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