arm:tegra[3]: make embedded_sdio platform data conditional
Mursalin Akon [Fri, 16 Mar 2012 18:15:56 +0000 (11:15 -0700)]
embedded_sdio is used, iff MMC_EMBEDDED_SDIO
Kconfig is on. This CL makes it explicit.

Additionally, for SDIO sdhci always keep the power on.

Bug 956238

Change-Id: I44e484b0705b50f942f177ee8d95fb363f38b8c1
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/90670
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/mach-tegra/board-cardhu-sdhci.c
arch/arm/mach-tegra/board-enterprise-sdhci.c
arch/arm/mach-tegra/board-kai-sdhci.c
arch/arm/mach-tegra/board-ventana-sdhci.c
arch/arm/mach-tegra/board-whistler-sdhci.c

index fddf01f..b1ca3de 100644 (file)
@@ -112,6 +112,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data2 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -126,13 +127,19 @@ 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,
+#endif
                .built_in = 1,
        },
+#ifndef CONFIG_MMC_EMBEDDED_SDIO
+       .pm_flags = MMC_PM_KEEP_POWER,
+#endif
        .cd_gpio = -1,
        .wp_gpio = -1,
        .power_gpio = -1,
index af1a9ea..6455cdb 100644 (file)
@@ -109,6 +109,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data0 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -123,16 +124,22 @@ static struct embedded_sdio_data embedded_sdio_data0 = {
                .device         = 0x4329,
        },
 };
+#endif
 
 static struct tegra_sdhci_platform_data tegra_sdhci_platform_data0 = {
        .mmc_data = {
                .register_status_notify = enterprise_wifi_status_register,
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
                .embedded_sdio = &embedded_sdio_data0,
+#endif
                /* FIXME need to revert the built_in change
                once we use get the signal strength fix of
                bcmdhd driver from broadcom for bcm4329 chipset*/
                .built_in = 0,
        },
+#ifndef CONFIG_MMC_EMBEDDED_SDIO
+       .pm_flags = MMC_PM_KEEP_POWER,
+#endif
        .cd_gpio = -1,
        .wp_gpio = -1,
        .power_gpio = -1,
index 3e48992..9c857a7 100644 (file)
@@ -101,6 +101,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data2 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -115,13 +116,19 @@ static struct embedded_sdio_data embedded_sdio_data2 = {
                .device         = 0x4076,
        },
 };
+#endif
 
 static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
        .mmc_data = {
                .register_status_notify = kai_wifi_status_register,
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
                /* .embedded_sdio = &embedded_sdio_data2, */
+#endif
                .built_in = 1,
        },
+#ifndef CONFIG_MMC_EMBEDDED_SDIO
+       .pm_flags = MMC_PM_KEEP_POWER,
+#endif
        .cd_gpio = -1,
        .wp_gpio = -1,
        .power_gpio = -1,
index 49720cd..81bbdc6 100644 (file)
@@ -108,6 +108,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data0 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -122,13 +123,19 @@ static struct embedded_sdio_data embedded_sdio_data0 = {
                .device         = 0x4329,
        },
 };
+#endif
 
 static struct tegra_sdhci_platform_data tegra_sdhci_platform_data0 = {
        .mmc_data = {
                .register_status_notify = ventana_wifi_status_register,
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
                .embedded_sdio = &embedded_sdio_data0,
+#endif
                .built_in = 1,
        },
+#ifndef CONFIG_MMC_EMBEDDED_SDIO
+       .pm_flags = MMC_PM_KEEP_POWER,
+#endif
        .cd_gpio = -1,
        .wp_gpio = -1,
        .power_gpio = -1,
index 08ebe33..ebd292a 100644 (file)
@@ -144,6 +144,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data1 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -158,13 +159,19 @@ static struct embedded_sdio_data embedded_sdio_data1 = {
                .device         = 0x4329,
        },
 };
+#endif
 
 static struct tegra_sdhci_platform_data tegra_sdhci_platform_data1 = {
        .mmc_data = {
                .register_status_notify = whistler_wifi_status_register,
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
                .embedded_sdio = &embedded_sdio_data1,
+#endif
                .built_in = 1,
        },
+#ifndef CONFIG_MMC_EMBEDDED_SDIO
+       .pm_flags = MMC_PM_KEEP_POWER,
+#endif
        .cd_gpio = -1,
        .wp_gpio = -1,
        .power_gpio = -1,