1 /*
2 * SDIO access interface for drivers - linux specific (pci only)
3 *
4 * Portions of this code are copyright (c) 2021 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 #ifdef DHD_DEBUG
87 #define SDLX_MSG(x) do { printf x; } while (0)
88 #else /* DHD_DEBUG */
89 #define SDLX_MSG(x)
90 #endif /* DHD_DEBUG */
91
92 /**
93 * Checks to see if vendor and device IDs match a supported SDIO Host Controller.
94 */
95 bool
bcmsdh_chipmatch(uint16 vendor,uint16 device)96 bcmsdh_chipmatch(uint16 vendor, uint16 device)
97 {
98 /* Add other vendors and devices as required */
99
100 #ifdef BCMSDIOH_STD
101 /* Check for Arasan host controller */
102 if (vendor == VENDOR_SI_IMAGE) {
103 return (TRUE);
104 }
105 if (device == SDIOH_FPGA_ID && vendor == VENDOR_CYPRESS) {
106 return (TRUE);
107 }
108 /* Check for BRCM 27XX Standard host controller */
109 if (device == BCM27XX_SDIOH_ID && vendor == VENDOR_BROADCOM) {
110 return (TRUE);
111 }
112 /* Check for BRCM Standard host controller */
113 if (device == SDIOH_FPGA_ID && vendor == VENDOR_BROADCOM) {
114 return (TRUE);
115 }
116 /* Check for TI PCIxx21 Standard host controller */
117 if (device == PCIXX21_SDIOH_ID && vendor == VENDOR_TI) {
118 return (TRUE);
119 }
120 if (device == PCIXX21_SDIOH0_ID && vendor == VENDOR_TI) {
121 return (TRUE);
122 }
123 /* Ricoh R5C822 Standard SDIO Host */
124 if (device == R5C822_SDIOH_ID && vendor == VENDOR_RICOH) {
125 return (TRUE);
126 }
127 /* JMicron Standard SDIO Host */
128 if (device == JMICRON_SDIOH_ID && vendor == VENDOR_JMICRON) {
129 return (TRUE);
130 }
131
132 #endif /* BCMSDIOH_STD */
133 #ifdef BCMSDIOH_SPI
134 /* This is the PciSpiHost. */
135 if (device == SPIH_FPGA_ID && vendor == VENDOR_BROADCOM) {
136 printf("Found PCI SPI Host Controller\n");
137 return (TRUE);
138 }
139
140 #endif /* BCMSDIOH_SPI */
141
142 return (FALSE);
143 }
144
bcmsdh_probe(osl_t * osh,void * dev,void * sdioh,void * adapter_info,uint bus_type,uint bus_num,uint slot_num)145 void* bcmsdh_probe(osl_t *osh, void *dev, void *sdioh, void *adapter_info, uint bus_type,
146 uint bus_num, uint slot_num)
147 {
148 ulong regs;
149 bcmsdh_info_t *bcmsdh;
150 uint32 vendevid;
151 bcmsdh_os_info_t *bcmsdh_osinfo = NULL;
152
153 bcmsdh = bcmsdh_attach(osh, sdioh, ®s);
154 if (bcmsdh == NULL) {
155 SDLX_MSG(("%s: bcmsdh_attach failed\n", __FUNCTION__));
156 goto err;
157 }
158 bcmsdh_osinfo = MALLOC(osh, sizeof(bcmsdh_os_info_t));
159 if (bcmsdh_osinfo == NULL) {
160 SDLX_MSG(("%s: failed to allocate bcmsdh_os_info_t\n", __FUNCTION__));
161 goto err;
162 }
163 bzero((char *)bcmsdh_osinfo, sizeof(bcmsdh_os_info_t));
164 bcmsdh->os_cxt = bcmsdh_osinfo;
165 bcmsdh_osinfo->sdioh = sdioh;
166 bcmsdh_osinfo->dev = dev;
167 osl_set_bus_handle(osh, bcmsdh);
168
169 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
170 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
171 if (dev && device_init_wakeup(dev, true) == 0)
172 bcmsdh_osinfo->dev_wake_enabled = TRUE;
173 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
174 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
175 */
176
177 #if defined(OOB_INTR_ONLY)
178 spin_lock_init(&bcmsdh_osinfo->oob_irq_spinlock);
179 /* Get customer specific OOB IRQ parametres: IRQ number as IRQ type */
180 bcmsdh_osinfo->oob_irq_num = wifi_platform_get_irq_number(adapter_info,
181 &bcmsdh_osinfo->oob_irq_flags);
182 if (bcmsdh_osinfo->oob_irq_num < 0) {
183 SDLX_MSG(("%s: Host OOB irq is not defined\n", __FUNCTION__));
184 goto err;
185 }
186 #endif /* defined(BCMLXSDMMC) */
187
188 /* Read the vendor/device ID from the CIS */
189 vendevid = bcmsdh_query_device(bcmsdh);
190
191 /* try to attach to the target device */
192 #if defined(BCMSPI) && (defined(BCMPCISPIHOST) || defined(BCMSDIOH_SPI))
193 bcmsdh_osinfo->context = drvinfo.probe((vendevid >> 16), (vendevid & 0xFFFF), bus_num,
194 slot_num, 0, bus_type, (void *)regs, NULL, bcmsdh);
195 #else
196 bcmsdh_osinfo->context = drvinfo.probe((vendevid >> 16), (vendevid & 0xFFFF), bus_num,
197 slot_num, 0, bus_type, (void *)regs, osh, bcmsdh);
198 #endif /* BCMSPI && (BCMPCISPIHOST || BCMSDIOH_SPI) */
199 if (bcmsdh_osinfo->context == NULL) {
200 SDLX_MSG(("%s: device attach failed\n", __FUNCTION__));
201 goto err;
202 }
203
204 return bcmsdh;
205
206 /* error handling */
207 err:
208 if (bcmsdh != NULL)
209 bcmsdh_detach(osh, bcmsdh);
210 if (bcmsdh_osinfo != NULL)
211 MFREE(osh, bcmsdh_osinfo, sizeof(bcmsdh_os_info_t));
212 return NULL;
213 }
214
bcmsdh_remove(bcmsdh_info_t * bcmsdh)215 int bcmsdh_remove(bcmsdh_info_t *bcmsdh)
216 {
217 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
218
219 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
220 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
221 if (bcmsdh_osinfo->dev)
222 device_init_wakeup(bcmsdh_osinfo->dev, false);
223 bcmsdh_osinfo->dev_wake_enabled = FALSE;
224 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
225 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
226 */
227
228 drvinfo.remove(bcmsdh_osinfo->context);
229 MFREE(bcmsdh->osh, bcmsdh->os_cxt, sizeof(bcmsdh_os_info_t));
230 bcmsdh_detach(bcmsdh->osh, bcmsdh);
231
232 return 0;
233 }
234
235 #ifdef DHD_WAKE_STATUS
bcmsdh_get_total_wake(bcmsdh_info_t * bcmsdh)236 int bcmsdh_get_total_wake(bcmsdh_info_t *bcmsdh)
237 {
238 return bcmsdh->total_wake_count;
239 }
240
bcmsdh_set_get_wake(bcmsdh_info_t * bcmsdh,int flag)241 int bcmsdh_set_get_wake(bcmsdh_info_t *bcmsdh, int flag)
242 {
243 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
244 unsigned long flags;
245 int ret;
246
247 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags);
248
249 ret = bcmsdh->pkt_wake;
250 bcmsdh->total_wake_count += flag;
251 bcmsdh->pkt_wake = flag;
252
253 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags);
254 return ret;
255 }
256 #endif /* DHD_WAKE_STATUS */
257
bcmsdh_suspend(bcmsdh_info_t * bcmsdh)258 int bcmsdh_suspend(bcmsdh_info_t *bcmsdh)
259 {
260 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
261
262 if (drvinfo.suspend && drvinfo.suspend(bcmsdh_osinfo->context))
263 return -EBUSY;
264 return 0;
265 }
266
bcmsdh_resume(bcmsdh_info_t * bcmsdh)267 int bcmsdh_resume(bcmsdh_info_t *bcmsdh)
268 {
269 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
270
271 if (drvinfo.resume)
272 return drvinfo.resume(bcmsdh_osinfo->context);
273 return 0;
274 }
275
276 extern int bcmsdh_register_client_driver(void);
277 extern void bcmsdh_unregister_client_driver(void);
278 extern int sdio_func_reg_notify(void* semaphore);
279 extern void sdio_func_unreg_notify(void);
280
281 #if defined(BCMLXSDMMC)
bcmsdh_reg_sdio_notify(void * semaphore)282 int bcmsdh_reg_sdio_notify(void* semaphore)
283 {
284 return sdio_func_reg_notify(semaphore);
285 }
286
bcmsdh_unreg_sdio_notify(void)287 void bcmsdh_unreg_sdio_notify(void)
288 {
289 sdio_func_unreg_notify();
290 }
291 #endif /* defined(BCMLXSDMMC) */
292
293 int
bcmsdh_register(bcmsdh_driver_t * driver)294 bcmsdh_register(bcmsdh_driver_t *driver)
295 {
296 int error = 0;
297
298 drvinfo = *driver;
299 SDLX_MSG(("%s: register client driver\n", __FUNCTION__));
300 error = bcmsdh_register_client_driver();
301 if (error)
302 SDLX_MSG(("%s: failed %d\n", __FUNCTION__, error));
303
304 return error;
305 }
306
307 void
bcmsdh_unregister(void)308 bcmsdh_unregister(void)
309 {
310 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0))
311 if (bcmsdh_pci_driver.node.next == NULL)
312 return;
313 #endif // endif
314
315 bcmsdh_unregister_client_driver();
316 }
317
bcmsdh_dev_pm_stay_awake(bcmsdh_info_t * bcmsdh)318 void bcmsdh_dev_pm_stay_awake(bcmsdh_info_t *bcmsdh)
319 {
320 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
321 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
322 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
323 pm_stay_awake(bcmsdh_osinfo->dev);
324 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
325 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
326 */
327 }
328
bcmsdh_dev_relax(bcmsdh_info_t * bcmsdh)329 void bcmsdh_dev_relax(bcmsdh_info_t *bcmsdh)
330 {
331 #if (!defined(CONFIG_PM_WAKELOCKS) || !defined(CONFIG_HAS_WAKELOCK)) && \
332 (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
333 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
334 pm_relax(bcmsdh_osinfo->dev);
335 #endif /* CONFIG_PM_WAKELOCKS ||CONFIG_HAS_WAKELOCK &&
336 * (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36))
337 */
338 }
339
bcmsdh_dev_pm_enabled(bcmsdh_info_t * bcmsdh)340 bool bcmsdh_dev_pm_enabled(bcmsdh_info_t *bcmsdh)
341 {
342 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
343
344 return bcmsdh_osinfo->dev_wake_enabled;
345 }
346
347 #if defined(OOB_INTR_ONLY) || defined(BCMSPI_ANDROID)
bcmsdh_oob_intr_set(bcmsdh_info_t * bcmsdh,bool enable)348 void bcmsdh_oob_intr_set(bcmsdh_info_t *bcmsdh, bool enable)
349 {
350 unsigned long flags;
351 bcmsdh_os_info_t *bcmsdh_osinfo;
352
353 if (!bcmsdh)
354 return;
355
356 bcmsdh_osinfo = bcmsdh->os_cxt;
357 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags);
358 if (bcmsdh_osinfo->oob_irq_enabled != enable) {
359 if (enable)
360 enable_irq(bcmsdh_osinfo->oob_irq_num);
361 else
362 disable_irq_nosync(bcmsdh_osinfo->oob_irq_num);
363 bcmsdh_osinfo->oob_irq_enabled = enable;
364 }
365 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags);
366 }
367
wlan_oob_irq(int irq,void * dev_id)368 static irqreturn_t wlan_oob_irq(int irq, void *dev_id)
369 {
370 bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *)dev_id;
371 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
372
373 #ifndef BCMSPI_ANDROID
374 bcmsdh_oob_intr_set(bcmsdh, FALSE);
375 #endif /* !BCMSPI_ANDROID */
376 bcmsdh_osinfo->oob_irq_handler(bcmsdh_osinfo->oob_irq_handler_context);
377
378 return IRQ_HANDLED;
379 }
380
bcmsdh_oob_intr_register(bcmsdh_info_t * bcmsdh,bcmsdh_cb_fn_t oob_irq_handler,void * oob_irq_handler_context)381 int bcmsdh_oob_intr_register(bcmsdh_info_t *bcmsdh, bcmsdh_cb_fn_t oob_irq_handler,
382 void* oob_irq_handler_context)
383 {
384 int err = 0;
385 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
386
387 SDLX_MSG(("%s: Enter\n", __FUNCTION__));
388 if (bcmsdh_osinfo->oob_irq_registered) {
389 SDLX_MSG(("%s: irq is already registered\n", __FUNCTION__));
390 return -EBUSY;
391 }
392 SDLX_MSG(("%s OOB irq=%d flags=%X \n", __FUNCTION__,
393 (int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags));
394 bcmsdh_osinfo->oob_irq_handler = oob_irq_handler;
395 bcmsdh_osinfo->oob_irq_handler_context = oob_irq_handler_context;
396 bcmsdh_osinfo->oob_irq_enabled = TRUE;
397 bcmsdh_osinfo->oob_irq_registered = TRUE;
398 err = request_irq(bcmsdh_osinfo->oob_irq_num, wlan_oob_irq,
399 bcmsdh_osinfo->oob_irq_flags, "bcmsdh_sdmmc", bcmsdh);
400 if (err) {
401 SDLX_MSG(("%s: request_irq failed with %d\n", __FUNCTION__, err));
402 bcmsdh_osinfo->oob_irq_enabled = FALSE;
403 bcmsdh_osinfo->oob_irq_registered = FALSE;
404 return err;
405 }
406
407 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
408 if (device_may_wakeup(bcmsdh_osinfo->dev)) {
409 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
410 err = enable_irq_wake(bcmsdh_osinfo->oob_irq_num);
411 if (!err)
412 bcmsdh_osinfo->oob_irq_wake_enabled = TRUE;
413 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
414 }
415 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
416 return err;
417 }
418
bcmsdh_oob_intr_unregister(bcmsdh_info_t * bcmsdh)419 void bcmsdh_oob_intr_unregister(bcmsdh_info_t *bcmsdh)
420 {
421 int err = 0;
422 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
423
424 SDLX_MSG(("%s: Enter\n", __FUNCTION__));
425 if (!bcmsdh_osinfo->oob_irq_registered) {
426 SDLX_MSG(("%s: irq is not registered\n", __FUNCTION__));
427 return;
428 }
429 if (bcmsdh_osinfo->oob_irq_wake_enabled) {
430 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
431 if (device_may_wakeup(bcmsdh_osinfo->dev)) {
432 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
433 err = disable_irq_wake(bcmsdh_osinfo->oob_irq_num);
434 if (!err)
435 bcmsdh_osinfo->oob_irq_wake_enabled = FALSE;
436 #if defined(CONFIG_ARCH_RHEA) || defined(CONFIG_ARCH_CAPRI)
437 }
438 #endif /* CONFIG_ARCH_RHEA || CONFIG_ARCH_CAPRI */
439 }
440 if (bcmsdh_osinfo->oob_irq_enabled) {
441 disable_irq(bcmsdh_osinfo->oob_irq_num);
442 bcmsdh_osinfo->oob_irq_enabled = FALSE;
443 }
444 free_irq(bcmsdh_osinfo->oob_irq_num, bcmsdh);
445 bcmsdh_osinfo->oob_irq_registered = FALSE;
446 }
447 #endif /* defined(OOB_INTR_ONLY) || defined(BCMSPI_ANDROID) */
448
449 /* Module parameters specific to each host-controller driver */
450
451 extern uint sd_msglevel; /* Debug message level */
452 #ifdef DHD_DEBUG
453 module_param(sd_msglevel, uint, 0664);
454 #else /* DHD_DEBUG */
455 module_param(sd_msglevel, uint, 0);
456 #endif /* DHD_DEBUG */
457
458 extern uint sd_power; /* 0 = SD Power OFF, 1 = SD Power ON. */
459 module_param(sd_power, uint, 0);
460
461 extern uint sd_clock; /* SD Clock Control, 0 = SD Clock OFF, 1 = SD Clock ON */
462 module_param(sd_clock, uint, 0);
463
464 extern uint sd_divisor; /* Divisor (-1 means external clock) */
465 module_param(sd_divisor, uint, 0);
466
467 extern uint sd_sdmode; /* Default is SD4, 0=SPI, 1=SD1, 2=SD4 */
468 module_param(sd_sdmode, uint, 0);
469
470 extern uint sd_hiok; /* Ok to use hi-speed mode */
471 module_param(sd_hiok, uint, 0);
472
473 extern uint sd_f2_blocksize;
474 module_param(sd_f2_blocksize, int, 0);
475
476 extern uint sd_f1_blocksize;
477 module_param(sd_f1_blocksize, int, 0);
478
479 #ifdef BCMSDIOH_STD
480 extern int sd_uhsimode;
481 module_param(sd_uhsimode, int, 0);
482 extern uint sd_tuning_period;
483 module_param(sd_tuning_period, uint, 0);
484 extern int sd_delay_value;
485 module_param(sd_delay_value, uint, 0);
486
487 /* SDIO Drive Strength for UHSI mode specific to SDIO3.0 */
488 extern char dhd_sdiod_uhsi_ds_override[2];
489 module_param_string(dhd_sdiod_uhsi_ds_override, dhd_sdiod_uhsi_ds_override, 2, 0);
490
491 #ifdef DHD_MAP_CHIP_FIRMWARE_PATH
492 extern uint sd_chip_module;
493 module_param(sd_chip_module, int, 0);
494 #endif /* DHD_MAP_CHIP_FIRMWARE_PATH */
495
496 #endif // endif
497
498 #ifdef BCMSDH_MODULE
499 EXPORT_SYMBOL(bcmsdh_attach);
500 EXPORT_SYMBOL(bcmsdh_detach);
501 EXPORT_SYMBOL(bcmsdh_intr_query);
502 EXPORT_SYMBOL(bcmsdh_intr_enable);
503 EXPORT_SYMBOL(bcmsdh_intr_disable);
504 EXPORT_SYMBOL(bcmsdh_intr_reg);
505 EXPORT_SYMBOL(bcmsdh_intr_dereg);
506
507 #if defined(DHD_DEBUG)
508 EXPORT_SYMBOL(bcmsdh_intr_pending);
509 #endif // endif
510
511 #if defined(BT_OVER_SDIO)
512 EXPORT_SYMBOL(bcmsdh_btsdio_interface_init);
513 #endif /* defined (BT_OVER_SDIO) */
514
515 EXPORT_SYMBOL(bcmsdh_devremove_reg);
516 EXPORT_SYMBOL(bcmsdh_cfg_read);
517 EXPORT_SYMBOL(bcmsdh_cfg_write);
518 EXPORT_SYMBOL(bcmsdh_cis_read);
519 EXPORT_SYMBOL(bcmsdh_reg_read);
520 EXPORT_SYMBOL(bcmsdh_reg_write);
521 EXPORT_SYMBOL(bcmsdh_regfail);
522 EXPORT_SYMBOL(bcmsdh_send_buf);
523 EXPORT_SYMBOL(bcmsdh_recv_buf);
524
525 EXPORT_SYMBOL(bcmsdh_rwdata);
526 EXPORT_SYMBOL(bcmsdh_abort);
527 EXPORT_SYMBOL(bcmsdh_query_device);
528 EXPORT_SYMBOL(bcmsdh_query_iofnum);
529 EXPORT_SYMBOL(bcmsdh_iovar_op);
530 EXPORT_SYMBOL(bcmsdh_register);
531 EXPORT_SYMBOL(bcmsdh_unregister);
532 EXPORT_SYMBOL(bcmsdh_chipmatch);
533 EXPORT_SYMBOL(bcmsdh_reset);
534 EXPORT_SYMBOL(bcmsdh_waitlockfree);
535
536 EXPORT_SYMBOL(bcmsdh_get_dstatus);
537 EXPORT_SYMBOL(bcmsdh_cfg_read_word);
538 EXPORT_SYMBOL(bcmsdh_cfg_write_word);
539 EXPORT_SYMBOL(bcmsdh_cur_sbwad);
540 EXPORT_SYMBOL(bcmsdh_chipinfo);
541
542 #endif /* BCMSDH_MODULE */
543