diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-sdhci.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sdhci.c | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sdhci.c b/arch/arm/mach-tegra/board-cardhu-sdhci.c index fddf01f3e39d..c4e631ddc108 100644 --- a/arch/arm/mach-tegra/board-cardhu-sdhci.c +++ b/arch/arm/mach-tegra/board-cardhu-sdhci.c @@ -2,7 +2,7 @@ * arch/arm/mach-tegra/board-harmony-sdhci.c * * Copyright (C) 2010 Google, Inc. - * Copyright (C) 2011 NVIDIA Corporation. + * Copyright (C) 2011-2012 NVIDIA Corporation. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -63,7 +63,7 @@ static struct resource wifi_resource[] = { }, }; -static struct platform_device cardhu_wifi_device = { +static struct platform_device broadcom_wifi_device = { .name = "bcm4329_wlan", .id = 1, .num_resources = 1, @@ -73,6 +73,15 @@ static struct platform_device cardhu_wifi_device = { }, }; +static struct platform_device marvell_wifi_device = { + .name = "mrvl8797_wlan", + .id = 1, + .num_resources = 0, + .dev = { + .platform_data = &cardhu_wifi_control, + }, +}; + static struct resource sdhci_resource0[] = { [0] = { .start = INT_SDMMC1, @@ -112,6 +121,7 @@ static struct resource sdhci_resource3[] = { }, }; +#ifdef CONFIG_MMC_EMBEDDED_SDIO static struct embedded_sdio_data embedded_sdio_data2 = { .cccr = { .sdio_vsn = 2, @@ -126,18 +136,25 @@ static struct embedded_sdio_data embedded_sdio_data2 = { .device = 0x4329, }, }; +#endif static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = { .mmc_data = { .register_status_notify = cardhu_wifi_status_register, +#ifdef CONFIG_MMC_EMBEDDED_SDIO .embedded_sdio = &embedded_sdio_data2, - .built_in = 1, +#endif + .built_in = 0, }, +#ifndef CONFIG_MMC_EMBEDDED_SDIO + .pm_flags = MMC_PM_KEEP_POWER, +#endif .cd_gpio = -1, .wp_gpio = -1, .power_gpio = -1, -/* .tap_delay = 6, - .is_voltage_switch_supported = false, + .tap_delay = 0x0F, + .ddr_clk_limit = 41000000, +/* .is_voltage_switch_supported = false, .vdd_rail_name = NULL, .slot_rail_name = NULL, .vdd_max_uv = -1, @@ -150,8 +167,9 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data0 = { .cd_gpio = CARDHU_SD_CD, .wp_gpio = CARDHU_SD_WP, .power_gpio = -1, -/* .tap_delay = 6, - .is_voltage_switch_supported = true, + .tap_delay = 0x0F, + .ddr_clk_limit = 41000000, +/* .is_voltage_switch_supported = true, .vdd_rail_name = "vddio_sdmmc1", .slot_rail_name = "vddio_sd_slot", .vdd_max_uv = 3320000, @@ -166,11 +184,11 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = { .power_gpio = -1, .is_8bit = 1, .tap_delay = 0x0F, + .ddr_clk_limit = 41000000, .mmc_data = { .built_in = 1, } -/* .tap_delay = 6, - .is_voltage_switch_supported = false, +/* .is_voltage_switch_supported = false, .vdd_rail_name = NULL, .slot_rail_name = NULL, .vdd_max_uv = -1, @@ -250,6 +268,7 @@ static int cardhu_wifi_reset(int on) static int __init cardhu_wifi_init(void) { int rc; + int commchip_id = tegra_get_commchip_id(); rc = gpio_request(CARDHU_WLAN_PWR, "wlan_power"); if (rc) @@ -275,10 +294,28 @@ static int __init cardhu_wifi_init(void) if (rc) pr_err("WLAN_WOW gpio direction configuration failed:%d\n", rc); - platform_device_register(&cardhu_wifi_device); + if (commchip_id == COMMCHIP_MARVELL_SD8797) + platform_device_register(&marvell_wifi_device); + else + platform_device_register(&broadcom_wifi_device); + return 0; } +#ifdef CONFIG_TEGRA_PREPOWER_WIFI +static int __init cardhu_wifi_prepower(void) +{ + if (!machine_is_cardhu()) + return 0; + + cardhu_wifi_power(1); + + return 0; +} + +subsys_initcall_sync(cardhu_wifi_prepower); +#endif + int __init cardhu_sdhci_init(void) { struct board_info board_info; |