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) {
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];
#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
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");
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)
{
.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,
};