Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 3cb6b77143d9a17f5d412f33de6cd98db11ba3b4 Mon Sep 17 00:00:00 2001
- From: Nishanth Menon <nm@ti.com>
- Date: Fri, 26 Apr 2013 02:21:55 -0500
- Subject: [PATCH] TESTING HACKHACK: add dummy virt-consumer for OMAP3/4/5
- Set CONFIG_REGULATOR_VIRTUAL_CONSUMER=y to use
- OMAP3630(beagle-XM):
- MPU :
- REG=/sys/class/regulator/regulator.9
- CONS=/sys/devices/platform/reg-virt-consumer.0
- for V in 1012500 1200000 1325000 1375000
- do
- echo -n "$V">$CONS/min_microvolts
- echo -n "$V">$CONS/max_microvolts
- echo "Tried $V, Voltage =" `cat $REG/microvolts`
- done
- OMAP4460(Panda-ES): MPU: http://pastebin.com/TKPPZDQ1
- REG=/sys/class/regulator/regulator.1
- CONS=/sys/devices/platform/reg-virt-consumer.0
- for V in 1025000 1200000 1313000 1375000 1389000
- do
- echo -n "$V">$CONS/min_microvolts
- echo -n "$V">$CONS/max_microvolts
- echo "Tried $V, Voltage =" `cat $REG/microvolts`
- done
- IVA:
- REG=/sys/class/regulator/regulator.2
- CONS=/sys/devices/platform/reg-virt-consumer.1
- for V in 950000 1140000 1291000 1375000 1376000
- do
- echo -n "$V">$CONS/min_microvolts
- echo -n "$V">$CONS/max_microvolts
- echo "Tried $V, Voltage =" `cat $REG/microvolts`
- done
- OMAP5: Similarly
- Signed-off-by: Nishanth Menon <nm@ti.com>
- ---
- arch/arm/mach-omap2/pm.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 53 insertions(+)
- diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
- index 6cf95160..635f40b 100644
- --- a/arch/arm/mach-omap2/pm.c
- +++ b/arch/arm/mach-omap2/pm.c
- @@ -265,6 +265,57 @@ static void __init omap4_init_voltages(void)
- omap2_set_init_voltage("iva", "dpll_iva_m5x2_ck", "iva");
- }
- +static inline void dummy_consumers_for_abb_test(void)
- +{
- + if (cpu_is_omap34xx()) {
- + char name1[] = "abb_mpu_iva";
- + struct platform_device_info devinfo1 = {
- + .name = "reg-virt-consumer",
- + .data = name1,
- + .size_data = sizeof(name1),
- + };
- + platform_device_register_full(&devinfo1);
- + }
- +
- + if (cpu_is_omap44xx()) {
- + char name1[] = "abb_mpu";
- + char name2[] = "abb_iva";
- + struct platform_device_info devinfo1 = {
- + .name = "reg-virt-consumer",
- + .id = 0,
- + .data = name1,
- + .size_data = sizeof(name1),
- + };
- + struct platform_device_info devinfo2 = {
- + .name = "reg-virt-consumer",
- + .id = 1,
- + .data = name2,
- + .size_data = sizeof(name2),
- + };
- + platform_device_register_full(&devinfo1);
- + platform_device_register_full(&devinfo2);
- + }
- +
- + if (soc_is_omap54xx()) {
- + char name1[] = "abb_mpu";
- + char name2[] = "abb_mm";
- + struct platform_device_info devinfo1 = {
- + .name = "reg-virt-consumer",
- + .id = 0,
- + .data = name1,
- + .size_data = sizeof(name1),
- + };
- + struct platform_device_info devinfo2 = {
- + .name = "reg-virt-consumer",
- + .id = 1,
- + .data = name2,
- + .size_data = sizeof(name2),
- + };
- + platform_device_register_full(&devinfo1);
- + platform_device_register_full(&devinfo2);
- + }
- +}
- +
- static inline void omap_init_cpufreq(void)
- {
- struct platform_device_info devinfo = { };
- @@ -310,6 +361,8 @@ int __init omap2_common_pm_late_init(void)
- /* cpufreq dummy device instantiation */
- omap_init_cpufreq();
- + dummy_consumers_for_abb_test();
- +
- #ifdef CONFIG_SUSPEND
- suspend_set_ops(&omap_pm_ops);
- #endif
- --
- 1.7.9.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement