Permalink
Browse files

bcm4329: update to 4.218.248-23

Includes changes from: https://github.com/pershoot/gtab-2632/commits/gingerbread/drivers/net/wireless/bcm4329
Plus modifications for Huawei U8160 support
  • Loading branch information...
1 parent 9638998 commit b549d807f142fcb9cfef2b93225ad0200dfb1d6e @psyke83 committed Feb 10, 2012
Showing with 7,120 additions and 1,672 deletions.
  1. +16 −2 drivers/net/wireless/bcm4329/Kconfig
  2. +12 −10 drivers/net/wireless/bcm4329/Makefile
  3. +2 −2 drivers/net/wireless/bcm4329/aiutils.c
  4. +9 −4 drivers/net/wireless/bcm4329/bcmpcispi.c
  5. +2 −6 drivers/net/wireless/bcm4329/bcmsdh.c
  6. +84 −36 drivers/net/wireless/bcm4329/bcmsdh_linux.c
  7. +9 −8 drivers/net/wireless/bcm4329/bcmsdh_sdmmc.c
  8. +39 −13 drivers/net/wireless/bcm4329/bcmsdh_sdmmc_linux.c
  9. +1 −1 drivers/net/wireless/bcm4329/bcmsdspi_linux.c
  10. +9 −12 drivers/net/wireless/bcm4329/bcmsdstd.c
  11. +5 −3 drivers/net/wireless/bcm4329/bcmsdstd_linux.c
  12. +1 −1 drivers/net/wireless/bcm4329/bcmutils.c
  13. +1 −1 drivers/net/wireless/bcm4329/bcmwifi.c
  14. +104 −30 drivers/net/wireless/bcm4329/dhd.h
  15. +6 −2 drivers/net/wireless/bcm4329/dhd_bus.h
  16. +32 −281 drivers/net/wireless/bcm4329/dhd_cdc.c
  17. +1,564 −28 drivers/net/wireless/bcm4329/dhd_common.c
  18. +78 −11 drivers/net/wireless/bcm4329/dhd_custom_gpio.c
  19. +5 −2 drivers/net/wireless/bcm4329/dhd_dbg.h
  20. +859 −162 drivers/net/wireless/bcm4329/dhd_linux.c
  21. +1 −1 drivers/net/wireless/bcm4329/dhd_linux_sched.c
  22. +7 −3 drivers/net/wireless/bcm4329/dhd_proto.h
  23. +453 −71 drivers/net/wireless/bcm4329/dhd_sdio.c
  24. +1 −1 drivers/net/wireless/bcm4329/dngl_stats.h
  25. +216 −0 drivers/net/wireless/bcm4329/firmware/LICENSE.TXT
  26. +2 −2 drivers/net/wireless/bcm4329/hndpmu.c
  27. +1 −1 drivers/net/wireless/bcm4329/include/aidmp.h
  28. +1 −1 drivers/net/wireless/bcm4329/include/bcmcdc.h
  29. +1 −1 drivers/net/wireless/bcm4329/include/bcmdevs.h
  30. +1 −1 drivers/net/wireless/bcm4329/include/bcmendian.h
  31. +1 −1 drivers/net/wireless/bcm4329/include/bcmpcispi.h
  32. +1 −1 drivers/net/wireless/bcm4329/include/bcmperf.h
  33. +1 −1 drivers/net/wireless/bcm4329/include/bcmsdbus.h
  34. +1 −1 drivers/net/wireless/bcm4329/include/bcmsdh.h
  35. +1 −1 drivers/net/wireless/bcm4329/include/bcmsdh_sdmmc.h
  36. +4 −3 drivers/net/wireless/bcm4329/include/bcmsdpcm.h
  37. +1 −1 drivers/net/wireless/bcm4329/include/bcmsdspi.h
  38. +1 −1 drivers/net/wireless/bcm4329/include/bcmspi.h
  39. +134 −0 drivers/net/wireless/bcm4329/include/bcmspibrcm.h
  40. +1 −1 drivers/net/wireless/bcm4329/include/bcmutils.h
  41. +2 −2 drivers/net/wireless/bcm4329/include/bcmwifi.h
  42. +3 −2 drivers/net/wireless/bcm4329/include/dhdioctl.h
  43. +6 −6 drivers/net/wireless/bcm4329/include/epivers.h
  44. +2 −2 drivers/net/wireless/bcm4329/include/hndpmu.h
  45. +88 −0 drivers/net/wireless/bcm4329/include/hndrte_armtrap.h
  46. +63 −0 drivers/net/wireless/bcm4329/include/hndrte_cons.h
  47. +1 −1 drivers/net/wireless/bcm4329/include/hndsoc.h
  48. +2 −3 drivers/net/wireless/bcm4329/include/linux_osl.h
  49. +4 −3 drivers/net/wireless/bcm4329/include/linuxver.h
  50. +1 −1 drivers/net/wireless/bcm4329/include/miniopt.h
  51. +1 −1 drivers/net/wireless/bcm4329/include/msgtrace.h
  52. +1 −1 drivers/net/wireless/bcm4329/include/osl.h
  53. +1 −1 drivers/net/wireless/bcm4329/include/packed_section_end.h
  54. +1 −1 drivers/net/wireless/bcm4329/include/packed_section_start.h
  55. +1 −1 drivers/net/wireless/bcm4329/include/pcicfg.h
  56. +3 −0 drivers/net/wireless/bcm4329/include/proto/802.11.h
  57. +1 −1 drivers/net/wireless/bcm4329/include/proto/802.11e.h
  58. +1 −1 drivers/net/wireless/bcm4329/include/proto/802.1d.h
  59. +1 −1 drivers/net/wireless/bcm4329/include/proto/bcmeth.h
  60. +7 −6 drivers/net/wireless/bcm4329/include/proto/bcmevent.h
  61. +1 −1 drivers/net/wireless/bcm4329/include/proto/bcmip.h
  62. +3 −2 drivers/net/wireless/bcm4329/include/proto/ethernet.h
  63. +1 −1 drivers/net/wireless/bcm4329/include/proto/sdspi.h
  64. +1 −1 drivers/net/wireless/bcm4329/include/proto/vlan.h
  65. +1 −1 drivers/net/wireless/bcm4329/include/proto/wpa.h
  66. +0 −111 drivers/net/wireless/bcm4329/include/sbchipc.h
  67. +1 −1 drivers/net/wireless/bcm4329/include/sbconfig.h
  68. +1 −1 drivers/net/wireless/bcm4329/include/sbhnddma.h
  69. +1 −1 drivers/net/wireless/bcm4329/include/sbpcmcia.h
  70. +1 −1 drivers/net/wireless/bcm4329/include/sbsdio.h
  71. +1 −1 drivers/net/wireless/bcm4329/include/sbsdpcmdev.h
  72. +1 −1 drivers/net/wireless/bcm4329/include/sbsocram.h
  73. +1 −1 drivers/net/wireless/bcm4329/include/sdio.h
  74. +1 −2 drivers/net/wireless/bcm4329/include/siutils.h
  75. +153 −0 drivers/net/wireless/bcm4329/include/spid.h
  76. +1 −1 drivers/net/wireless/bcm4329/include/trxhdr.h
  77. +1 −1 drivers/net/wireless/bcm4329/include/typedefs.h
  78. +18 −9 drivers/net/wireless/bcm4329/include/wlioctl.h
  79. +6 −5 drivers/net/wireless/bcm4329/linux_osl.c
  80. +1 −1 drivers/net/wireless/bcm4329/miniopt.c
  81. +2 −2 drivers/net/wireless/bcm4329/sbutils.c
  82. +3 −2 drivers/net/wireless/bcm4329/siutils.c
  83. +1 −1 drivers/net/wireless/bcm4329/siutils_priv.h
  84. +2,894 −754 drivers/net/wireless/bcm4329/wl_iw.c
  85. +140 −28 drivers/net/wireless/bcm4329/wl_iw.h
  86. +27 −0 include/linux/wlan_plat.h
@@ -13,13 +13,27 @@ config BCM4329
config BCM4329_FW_PATH
depends on BCM4329
string "Firmware path"
- default "/system/etc/firmware/fw_bcm4329.bin"
+ default "/system/lib/hw/wlan/fw_bcm4329.bin"
---help---
Path to the firmware file.
config BCM4329_NVRAM_PATH
depends on BCM4329
string "NVRAM path"
- default "/proc/calibration"
+ default "/system/lib/hw/wlan/nvram.txt"
---help---
Path to the calibration file.
+
+config BCM4329_ENABLE_CSCAN
+ depends on BCM4329
+ bool "Enable CSCAN"
+ default n
+ ---help---
+ Enable the use of CSCAN methods.
+
+config BCM4329_ENABLE_PNO_SUPPORT
+ depends on BCM4329_ENABLE_CSCAN
+ bool "Enable PNO_SUPPORT"
+ default n
+ ---help---
+ Enable the use of PNO_SUPPORT methods.
@@ -1,18 +1,20 @@
# bcm4329
-DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 \
- -DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 \
- -DDHD_FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS \
- -DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS \
- -Wall -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2 \
- -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DSOFTAP \
+DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD \
+ -DBCMWPA2 -DBCMWAPI_WPI -DUNRELEASEDCHIP -DCONFIG_WIRELESS_EXT \
+ -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS \
+ -DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DHW_OOB -DOOB_INTR_ONLY \
+ -DBCMLXSDMMC -DBCMPLATFORM_BUS -DEMBEDDED_PLATFORM -DOEM_ANDROID \
+ -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT \
+ -DCUSTOMER_HW2 -DCUSTOM_OOB_GPIO_NUM=17 -DCUSTOM_SDCC_WIFI_SLOT=2 \
+ -DSOFTAP -Wall -Wstrict-prototypes \ \
-Idrivers/net/wireless/bcm4329 -Idrivers/net/wireless/bcm4329/include
DHDOFILES = dhd_linux.o linux_osl.o bcmutils.o dhd_common.o dhd_custom_gpio.o \
- wl_iw.o siutils.o sbutils.o aiutils.o hndpmu.o bcmwifi.o dhd_sdio.o \
- dhd_linux_sched.o dhd_cdc.o bcmsdh_sdmmc.o bcmsdh.o bcmsdh_linux.o \
+ siutils.o sbutils.o aiutils.o hndpmu.o dhd_linux_sched.o bcmwifi.o \
+ wl_iw.o dhd_cdc.o dhd_sdio.o bcmsdh_sdmmc.o bcmsdh.o bcmsdh_linux.o \
bcmsdh_sdmmc_linux.o
-obj-$(CONFIG_BCM4329) += bcm4329.o
-bcm4329-objs += $(DHDOFILES)
+obj-$(CONFIG_BCM4329) += dhd.o
+dhd-objs += $(DHDOFILES)
EXTRA_CFLAGS = $(DHDCFLAGS)
EXTRA_LDFLAGS += --strip-debug
@@ -2,7 +2,7 @@
* Misc utility routines for accessing chip-specific features
* of the SiliconBackplane-based Broadcom chips.
*
- * Copyright (C) 1999-2009, Broadcom Corporation
+ * Copyright (C) 1999-2010, Broadcom Corporation
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
@@ -22,7 +22,7 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: aiutils.c,v 1.6.4.7.4.5 2009/09/25 00:32:01 Exp $
+ * $Id: aiutils.c,v 1.6.4.7.4.6 2010/04/21 20:43:47 Exp $
*/
#include <typedefs.h>
@@ -1,7 +1,7 @@
/*
* Broadcom SPI over PCI-SPI Host Controller, low-level hardware driver
*
- * Copyright (C) 1999-2009, Broadcom Corporation
+ * Copyright (C) 1999-2010, Broadcom Corporation
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
@@ -21,7 +21,7 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: bcmpcispi.c,v 1.22.2.4.4.5 2008/07/09 21:23:30 Exp $
+ * $Id: bcmpcispi.c,v 1.22.2.4.4.5.6.1 2010/08/13 00:26:05 Exp $
*/
#include <typedefs.h>
@@ -606,18 +606,23 @@ spi_spinbits(sdioh_info_t *sd)
spin_count = 0;
while ((SPIPCI_RREG(sd->osh, &regs->spih_stat) & SPIH_WFEMPTY) == 0) {
if (spin_count > SPI_SPIN_BOUND) {
- ASSERT(FALSE); /* Spin bound exceeded */
+ sd_err(("%s: SPIH_WFEMPTY spin bits out of bound %u times \n",
+ __FUNCTION__, spin_count));
+ ASSERT(FALSE);
}
spin_count++;
}
- spin_count = 0;
+
/* Wait for SPI Transfer state machine to return to IDLE state.
* The state bits are only implemented in Rev >= 5 FPGA. These
* bits are hardwired to 00 for Rev < 5, so this check doesn't cause
* any problems.
*/
+ spin_count = 0;
while ((SPIPCI_RREG(osh, &regs->spih_stat) & SPIH_STATE_MASK) != 0) {
if (spin_count > SPI_SPIN_BOUND) {
+ sd_err(("%s: SPIH_STATE_MASK spin bits out of bound %u times \n",
+ __FUNCTION__, spin_count));
ASSERT(FALSE);
}
spin_count++;
@@ -2,7 +2,7 @@
* BCMSDH interface glue
* implement bcmsdh API for SDIOH driver
*
- * Copyright (C) 1999-2009, Broadcom Corporation
+ * Copyright (C) 1999-2010, Broadcom Corporation
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
@@ -22,7 +22,7 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: bcmsdh.c,v 1.35.2.1.4.8.6.11 2009/10/20 09:48:20 Exp $
+ * $Id: bcmsdh.c,v 1.35.2.1.4.8.6.13 2010/04/06 03:26:57 Exp $
*/
/* ****************** BCMSDH Interface Functions *************************** */
@@ -40,9 +40,7 @@
#include <sdio.h> /* sdio spec */
-/* Defines number of access retries to configuration registers */
#define SDIOH_API_ACCESS_RETRY_LIMIT 2
-
const uint bcmsdh_msglevel = BCMSDH_ERROR_VAL;
@@ -59,7 +57,6 @@ struct bcmsdh_info
bcmsdh_info_t * l_bcmsdh = NULL;
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
-
extern int
sdioh_enable_hw_oob_intr(void *sdioh, bool enable);
@@ -68,7 +65,6 @@ bcmsdh_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable)
{
sdioh_enable_hw_oob_intr(sdh->sdioh, enable);
}
-
#endif
bcmsdh_info_t *
@@ -21,7 +21,7 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: bcmsdh_linux.c,v 1.42.10.10.2.12 2010/03/10 03:09:48 Exp $
+ * $Id: bcmsdh_linux.c,v 1.42.10.10.2.14.4.2 2010/09/15 00:30:11 Exp $
*/
/**
@@ -75,7 +75,11 @@ struct bcmsdh_hc {
bcmsdh_info_t *sdh; /* SDIO Host Controller handle */
void *ch;
unsigned int oob_irq;
- unsigned long oob_flags;
+ unsigned long oob_flags; /* OOB Host specifiction as edge and etc */
+ bool oob_irq_registered;
+#if defined(OOB_INTR_ONLY)
+ spinlock_t irq_lock;
+#endif
};
static bcmsdh_hc_t *sdhcinfo = NULL;
@@ -176,7 +180,7 @@ int bcmsdh_probe(struct device *dev)
#endif /* BCMLXSDMMC */
int irq = 0;
uint32 vendevid;
- unsigned long irq_flags = IRQF_TRIGGER_FALLING;
+ unsigned long irq_flags = 0;
#if !defined(BCMLXSDMMC) && defined(BCMPLATFORM_BUS)
pdev = to_platform_device(dev);
@@ -187,6 +191,12 @@ int bcmsdh_probe(struct device *dev)
#endif /* BCMLXSDMMC */
#if defined(OOB_INTR_ONLY)
+#ifdef HW_OOB
+ irq_flags = \
+ IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE;
+#else
+ irq_flags = IRQF_TRIGGER_FALLING;
+#endif /* HW_OOB */
irq = dhd_customer_oob_irq_map(&irq_flags);
if (irq < 0) {
SDLX_MSG(("%s: Host irq is not defined\n", __FUNCTION__));
@@ -225,6 +235,10 @@ int bcmsdh_probe(struct device *dev)
sdhc->sdh = sdh;
sdhc->oob_irq = irq;
sdhc->oob_flags = irq_flags;
+ sdhc->oob_irq_registered = FALSE; /* to make sure.. */
+#if defined(OOB_INTR_ONLY)
+ spin_lock_init(&sdhc->irq_lock);
+#endif
/* chain SDIO Host Controller info together */
sdhc->next = sdhcinfo;
@@ -287,7 +301,7 @@ int bcmsdh_remove(struct device *dev)
MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
osl_detach(osh);
-#if !defined(BCMLXSDMMC)
+#if !defined(BCMLXSDMMC) || defined(OOB_INTR_ONLY)
dev_set_drvdata(dev, NULL);
#endif /* !defined(BCMLXSDMMC) */
@@ -338,7 +352,7 @@ extern uint sd_pci_slot; /* Force detection to a particular PCI */
/* slot only . Allows for having multiple */
/* WL devices at once in a PC */
/* Only one instance of dhd will be */
- /* useable at a time */
+ /* usable at a time */
/* Upper word is bus number, */
/* lower word is slot number */
/* Default value of 0xFFFFffff turns this */
@@ -365,20 +379,21 @@ bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (pdev->bus->number != (sd_pci_slot>>16) ||
PCI_SLOT(pdev->devfn) != (sd_pci_slot&0xffff)) {
SDLX_MSG(("%s: %s: bus %X, slot %X, vend %X, dev %X\n",
- __FUNCTION__,
- bcmsdh_chipmatch(pdev->vendor, pdev->device)
- ? "Found compatible SDIOHC"
- : "Probing unknown device",
- pdev->bus->number, PCI_SLOT(pdev->devfn), pdev->vendor,
- pdev->device));
+ __FUNCTION__,
+ bcmsdh_chipmatch(pdev->vendor, pdev->device) ?
+ "Found compatible SDIOHC" :
+ "Probing unknown device",
+ pdev->bus->number, PCI_SLOT(pdev->devfn),
+ pdev->vendor, pdev->device));
return -ENODEV;
}
SDLX_MSG(("%s: %s: bus %X, slot %X, vendor %X, device %X (good PCI location)\n",
- __FUNCTION__,
- bcmsdh_chipmatch(pdev->vendor, pdev->device)
- ? "Using compatible SDIOHC"
- : "WARNING, forced use of unkown device",
- pdev->bus->number, PCI_SLOT(pdev->devfn), pdev->vendor, pdev->device));
+ __FUNCTION__,
+ bcmsdh_chipmatch(pdev->vendor, pdev->device) ?
+ "Using compatible SDIOHC" :
+ "WARNING, forced use of unkown device",
+ pdev->bus->number, PCI_SLOT(pdev->devfn),
+ pdev->vendor, pdev->device));
}
if ((pdev->vendor == VENDOR_TI) && ((pdev->device == PCIXX21_FLASHMEDIA_ID) ||
@@ -439,7 +454,7 @@ bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_master(pdev);
rc = pci_enable_device(pdev);
if (rc) {
- SDLX_MSG(("%s: Cannot enble PCI device\n", __FUNCTION__));
+ SDLX_MSG(("%s: Cannot enable PCI device\n", __FUNCTION__));
goto err;
}
if (!(sdh = bcmsdh_attach(osh, (void *)(uintptr)pci_resource_start(pdev, 0),
@@ -567,14 +582,31 @@ bcmsdh_unregister(void)
}
#if defined(OOB_INTR_ONLY)
+void bcmsdh_oob_intr_set(bool enable)
+{
+ static bool curstate = 1;
+ unsigned long flags;
+
+ spin_lock_irqsave(&sdhcinfo->irq_lock, flags);
+ if (curstate != enable) {
+ if (enable)
+ enable_irq(sdhcinfo->oob_irq);
+ else
+ disable_irq_nosync(sdhcinfo->oob_irq);
+ curstate = enable;
+ }
+ spin_unlock_irqrestore(&sdhcinfo->irq_lock, flags);
+}
+
static irqreturn_t wlan_oob_irq(int irq, void *dev_id)
{
dhd_pub_t *dhdp;
dhdp = (dhd_pub_t *)dev_get_drvdata(sdhcinfo->dev);
+ bcmsdh_oob_intr_set(0);
+
if (dhdp == NULL) {
- disable_irq(sdhcinfo->oob_irq);
SDLX_MSG(("Out of band GPIO interrupt fired way too early\n"));
return IRQ_HANDLED;
}
@@ -590,35 +622,51 @@ int bcmsdh_register_oob_intr(void * dhdp)
SDLX_MSG(("%s Enter\n", __FUNCTION__));
- dev_set_drvdata(sdhcinfo->dev, dhdp);
+/* Example of HW_OOB for HW2: please refer to your host specifiction */
+/* sdhcinfo->oob_flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE; */
- /* Refer to customer Host IRQ docs about proper irqflags definition */
- error = request_irq(sdhcinfo->oob_irq, wlan_oob_irq, sdhcinfo->oob_flags,
- "bcmsdh_sdmmc", NULL);
+ dev_set_drvdata(sdhcinfo->dev, dhdp);
- if (error)
- return -ENODEV;
+ if (!sdhcinfo->oob_irq_registered) {
+ SDLX_MSG(("%s IRQ=%d Type=%X \n", __FUNCTION__, \
+ (int)sdhcinfo->oob_irq, (int)sdhcinfo->oob_flags));
+ /* Refer to customer Host IRQ docs about proper irqflags definition */
+ error = request_irq(sdhcinfo->oob_irq, wlan_oob_irq, sdhcinfo->oob_flags,
+ "bcmsdh_sdmmc", NULL);
+ if (error)
+ return -ENODEV;
- set_irq_wake(sdhcinfo->oob_irq, 1);
+ set_irq_wake(sdhcinfo->oob_irq, 1);
+ sdhcinfo->oob_irq_registered = TRUE;
+ }
return 0;
}
-void bcmsdh_unregister_oob_intr(void)
+void bcmsdh_set_irq(int flag)
{
- SDLX_MSG(("%s: Enter\n", __FUNCTION__));
-
- set_irq_wake(sdhcinfo->oob_irq, 0);
- disable_irq(sdhcinfo->oob_irq); /* just in case.. */
- free_irq(sdhcinfo->oob_irq, NULL);
+ if (sdhcinfo->oob_irq_registered) {
+ SDLX_MSG(("%s Flag = %d", __FUNCTION__, flag));
+ if (flag) {
+ enable_irq(sdhcinfo->oob_irq);
+ enable_irq_wake(sdhcinfo->oob_irq);
+ } else {
+ disable_irq_wake(sdhcinfo->oob_irq);
+ disable_irq(sdhcinfo->oob_irq);
+ }
+ }
}
-void bcmsdh_oob_intr_set(bool enable)
+void bcmsdh_unregister_oob_intr(void)
{
- if (enable)
- enable_irq(sdhcinfo->oob_irq);
- else
- disable_irq(sdhcinfo->oob_irq);
+ SDLX_MSG(("%s: Enter\n", __FUNCTION__));
+
+ if (sdhcinfo->oob_irq_registered) {
+ set_irq_wake(sdhcinfo->oob_irq, 0);
+ disable_irq(sdhcinfo->oob_irq); /* just in case.. */
+ free_irq(sdhcinfo->oob_irq, NULL);
+ sdhcinfo->oob_irq_registered = FALSE;
+ }
}
#endif /* defined(OOB_INTR_ONLY) */
/* Module parameters specific to each host-controller driver */
Oops, something went wrong.

0 comments on commit b549d80

Please sign in to comment.