Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266862
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 17/20] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros |
| Date | 2015-11-11 00:50 +0100 |
| Message-ID | <qtqPL-3lH-13@gated-at.bofh.it> (permalink) |
| References | <qtqPL-3lH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The last remaining user of WILC_SDIO macro checks for the correct
time to wait in an interrupt for the PLL to settle. We can
replace this with a runtime check and remove both WILC_SDIO and
WILC_SPI, as we no longer need conditional compilation based on
the hardware type.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/wilc1000/Makefile | 3 +--
drivers/staging/wilc1000/wilc_wlan.c | 5 ++++-
drivers/staging/wilc1000/wilc_wlan.h | 7 ++-----
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile
index fe480c76c521..dcba27bd3bce 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -1,7 +1,6 @@
obj-$(CONFIG_WILC1000) += wilc1000.o
-ccflags-$(CONFIG_WILC1000_SDIO) += -DWILC_SDIO -DCOMPLEMENT_BOOT
-ccflags-$(CONFIG_WILC1000_SPI) += -DWILC_SPI
+ccflags-$(CONFIG_WILC1000_SDIO) += -DCOMPLEMENT_BOOT
ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \
-DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 5e37ec65d3bb..f72f976906cc 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1067,7 +1067,10 @@ static void wilc_pllupdate_isr_ext(u32 int_stats)
g_wlan.hif_func.hif_clear_int_ext(PLL_INT_CLR);
- mdelay(WILC_PLL_TO);
+ if (g_wlan.io_type == HIF_SDIO)
+ mdelay(WILC_PLL_TO_SDIO);
+ else
+ mdelay(WILC_PLL_TO_SPI);
while (!(ISWILC1000(wilc_get_chipid(true)) && --trials)) {
PRINT_D(TX_DBG, "PLL update retrying\n");
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index 44a590f80def..90ef650e722d 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -134,11 +134,8 @@
#define WILC_CFG_RSP_STATUS 2
#define WILC_CFG_RSP_SCAN 3
-#ifdef WILC_SDIO
-#define WILC_PLL_TO 4
-#else
-#define WILC_PLL_TO 2
-#endif
+#define WILC_PLL_TO_SDIO 4
+#define WILC_PLL_TO_SPI 2
#define ABORT_INT BIT(31)
/*******************************************/
--
2.1.0.rc2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/20] staging/wilc1000: cleanups once again Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 07/20] staging/wilc1000: avoid static definitions in header Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 01/20] staging/wilc1000: add struct net_device declaration Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration Joe Perches <joe@perches.com> - 2015-11-11 00:50 +0100
Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration Arnd Bergmann <arnd@arndb.de> - 2015-11-11 01:00 +0100
Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-11 01:10 +0100
Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration Arnd Bergmann <arnd@arndb.de> - 2015-11-11 01:20 +0100
Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-11 01:40 +0100
[PATCH 17/20] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 10/20] staging/wilc1000: move init/exit functions to driver files Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 06/20] staging/wilc1000: use NO_SECURITY instead of NO_ENCRYPT Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 15/20] staging/wilc1000: pass hif operations through initialization Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
Re: [PATCH 15/20] staging/wilc1000: pass hif operations through initialization glen lee <glen.lee@atmel.com> - 2015-11-12 11:10 +0100
Re: [PATCH 15/20] staging/wilc1000: pass hif operations through initialization Arnd Bergmann <arnd@arndb.de> - 2015-11-12 12:40 +0100
Re: [PATCH 15/20] staging/wilc1000: pass hif operations through initialization glen lee <glen.lee@atmel.com> - 2015-11-13 08:50 +0100
Re: [PATCH 15/20] staging/wilc1000: pass hif operations through initialization Arnd Bergmann <arnd@arndb.de> - 2015-11-13 10:20 +0100
Re: [PATCH 15/20] staging/wilc1000: pass hif operations through initialization glen lee <glen.lee@atmel.com> - 2015-11-16 02:40 +0100
[PATCH 19/20] staging/wilc1000: use more regular probing Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
Re: [PATCH 19/20] staging/wilc1000: use more regular probing Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-11 09:00 +0100
Re: [PATCH 19/20] staging/wilc1000: use more regular probing Arnd Bergmann <arnd@arndb.de> - 2015-11-11 10:00 +0100
[PATCH 09/20] staging/wilc1000: move wilc_wlan_inp_t into struct wilc Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 20/20] staging/wilc1000: pass struct wilc to most linux_wlan.c functions Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 13/20] staging/wilc1000: use device pointer for phy creation Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 08/20] staging/wilc1000: remove linux_wlan_{device_power,device_detection} Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 11/20] staging/wilc1000: unify device pointer Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 14/20] staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO Arnd Bergmann <arnd@arndb.de> - 2015-11-11 00:50 +0100
[PATCH 02/20] staging/wilc1000: remove unused functions Arnd Bergmann <arnd@arndb.de> - 2015-11-11 01:00 +0100
csiph-web