1 /*
2 * SDIO access interface for drivers - linux specific (pci only)
3 *
4 * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
5 *
6 * Copyright (C) 1999-2017, Broadcom Corporation
7 *
8 * Unless you and Broadcom execute a separate written software license
9 * agreement governing use of this software, this software is licensed to you
10 * under the terms of the GNU General Public License version 2 (the "GPL"),
11 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
12 * following added to such license:
13 *
14 * As a special exception, the copyright holders of this software give you
15 * permission to link this software with independent modules, and to copy and
16 * distribute the resulting executable under terms of your choice, provided that
17 * you also meet, for each linked independent module, the terms and conditions of
18 * the license of that module. An independent module is a module which is not
19 * derived from this software. The special exception does not apply to any
20 * modifications of the software.
21 *
22 * Notwithstanding the above, under no circumstances may you combine this
23 * software in any way with any other Broadcom software provided under a license
24 * other than the GPL, without Broadcom's express prior written consent.
25 *
26 *
27 * <<Broadcom-WL-IPTag/Open:>>
28 *
29 * $Id: bcmsdh_linux.c 689948 2017-03-14 05:21:03Z $
30 */
31
32 /**
33 * @file bcmsdh_linux.c
34 */
35
36 #define __UNDEF_NO_VERSION__
37
38 #include <typedefs.h>
39 #include <linuxver.h>
40 #include <linux/pci.h>
41 #include <linux/completion.h>
42
43 #include <osl.h>
44 #include <pcicfg.h>
45 #include <bcmdefs.h>
46 #include <bcmdevs.h>
47 #include <linux/irq.h>
48 extern void dhdsdio_isr(void * args);
49 #include <bcmutils.h>
50 #include <dngl_stats.h>
51 #include <dhd.h>
52 #include <dhd_linux.h>
53
54 /* driver info, initialized when bcmsdh_register is called */
55 static bcmsdh_driver_t drvinfo = {NULL, NULL, NULL, NULL};
56
57 typedef enum {
58 DHD_INTR_INVALID = 0,
59 DHD_INTR_INBAND,
60 DHD_INTR_HWOOB,
61 DHD_INTR_SWOOB
62 } DHD_HOST_INTR_TYPE;
63
64 /* the BCMSDH module comprises the generic part (bcmsdh.c) and OS specific layer (e.g.
65 * bcmsdh_linux.c). Put all OS specific variables (e.g. irq number and flags) here rather
66 * than in the common structure bcmsdh_info. bcmsdh_info only keeps a handle (os_ctx) to this
67 * structure.
68 */
69 typedef struct bcmsdh_os_info {
70 DHD_HOST_INTR_TYPE intr_type;
71 int oob_irq_num; /* valid when hardware or software oob in use */
72 unsigned long oob_irq_flags; /* valid when hardware or software oob in use */
73 bool oob_irq_registered;
74 bool oob_irq_enabled;
75 bool oob_irq_wake_enabled;
76 spinlock_t oob_irq_spinlock;
77 bcmsdh_cb_fn_t oob_irq_handler;
78 void *oob_irq_handler_context;
79 void *context; /* context returned from upper layer */
80 void *sdioh; /* handle to lower layer (sdioh) */
81 void *dev; /* handle to the underlying device */
82 bool dev_wake_enabled;
83 } bcmsdh_os_info_t;
84
85 /* debugging macros */
86 #define SDLX_MSG(x)
87
88 /**
89 * Checks to see if vendor and device IDs match a supported SDIO Host Controller.
90 */
91 bool
bcmsdh_chipmatch(uint16 vendor,uint16 device)92 bcmsdh_chipmatch(uint16 vendor, uint16 device)
93 {
94 /* Add other vendors and devices as required */
95
96 #ifdef BCMSDIOH_STD
97 /* Check for Arasan host controller */
98 if (vendor == VENDOR_SI_IMAGE) {
99 return (TRUE);
100 }
101 if (device == SDIOH_FPGA_ID && vendor == VENDOR_CYPRESS) {
102 return (TRUE);
103 }
104 /* Check for BRCM 27XX Standard host controller */
105 if (device == BCM27XX_SDIOH_ID && vendor == VENDOR_BROADCOM) {
106 return (TRUE);
107 }
108 /* Check for BRCM Standard host controller */
109 if (device == SDIOH_FPGA_ID && vendor == VENDOR_BROADCOM) {
110 return (TRUE);
111 }
112 /* Check for TI PCIxx21 Standard host controller */
113 if (device == PCIXX21_SDIOH_ID && vendor == VENDOR_TI) {
114 return (TRUE);
115 }
116 if (device == PCIXX21_SDIOH0_ID && vendor == VENDOR_TI) {
117 return (TRUE);
118 }
119 /* Ricoh R5C822 Standard SDIO Host */
120 if (device == R5C822_SDIOH_ID && vendor == VENDOR_RICOH) {
121 return (TRUE);
122 }
123 /* JMicron Standard SDIO Host */
124 if (device == JMICRON_SDIOH_ID && vendor == VENDOR_JMICRON) {
125 return (TRUE);
126 }
127
128 #endif /* BCMSDIOH_STD */
129 #ifdef BCMSDIOH_SPI
130 /* This is the PciSpiHost. */
131 if (device == SPIH_FPGA_ID && vendor == VENDOR_BROADCOM) {
132 printf("Found PCI SPI Host Controller\n");
133 return (TRUE);
134 }
135
136 #endif /* BCMSDIOH_SPI */
137
138 return (FALSE);
139 }
140
bcmsdh_probe(osl_t * osh,void * dev,void * sdioh,void * adapter_info,uint bus_type,uint bus_num,uint slot_num)141 void* bcmsdh_probe(osl_t *osh, void *dev, void *sdioh, void *adapter_info, uint bus_type,
142 uint bus_num, uint slot_num)
143 {
144 ulong regs;
145 bcmsdh_info_t *bcmsdh;
146 uint32 vendevid;
147 bcmsdh_os_info_t *bcmsdh_osinfo = NULL;
148
149 bcmsdh = bcmsdh_attach(osh, sdioh, ®s);
150 if (bcmsdh == NULL) {
151 SDLX_MSG(("%s: bcmsdh_attach failed\n", __FUNCTION__));
152 goto err;
153 }
154 bcmsdh_osinfo = MALLOC(osh, sizeof(bcmsdh_os_info_t));
155 if (bcmsdh_osinfo == NULL) {
156 SDLX_MSG(("%s: failed to allocate bcmsdh_os_info_t\n", __FUNCTION__));
157 goto err;
158 }
159 bzero((char *)bcmsdh_osinfo, sizeof(bcmsdh_os_info_t));
160 bcmsdh->os_cxt = bcmsdh_osinfo;
161 bcmsdh_osinfo->sdioh = sdioh;
162 bcmsdh_osinfo->dev = dev;
163 osl_set_bus_handle(osh, bcmsdh);
164
165 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
166 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
167 if (dev && device_init_wakeup(dev, true) == 0)
168 bcmsdh_osinfo->dev_wake_enabled = TRUE;
169 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
170 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
171 */
172
173 #if defined(OOB_INTR_ONLY)
174 spin_lock_init(&bcmsdh_osinfo->oob_irq_spinlock);
175 /* Get customer specific OOB IRQ parametres: IRQ number as IRQ type */
176 bcmsdh_osinfo->oob_irq_num = wifi_platform_get_irq_number(adapter_info,
177 &bcmsdh_osinfo->oob_irq_flags);
178 if (bcmsdh_osinfo->oob_irq_num < 0) {
179 SDLX_MSG(("%s: Host OOB irq is not defined\n", __FUNCTION__));
180 goto err;
181 }
182 #endif /* defined(BCMLXSDMMC) */
183
184 /* Read the vendor/device ID from the CIS */
185 vendevid = bcmsdh_query_device(bcmsdh);
186
187 /* try to attach to the target device */
188 #if defined(BCMSPI) && (defined(BCMPCISPIHOST) || defined(BCMSDIOH_SPI))
189 bcmsdh_osinfo->context = drvinfo.probe((vendevid >> 16), (vendevid & 0xFFFF), bus_num,
190 slot_num, 0, bus_type, (void *)regs, NULL, bcmsdh);
191 #else
192 bcmsdh_osinfo->context = drvinfo.probe((vendevid >> 16), (vendevid & 0xFFFF), bus_num,
193 slot_num, 0, bus_type, (void *)regs, osh, bcmsdh);
194 #endif /* BCMSPI && (BCMPCISPIHOST || BCMSDIOH_SPI) */
195 if (bcmsdh_osinfo->context == NULL) {
196 SDLX_MSG(("%s: device attach failed\n", __FUNCTION__));
197 goto err;
198 }
199
200 return bcmsdh;
201
202 /* error handling */
203 err:
204 if (bcmsdh != NULL)
205 bcmsdh_detach(osh, bcmsdh);
206 if (bcmsdh_osinfo != NULL)
207 MFREE(osh, bcmsdh_osinfo, sizeof(bcmsdh_os_info_t));
208 return NULL;
209 }
210
bcmsdh_remove(bcmsdh_info_t * bcmsdh)211 int bcmsdh_remove(bcmsdh_info_t *bcmsdh)
212 {
213 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
214
215 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
216 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
217 if (bcmsdh_osinfo->dev)
218 device_init_wakeup(bcmsdh_osinfo->dev, false);
219 bcmsdh_osinfo->dev_wake_enabled = FALSE;
220 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
221 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
222 */
223
224 drvinfo.remove(bcmsdh_osinfo->context);
225 MFREE(bcmsdh->osh, bcmsdh->os_cxt, sizeof(bcmsdh_os_info_t));
226 bcmsdh_detach(bcmsdh->osh, bcmsdh);
227
228 return 0;
229 }
230
231 #ifdef DHD_WAKE_STATUS
bcmsdh_get_total_wake(bcmsdh_info_t * bcmsdh)232 int bcmsdh_get_total_wake(bcmsdh_info_t *bcmsdh)
233 {
234 return bcmsdh->total_wake_count;
235 }
236
bcmsdh_set_get_wake(bcmsdh_info_t * bcmsdh,int flag)237 int bcmsdh_set_get_wake(bcmsdh_info_t *bcmsdh, int flag)
238 {
239 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
240 unsigned long flags;
241 int ret;
242
243 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags);
244
245 ret = bcmsdh->pkt_wake;
246 bcmsdh->total_wake_count += flag;
247 bcmsdh->pkt_wake = flag;
248
249 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags);
250 return ret;
251 }
252 #endif /* DHD_WAKE_STATUS */
253
bcmsdh_suspend(bcmsdh_info_t * bcmsdh)254 int bcmsdh_suspend(bcmsdh_info_t *bcmsdh)
255 {
256 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
257
258 if (drvinfo.suspend && drvinfo.suspend(bcmsdh_osinfo->context))
259 return -EBUSY;
260 return 0;
261 }
262
bcmsdh_resume(bcmsdh_info_t * bcmsdh)263 int bcmsdh_resume(bcmsdh_info_t *bcmsdh)
264 {
265 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
266
267 if (drvinfo.resume)
268 return drvinfo.resume(bcmsdh_osinfo->context);
269 return 0;
270 }
271
272 extern int bcmsdh_register_client_driver(void);
273 extern void bcmsdh_unregister_client_driver(void);
274 extern int sdio_func_reg_notify(void* semaphore);
275 extern void sdio_func_unreg_notify(void);
276
277 #if defined(BCMLXSDMMC)
bcmsdh_reg_sdio_notify(void * semaphore)278 int bcmsdh_reg_sdio_notify(void* semaphore)
279 {
280 return sdio_func_reg_notify(semaphore);
281 }
282
bcmsdh_unreg_sdio_notify(void)283 void bcmsdh_unreg_sdio_notify(void)
284 {
285 sdio_func_unreg_notify();
286 }
287 #endif /* defined(BCMLXSDMMC) */
288
289 int
bcmsdh_register(bcmsdh_driver_t * driver)290 bcmsdh_register(bcmsdh_driver_t *driver)
291 {
292 int error = 0;
293
294 drvinfo = *driver;
295 SDLX_MSG(("%s: register client driver\n", __FUNCTION__));
296 error = bcmsdh_register_client_driver();
297 if (error)
298 SDLX_MSG(("%s: failed %d\n", __FUNCTION__, error));
299
300 return error;
301 }
302
303 void
bcmsdh_unregister(void)304 bcmsdh_unregister(void)
305 {
306 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0))
307 if (bcmsdh_pci_driver.node.next == NULL)
308 return;
309 #endif // endif
310
311 bcmsdh_unregister_client_driver();
312 }
313
bcmsdh_dev_pm_stay_awake(bcmsdh_info_t * bcmsdh)314 void bcmsdh_dev_pm_stay_awake(bcmsdh_info_t *bcmsdh)
315 {
316 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
317 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
318 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
319 pm_stay_awake(bcmsdh_osinfo->dev);
320 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
321 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
322 */
323 }
324
bcmsdh_dev_relax(bcmsdh_info_t * bcmsdh)325 void bcmsdh_dev_relax(bcmsdh_info_t *bcmsdh)
326 {
327 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
328 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
329 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
330 pm_relax(bcmsdh_osinfo->dev);
331 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
332 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
333 */
334 }
335
bcmsdh_dev_pm_enabled(bcmsdh_info_t * bcmsdh)336 bool bcmsdh_dev_pm_enabled(bcmsdh_info_t *bcmsdh)
337 {
338 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
339
340 return bcmsdh_osinfo->dev_wake_enabled;
341 }
342
343 #if defined(OOB_INTR_ONLY) || defined(BCMSPI_ANDROID)
bcmsdh_oob_intr_set(bcmsdh_info_t * bcmsdh,bool enable)344 void bcmsdh_oob_intr_set(bcmsdh_info_t *bcmsdh, bool enable)
345 {
346 unsigned long flags;
347 bcmsdh_os_info_t *bcmsdh_osinfo;
348
349 if (!bcmsdh)
350 return;
351
352 bcmsdh_osinfo = bcmsdh->os_cxt;
353 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags);
354 if (bcmsdh_osinfo->oob_irq_enabled != enable) {
355 if (enable)
356 enable_irq(bcmsdh_osinfo->oob_irq_num);
357 else
358 disable_irq_nosync(bcmsdh_osinfo->oob_irq_num);
359 bcmsdh_osinfo->oob_irq_enabled = enable;
360 }
361 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags);
362 }
363
wlan_oob_irq(int irq,void * dev_id)364 static irqreturn_t wlan_oob_irq(int irq, void *dev_id)
365 {
366 bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *)dev_id;
367 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
368
369 #ifndef BCMSPI_ANDROID
370 bcmsdh_oob_intr_set(bcmsdh, FALSE);
371 #endif /* !BCMSPI_ANDROID */
372 bcmsdh_osinfo->oob_irq_handler(bcmsdh_osinfo->oob_irq_handler_context);
373
374 return IRQ_HANDLED;
375 }
376
bcmsdh_oob_intr_register(bcmsdh_info_t * bcmsdh,bcmsdh_cb_fn_t oob_irq_handler,void * oob_irq_handler_context)377 int bcmsdh_oob_intr_register(bcmsdh_info_t *bcmsdh, bcmsdh_cb_fn_t oob_irq_handler,
378 void* oob_irq_handler_context)
379 {
380 int err = 0;
381 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
382
383 SDLX_MSG(("%s: Enter\n", __FUNCTION__));
384 if (bcmsdh_osinfo->oob_irq_registered) {
385 SDLX_MSG(("%s: irq is already registered\n", __FUNCTION__));
386 return -EBUSY;
387 }
388 SDLX_MSG(("%s OOB irq=%d flags=%X \n", __FUNCTION__,
389 (int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags));
390 bcmsdh_osinfo->oob_irq_handler = oob_irq_handler;
391 bcmsdh_osinfo->oob_irq_handler_context = oob_irq_handler_context;
392 bcmsdh_osinfo->oob_irq_enabled = TRUE;
393 bcmsdh_osinfo->oob_irq_registered = TRUE;
394 err = request_irq(bcmsdh_osinfo->oob_irq_num, wlan_oob_irq,
395 bcmsdh_osinfo->oob_irq_flags, "bcmsdh_sdmmc", bcmsdh);
396 if (err) {
397 SDLX_MSG(("%s: request_irq failed with %d\n", __FUNCTION__, err));
398 bcmsdh_osinfo->oob_irq_enabled = FALSE;
399 bcmsdh_osinfo->oob_irq_registered = FALSE;
400 return err;
401 }
402
403 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
404 if (device_may_wakeup(bcmsdh_osinfo->dev)) {
405 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
406 err = enable_irq_wake(bcmsdh_osinfo->oob_irq_num);
407 if (!err)
408 bcmsdh_osinfo->oob_irq_wake_enabled = TRUE;
409 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
410 }
411 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
412 return err;
413 }
414
bcmsdh_oob_intr_unregister(bcmsdh_info_t * bcmsdh)415 void bcmsdh_oob_intr_unregister(bcmsdh_info_t *bcmsdh)
416 {
417 int err = 0;
418 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
419
420 SDLX_MSG(("%s: Enter\n", __FUNCTION__));
421 if (!bcmsdh_osinfo->oob_irq_registered) {
422 SDLX_MSG(("%s: irq is not registered\n", __FUNCTION__));
423 return;
424 }
425 if (bcmsdh_osinfo->oob_irq_wake_enabled) {
426 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
427 if (device_may_wakeup(bcmsdh_osinfo->dev)) {
428 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
429 err = disable_irq_wake(bcmsdh_osinfo->oob_irq_num);
430 if (!err)
431 bcmsdh_osinfo->oob_irq_wake_enabled = FALSE;
432 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
433 }
434 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
435 }
436 if (bcmsdh_osinfo->oob_irq_enabled) {
437 disable_irq(bcmsdh_osinfo->oob_irq_num);
438 bcmsdh_osinfo->oob_irq_enabled = FALSE;
439 }
440 free_irq(bcmsdh_osinfo->oob_irq_num, bcmsdh);
441 bcmsdh_osinfo->oob_irq_registered = FALSE;
442 }
443 #endif /* defined(OOB_INTR_ONLY) || defined(BCMSPI_ANDROID) */
444
445 /* Module parameters specific to each host-controller driver */
446
447 extern uint sd_msglevel; /* Debug message level */
448 module_param(sd_msglevel, uint, 0);
449
450 extern uint sd_power; /* 0 = SD Power OFF, 1 = SD Power ON. */
451 module_param(sd_power, uint, 0);
452
453 extern uint sd_clock; /* SD Clock Control, 0 = SD Clock OFF, 1 = SD Clock ON */
454 module_param(sd_clock, uint, 0);
455
456 extern uint sd_divisor; /* Divisor (-1 means external clock) */
457 module_param(sd_divisor, uint, 0);
458
459 extern uint sd_sdmode; /* Default is SD4, 0=SPI, 1=SD1, 2=SD4 */
460 module_param(sd_sdmode, uint, 0);
461
462 extern uint sd_hiok; /* Ok to use hi-speed mode */
463 module_param(sd_hiok, uint, 0);
464
465 extern uint sd_f2_blocksize;
466 module_param(sd_f2_blocksize, int, 0);
467
468 extern uint sd_f1_blocksize;
469 module_param(sd_f1_blocksize, int, 0);
470
471 #ifdef BCMSDIOH_STD
472 extern int sd_uhsimode;
473 module_param(sd_uhsimode, int, 0);
474 extern uint sd_tuning_period;
475 module_param(sd_tuning_period, uint, 0);
476 extern int sd_delay_value;
477 module_param(sd_delay_value, uint, 0);
478
479 /* SDIO Drive Strength for UHSI mode specific to SDIO3.0 */
480 extern char dhd_sdiod_uhsi_ds_override[2];
481 module_param_string(dhd_sdiod_uhsi_ds_override, dhd_sdiod_uhsi_ds_override, 2, 0);
482
483 #endif // endif
484
485
486
487
488 #ifdef BCMSDH_MODULE
489 EXPORT_SYMBOL(bcmsdh_attach);
490 EXPORT_SYMBOL(bcmsdh_detach);
491 EXPORT_SYMBOL(bcmsdh_intr_query);
492 EXPORT_SYMBOL(bcmsdh_intr_enable);
493 EXPORT_SYMBOL(bcmsdh_intr_disable);
494 EXPORT_SYMBOL(bcmsdh_intr_reg);
495 EXPORT_SYMBOL(bcmsdh_intr_dereg);
496
497 #if defined(DHD_DEBUG)
498 EXPORT_SYMBOL(bcmsdh_intr_pending);
499 #endif // endif
500
501 #if defined(BT_OVER_SDIO)
502 EXPORT_SYMBOL(bcmsdh_btsdio_interface_init);
503 #endif /* defined (BT_OVER_SDIO) */
504
505 EXPORT_SYMBOL(bcmsdh_devremove_reg);
506 EXPORT_SYMBOL(bcmsdh_cfg_read);
507 EXPORT_SYMBOL(bcmsdh_cfg_write);
508 EXPORT_SYMBOL(bcmsdh_cis_read);
509 EXPORT_SYMBOL(bcmsdh_reg_read);
510 EXPORT_SYMBOL(bcmsdh_reg_write);
511 EXPORT_SYMBOL(bcmsdh_regfail);
512 EXPORT_SYMBOL(bcmsdh_send_buf);
513 EXPORT_SYMBOL(bcmsdh_recv_buf);
514
515 EXPORT_SYMBOL(bcmsdh_rwdata);
516 EXPORT_SYMBOL(bcmsdh_abort);
517 EXPORT_SYMBOL(bcmsdh_query_device);
518 EXPORT_SYMBOL(bcmsdh_query_iofnum);
519 EXPORT_SYMBOL(bcmsdh_iovar_op);
520 EXPORT_SYMBOL(bcmsdh_register);
521 EXPORT_SYMBOL(bcmsdh_unregister);
522 EXPORT_SYMBOL(bcmsdh_chipmatch);
523 EXPORT_SYMBOL(bcmsdh_reset);
524 EXPORT_SYMBOL(bcmsdh_waitlockfree);
525
526 EXPORT_SYMBOL(bcmsdh_get_dstatus);
527 EXPORT_SYMBOL(bcmsdh_cfg_read_word);
528 EXPORT_SYMBOL(bcmsdh_cfg_write_word);
529 EXPORT_SYMBOL(bcmsdh_cur_sbwad);
530 EXPORT_SYMBOL(bcmsdh_chipinfo);
531
532 #endif /* BCMSDH_MODULE */
533