staging: wilc1000: remove unused interrupt status handling code
authorAjay Singh <ajay.kathat@microchip.com>
Tue, 10 Sep 2019 07:46:04 +0000 (07:46 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2019 09:37:26 +0000 (10:37 +0100)
Remove interrupt handling for unused interrupt status(PLL update and
Sleep). The firmware only initiates the interrupt for the data transfer
to host and rest are not used anymore.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20190910074514.3073-1-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan.h

index 2bbb359..771d8cb 100644 (file)
@@ -758,26 +758,6 @@ static void wilc_unknown_isr_ext(struct wilc *wilc)
        wilc->hif_func->hif_clear_int_ext(wilc, 0);
 }
 
-static void wilc_pllupdate_isr_ext(struct wilc *wilc, u32 int_stats)
-{
-       int trials = 10;
-
-       wilc->hif_func->hif_clear_int_ext(wilc, PLL_INT_CLR);
-
-       if (wilc->io_type == WILC_HIF_SDIO)
-               mdelay(WILC_PLL_TO_SDIO);
-       else
-               mdelay(WILC_PLL_TO_SPI);
-
-       while (!(is_wilc1000(wilc_get_chipid(wilc, true)) && --trials))
-               mdelay(1);
-}
-
-static void wilc_sleeptimer_isr_ext(struct wilc *wilc, u32 int_stats1)
-{
-       wilc->hif_func->hif_clear_int_ext(wilc, SLEEP_INT_CLR);
-}
-
 static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status)
 {
        u32 offset = wilc->rx_buffer_offset;
@@ -827,15 +807,9 @@ void wilc_handle_isr(struct wilc *wilc)
        acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
        wilc->hif_func->hif_read_int(wilc, &int_status);
 
-       if (int_status & PLL_INT_EXT)
-               wilc_pllupdate_isr_ext(wilc, int_status);
-
        if (int_status & DATA_INT_EXT)
                wilc_wlan_handle_isr_ext(wilc, int_status);
 
-       if (int_status & SLEEP_INT_EXT)
-               wilc_sleeptimer_isr_ext(wilc, int_status);
-
        if (!(int_status & (ALL_INT_EXT)))
                wilc_unknown_isr_ext(wilc);
 
index f566d04..7469fa4 100644 (file)
 #define WILC_CFG_RSP_STATUS    2
 #define WILC_CFG_RSP_SCAN      3
 
-#define WILC_PLL_TO_SDIO       4
-#define WILC_PLL_TO_SPI                2
 #define WILC_ABORT_REQ_BIT             BIT(31)
 
 #define WILC_RX_BUFF_SIZE      (96 * 1024)
 #define EN_VMM                 BIT(8)
 
 #define DATA_INT_EXT           INT_0
-#define PLL_INT_EXT            INT_1
-#define SLEEP_INT_EXT          INT_2
-#define ALL_INT_EXT            (DATA_INT_EXT | PLL_INT_EXT | SLEEP_INT_EXT)
-#define NUM_INT_EXT            3
+#define ALL_INT_EXT            DATA_INT_EXT
+#define NUM_INT_EXT            1
 
 #define DATA_INT_CLR           CLR_INT0
-#define PLL_INT_CLR            CLR_INT1
-#define SLEEP_INT_CLR          CLR_INT2
 
 #define ENABLE_RX_VMM          (SEL_VMM_TBL1 | EN_VMM)
 #define ENABLE_TX_VMM          (SEL_VMM_TBL0 | EN_VMM)