ARM: tegra: ardbeg: Enable HS200 mode for eMMC
Naveen Kumar Arepalli [Thu, 19 Sep 2013 09:32:43 +0000 (14:32 +0530)]
-Enable HS200 mode for eMMC
-Enable POR frequency for eMMC on E1780

Bug 1259830

Change-Id: Ia0695d213f0c4020d48ccf673728a7e44fc2d545
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
(cherry picked from commit 67169f277e90012aef5dcd423508eeda72b4bca6)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>

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

index d41aefa..e7a1f23 100644 (file)
@@ -37,6 +37,7 @@
 #include "board-ardbeg.h"
 #include "dvfs.h"
 #include "iomap.h"
+#include "tegra-board-id.h"
 
 #define ARDBEG_WLAN_RST        TEGRA_GPIO_PCC5
 #define ARDBEG_WLAN_PWR        TEGRA_GPIO_PX7
@@ -182,7 +183,6 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = {
                .built_in = 1,
                .ocr_mask = MMC_OCR_1V8_MASK,
        },
-       .uhs_mask = MMC_MASK_HS200,
        .ddr_clk_limit = 51000000,
        .max_clk_limit = 102000000,
        .calib_3v3_offsets = 0x0202,
@@ -311,6 +311,7 @@ int __init ardbeg_sdhci_init(void)
        int nominal_core_mv;
        int min_vcore_override_mv;
        int boot_vcore_mv;
+       struct board_info board_info;
 
        nominal_core_mv =
                tegra_dvfs_rail_get_nominal_millivolts(tegra_core_rail);
@@ -335,6 +336,13 @@ int __init ardbeg_sdhci_init(void)
                tegra_sdhci_platform_data2.boot_vcore_mv = boot_vcore_mv;
                tegra_sdhci_platform_data3.boot_vcore_mv = boot_vcore_mv;
        }
+
+       tegra_get_board_info(&board_info);
+       if (board_info.board_id == BOARD_E1780)
+               tegra_sdhci_platform_data3.max_clk_limit = 200000000;
+       else
+               tegra_sdhci_platform_data3.uhs_mask = MMC_MASK_HS200;
+
        platform_device_register(&tegra_sdhci_device3);
        platform_device_register(&tegra_sdhci_device2);
        platform_device_register(&tegra_sdhci_device0);