ESP8089 sdio premalloc default config

This commit is contained in:
xxh
2015-03-10 19:17:29 +08:00
committed by xxh
parent c859dedc50
commit d6207cb96f
5 changed files with 36 additions and 34 deletions

View File

@@ -54,7 +54,7 @@ void esp_common_exit(void)
#endif
}
static int __init esp_init(void)
static int /*__init*/ esp_init(void)
{
u64 ver;
int edf_ret = 0;
@@ -82,7 +82,7 @@ static int __init esp_init(void)
return esp_common_init();
}
static void __exit esp_exit(void)
static void /*__exit */ esp_exit(void)
{
esp_debugfs_exit();
#ifdef ESP_CLASS
@@ -92,5 +92,20 @@ static void __exit esp_exit(void)
esp_common_exit();
}
module_init(esp_init);
module_exit(esp_exit);
int rockchip_wifi_init_module_esp8089(void)
{
return esp_init();
}
void rockchip_wifi_exit_module_esp8089(void)
{
esp_exit();
}
EXPORT_SYMBOL(rockchip_wifi_init_module_esp8089);
EXPORT_SYMBOL(rockchip_wifi_exit_module_esp8089);
//module_init(esp_init);
//module_exit(esp_exit);

View File

@@ -1,8 +1,8 @@
/* Copyright (c) 2008 -2014 Espressif System.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
/* Copyright (c) 2008 -2014 Espressif System.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
static char esp_init_data[] = {0x5,0x0,4,2,5,5,5,2,5,0,4,5,5,4,5,5,4,-2,-3,-1,-16,-16,-16,-32,-32,-32,204,1,0xff,0xff,0,0,0,0,82,78,74,68,64,56,0,0,1,1,2,3,4,5,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,240,10,0x0,0x0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

View File

@@ -22,17 +22,6 @@ extern int rockchip_wifi_set_carddetect(int val);
extern int rk29sdk_wifi_power(int on);
extern int rk29sdk_wifi_set_carddetect(int val);
int rockchip_wifi_init_module_esp8089(void)
{
return esp_sdio_init();
}
void rockchip_wifi_exit_module_esp8089(void)
{
esp_sdio_exit();
}
void sif_platform_rescan_card(unsigned insert)
{
//rk29sdk_wifi_set_carddetect(insert); libing
@@ -68,7 +57,7 @@ void sif_platform_target_poweroff(void)
printk("=======================================================\n");
printk("==== Dislaunching Wi-Fi driver! (Powered by Rockchip) ====\n");
printk("=======================================================\n");
printk("Espressif ESP8089 SDIO WiFi driver (Powered by Rockchip,Ver %s) init.\n", ESP8089_DRV_VERSION);
printk("Espressif ESP8089 SDIO WiFi driver (Powered by Rockchip, Ver2.25(03/10/2015),Drv: %s) exit.\n", ESP8089_DRV_VERSION);
//rk29sdk_wifi_set_carddetect(0);
if(sif_get_bt_config() != 1)
@@ -81,7 +70,7 @@ void sif_platform_target_poweron(void)
printk("=======================================================\n");
printk("==== Launching Wi-Fi driver! (Powered by Rockchip) ====\n");
printk("=======================================================\n");
printk("Espressif ESP8089 SDIO WiFi driver (Powered by Rockchip,Ver %s) init.\n", ESP8089_DRV_VERSION);
printk("Espressif ESP8089 SDIO WiFi driver (Powered by Rockchip, Ver2.25(03/10/2015),Drv: %s) init.\n", ESP8089_DRV_VERSION);
if(sif_get_bt_config() == 1){
sif_platform_reset_target();
@@ -119,5 +108,3 @@ void sif_platform_ack_interrupt(struct esp_pub *epub)
}
#endif //ESP_ACK_INTERRUPT
EXPORT_SYMBOL(rockchip_wifi_init_module_esp8089);
EXPORT_SYMBOL(rockchip_wifi_exit_module_esp8089);

View File

@@ -1,9 +1,9 @@
/* Copyright (c) 2008 -2014 Espressif System.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
/* Copyright (c) 2008 -2014 Espressif System.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*
*/

View File

@@ -9,8 +9,8 @@ MODPATH := $(shell pwd)
DRIVER_NAME := esp_prealloc
####################### NORMAL OPTION ########################################
#EXTRA_CFLAGS += -DESP_PRE_MEM # normal mode, support SDIO
EXTRA_CFLAGS += -DESP_PRE_MEM -DESP_SPI # normal mode, support SPI
EXTRA_CFLAGS += -DESP_PRE_MEM # normal mode, support SDIO
#EXTRA_CFLAGS += -DESP_PRE_MEM -DESP_SPI # normal mode, support SPI
##############################################################################
####################### ADVANCE OPTION ###########################