summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2015-02-04 16:00:47 +0800
committerDong Aisheng <b29396@freescale.com>2015-06-08 11:31:35 +0800
commit32e2f4ee06de3ff560efe1703f529c79e6828958 (patch)
tree47835768bb2e0b14114bc96f56740ca2abe3ba84 /drivers/net
parent374a3a481c663eae33b0e1847d737140d9bacbc1 (diff)
MLK-11065-4 wireless: make bcmdhd wireless driver functionally
1. Add dummy regulator in dts which is must required by bcmdhd driver 2. Workaround to add dummy sdio_reset_comm as suggested by Broadcom guy because driver always failed in this function porting from Android kernel, root cause unknown. 3. enable driver dts function, inband irq, built as module 4. comment out the hard code in wifi_plat_dev_drv_probe which has to parse oob irq gpio properties and gpio regulators from device tree even the driver does not use it. 5. warning fix Signed-off-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/bcmdhd/Makefile8
-rw-r--r--drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c8
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux_platdev.c8
3 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/wireless/bcmdhd/Makefile b/drivers/net/wireless/bcmdhd/Makefile
index 08e805acb23d..88ab641bd682 100644
--- a/drivers/net/wireless/bcmdhd/Makefile
+++ b/drivers/net/wireless/bcmdhd/Makefile
@@ -10,7 +10,8 @@ DHDCFLAGS += -Wall -Wstrict-prototypes -Dlinux -DLINUX -DBCMDRIVER \
-DKEEP_ALIVE -DCSCAN -DPKT_FILTER_SUPPORT \
-DEMBEDDED_PLATFORM -DPNO_SUPPORT \
-DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT \
- -DENABLE_INSMOD_NO_FW_LOAD -DCUSTOMER_HW2 -DGET_CUSTOM_MAC_ENABLE
+ -DCUSTOMER_HW2 -DGET_CUSTOM_MAC_ENABLE \
+ -DCONFIG_DTS
#################
# Common feature
@@ -93,7 +94,7 @@ DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS
# m: module type driver
# y: built-in type driver
##########################
-DRIVER_TYPE ?= y
+DRIVER_TYPE ?= m
#########################
# Chip dependent feature
@@ -148,7 +149,8 @@ ifneq ($(CONFIG_BCM4339),)
endif
ifneq ($(CONFIG_BCMDHD_SDIO),)
- DHDCFLAGS += -DBDC -DOOB_INTR_ONLY -DDHD_BCMEVENTS -DMMC_SDIO_ABORT
+ # DHDCFLAGS += -DBDC -DOOB_INTR_ONLY -DDHD_BCMEVENTS -DMMC_SDIO_ABORT
+ DHDCFLAGS += -DBDC -DSDIO_ISR_THREAD -DDHD_BCMEVENTS -DMMC_SDIO_ABORT
DHDCFLAGS += -DBCMSDIO -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR
endif
diff --git a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
index 181cf47a22a0..22cef80fca54 100644
--- a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
+++ b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
@@ -59,7 +59,7 @@ static void IRQHandler(struct sdio_func *func);
static void IRQHandlerF2(struct sdio_func *func);
#endif /* !defined(OOB_INTR_ONLY) */
static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr);
-extern int sdio_reset_comm(struct mmc_card *card);
+static int sdio_reset_comm(struct mmc_card *card);
#define DEFAULT_SDIO_F2_BLKSIZE 512
#ifndef CUSTOM_SDIO_F2_BLKSIZE
@@ -92,6 +92,12 @@ DHD_PM_RESUME_WAIT_INIT(sdioh_request_buffer_wait);
int sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, uint32 regaddr, int regsize, uint32 *data);
+/* workaround to simply return 0 as suggested by Broadcom */
+static int sdio_reset_comm(struct mmc_card *card)
+{
+ return 0;
+}
+
static int
sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
{
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c b/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c
index f2428ecb940f..5e8a57fb4780 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux_platdev.c
@@ -256,7 +256,7 @@ static int wifi_plat_dev_drv_probe(struct platform_device *pdev)
struct resource *resource;
wifi_adapter_info_t *adapter;
#ifdef CONFIG_DTS
- int irq, gpio;
+// int irq, gpio;
#endif /* CONFIG_DTS */
/* Android style wifi platform data device ("bcmdhd_wlan" or "bcm4329_wlan")
@@ -282,6 +282,7 @@ static int wifi_plat_dev_drv_probe(struct platform_device *pdev)
return -1;
}
+#if 0
/* This is to get the irq for the OOB */
gpio = of_get_gpio(pdev->dev.of_node, 0);
@@ -299,6 +300,7 @@ static int wifi_plat_dev_drv_probe(struct platform_device *pdev)
/* need to change the flags according to our requirement */
adapter->intr_flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL |
IORESOURCE_IRQ_SHAREABLE;
+#endif
#endif /* CONFIG_DTS */
wifi_plat_dev_probe_ret = dhd_wifi_platform_load();
@@ -461,12 +463,12 @@ static int wifi_ctrlfunc_register_drv(void)
void wifi_ctrlfunc_unregister_drv(void)
{
- struct device *dev1, *dev2;
-
#ifdef CONFIG_DTS
DHD_ERROR(("unregister wifi platform drivers\n"));
platform_driver_unregister(&wifi_platform_dev_driver);
#else
+ struct device *dev1, *dev2;
+
dev1 = bus_find_device(&platform_bus_type, NULL, WIFI_PLAT_NAME, wifi_platdev_match);
dev2 = bus_find_device(&platform_bus_type, NULL, WIFI_PLAT_NAME2, wifi_platdev_match);
if (!dts_enabled)