arm: tegra: ardbeg board file change for cpu edp init
Xue Dong [Tue, 23 Jul 2013 00:03:11 +0000 (17:03 -0700)]
bug 1330937

Change-Id: I70216a8cb8007912670b7a403eb1736ad5ee4b9e
Signed-off-by: Xue Dong <xdong@nvidia.com>
Reviewed-on: http://git-master/r/256487
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>

arch/arm/mach-tegra/board-ardbeg-power.c
arch/arm/mach-tegra/board-ardbeg-sensors.c
arch/arm/mach-tegra/board-ardbeg.c
arch/arm/mach-tegra/board-ardbeg.h

index 701e166..1ae4762 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/resource.h>
 #include <linux/io.h>
+#include <mach/edp.h>
 #include <mach/irqs.h>
 #include <mach/hardware.h>
 #include <linux/regulator/fixed.h>
@@ -1584,6 +1585,22 @@ static int __init ardbeg_fixed_regulator_init(void)
 
 subsys_initcall_sync(ardbeg_fixed_regulator_init);
 
+int __init ardbeg_edp_init(void)
+{
+       unsigned int regulator_mA;
+
+       regulator_mA = get_maximum_cpu_current_supported();
+       if (!regulator_mA)
+               regulator_mA = 16000;
+
+       pr_info("%s: CPU regulator %d mA\n", __func__, regulator_mA);
+       tegra_init_cpu_edp_limits(regulator_mA);
+
+       return 0;
+}
+
+
+
 /* TO DO: set default governor for gpu throttling */
 /*
 static struct thermal_zone_params bonaire_soctherm_therm_gpu_tzp = {
index 12ad04e..af2fead 100644 (file)
@@ -28,6 +28,7 @@
 #include <media/dw9718.h>
 #include <media/as364x.h>
 #include <linux/pid_thermal_gov.h>
+#include <mach/edp.h>
 
 #include "cpu-tegra.h"
 #include "devices.h"
@@ -673,6 +674,10 @@ static int ardbeg_nct72_init(void)
        int nct72_port = TEGRA_GPIO_PI6;
        int ret = 0;
 
+       tegra_platform_edp_init(ardbeg_nct72_pdata.trips,
+                               &ardbeg_nct72_pdata.num_trips,
+                               12000);
+
 /*
        tegra_add_cdev_trips(ardbeg_nct72_pdata.trips,
                                &ardbeg_nct72_pdata.num_trips);
index c68f8b6..ccc8c15 100644 (file)
@@ -1078,8 +1078,8 @@ static void __init tegra_ardbeg_late_init(void)
        ardbeg_suspend_init();
 #if 0
        ardbeg_emc_init();
-       ardbeg_edp_init();
 #endif
+       ardbeg_edp_init();
        isomgr_init();
        ardbeg_touch_init();
        ardbeg_panel_init();
index 0118543..d1f7cf2 100644 (file)
@@ -26,6 +26,7 @@
 #include "gpio-names.h"
 
 int ardbeg_pinmux_init(void);
+int ardbeg_edp_init(void);
 int ardbeg_panel_init(void);
 int ardbeg_kbc_init(void);
 int ardbeg_sdhci_init(void);