staging/wilc1000: remove WILC_SDIO/WILC_SPI macros
authorArnd Bergmann <arnd@arndb.de>
Mon, 16 Nov 2015 14:05:07 +0000 (15:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:19:20 +0000 (14:19 -0800)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/Makefile
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan.h

index fe480c76c521a5b15140fad64a2495d24631093b..dcba27bd3bce8482113a2c523b8acd91099c9dcc 100644 (file)
@@ -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\" \
index 5e37ec65d3bb14df7c06475cc91ef40cdfd89c31..f72f976906cc4dc73d9233f1166f269059fab4f3 100644 (file)
@@ -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");
index 44a590f80def2e3317b5bc5c0f7e54603550c17a..90ef650e722d25140e0155096e32bd9076667cf8 100644 (file)
 #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)
 
 /*******************************************/