Lines Matching +full:vendor +full:- +full:specific

2  * SDIO access interface for drivers - linux specific (pci only)
21 * <<Broadcom-WL-IPTag/Open:>>
47 #include <linux/platform_data/gpio-odin.h>
61 /* the BCMSDH module comprises the generic part (bcmsdh.c) and OS specific layer (e.g.
62 * bcmsdh_linux.c). Put all OS specific variables (e.g. irq number and flags) here rather
92 * Checks to see if vendor and device IDs match a supported SDIO Host Controller.
95 bcmsdh_chipmatch(uint16 vendor, uint16 device) in bcmsdh_chipmatch() argument
100 if (device == SDIOH_FPGA_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
103 if (device == BCM_SDIOH_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
106 if (device == BCM4710_DEVICE_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
110 if (device == 0x4380 && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
118 if (vendor == VENDOR_SI_IMAGE) { in bcmsdh_chipmatch()
122 if (device == BCM27XX_SDIOH_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
126 if (device == SDIOH_FPGA_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
130 if (device == PCIXX21_SDIOH_ID && vendor == VENDOR_TI) { in bcmsdh_chipmatch()
133 if (device == PCIXX21_SDIOH0_ID && vendor == VENDOR_TI) { in bcmsdh_chipmatch()
137 if (device == R5C822_SDIOH_ID && vendor == VENDOR_RICOH) { in bcmsdh_chipmatch()
141 if (device == JMICRON_SDIOH_ID && vendor == VENDOR_JMICRON) { in bcmsdh_chipmatch()
146 /* Check for Jinvani (C-Guys) host controller */ in bcmsdh_chipmatch()
147 if (device == JINVANI_SDIOH_ID && vendor == VENDOR_JINVANI) { in bcmsdh_chipmatch()
154 if (device == SPIH_FPGA_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
161 if (device == BCM_SPIH_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
170 * XXX - This is a hack to get the GPL SdioLinux driver to load on Arasan/x86 in bcmsdh_chipmatch()
175 if (device == SPIH_FPGA_ID && vendor == VENDOR_BROADCOM) { in bcmsdh_chipmatch()
203 bcmsdh->os_cxt = bcmsdh_osinfo; in bcmsdh_probe()
204 bcmsdh_osinfo->sdioh = sdioh; in bcmsdh_probe()
205 bcmsdh_osinfo->dev = dev; in bcmsdh_probe()
210 bcmsdh_osinfo->dev_wake_enabled = TRUE; in bcmsdh_probe()
214 spin_lock_init(&bcmsdh_osinfo->oob_irq_spinlock); in bcmsdh_probe()
215 /* Get customer specific OOB IRQ parametres: IRQ number as IRQ type */ in bcmsdh_probe()
216 bcmsdh_osinfo->oob_irq_num = wifi_platform_get_irq_number(adapter_info, in bcmsdh_probe()
217 &bcmsdh_osinfo->oob_irq_flags); in bcmsdh_probe()
218 if (bcmsdh_osinfo->oob_irq_num < 0) { in bcmsdh_probe()
224 /* Read the vendor/device ID from the CIS */ in bcmsdh_probe()
227 bcmsdh_osinfo->context = drvinfo.probe((vendevid >> 16), (vendevid & 0xFFFF), bus_num, in bcmsdh_probe()
229 if (bcmsdh_osinfo->context == NULL) { in bcmsdh_probe()
247 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_remove()
250 if (bcmsdh_osinfo->dev) in bcmsdh_remove()
251 device_init_wakeup(bcmsdh_osinfo->dev, false); in bcmsdh_remove()
252 bcmsdh_osinfo->dev_wake_enabled = FALSE; in bcmsdh_remove()
255 drvinfo.remove(bcmsdh_osinfo->context); in bcmsdh_remove()
256 MFREE(bcmsdh->osh, bcmsdh->os_cxt, sizeof(bcmsdh_os_info_t)); in bcmsdh_remove()
257 bcmsdh_detach(bcmsdh->osh, bcmsdh); in bcmsdh_remove()
265 return bcmsdh->total_wake_count; in bcmsdh_get_total_wake()
271 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_set_get_wake()
277 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_set_get_wake()
279 ret = bcmsdh->pkt_wake; in bcmsdh_set_get_wake()
280 bcmsdh->total_wake_count += flag; in bcmsdh_set_get_wake()
281 bcmsdh->pkt_wake = flag; in bcmsdh_set_get_wake()
283 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_set_get_wake()
291 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_suspend()
293 if (drvinfo.suspend && drvinfo.suspend(bcmsdh_osinfo->context)) in bcmsdh_suspend()
294 return -EBUSY; in bcmsdh_suspend()
300 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_resume()
303 return drvinfo.resume(bcmsdh_osinfo->context); in bcmsdh_resume()
351 bcmsdh_os_info_t *bcmsdh_osinfo = sdh->os_cxt; in bcmsdh_get_dev()
352 return bcmsdh_osinfo->dev; in bcmsdh_get_dev()
358 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_dev_pm_stay_awake()
359 pm_stay_awake(bcmsdh_osinfo->dev); in bcmsdh_dev_pm_stay_awake()
366 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_dev_relax()
367 pm_relax(bcmsdh_osinfo->dev); in bcmsdh_dev_relax()
373 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_dev_pm_enabled()
375 return bcmsdh_osinfo->dev_wake_enabled; in bcmsdh_dev_pm_enabled()
381 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_get_oob_intr_num()
383 return bcmsdh_osinfo->oob_irq_num; in bcmsdh_get_oob_intr_num()
394 bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_oob_intr_set()
395 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_oob_intr_set()
396 if (bcmsdh_osinfo->oob_irq_enabled != enable) { in bcmsdh_oob_intr_set()
398 enable_irq(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_set()
400 disable_irq_nosync(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_set()
401 bcmsdh_osinfo->oob_irq_enabled = enable; in bcmsdh_oob_intr_set()
403 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_oob_intr_set()
414 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in wlan_oob_irq()
419 bcmsdh_osinfo->oob_irq_handler(bcmsdh_osinfo->oob_irq_handler_context); in wlan_oob_irq()
434 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_oob_intr_register()
436 if (bcmsdh_osinfo->oob_irq_registered) { in bcmsdh_oob_intr_register()
438 return -EBUSY; in bcmsdh_oob_intr_register()
442 (int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags)); in bcmsdh_oob_intr_register()
445 (int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags)); in bcmsdh_oob_intr_register()
447 bcmsdh_osinfo->oob_irq_handler = oob_irq_handler; in bcmsdh_oob_intr_register()
448 bcmsdh_osinfo->oob_irq_handler_context = oob_irq_handler_context; in bcmsdh_oob_intr_register()
449 bcmsdh_osinfo->oob_irq_enabled = TRUE; in bcmsdh_oob_intr_register()
450 bcmsdh_osinfo->oob_irq_registered = TRUE; in bcmsdh_oob_intr_register()
452 err = odin_gpio_sms_request_irq(bcmsdh_osinfo->oob_irq_num, wlan_oob_irq, in bcmsdh_oob_intr_register()
453 bcmsdh_osinfo->oob_irq_flags, "bcmsdh_sdmmc", bcmsdh); in bcmsdh_oob_intr_register()
455 err = request_irq(bcmsdh_osinfo->oob_irq_num, wlan_oob_irq, in bcmsdh_oob_intr_register()
456 bcmsdh_osinfo->oob_irq_flags, "bcmsdh_sdmmc", bcmsdh); in bcmsdh_oob_intr_register()
460 bcmsdh_osinfo->oob_irq_enabled = FALSE; in bcmsdh_oob_intr_register()
461 bcmsdh_osinfo->oob_irq_registered = FALSE; in bcmsdh_oob_intr_register()
467 bcmsdh_osinfo->oob_irq_wake_enabled = FALSE; in bcmsdh_oob_intr_register()
470 if (device_may_wakeup(bcmsdh_osinfo->dev)) { in bcmsdh_oob_intr_register()
472 err = enable_irq_wake(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_register()
476 bcmsdh_osinfo->oob_irq_wake_enabled = TRUE; in bcmsdh_oob_intr_register()
488 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_oob_intr_unregister()
491 if (!bcmsdh_osinfo->oob_irq_registered) { in bcmsdh_oob_intr_unregister()
495 if (bcmsdh_osinfo->oob_irq_wake_enabled) { in bcmsdh_oob_intr_unregister()
497 if (device_may_wakeup(bcmsdh_osinfo->dev)) { in bcmsdh_oob_intr_unregister()
499 err = disable_irq_wake(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_unregister()
501 bcmsdh_osinfo->oob_irq_wake_enabled = FALSE; in bcmsdh_oob_intr_unregister()
506 if (bcmsdh_osinfo->oob_irq_enabled) { in bcmsdh_oob_intr_unregister()
507 disable_irq(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_unregister()
508 bcmsdh_osinfo->oob_irq_enabled = FALSE; in bcmsdh_oob_intr_unregister()
510 free_irq(bcmsdh_osinfo->oob_irq_num, bcmsdh); in bcmsdh_oob_intr_unregister()
511 bcmsdh_osinfo->oob_irq_registered = FALSE; in bcmsdh_oob_intr_unregister()
515 /* Module parameters specific to each host-controller driver */
527 extern uint sd_divisor; /* Divisor (-1 means external clock) */
533 extern uint sd_hiok; /* Ok to use hi-speed mode */
550 /* SDIO Drive Strength for UHSI mode specific to SDIO3.0 */