ARM: tegra: ardbeg: Pass vcore limits in plat data
[linux-3.10.git] / 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);