Remove unused voltagedomain data for AM33xx
Subsystems (4)
v2 cover Remove unused voltagedomain data for AM33xx
Hi,
The powerdomain framework currently expects to always have a voltagedomain associated with a given powerdomain. We already have AM33xx which has no Voltage Controller/Voltage Processor as part of PRCM. There are more SoCs' to follow starting with AM437x and DRA7xx which do not have VC/VP. All these SoCs', hence do not support any form of auto-scaling of voltages, that was possible on earlier OMAPs' using the VFSM to trigger an i2c communication to the PMIC automatically on hitting a low power state.
Instead of adding dummy voltage domain data files, like was done for the AM33xx case, make the powerdomain framework aware of the fact that some SoCs' might not really have support for auto-scaling of voltages in hw.
Patches are based of 3.10-rc6 and are boot tested on am335x bone.
Rajendra Nayak (2):
ARM: OMAP2+: Powerdomain: Remove the need to always have a voltdm
associated to a pwrdm
ARM: AM33xx: Remove the unused voltagedomain data
arch/arm/mach-omap2/Makefile | 1 - arch/arm/mach-omap2/io.c | 1 - arch/arm/mach-omap2/powerdomain.c | 5 +++ arch/arm/mach-omap2/powerdomain.h | 2 ++ arch/arm/mach-omap2/prm33xx.c | 7 ++++ arch/arm/mach-omap2/voltage.h | 1 - arch/arm/mach-omap2/voltagedomains33xx_data.c | 43 ------------------------- 7 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 arch/arm/mach-omap2/voltagedomains33xx_data.c
Signature · 1 line
1.7.9.5
PATCH v2 1/2 ARM: OMAP2+: Powerdomain: Remove the need to always have a voltdm associated to a pwrdm
The powerdomain framework currently expects all powerdomains to be associated with a corresponding voltagedomain. For some SoCs' (like the already existing AM33xx family, or for the upcoming AM437x and DRA7 SoCs') which
do not have a Voltage controller/Voltage Processor (neither the SR I2C bus to communicate with the PMIC) there is no need for a Powerdomain to have a voltage domain association since there is no auto-scaling of voltages possible using the voltage FSM.
Extend the arch operations to add an api which the powerdomain core can then use to identify if a voltdm lookup and association for a powerdomain is really needed.
--- arch/arm/mach-omap2/powerdomain.c | 5 +++++ arch/arm/mach-omap2/powerdomain.h | 2 ++ 2 files changed, 7 insertions(+)
arch/arm/mach-omap2/powerdomain.c +5 -0
@@ -102,6 +102,10 @@ static int _pwrdm_register(struct powerdomain *pwrdm)if (_pwrdm_lookup (pwrdm->name))return -EEXIST ; +if (arch_pwrdm && arch_pwrdm->pwrdm_has_voltdm) +if (!arch_pwrdm->pwrdm_has_voltdm ()) + goto skip_voltdm; + voltdm =voltdm_lookup (pwrdm->voltdm.name);if (!voltdm) { pr_err("powerdomain: %s: voltagedomain %s does not exist\n",
@@ -111,6 +115,7 @@ static int _pwrdm_register(struct powerdomain *pwrdm) pwrdm->voltdm.ptr = voltdm;INIT_LIST_HEAD (&pwrdm->voltdm_node);voltdm_add_pwrdm (voltdm, pwrdm); +skip_voltdm:spin_lock_init (&pwrdm->_lock);list_add (&pwrdm->node, &pwrdm_list);
arch/arm/mach-omap2/powerdomain.h +2 -0
@@ -166,6 +166,7 @@ struct powerdomain {* @pwrdm_disable_hdwr_sar: Disable Hardware Save-Restore feature for a pd * @pwrdm_set_lowpwrstchange: Enable pd transitions from a shallow to deep sleep * @pwrdm_wait_transition: Wait for a pd state transition to complete +* @pwrdm_has_voltdm: Check if a voltdm association is needed * * Regarding @pwrdm_set_lowpwrstchange: On the OMAP2 and 3-family * chips, a powerdomain's power state is not allowed to directly
@@ -196,6 +197,7 @@ struct pwrdm_ops {int (*pwrdm_disable_hdwr_sar)(struct powerdomain *pwrdm);int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm);int (*pwrdm_wait_transition)(struct powerdomain *pwrdm); +int (*pwrdm_has_voltdm)(void ); };int pwrdm_register_platform_funcs (struct pwrdm_ops *custom_funcs);
Signature · 1 line
1.7.9.5
PATCH v2 2/2 ARM: AM33xx: Remove the unused voltagedomain data
In reply to Rajendra NayakNow that there is a way to tell the powerdomain core about missing voltage domain auto-scaling control in SoCs', get rid of the dummy voltage domain data populated for AM33xx devices.
--- arch/arm/mach-omap2/Makefile | 1 - arch/arm/mach-omap2/io.c | 1 - arch/arm/mach-omap2/prm33xx.c | 7 ++++ arch/arm/mach-omap2/voltage.h | 1 - arch/arm/mach-omap2/voltagedomains33xx_data.c | 43 ------------------------- 5 files changed, 7 insertions(+), 46 deletions(-) delete mode 100644 arch/arm/mach-omap2/voltagedomains33xx_data.c
arch/arm/mach-omap2/Makefile +0 -1
@@ -125,7 +125,6 @@ obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common) -obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common) # OMAP powerdomain framework
arch/arm/mach-omap2/io.c +0 -1
@@ -577,7 +577,6 @@ void __init am33xx_init_early(void)omap2_set_globals_cm (AM33XX_L4_WK_IO_ADDRESS (AM33XX_PRCM_BASE ),NULL );omap3xxx_check_revision ();ti81xx_check_features (); -am33xx_voltagedomains_init ();am33xx_powerdomains_init ();am33xx_clockdomains_init ();am33xx_hwmod_init ();
arch/arm/mach-omap2/prm33xx.c +7 -0
@@ -320,6 +320,12 @@ static int am33xx_pwrdm_wait_transition(struct powerdomain *pwrdm)return 0 ; } +static int am33xx_check_vcvp (void ) +{ +/* No VC/VP on am33xx devices */ +return 0 ; +} +struct pwrdm_ops am33xx_pwrdm_operations = { .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst,
@@ -335,4 +341,5 @@ struct pwrdm_ops am33xx_pwrdm_operations = { .pwrdm_set_mem_onst = am33xx_pwrdm_set_mem_onst, .pwrdm_set_mem_retst = am33xx_pwrdm_set_mem_retst, .pwrdm_wait_transition = am33xx_pwrdm_wait_transition, + .pwrdm_has_voltdm = am33xx_check_vcvp, };
arch/arm/mach-omap2/voltage.h +0 -1
@@ -169,7 +169,6 @@ int omap_voltage_late_init(void);extern void omap2xxx_voltagedomains_init (void );extern void omap3xxx_voltagedomains_init (void ); -extern void am33xx_voltagedomains_init (void );extern void omap44xx_voltagedomains_init (void );struct voltagedomain *voltdm_lookup (const char *name);
arch/arm/mach-omap2/voltagedomains33xx_data.c deleted +0 -43
43 lines not on this page · raw message
Signature · 1 line
1.7.9.5
v2 cover Remove unused voltagedomain data for AM33xx
In reply to Rajendra NayakQuoted 22 lines · Rajendra Nayak
Hi,
The powerdomain framework currently expects to always have a voltagedomain associated with a given powerdomain. We already have AM33xx which has no Voltage Controller/Voltage Processor as part of PRCM. There are more SoCs' to follow starting with AM437x and DRA7xx which do not have VC/VP. All these SoCs', hence do not support any form of auto-scaling of voltages, that was possible on earlier OMAPs' using the VFSM to trigger an i2c communication to the PMIC automatically on hitting a low power state.
Instead of adding dummy voltage domain data files, like was done for the AM33xx case, make the powerdomain framework aware of the fact that some SoCs' might not really have support for auto-scaling of voltages in hw.
Patches are based of 3.10-rc6 and are boot tested on am335x bone.
Rajendra Nayak (2):
ARM: OMAP2+: Powerdomain: Remove the need to always have a voltdm
associated to a pwrdm
ARM: AM33xx: Remove the unused voltagedomain data
Quoted 10 lines
arch/arm/mach-omap2/Makefile | 1 - arch/arm/mach-omap2/io.c | 1 - arch/arm/mach-omap2/powerdomain.c | 5 +++ arch/arm/mach-omap2/powerdomain.h | 2 ++ arch/arm/mach-omap2/prm33xx.c | 7 ++++ arch/arm/mach-omap2/voltage.h | 1 - arch/arm/mach-omap2/voltagedomains33xx_data.c | 43 ------------------------- 7 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 arch/arm/mach-omap2/voltagedomains33xx_data.c
Nice !!
FWIW, Acked-by: Santosh Shilimkar <[email protected]>
v2 cover Remove unused voltagedomain data for AM33xx
In reply to Rajendra NayakHi,
Quoted 9 lines · Rajendra
The powerdomain framework currently expects to always have a voltagedomain associated with a given powerdomain. We already have AM33xx which has no Voltage Controller/Voltage Processor as part of PRCM. There are more SoCs' to follow starting with AM437x and DRA7xx which do not have VC/VP. All these SoCs', hence do not support any form of auto-scaling of voltages, that was possible on earlier OMAPs' using the VFSM to trigger an i2c communication to the PMIC automatically on hitting a low power state.
Quoted 5 lines
Instead of adding dummy voltage domain data files, like was done for the AM33xx case, make the powerdomain framework aware of the fact that some SoCs' might not really have support for auto-scaling of voltages in hw.
Patches are based of 3.10-rc6 and are boot tested on am335x bone.
Regards
Afzal
v2 cover Remove unused voltagedomain data for AM33xx
In reply to Rajendra NayakQuoted 15 lines · Rajendra Nayak
Hi,
The powerdomain framework currently expects to always have a voltagedomain associated with a given powerdomain. We already have AM33xx which has no Voltage Controller/Voltage Processor as part of PRCM. There are more SoCs' to follow starting with AM437x and DRA7xx which do not have VC/VP. All these SoCs', hence do not support any form of auto-scaling of voltages, that was possible on earlier OMAPs' using the VFSM to trigger an i2c communication to the PMIC automatically on hitting a low power state.
Instead of adding dummy voltage domain data files, like was done for the AM33xx case, make the powerdomain framework aware of the fact that some SoCs' might not really have support for auto-scaling of voltages in hw.
Quoted 6 lines
Patches are based of 3.10-rc6 and are boot tested on am335x bone.
Rajendra Nayak (2):
ARM: OMAP2+: Powerdomain: Remove the need to always have a voltdm
associated to a pwrdm
ARM: AM33xx: Remove the unused voltagedomain data
Thanks, queuing up this series with ack from Santosh and tested-by from Afzal. I'll try, but not sure if it can make it for v3.11.
Kevin