staging: wilc1000: remove sdio speed control codes
authorGlen Lee <glen.lee@atmel.com>
Wed, 18 Nov 2015 06:11:22 +0000 (15:11 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:30:50 +0000 (14:30 -0800)
This patch removes spi speed control related functions and variable. We cannot
get exact clock what we need in this way and it can causes some problem in host
side by setting the clock, so remove the codes.
Speed control codes in spi also will removed in next patch, so it's ok to
remove functions in linux_wlan.c and wilc_wlan.c which also not used anymore.

The Following functions and varialbe are removed.
MAX_SPEED, sdio_default_speed
wilc_bus_set_default_speed
wilc_bus_set_max_speed
linux_sdio_set_speed
linux_sdio_get_speed
wilc_sdio_set_max_speed
wilc_sdio_set_default_speed

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/linux_wlan_sdio.c
drivers/staging/wilc1000/linux_wlan_sdio.h
drivers/staging/wilc1000/wilc_sdio.c
drivers/staging/wilc1000/wilc_wlan.c

index 89b5aca2115c576a8b7e293117f67cf5bf0c7498..ab17110fb17e2358b58cd8fd62f316dbcadfd189 100644 (file)
@@ -733,12 +733,6 @@ void wilc1000_wlan_deinit(struct net_device *dev)
        if (wl->initialized)    {
                netdev_info(dev, "Deinitializing wilc1000...\n");
 
-#if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31)
-               PRINT_D(INIT_DBG, "skip wilc_bus_set_default_speed\n");
-#else
-               wilc_bus_set_default_speed();
-#endif
-
                PRINT_D(INIT_DBG, "Disabling IRQ\n");
                if (!wl->dev_irq_num &&
                    wl->ops->disable_interrupt) {
@@ -929,8 +923,6 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
                        goto _fail_irq_enable_;
                }
 
-               wilc_bus_set_max_speed();
-
                if (wilc_wlan_cfg_get(1, WID_FIRMWARE_VERSION, 1, 0)) {
                        int size;
                        char Firmware_ver[20];
index 1f366b5f0d2d282c2d4468efa395d3bdff4a6f86..761cb3ddd132de678b865f3a32bac744f895d9ac 100644 (file)
 
 #define SDIO_MODALIAS "wilc1000_sdio"
 
-#if defined(CUSTOMER_PLATFORM)
-/* TODO : User have to stable bus clock as user's environment. */
- #ifdef MAX_BUS_SPEED
- #define MAX_SPEED MAX_BUS_SPEED
- #else
- #define MAX_SPEED 50000000
- #endif
-#else
- #define MAX_SPEED (6 * 1000000) /* Max 50M */
-#endif
-
 static struct sdio_func *wilc_sdio_func;
-static unsigned int sdio_default_speed;
 
 #define SDIO_VENDOR_ID_WILC 0x0296
 #define SDIO_DEVICE_ID_WILC 0x5347
@@ -177,49 +165,9 @@ void wilc_sdio_disable_interrupt(struct wilc *dev)
        PRINT_D(INIT_DBG, "wilc_sdio_disable_interrupt OUT\n");
 }
 
-static int linux_sdio_set_speed(int speed)
-{
-       struct mmc_ios ios;
-       struct sdio_func *func = container_of(wilc_dev->dev, struct sdio_func, dev);
-
-       sdio_claim_host(func);
-
-       memcpy((void *)&ios, (void *)&func->card->host->ios, sizeof(struct mmc_ios));
-       func->card->host->ios.clock = speed;
-       ios.clock = speed;
-       func->card->host->ops->set_ios(func->card->host, &ios);
-       sdio_release_host(func);
-       PRINT_INFO(INIT_DBG, "@@@@@@@@@@@@ change SDIO speed to %d @@@@@@@@@\n", speed);
-
-       return 1;
-}
-
-static int linux_sdio_get_speed(void)
-{
-       struct sdio_func *func = container_of(wilc_dev->dev, struct sdio_func, dev);
-       return func->card->host->ios.clock;
-}
-
 int wilc_sdio_init(void)
 {
-
-       /**
-        *      TODO :
-        **/
-
-
-       sdio_default_speed = linux_sdio_get_speed();
        return 1;
 }
 
-int wilc_sdio_set_max_speed(void)
-{
-       return linux_sdio_set_speed(MAX_SPEED);
-}
-
-int wilc_sdio_set_default_speed(void)
-{
-       return linux_sdio_set_speed(sdio_default_speed);
-}
-
 MODULE_LICENSE("GPL");
index d7b213a7b18d14d2aaab626b0bf115227790cfa4..dbe911a9ae3d012a4b1a15e55356778fbac89e1d 100644 (file)
@@ -6,6 +6,3 @@ int wilc_sdio_cmd53(sdio_cmd53_t *cmd);
 
 int wilc_sdio_enable_interrupt(struct wilc *);
 void wilc_sdio_disable_interrupt(struct wilc *);
-int wilc_sdio_set_max_speed(void);
-int wilc_sdio_set_default_speed(void);
-
index f550ce059c159d0b943ccd943c4e25d7adf6e8ea..b0454a7e78a51cf6aa956eb7dd0b7560da9ec9c0 100644 (file)
@@ -610,16 +610,6 @@ _fail_:
        return 0;
 }
 
-static void sdio_set_max_speed(void)
-{
-       wilc_sdio_set_max_speed();
-}
-
-static void sdio_set_default_speed(void)
-{
-       wilc_sdio_set_default_speed();
-}
-
 static int sdio_read_size(u32 *size)
 {
 
@@ -927,8 +917,6 @@ const struct wilc_hif_func wilc_hif_sdio = {
        .hif_block_tx_ext = sdio_write,
        .hif_block_rx_ext = sdio_read,
        .hif_sync_ext = sdio_sync_ext,
-       .hif_set_max_bus_speed = sdio_set_max_speed,
-       .hif_set_default_bus_speed = sdio_set_default_speed,
        .enable_interrupt = wilc_sdio_enable_interrupt,
        .disable_interrupt = wilc_sdio_disable_interrupt,
 };
index df8503f83a12c9fed2ec462e358f09b53dd75aff..114ea9535f7908729a4075041b359de46e1df4d7 100644 (file)
@@ -1575,16 +1575,6 @@ int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 buffer_size)
        return ret;
 }
 
-void wilc_bus_set_max_speed(void)
-{
-       g_wlan.hif_func.hif_set_max_bus_speed();
-}
-
-void wilc_bus_set_default_speed(void)
-{
-       g_wlan.hif_func.hif_set_default_bus_speed();
-}
-
 static u32 init_chip(struct net_device *dev)
 {
        u32 chipid;