From: xbw Date: Fri, 10 Aug 2012 06:02:20 +0000 (+0800) Subject: add MTK-combo-module X-Git-Tag: firefly_0821_release~8922^2~30 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=17f39ed917874e77e80411f33faba1b7ee8138c8;p=firefly-linux-kernel-4.4.55.git add MTK-combo-module --- diff --git a/arch/arm/mach-rk30/board-rk30-sdk.c b/arch/arm/mach-rk30/board-rk30-sdk.c index c9dc5095026e..dc753d662cff 100755 --- a/arch/arm/mach-rk30/board-rk30-sdk.c +++ b/arch/arm/mach-rk30/board-rk30-sdk.c @@ -67,6 +67,10 @@ #include "../../../drivers/staging/android/timed_gpio.h" #endif +#if defined(CONFIG_MT6620) +#include +#endif + #ifdef CONFIG_THREE_FB_BUFFER #define RK30_FB0_MEM_SIZE 12*SZ_1M #else @@ -1486,6 +1490,11 @@ static struct platform_device *devices[] __initdata = { #if defined(CONFIG_WIFI_CONTROL_FUNC)||defined(CONFIG_WIFI_COMBO_MODULE_CONTROL_FUNC) &rk29sdk_wifi_device, #endif + +#if defined(CONFIG_MT6620) + &mt3326_device_gps, +#endif + #ifdef CONFIG_RK29_SUPPORT_MODEM &rk30_device_modem, #endif @@ -1822,6 +1831,10 @@ static void __init machine_rk30_board_init(void) #ifdef CONFIG_WIFI_CONTROL_FUNC rk29sdk_wifi_bt_gpio_control_init(); #endif + +#if defined(CONFIG_MT6620) + clk_set_rate(clk_get_sys("rk_serial.0", "uart"), 16*1000000); +#endif } static void __init rk30_reserve(void) diff --git a/drivers/Kconfig b/drivers/Kconfig index a95047a6fe0a..fd5737ef1600 100755 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -140,4 +140,6 @@ source "drivers/smc/Kconfig" source "drivers/cir/Kconfig" +source "drivers/mtk_wcn_combo/Kconfig" + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index 12345dd77085..bb738dfc653a 100755 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -130,3 +130,4 @@ obj-$(CONFIG_TEST_CODE) += testcode/ obj-y += smc/ obj-y += cir/ obj-$(CONFIG_ARCH_RK29) += dbg/ +obj-$(CONFIG_MTK_COMBO) += mtk_wcn_combo/ diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c old mode 100644 new mode 100755 index 05c523cd2694..95a097256c97 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1225,7 +1225,7 @@ done: spin_unlock_irqrestore(&gpio_lock, flags); return status; } -EXPORT_SYMBOL_GPL(gpio_request); +EXPORT_SYMBOL(gpio_request);//EXPORT_SYMBOL_GPL(gpio_request); void gpio_free(unsigned gpio) { @@ -1262,7 +1262,9 @@ void gpio_free(unsigned gpio) spin_unlock_irqrestore(&gpio_lock, flags); } -EXPORT_SYMBOL_GPL(gpio_free); +//EXPORT_SYMBOL_GPL(gpio_free); +EXPORT_SYMBOL(gpio_free); + /** * gpio_request_one - request a single GPIO with initial configuration @@ -1418,7 +1420,9 @@ fail: __func__, gpio, status); return status; } -EXPORT_SYMBOL_GPL(gpio_direction_input); +//EXPORT_SYMBOL_GPL(gpio_direction_input); +EXPORT_SYMBOL(gpio_direction_input); + int gpio_direction_output(unsigned gpio, int value) { @@ -1475,7 +1479,8 @@ fail: __func__, gpio, status); return status; } -EXPORT_SYMBOL_GPL(gpio_direction_output); +//EXPORT_SYMBOL_GPL(gpio_direction_output); +EXPORT_SYMBOL(gpio_direction_output); /* gpio pull up or pull down @@ -1536,7 +1541,8 @@ fail: __func__, gpio, status); return status; } -EXPORT_SYMBOL_GPL(gpio_pull_updown); +//EXPORT_SYMBOL_GPL(gpio_pull_updown); +EXPORT_SYMBOL(gpio_pull_updown); /** * gpio_set_debounce - sets @debounce time for a @gpio @@ -1626,7 +1632,9 @@ int __gpio_get_value(unsigned gpio) trace_gpio_value(gpio, 1, value); return value; } -EXPORT_SYMBOL_GPL(__gpio_get_value); +//EXPORT_SYMBOL_GPL(__gpio_get_value); +EXPORT_SYMBOL(__gpio_get_value); + /** * __gpio_set_value() - assign a gpio's value @@ -1650,7 +1658,8 @@ void __gpio_set_value(unsigned gpio, int value) trace_gpio_value(gpio, 0, value); chip->set(chip, gpio - chip->base, value); } -EXPORT_SYMBOL_GPL(__gpio_set_value); +//EXPORT_SYMBOL_GPL(__gpio_set_value); +EXPORT_SYMBOL(__gpio_set_value); /** * __gpio_cansleep() - report whether gpio value access will sleep diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig old mode 100644 new mode 100755 index 59c5914ddf52..792268c67c2e --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -55,6 +55,16 @@ choice ---help--- A library for Broadcom BCM4319 SDIO WLAN devices. + config MT6620 + depends on WLAN_80211 && MMC && MTK_COMBO + select WIRELESS_EXT + select WEXT_PRIV + select IEEE80211 + select FW_LOADER + bool "MTK MT6620 WiFi SDIO" + ---help--- + A library for MTK_wcn_combo SDIO WLAN devices. + config MV8686 depends on WLAN_80211 && MMC select WIRELESS_EXT diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h old mode 100644 new mode 100755 index 396e8fc8910e..fc55a37ea6ae --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -558,6 +558,11 @@ struct station_info { struct sta_bss_parameters bss_param; int generation; + +#if defined(CONFIG_MT6620) + const u8 *assoc_req_ies; + size_t assoc_req_ies_len; +#endif }; /** diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c old mode 100644 new mode 100755 index 3b3919864078..ca8e80e6e5df --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1530,6 +1530,7 @@ int hci_register_dev(struct hci_dev *hdev) hci_register_sysfs(hdev); +#if !defined(CONFIG_MT6620) hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev, RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops, hdev); if (hdev->rfkill) { @@ -1542,6 +1543,7 @@ int hci_register_dev(struct hci_dev *hdev) set_bit(HCI_AUTO_OFF, &hdev->flags); set_bit(HCI_SETUP, &hdev->flags); queue_work(hdev->workqueue, &hdev->power_on); +#endif hci_notify(hdev, HCI_DEV_REG);