sdio.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. /*
  2. * Intel Wireless WiMAX Connection 2400m
  3. * Linux driver model glue for the SDIO device, reset & fw upload
  4. *
  5. *
  6. * Copyright (C) 2007-2008 Intel Corporation <linux-wimax@intel.com>
  7. * Dirk Brandewie <dirk.j.brandewie@intel.com>
  8. * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
  9. * Yanir Lubetkin <yanirx.lubetkin@intel.com>
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License version
  13. * 2 as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  23. * 02110-1301, USA.
  24. *
  25. *
  26. * See i2400m-sdio.h for a general description of this driver.
  27. *
  28. * This file implements driver model glue, and hook ups for the
  29. * generic driver to implement the bus-specific functions (device
  30. * communication setup/tear down, firmware upload and resetting).
  31. *
  32. * ROADMAP
  33. *
  34. * i2400m_probe()
  35. * alloc_netdev()
  36. * i2400ms_netdev_setup()
  37. * i2400ms_init()
  38. * i2400m_netdev_setup()
  39. * i2400ms_enable_function()
  40. * i2400m_setup()
  41. *
  42. * i2400m_remove()
  43. * i2400m_release()
  44. * free_netdev(net_dev)
  45. *
  46. * i2400ms_bus_reset() Called by i2400m_reset
  47. * __i2400ms_reset()
  48. * __i2400ms_send_barker()
  49. */
  50. #include <linux/slab.h>
  51. #include <linux/debugfs.h>
  52. #include <linux/mmc/sdio_ids.h>
  53. #include <linux/mmc/sdio.h>
  54. #include <linux/mmc/sdio_func.h>
  55. #include "i2400m-sdio.h"
  56. #include <linux/wimax/i2400m.h>
  57. #include <linux/module.h>
  58. #define D_SUBMODULE main
  59. #include "sdio-debug-levels.h"
  60. /* IOE WiMAX function timeout in seconds */
  61. static int ioe_timeout = 2;
  62. module_param(ioe_timeout, int, 0);
  63. static char i2400ms_debug_params[128];
  64. module_param_string(debug, i2400ms_debug_params, sizeof(i2400ms_debug_params),
  65. 0644);
  66. MODULE_PARM_DESC(debug,
  67. "String of space-separated NAME:VALUE pairs, where NAMEs "
  68. "are the different debug submodules and VALUE are the "
  69. "initial debug value to set.");
  70. /* Our firmware file name list */
  71. static const char *i2400ms_bus_fw_names[] = {
  72. #define I2400MS_FW_FILE_NAME "i2400m-fw-sdio-1.3.sbcf"
  73. I2400MS_FW_FILE_NAME,
  74. NULL
  75. };
  76. static const struct i2400m_poke_table i2400ms_pokes[] = {
  77. I2400M_FW_POKE(0x6BE260, 0x00000088),
  78. I2400M_FW_POKE(0x080550, 0x00000005),
  79. I2400M_FW_POKE(0xAE0000, 0x00000000),
  80. I2400M_FW_POKE(0x000000, 0x00000000), /* MUST be 0 terminated or bad
  81. * things will happen */
  82. };
  83. /*
  84. * Enable the SDIO function
  85. *
  86. * Tries to enable the SDIO function; might fail if it is still not
  87. * ready (in some hardware, the SDIO WiMAX function is only enabled
  88. * when we ask it to explicitly doing). Tries until a timeout is
  89. * reached.
  90. *
  91. * The @maxtries argument indicates how many times (at most) it should
  92. * be tried to enable the function. 0 means forever. This acts along
  93. * with the timeout (ie: it'll stop trying as soon as the maximum
  94. * number of tries is reached _or_ as soon as the timeout is reached).
  95. *
  96. * The reverse of this is...sdio_disable_function()
  97. *
  98. * Returns: 0 if the SDIO function was enabled, < 0 errno code on
  99. * error (-ENODEV when it was unable to enable the function).
  100. */
  101. static
  102. int i2400ms_enable_function(struct i2400ms *i2400ms, unsigned maxtries)
  103. {
  104. struct sdio_func *func = i2400ms->func;
  105. u64 timeout;
  106. int err;
  107. struct device *dev = &func->dev;
  108. unsigned tries = 0;
  109. d_fnstart(3, dev, "(func %p)\n", func);
  110. /* Setup timeout (FIXME: This needs to read the CIS table to
  111. * get a real timeout) and then wait for the device to signal
  112. * it is ready */
  113. timeout = get_jiffies_64() + ioe_timeout * HZ;
  114. err = -ENODEV;
  115. while (err != 0 && time_before64(get_jiffies_64(), timeout)) {
  116. sdio_claim_host(func);
  117. /*
  118. * There is a sillicon bug on the IWMC3200, where the
  119. * IOE timeout will cause problems on Moorestown
  120. * platforms (system hang). We explicitly overwrite
  121. * func->enable_timeout here to work around the issue.
  122. */
  123. if (i2400ms->iwmc3200)
  124. func->enable_timeout = IWMC3200_IOR_TIMEOUT;
  125. err = sdio_enable_func(func);
  126. if (0 == err) {
  127. sdio_release_host(func);
  128. d_printf(2, dev, "SDIO function enabled\n");
  129. goto function_enabled;
  130. }
  131. d_printf(2, dev, "SDIO function failed to enable: %d\n", err);
  132. sdio_release_host(func);
  133. if (maxtries > 0 && ++tries >= maxtries) {
  134. err = -ETIME;
  135. break;
  136. }
  137. msleep(I2400MS_INIT_SLEEP_INTERVAL);
  138. }
  139. /* If timed out, device is not there yet -- get -ENODEV so
  140. * the device driver core will retry later on. */
  141. if (err == -ETIME) {
  142. dev_err(dev, "Can't enable WiMAX function; "
  143. " has the function been enabled?\n");
  144. err = -ENODEV;
  145. }
  146. function_enabled:
  147. d_fnend(3, dev, "(func %p) = %d\n", func, err);
  148. return err;
  149. }
  150. /*
  151. * Setup minimal device communication infrastructure needed to at
  152. * least be able to update the firmware.
  153. *
  154. * Note the ugly trick: if we are in the probe path
  155. * (i2400ms->debugfs_dentry == NULL), we only retry function
  156. * enablement one, to avoid racing with the iwmc3200 top controller.
  157. */
  158. static
  159. int i2400ms_bus_setup(struct i2400m *i2400m)
  160. {
  161. int result;
  162. struct i2400ms *i2400ms =
  163. container_of(i2400m, struct i2400ms, i2400m);
  164. struct device *dev = i2400m_dev(i2400m);
  165. struct sdio_func *func = i2400ms->func;
  166. int retries;
  167. sdio_claim_host(func);
  168. result = sdio_set_block_size(func, I2400MS_BLK_SIZE);
  169. sdio_release_host(func);
  170. if (result < 0) {
  171. dev_err(dev, "Failed to set block size: %d\n", result);
  172. goto error_set_blk_size;
  173. }
  174. if (i2400ms->iwmc3200 && i2400ms->debugfs_dentry == NULL)
  175. retries = 1;
  176. else
  177. retries = 0;
  178. result = i2400ms_enable_function(i2400ms, retries);
  179. if (result < 0) {
  180. dev_err(dev, "Cannot enable SDIO function: %d\n", result);
  181. goto error_func_enable;
  182. }
  183. result = i2400ms_tx_setup(i2400ms);
  184. if (result < 0)
  185. goto error_tx_setup;
  186. result = i2400ms_rx_setup(i2400ms);
  187. if (result < 0)
  188. goto error_rx_setup;
  189. return 0;
  190. error_rx_setup:
  191. i2400ms_tx_release(i2400ms);
  192. error_tx_setup:
  193. sdio_claim_host(func);
  194. sdio_disable_func(func);
  195. sdio_release_host(func);
  196. error_func_enable:
  197. error_set_blk_size:
  198. return result;
  199. }
  200. /*
  201. * Tear down minimal device communication infrastructure needed to at
  202. * least be able to update the firmware.
  203. */
  204. static
  205. void i2400ms_bus_release(struct i2400m *i2400m)
  206. {
  207. struct i2400ms *i2400ms =
  208. container_of(i2400m, struct i2400ms, i2400m);
  209. struct sdio_func *func = i2400ms->func;
  210. i2400ms_rx_release(i2400ms);
  211. i2400ms_tx_release(i2400ms);
  212. sdio_claim_host(func);
  213. sdio_disable_func(func);
  214. sdio_release_host(func);
  215. }
  216. /*
  217. * Setup driver resources needed to communicate with the device
  218. *
  219. * The fw needs some time to settle, and it was just uploaded,
  220. * so give it a break first. I'd prefer to just wait for the device to
  221. * send something, but seems the poking we do to enable SDIO stuff
  222. * interferes with it, so just give it a break before starting...
  223. */
  224. static
  225. int i2400ms_bus_dev_start(struct i2400m *i2400m)
  226. {
  227. struct i2400ms *i2400ms = container_of(i2400m, struct i2400ms, i2400m);
  228. struct sdio_func *func = i2400ms->func;
  229. struct device *dev = &func->dev;
  230. d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
  231. msleep(200);
  232. d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, 0);
  233. return 0;
  234. }
  235. /*
  236. * Sends a barker buffer to the device
  237. *
  238. * This helper will allocate a kmalloced buffer and use it to transmit
  239. * (then free it). Reason for this is that the SDIO host controller
  240. * expects alignment (unknown exactly which) which the stack won't
  241. * really provide and certain arches/host-controller combinations
  242. * cannot use stack/vmalloc/text areas for DMA transfers.
  243. */
  244. static
  245. int __i2400ms_send_barker(struct i2400ms *i2400ms,
  246. const __le32 *barker, size_t barker_size)
  247. {
  248. int ret;
  249. struct sdio_func *func = i2400ms->func;
  250. struct device *dev = &func->dev;
  251. void *buffer;
  252. ret = -ENOMEM;
  253. buffer = kmalloc(I2400MS_BLK_SIZE, GFP_KERNEL);
  254. if (buffer == NULL)
  255. goto error_kzalloc;
  256. memcpy(buffer, barker, barker_size);
  257. sdio_claim_host(func);
  258. ret = sdio_memcpy_toio(func, 0, buffer, I2400MS_BLK_SIZE);
  259. sdio_release_host(func);
  260. if (ret < 0)
  261. d_printf(0, dev, "E: barker error: %d\n", ret);
  262. kfree(buffer);
  263. error_kzalloc:
  264. return ret;
  265. }
  266. /*
  267. * Reset a device at different levels (warm, cold or bus)
  268. *
  269. * @i2400ms: device descriptor
  270. * @reset_type: soft, warm or bus reset (I2400M_RT_WARM/SOFT/BUS)
  271. *
  272. * FIXME: not tested -- need to confirm expected effects
  273. *
  274. * Warm and cold resets get an SDIO reset if they fail (unimplemented)
  275. *
  276. * Warm reset:
  277. *
  278. * The device will be fully reset internally, but won't be
  279. * disconnected from the bus (so no reenumeration will
  280. * happen). Firmware upload will be necessary.
  281. *
  282. * The device will send a reboot barker that will trigger the driver
  283. * to reinitialize the state via __i2400m_dev_reset_handle.
  284. *
  285. *
  286. * Cold and bus reset:
  287. *
  288. * The device will be fully reset internally, disconnected from the
  289. * bus an a reenumeration will happen. Firmware upload will be
  290. * necessary. Thus, we don't do any locking or struct
  291. * reinitialization, as we are going to be fully disconnected and
  292. * reenumerated.
  293. *
  294. * Note we need to return -ENODEV if a warm reset was requested and we
  295. * had to resort to a bus reset. See i2400m_op_reset(), wimax_reset()
  296. * and wimax_dev->op_reset.
  297. *
  298. * WARNING: no driver state saved/fixed
  299. */
  300. static
  301. int i2400ms_bus_reset(struct i2400m *i2400m, enum i2400m_reset_type rt)
  302. {
  303. int result = 0;
  304. struct i2400ms *i2400ms =
  305. container_of(i2400m, struct i2400ms, i2400m);
  306. struct device *dev = i2400m_dev(i2400m);
  307. static const __le32 i2400m_WARM_BOOT_BARKER[4] = {
  308. cpu_to_le32(I2400M_WARM_RESET_BARKER),
  309. cpu_to_le32(I2400M_WARM_RESET_BARKER),
  310. cpu_to_le32(I2400M_WARM_RESET_BARKER),
  311. cpu_to_le32(I2400M_WARM_RESET_BARKER),
  312. };
  313. static const __le32 i2400m_COLD_BOOT_BARKER[4] = {
  314. cpu_to_le32(I2400M_COLD_RESET_BARKER),
  315. cpu_to_le32(I2400M_COLD_RESET_BARKER),
  316. cpu_to_le32(I2400M_COLD_RESET_BARKER),
  317. cpu_to_le32(I2400M_COLD_RESET_BARKER),
  318. };
  319. if (rt == I2400M_RT_WARM)
  320. result = __i2400ms_send_barker(i2400ms, i2400m_WARM_BOOT_BARKER,
  321. sizeof(i2400m_WARM_BOOT_BARKER));
  322. else if (rt == I2400M_RT_COLD)
  323. result = __i2400ms_send_barker(i2400ms, i2400m_COLD_BOOT_BARKER,
  324. sizeof(i2400m_COLD_BOOT_BARKER));
  325. else if (rt == I2400M_RT_BUS) {
  326. do_bus_reset:
  327. i2400ms_bus_release(i2400m);
  328. /* Wait for the device to settle */
  329. msleep(40);
  330. result = i2400ms_bus_setup(i2400m);
  331. } else
  332. BUG();
  333. if (result < 0 && rt != I2400M_RT_BUS) {
  334. dev_err(dev, "%s reset failed (%d); trying SDIO reset\n",
  335. rt == I2400M_RT_WARM ? "warm" : "cold", result);
  336. rt = I2400M_RT_BUS;
  337. goto do_bus_reset;
  338. }
  339. return result;
  340. }
  341. static
  342. void i2400ms_netdev_setup(struct net_device *net_dev)
  343. {
  344. struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
  345. struct i2400ms *i2400ms = container_of(i2400m, struct i2400ms, i2400m);
  346. i2400ms_init(i2400ms);
  347. i2400m_netdev_setup(net_dev);
  348. }
  349. /*
  350. * Debug levels control; see debug.h
  351. */
  352. struct d_level D_LEVEL[] = {
  353. D_SUBMODULE_DEFINE(main),
  354. D_SUBMODULE_DEFINE(tx),
  355. D_SUBMODULE_DEFINE(rx),
  356. D_SUBMODULE_DEFINE(fw),
  357. };
  358. size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL);
  359. #define __debugfs_register(prefix, name, parent) \
  360. do { \
  361. result = d_level_register_debugfs(prefix, name, parent); \
  362. if (result < 0) \
  363. goto error; \
  364. } while (0)
  365. static
  366. int i2400ms_debugfs_add(struct i2400ms *i2400ms)
  367. {
  368. int result;
  369. struct dentry *dentry = i2400ms->i2400m.wimax_dev.debugfs_dentry;
  370. dentry = debugfs_create_dir("i2400m-sdio", dentry);
  371. result = PTR_ERR(dentry);
  372. if (IS_ERR(dentry)) {
  373. if (result == -ENODEV)
  374. result = 0; /* No debugfs support */
  375. goto error;
  376. }
  377. i2400ms->debugfs_dentry = dentry;
  378. __debugfs_register("dl_", main, dentry);
  379. __debugfs_register("dl_", tx, dentry);
  380. __debugfs_register("dl_", rx, dentry);
  381. __debugfs_register("dl_", fw, dentry);
  382. return 0;
  383. error:
  384. debugfs_remove_recursive(i2400ms->debugfs_dentry);
  385. i2400ms->debugfs_dentry = NULL;
  386. return result;
  387. }
  388. static struct device_type i2400ms_type = {
  389. .name = "wimax",
  390. };
  391. /*
  392. * Probe a i2400m interface and register it
  393. *
  394. * @func: SDIO function
  395. * @id: SDIO device ID
  396. * @returns: 0 if ok, < 0 errno code on error.
  397. *
  398. * Alloc a net device, initialize the bus-specific details and then
  399. * calls the bus-generic initialization routine. That will register
  400. * the wimax and netdev devices, upload the firmware [using
  401. * _bus_bm_*()], call _bus_dev_start() to finalize the setup of the
  402. * communication with the device and then will start to talk to it to
  403. * finnish setting it up.
  404. *
  405. * Initialization is tricky; some instances of the hw are packed with
  406. * others in a way that requires a third driver that enables the WiMAX
  407. * function. In those cases, we can't enable the SDIO function and
  408. * we'll return with -ENODEV. When the driver that enables the WiMAX
  409. * function does its thing, it has to do a bus_rescan_devices() on the
  410. * SDIO bus so this driver is called again to enumerate the WiMAX
  411. * function.
  412. */
  413. static
  414. int i2400ms_probe(struct sdio_func *func,
  415. const struct sdio_device_id *id)
  416. {
  417. int result;
  418. struct net_device *net_dev;
  419. struct device *dev = &func->dev;
  420. struct i2400m *i2400m;
  421. struct i2400ms *i2400ms;
  422. /* Allocate instance [calls i2400m_netdev_setup() on it]. */
  423. result = -ENOMEM;
  424. net_dev = alloc_netdev(sizeof(*i2400ms), "wmx%d",
  425. i2400ms_netdev_setup);
  426. if (net_dev == NULL) {
  427. dev_err(dev, "no memory for network device instance\n");
  428. goto error_alloc_netdev;
  429. }
  430. SET_NETDEV_DEV(net_dev, dev);
  431. SET_NETDEV_DEVTYPE(net_dev, &i2400ms_type);
  432. i2400m = net_dev_to_i2400m(net_dev);
  433. i2400ms = container_of(i2400m, struct i2400ms, i2400m);
  434. i2400m->wimax_dev.net_dev = net_dev;
  435. i2400ms->func = func;
  436. sdio_set_drvdata(func, i2400ms);
  437. i2400m->bus_tx_block_size = I2400MS_BLK_SIZE;
  438. /*
  439. * Room required in the TX queue for SDIO message to accommodate
  440. * a smallest payload while allocating header space is 224 bytes,
  441. * which is the smallest message size(the block size 256 bytes)
  442. * minus the smallest message header size(32 bytes).
  443. */
  444. i2400m->bus_tx_room_min = I2400MS_BLK_SIZE - I2400M_PL_ALIGN * 2;
  445. i2400m->bus_pl_size_max = I2400MS_PL_SIZE_MAX;
  446. i2400m->bus_setup = i2400ms_bus_setup;
  447. i2400m->bus_dev_start = i2400ms_bus_dev_start;
  448. i2400m->bus_dev_stop = NULL;
  449. i2400m->bus_release = i2400ms_bus_release;
  450. i2400m->bus_tx_kick = i2400ms_bus_tx_kick;
  451. i2400m->bus_reset = i2400ms_bus_reset;
  452. /* The iwmc3200-wimax sometimes requires the driver to try
  453. * hard when we paint it into a corner. */
  454. i2400m->bus_bm_retries = I2400M_SDIO_BOOT_RETRIES;
  455. i2400m->bus_bm_cmd_send = i2400ms_bus_bm_cmd_send;
  456. i2400m->bus_bm_wait_for_ack = i2400ms_bus_bm_wait_for_ack;
  457. i2400m->bus_fw_names = i2400ms_bus_fw_names;
  458. i2400m->bus_bm_mac_addr_impaired = 1;
  459. i2400m->bus_bm_pokes_table = &i2400ms_pokes[0];
  460. switch (func->device) {
  461. case SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX:
  462. case SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5:
  463. i2400ms->iwmc3200 = 1;
  464. break;
  465. default:
  466. i2400ms->iwmc3200 = 0;
  467. }
  468. result = i2400m_setup(i2400m, I2400M_BRI_NO_REBOOT);
  469. if (result < 0) {
  470. dev_err(dev, "cannot setup device: %d\n", result);
  471. goto error_setup;
  472. }
  473. result = i2400ms_debugfs_add(i2400ms);
  474. if (result < 0) {
  475. dev_err(dev, "cannot create SDIO debugfs: %d\n",
  476. result);
  477. goto error_debugfs_add;
  478. }
  479. return 0;
  480. error_debugfs_add:
  481. i2400m_release(i2400m);
  482. error_setup:
  483. sdio_set_drvdata(func, NULL);
  484. free_netdev(net_dev);
  485. error_alloc_netdev:
  486. return result;
  487. }
  488. static
  489. void i2400ms_remove(struct sdio_func *func)
  490. {
  491. struct device *dev = &func->dev;
  492. struct i2400ms *i2400ms = sdio_get_drvdata(func);
  493. struct i2400m *i2400m = &i2400ms->i2400m;
  494. struct net_device *net_dev = i2400m->wimax_dev.net_dev;
  495. d_fnstart(3, dev, "SDIO func %p\n", func);
  496. debugfs_remove_recursive(i2400ms->debugfs_dentry);
  497. i2400ms->debugfs_dentry = NULL;
  498. i2400m_release(i2400m);
  499. sdio_set_drvdata(func, NULL);
  500. free_netdev(net_dev);
  501. d_fnend(3, dev, "SDIO func %p\n", func);
  502. }
  503. static
  504. const struct sdio_device_id i2400ms_sdio_ids[] = {
  505. /* Intel: i2400m WiMAX (iwmc3200) over SDIO */
  506. { SDIO_DEVICE(SDIO_VENDOR_ID_INTEL,
  507. SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX) },
  508. { SDIO_DEVICE(SDIO_VENDOR_ID_INTEL,
  509. SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5) },
  510. { /* end: all zeroes */ },
  511. };
  512. MODULE_DEVICE_TABLE(sdio, i2400ms_sdio_ids);
  513. static
  514. struct sdio_driver i2400m_sdio_driver = {
  515. .name = KBUILD_MODNAME,
  516. .probe = i2400ms_probe,
  517. .remove = i2400ms_remove,
  518. .id_table = i2400ms_sdio_ids,
  519. };
  520. static
  521. int __init i2400ms_driver_init(void)
  522. {
  523. d_parse_params(D_LEVEL, D_LEVEL_SIZE, i2400ms_debug_params,
  524. "i2400m_sdio.debug");
  525. return sdio_register_driver(&i2400m_sdio_driver);
  526. }
  527. module_init(i2400ms_driver_init);
  528. static
  529. void __exit i2400ms_driver_exit(void)
  530. {
  531. sdio_unregister_driver(&i2400m_sdio_driver);
  532. }
  533. module_exit(i2400ms_driver_exit);
  534. MODULE_AUTHOR("Intel Corporation <linux-wimax@intel.com>");
  535. MODULE_DESCRIPTION("Intel 2400M WiMAX networking for SDIO");
  536. MODULE_LICENSE("GPL");
  537. MODULE_FIRMWARE(I2400MS_FW_FILE_NAME);