ARM: tegra: pluto: Pass nominal core voltage
Pavan Kunapuli [Wed, 17 Apr 2013 08:10:50 +0000 (13:10 +0530)]
Pass nominal core voltage value through mmc platform data to be used
for setting core voltage constraints during tuning.
Set sdmmc4 clk limit to 156MHz for HS200 mode.

Bug 1167519
Bug 1225343

Reviewed-on: http://git-master/r/200410
(cherry picked from commit 48a5e1f211d72a067507291407dfaa9686669b64)
Change-Id: Ibb93345bee9407ed12cfa2b2202016d9908b00d4
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/212414
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

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

index d88e728..204e839 100644 (file)
@@ -32,6 +32,7 @@
 #include "gpio-names.h"
 #include "board.h"
 #include "board-pluto.h"
+#include "dvfs.h"
 #include "iomap.h"
 
 #define PLUTO_WLAN_PWR TEGRA_GPIO_PCC5
@@ -169,6 +170,7 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = {
        .tap_delay = 0x5,
        .trim_delay = 0x3,
        .ddr_clk_limit = 41000000,
+       .max_clk_limit = 156000000,
        .mmc_data = {
                .built_in = 1,
                .ocr_mask = MMC_OCR_1V8_MASK,
@@ -300,6 +302,16 @@ subsys_initcall_sync(pluto_wifi_prepower);
 int __init pluto_sdhci_init(void)
 {
 #ifndef CONFIG_USE_OF
+       int nominal_core_mv;
+
+       nominal_core_mv =
+               tegra_dvfs_rail_get_nominal_millivolts(tegra_core_rail);
+       if (nominal_core_mv > 0) {
+               pluto_tegra_sdhci_platform_data0.nominal_vcore_uV =
+                       nominal_core_mv * 1000;
+               tegra_sdhci_platform_data3.nominal_vcore_uV = nominal_core_mv *
+                       1000;
+       }
        platform_device_register(&tegra_sdhci_device3);
        platform_device_register(&tegra_sdhci_device2);
        platform_device_register(&tegra_sdhci_device0);