ARM: DRA7: hwmod: fix gpmc hwmod for core-retention
Subsystems (4)
cover ARM: DRA7: hwmod: fix gpmc hwmod for core-retention
Hi,
Disabling GPMC node in device tree prevents core retention on dra7-evm. Fix that by getting rid of HWMOD_INIT_NO_IDLE & NO_RESET.
Fixup gpmc hwmod as it doesn't support SIDLE_SMART_WKUP.
cheers,
-roger
Roger Quadros (2):
ARM: DRA7: hwmod: fix gpmc hwmod
ARM: DRA7: hwmod: Fix GPMC from preventing core suspend
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/2 ARM: DRA7: hwmod: fix gpmc hwmod
GPMC smart idle is not really broken but it does not support smart idle with wakeup.
--- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +2 -4
@@ -819,8 +819,7 @@ static struct omap_hwmod dra7xx_gpmc_hwmod = { .name = "gpmc", .class = &dra7xx_gpmc_hwmod_class, .clkdm_name = "l3main1_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET | - HWMOD_SWSUP_SIDLE), + .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, .main_clk = "l3_iclk_div", .prcm = { .omap4 = {
@@ -1421,8 +1420,7 @@ static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = { .syss_offs = 0x0014, .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), - .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | - SIDLE_SMART_WKUP), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), .sysc_fields = &omap_hwmod_sysc_type1, };
Signature · 1 line
2.1.4
PATCH 2/2 ARM: DRA7: hwmod: Fix GPMC from preventing core suspend
In reply to Roger QuadrosGPMC hwmod is flagged as HWMOD_INIT_NO_IDLE so it is kept enabled at boot. If the GPMC driver is not loaded then GPMC will not be idled thus preventing CORE from going idle during suspend.
Disable HWMOD_INIT_NO_IDLE and HWMOD_INIT_NO_RESET.
The only reason HWMOD_INIT_NO_RESET was there was to retain GPMC timings/settings configured by bootloader. We no longer need that as we're configuring the timins in the kernel.
There is no reasoning as to why HWMOD_INIT_NO_IDLE was there. Seems to have beein blindly copied from omap3/4 hwmod code.
--- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +0 -1
@@ -819,7 +819,6 @@ static struct omap_hwmod dra7xx_gpmc_hwmod = { .name = "gpmc", .class = &dra7xx_gpmc_hwmod_class, .clkdm_name = "l3main1_clkdm", - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, .main_clk = "l3_iclk_div", .prcm = { .omap4 = {
Signature · 1 line
2.1.4
Paul Walmsley
maintainerRe: [PATCH 1/2] ARM: DRA7: hwmod: fix gpmc hwmod
In reply to Roger QuadrosQuoted 6 lines · Roger Quadros
GPMC smart idle is not really broken but it does not support smart idle with wakeup.
Fixes 556708fe8718 ("ARM: OMAP: DRA7: hwmod: Make gpmc software supervised as the smart idle is broken")Signed-off-by Roger Quadros <[email protected]>
Thanks, queued for v4.2-rc fixes.
- Paul
Paul Walmsley
maintainerRe: [PATCH 2/2] ARM: DRA7: hwmod: Fix GPMC from preventing core suspend
In reply to Roger QuadrosQuoted 7 lines · Roger Quadros
GPMC hwmod is flagged as
HWMOD_INIT_NO_IDLEso it is kept enabled at boot. If the GPMC driver is not loaded then GPMC will not be idled thus preventing CORE from going idle during suspend.Disable
HWMOD_INIT_NO_IDLEandHWMOD_INIT_NO_RESET.
Quoted 8 lines
The only reason
HWMOD_INIT_NO_RESETwas there was to retain GPMC timings/settings configured by bootloader. We no longer need that as we're configuring the timins in the kernel.There is no reasoning as to why
HWMOD_INIT_NO_IDLEwas there. Seems to have beein blindly copied from omap3/4 hwmod code.Signed-off-by Roger Quadros <[email protected]>
Hi Roger, could you take a look at Tony's patch "memory: omap-gpmc: Add Kconfig option for debug" and see if this needs to be changed in light of that patch?
regards,
- Paul
Re: [PATCH 2/2] ARM: DRA7: hwmod: Fix GPMC from preventing core suspend
Paul,
Quoted 13 lines · Paul Walmsley
Quoted 11 lines · Roger Quadros
GPMC hwmod is flagged as
HWMOD_INIT_NO_IDLEso it is kept enabled at boot. If the GPMC driver is not loaded then GPMC will not be idled thus preventing CORE from going idle during suspend.Disable
HWMOD_INIT_NO_IDLEandHWMOD_INIT_NO_RESET.The only reason
HWMOD_INIT_NO_RESETwas there was to retain GPMC timings/settings configured by bootloader. We no longer need that as we're configuring the timins in the kernel.
Quoted 8 lines
Quoted 4 lines
There is no reasoning as to why
HWMOD_INIT_NO_IDLEwas there. Seems to have beein blindly copied from omap3/4 hwmod code.Signed-off-by Roger Quadros <[email protected]>Hi Roger, could you take a look at Tony's patch "memory: omap-gpmc: Add
Kconfigoption for debug" and see if this needs to be changed in light of that patch?
Yes. We don't need this patch if we can just rid of HWMOD_SWSUP_SIDLE as done in the first patch.
cheers,
-roger
PATCH v2 1/1 ARM: DRA7: hwmod: fix gpmc hwmod
In reply to Roger QuadrosGPMC smart idle is not really broken but it does not support smart idle with wakeup.
---
v2 - Rebased on top of for-v4.2/omap-hwmod-a
Patch 2/2 is no longer needed
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +2 -3
@@ -820,7 +820,7 @@ static struct omap_hwmod dra7xx_gpmc_hwmod = { .class = &dra7xx_gpmc_hwmod_class, .clkdm_name = "l3main1_clkdm", /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */ - .flags = HWMOD_SWSUP_SIDLE | DEBUG_OMAP_GPMC_HWMOD_FLAGS, + .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS, .main_clk = "l3_iclk_div", .prcm = { .omap4 = {
@@ -1421,8 +1421,7 @@ static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = { .syss_offs = 0x0014, .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), - .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | - SIDLE_SMART_WKUP), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), .sysc_fields = &omap_hwmod_sysc_type1, };
Signature · 1 line
2.1.4
Re: [PATCH 1/2] ARM: DRA7: hwmod: fix gpmc hwmod
In reply to Paul WalmsleyPaul,
Quoted 10 lines · On Tue, 2 Jun 2015 21:34:58 +0000 Paul Walmsley <[email protected]> wrote:
Quoted 6 lines · Roger Quadros
GPMC smart idle is not really broken but it does not support smart idle with wakeup.
Fixes 556708fe8718 ("ARM: OMAP: DRA7: hwmod: Make gpmc software supervised as the smart idle is broken")Signed-off-by Roger Quadros <[email protected]>Thanks, queued for v4.2-rc fixes.
you might want to take v2 of the patch [1] or did you fix the conflict yourself?
cheers,
-roger
[1] http://article.gmane.org/gmane.linux.ports.arm.omap/126730