ARM: tegra: ardbeg: Pass vcore limits in plat data
Naveen Kumar Arepalli [Wed, 11 Sep 2013 13:25:10 +0000 (18:25 +0530)]
Pass boot core voltage, nominal core voltage, min vcore override
voltage limits through platform data for sdmmc1/3/4.

Bug 1344651
Bug 1344649
Bug 1340258

Change-Id: Ibb234f03f0c750c3ba645280ca2d72485959a74e
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/273195
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

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

index 26a250d..10f1e71 100644 (file)
@@ -35,6 +35,7 @@
 #include "gpio-names.h"
 #include "board.h"
 #include "board-ardbeg.h"
+#include "dvfs.h"
 #include "iomap.h"
 
 #define ARDBEG_WLAN_RST        TEGRA_GPIO_PCC5
@@ -296,6 +297,33 @@ subsys_initcall_sync(ardbeg_wifi_prepower);
 
 int __init ardbeg_sdhci_init(void)
 {
+       int nominal_core_mv;
+       int min_vcore_override_mv;
+       int boot_vcore_mv;
+
+       nominal_core_mv =
+               tegra_dvfs_rail_get_nominal_millivolts(tegra_core_rail);
+       if (nominal_core_mv) {
+               tegra_sdhci_platform_data0.nominal_vcore_mv = nominal_core_mv;
+               tegra_sdhci_platform_data2.nominal_vcore_mv = nominal_core_mv;
+               tegra_sdhci_platform_data3.nominal_vcore_mv = nominal_core_mv;
+       }
+       min_vcore_override_mv =
+               tegra_dvfs_rail_get_override_floor(tegra_core_rail);
+       if (min_vcore_override_mv) {
+               tegra_sdhci_platform_data0.min_vcore_override_mv =
+                       min_vcore_override_mv;
+               tegra_sdhci_platform_data2.min_vcore_override_mv =
+                       min_vcore_override_mv;
+               tegra_sdhci_platform_data3.min_vcore_override_mv =
+                       min_vcore_override_mv;
+       }
+       boot_vcore_mv = tegra_dvfs_rail_get_boot_level(tegra_core_rail);
+       if (boot_vcore_mv) {
+               tegra_sdhci_platform_data0.boot_vcore_mv = boot_vcore_mv;
+               tegra_sdhci_platform_data2.boot_vcore_mv = boot_vcore_mv;
+               tegra_sdhci_platform_data3.boot_vcore_mv = boot_vcore_mv;
+       }
        platform_device_register(&tegra_sdhci_device3);
        platform_device_register(&tegra_sdhci_device2);
        platform_device_register(&tegra_sdhci_device0);