arm: tegra: ardbeg: Add Marvell platform data
Nagarjuna Kristam [Fri, 27 Sep 2013 04:22:38 +0000 (09:22 +0530)]
Add Marvell platform data, to control Wifi power and wake GPIO

Bug 1375751

Change-Id: I0ab9d25ef540d1b034568d2d817e05243a889005
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/279653
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
(cherry picked from commit 918930abd6c09c3d0d5c296b1d2d580ed1392447)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>

arch/arm/mach-tegra/board-ardbeg-sdhci.c

index 313a07b..e28bb5e 100644 (file)
@@ -77,6 +77,23 @@ static struct platform_device ardbeg_wifi_device = {
        },
 };
 
+static struct resource mrvl_wifi_resource[] = {
+       [0] = {
+               .name   = "mrvl_wlan_irq",
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL | IORESOURCE_IRQ_SHAREABLE,
+       },
+};
+
+static struct platform_device marvell_wifi_device = {
+       .name           = "mrvl_wlan",
+       .id             = 1,
+       .num_resources  = 1,
+       .resource       = mrvl_wifi_resource,
+       .dev            = {
+               .platform_data = &ardbeg_wifi_control,
+       },
+};
+
 static struct resource sdhci_resource0[] = {
        [0] = {
                .start  = INT_SDMMC1,
@@ -287,6 +304,11 @@ static int __init ardbeg_wifi_init(void)
                gpio_to_irq(ARDBEG_WLAN_WOW);
 
        platform_device_register(&ardbeg_wifi_device);
+
+       mrvl_wifi_resource[0].start = mrvl_wifi_resource[0].end =
+               gpio_to_irq(ARDBEG_WLAN_WOW);
+       platform_device_register(&marvell_wifi_device);
+
        return 0;
 }