Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252324

[PATCH 16/19] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH 16/19] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros
Date 2015-10-21 01:00 +0200
Message-ID <qlO2S-10k-13@gated-at.bofh.it> (permalink)
References <qlNTc-O7-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 b96fee8f94f2..9ce30e92ea3a 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 d12a4e7df32c..038c9b2eee6c 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1238,7 +1238,10 @@ static void wilc_pllupdate_isr_ext(u32 int_stats)
 	g_wlan.hif_func.hif_clear_int_ext(PLL_INT_CLR);
 
 	/* Waiting for PLL */
-	mdelay(WILC_PLL_TO);
+	if (g_wlan.io_func->io_type == HIF_SDIO)
+		mdelay(WILC_PLL_TO_SDIO);
+	else
+		mdelay(WILC_PLL_TO_SPI);
 
 	/* poll till read a valid data */
 	while (!(ISWILC1000(wilc_get_chipid(true)) && --trials)) {
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index 2e9b5d50ff7e..2f636534fc5d 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -143,11 +143,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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
  [PATCH 17/19] staging/wilc1000: pass hif operations through initialization Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
  [PATCH 19/19] [RFC] staging/wilc1000: use more regular probing Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
  [PATCH 08/19] staging/wilc1000: move wilc_wlan_inp_t into struct wilc Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 10/19] staging/wilc1000: unify device pointer Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 04/19] staging/wilc1000: move extern declarations to headers Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 05/19] staging/wilc1000: use NO_SECURITY instead of NO_ENCRYPT Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 16/19] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 14/19] staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 01/19] staging/wilc1000: remove unused functions Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
    Re: [PATCH 01/19] staging/wilc1000: remove unused functions Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 09:30 +0100
  [PATCH 06/19] staging/wilc1000: avoid static definitions in header Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 09/19] staging/wilc1000: move init/exit functions to driver files Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 07/19] staging/wilc1000: remove linux_wlan_{device_power,device_detection} Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 13/19] staging/wilc1000: move COMPLEMENT_BOOT code to linux_wlan_sdio.c Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 18/19] staging/wilc1000: split out bus specific modules Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
    [PATCH] fixup! staging/wilc1000: split out bus specific modules Arnd Bergmann <arnd@arndb.de> - 2015-10-21 16:30 +0200
  [PATCH 02/19] staging/wilc1000: make symbols static if possible Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  [PATCH 12/19] staging/wilc1000: use device pointer for phy creation Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
  Re: [PATCH 00/19] staging/wilc1000 cleanups glen lee <glen.lee@atmel.com> - 2015-10-21 12:10 +0200
    Re: [PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-21 13:00 +0200
    Re: [PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-22 14:30 +0200
      Re: [PATCH 00/19] staging/wilc1000 cleanups glen lee <glen.lee@atmel.com> - 2015-10-23 03:40 +0200
        Re: [PATCH 00/19] staging/wilc1000 cleanups Tony Cho <tony.cho@atmel.com> - 2015-10-23 10:00 +0200
          Re: [PATCH 00/19] staging/wilc1000 cleanups Tony Cho <tony.cho@atmel.com> - 2015-10-27 08:20 +0100

csiph-web