Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
Subsystems (3)
PATCH 1/1 Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
This reverts commit 183e2077d007aa4b697efba095ecfea7244a6107.
The original patch added a check to am33xx_cm_wait_module_ready for a clkctrl offset of 0 as an invalid case, however, clkctrl offset of 0 is perfectly valid for hwmods, in particular the rtc.
Without reverting this patch sometimes external aborts are seen on am335x during boot. This is due to the am33xx_cm_wait_module_ready function immediately returning 0 rather than waiting for the RTC_CLKCTRL register to indicate it is actually ready before rtc register accesses happen.
--- arch/arm/mach-omap2/cm33xx.c | 3 --- 1 file changed, 3 deletions(-)
arch/arm/mach-omap2/cm33xx.c +0 -3
@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, {int i =0 ; -if (!clkctrl_offs) -return 0 ; -omap_test_timeout (_is_module_ready (inst, clkctrl_offs),MAX_MODULE_READY_TIME , i);
Signature · 1 line
2.9.0
PATCH 1/1 Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
Hi,
Quoted 2 lines · Dave Gerlach
This reverts commit
183e2077d007aa4b697efba095ecfea7244a6107.
This is a fix for an external abort seen on am335x platforms during boot on next-20160711. The offending patch was merged to next on next-20160705 and I haven't seen any ill effects from reverting it with this patch, and the external abort goes away entirely with it reverted.
Regards,
Dave
Quoted 30 lines
The original patch added a check to
am33xx_cm_wait_module_readyfor a clkctrl offset of 0 as an invalid case, however, clkctrl offset of 0 is perfectly valid for hwmods, in particular the rtc.Without reverting this patch sometimes external aborts are seen on am335x during boot. This is due to the
am33xx_cm_wait_module_readyfunction immediately returning 0 rather than waiting for theRTC_CLKCTRLregister to indicate it is actually ready before rtc register accesses happen.Signed-off-by Dave Gerlach <[email protected]>--- arch/arm/mach-omap2/cm33xx.c | 3 --- 1 file changed, 3 deletions(-)arch/arm/mach-omap2/cm33xx.c +0
-3@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, {int i =0 ; -if (!clkctrl_offs) -return 0 ; -omap_test_timeout (_is_module_ready (inst, clkctrl_offs),MAX_MODULE_READY_TIME , i);
PATCH 1/1 Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
Quoted 10 lines · Dave Gerlach
Hi,
Quoted 2 lines · Dave Gerlach
This reverts commit
183e2077d007aa4b697efba095ecfea7244a6107.This is a fix for an external abort seen on am335x platforms during boot on next-20160711. The offending patch was merged to next on next-20160705 and I haven't seen any ill effects from reverting it with this patch, and the external abort goes away entirely with it reverted.
Failure can be seen here [1].
Regards,
Dave
Quoted 35 lines
Regards,
DaveQuoted 31 lines
The original patch added a check to
am33xx_cm_wait_module_readyfor a clkctrl offset of 0 as an invalid case, however, clkctrl offset of 0 is perfectly valid for hwmods, in particular the rtc.Without reverting this patch sometimes external aborts are seen on am335x during boot. This is due to the
am33xx_cm_wait_module_readyfunction immediately returning 0 rather than waiting for theRTC_CLKCTRLregister to indicate it is actually ready before rtc register accesses happen.Signed-off-by Dave Gerlach <[email protected]>--- arch/arm/mach-omap2/cm33xx.c | 3 --- 1 file changed, 3 deletions(-)arch/arm/mach-omap2/cm33xx.c +0
-3@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, { int i = 0; -if (!clkctrl_offs) -return 0 ; -omap_test_timeout (_is_module_ready (inst, clkctrl_offs),MAX_MODULE_READY_TIME , i);
PATCH 1/1 Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
In reply to Dave GerlachQuoted 5 lines · Dave Gerlach
This reverts commit
183e2077d007aa4b697efba095ecfea7244a6107.The original patch added a check to
am33xx_cm_wait_module_readyfor a clkctrl offset of 0 as an invalid case, however, clkctrl offset of 0 is perfectly valid for hwmods, in particular the rtc.
Looks like a similar check is present for am33xx_cm_wait_module_idle. Shouldn't that also be removed?
Thanks and regards,
Lokesh
Quoted 27 lines
Without reverting this patch sometimes external aborts are seen on am335x during boot. This is due to the
am33xx_cm_wait_module_readyfunction immediately returning 0 rather than waiting for theRTC_CLKCTRLregister to indicate it is actually ready before rtc register accesses happen.Signed-off-by Dave Gerlach <[email protected]>--- arch/arm/mach-omap2/cm33xx.c | 3 --- 1 file changed, 3 deletions(-)arch/arm/mach-omap2/cm33xx.c +0
-3@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, {int i =0 ; -if (!clkctrl_offs) -return 0 ; -omap_test_timeout (_is_module_ready (inst, clkctrl_offs),MAX_MODULE_READY_TIME , i);
PATCH 1/1 Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
Quoted 11 lines · Lokesh Vutla
Quoted 5 lines · Dave Gerlach
This reverts commit
183e2077d007aa4b697efba095ecfea7244a6107.The original patch added a check to
am33xx_cm_wait_module_readyfor a clkctrl offset of 0 as an invalid case, however, clkctrl offset of 0 is perfectly valid for hwmods, in particular the rtc.Looks like a similar check is present for
am33xx_cm_wait_module_idle. Shouldn't that also be removed?
Oh this is annoying, I didn't notice that RTC had mutant register when I did the patch to add the check in place, and didn't face this issue either during testing. However, this check must be in there to avoid any issues with the transition to the hwmod clock data, as all the clkctrl offsets will be removed from hwmod data.
I think for RTC we probably need to add some sort of HWMOD flag, and add a check within the hwmod code itself against this. Just reverting this patch is wrong approach, as you need to fix it some other way then.
-Tero
Quoted 31 lines
Thanks and regards,
LokeshQuoted 27 lines
Without reverting this patch sometimes external aborts are seen on am335x during boot. This is due to the
am33xx_cm_wait_module_readyfunction immediately returning 0 rather than waiting for theRTC_CLKCTRLregister to indicate it is actually ready before rtc register accesses happen.Signed-off-by Dave Gerlach <[email protected]>--- arch/arm/mach-omap2/cm33xx.c | 3 --- 1 file changed, 3 deletions(-)arch/arm/mach-omap2/cm33xx.c +0
-3@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, {int i =0 ; -if (!clkctrl_offs) -return 0 ; -omap_test_timeout (_is_module_ready (inst, clkctrl_offs),MAX_MODULE_READY_TIME , i);
PATCH 1/1 Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
Quoted 19 lines · Tero Kristo
Quoted 11 lines · Lokesh Vutla
Quoted 5 lines · Dave Gerlach
This reverts commit
183e2077d007aa4b697efba095ecfea7244a6107.The original patch added a check to
am33xx_cm_wait_module_readyfor a clkctrl offset of 0 as an invalid case, however, clkctrl offset of 0 is perfectly valid for hwmods, in particular the rtc.Looks like a similar check is present for
am33xx_cm_wait_module_idle. Shouldn't that also be removed?Oh this is annoying, I didn't notice that RTC had mutant register when I did the patch to add the check in place, and didn't face this issue either during testing. However, this check must be in there to avoid any issues with the transition to the hwmod clock data, as all the clkctrl offsets will be removed from hwmod data.
Quoted 3 lines
I think for RTC we probably need to add some sort of HWMOD flag, and add a check within the hwmod code itself against this. Just reverting this patch is wrong approach, as you need to fix it some other way then.
I agree, that was another option I considered, but I went with reverting it for now as there were no ill effects and we've made it this long with out it.
I can send a new version with a flag soon.
Regards,
Dave
Quoted 36 lines
-Tero
Quoted 32 lines
Thanks and regards,
LokeshQuoted 28 lines
Without reverting this patch sometimes external aborts are seen on am335x during boot. This is due to the
am33xx_cm_wait_module_readyfunction immediately returning 0 rather than waiting for theRTC_CLKCTRLregister to indicate it is actually ready before rtc register accesses happen.Signed-off-by Dave Gerlach <[email protected]>--- arch/arm/mach-omap2/cm33xx.c | 3 --- 1 file changed, 3 deletions(-)arch/arm/mach-omap2/cm33xx.c +0
-3@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, { int i = 0; -if (!clkctrl_offs) -return 0 ; -omap_test_timeout (_is_module_ready (inst, clkctrl_offs),MAX_MODULE_READY_TIME , i);
PATCH 1/1 Revert "ARM: AM33xx: fix module_wait_ready without clkctrl register"
Quoted 24 lines · Dave Gerlach
Quoted 19 lines · Tero Kristo
Quoted 11 lines · Lokesh Vutla
Quoted 5 lines · Dave Gerlach
This reverts commit
183e2077d007aa4b697efba095ecfea7244a6107.The original patch added a check to
am33xx_cm_wait_module_readyfor a clkctrl offset of 0 as an invalid case, however, clkctrl offset of 0 is perfectly valid for hwmods, in particular the rtc.Looks like a similar check is present for
am33xx_cm_wait_module_idle. Shouldn't that also be removed?Oh this is annoying, I didn't notice that RTC had mutant register when I did the patch to add the check in place, and didn't face this issue either during testing. However, this check must be in there to avoid any issues with the transition to the hwmod clock data, as all the clkctrl offsets will be removed from hwmod data.
Quoted 3 lines
I think for RTC we probably need to add some sort of HWMOD flag, and add a check within the hwmod code itself against this. Just reverting this patch is wrong approach, as you need to fix it some other way then.
Quoted 5 lines
I agree, that was another option I considered, but I went with reverting it for now as there were no ill effects and we've made it this long with out it.
I can send a new version with a flag soon.
Ok so let's forget this patch, new series sent here
http://marc.info/?l=linux-omap&m=146834587516818&w=2
Regards,
Dave
Quoted 43 lines
Regards,
DaveQuoted 38 lines
-Tero
Quoted 34 lines
Thanks and regards,
LokeshQuoted 30 lines
Without reverting this patch sometimes external aborts are seen on am335x during boot. This is due to the
am33xx_cm_wait_module_readyfunction immediately returning 0 rather than waiting for theRTC_CLKCTRL
register to indicate it is actually ready before rtc register accesses happen.Signed-off-by Dave Gerlach <[email protected]>--- arch/arm/mach-omap2/cm33xx.c | 3 --- 1 file changed, 3 deletions(-)arch/arm/mach-omap2/cm33xx.c +0
-3@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, { int i = 0; -if (!clkctrl_offs) -return 0 ; -omap_test_timeout (_is_module_ready (inst, clkctrl_offs),MAX_MODULE_READY_TIME , i);