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 9f29ac5..05bb3e2 100644 (file)
@@ -113,6 +113,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data2 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -127,13 +128,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 dc93aea..c32e7eb 100644 (file)
@@ -110,6 +110,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data0 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -124,16 +125,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 1ca076a..6159ee3 100644 (file)
@@ -102,6 +102,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data2 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -116,13 +117,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 186a9dc..a8e1280 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,13 +124,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 a798bf2..fef3850 100644 (file)
@@ -145,6 +145,7 @@ static struct resource sdhci_resource3[] = {
        },
 };
 
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
 static struct embedded_sdio_data embedded_sdio_data1 = {
        .cccr   = {
                .sdio_vsn       = 2,
@@ -159,13 +160,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,