From 3bcfb01a01faf8ecc3d1d1ca19eee98c33d39a25 Mon Sep 17 00:00:00 2001 From: Nitin Bindal Date: Thu, 26 Apr 2012 15:18:59 +0530 Subject: arch: arm: tegra: Add support for marvell 8797 If bootloader specify that marvell wifi chip is present on the board, then create marvell wifi device, else create broadcom wifi device. Bug 954218 Change-Id: Ia0515e70b6d4b239a165b8d8629e3b90c19666b6 Signed-off-by: Nitin Bindal Reviewed-on: http://git-master/r/98490 Reviewed-by: Simone Willett Tested-by: Simone Willett --- arch/arm/mach-tegra/board-cardhu-sdhci.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-tegra/board-cardhu-sdhci.c') diff --git a/arch/arm/mach-tegra/board-cardhu-sdhci.c b/arch/arm/mach-tegra/board-cardhu-sdhci.c index 35541e4d27ae..73bd1f2c308a 100644 --- a/arch/arm/mach-tegra/board-cardhu-sdhci.c +++ b/arch/arm/mach-tegra/board-cardhu-sdhci.c @@ -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, @@ -257,6 +266,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) @@ -282,7 +292,11 @@ 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; } -- cgit v1.2.3