RE: [PATCH v3] ARM: OMAP2: am33xx-hwmod: Fix register offset NULL check bug

2013-01-31 Thread Hebbar, Gururaja
On Thu, Jan 31, 2013 at 12:58:36, Koen Kooi wrote:
 
 Op 30 jan. 2013, om 15:39 heeft Hebbar Gururaja gururaja.heb...@ti.com het 
 volgende geschreven:
 
  am33xx_cm_wait_module_ready() checks if register offset is NULL.
  
  int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
  {
  int i = 0;
  
  if (!clkctrl_offs)
  return 0;
  
  In case of AM33xx, CLKCTRL register offset for different clock domains
  are not uniformly placed. An example of this would be the RTC clock
  domain with CLKCTRL offset at 0x00.
  In such cases the module ready check is skipped which leads to a data
  abort during boot-up when RTC registers is accessed.
  
  Remove this check here to avoid checking module readiness for modules
  with clkctrl register offset at 0x00.
  
  Signed-off-by: Hebbar Gururaja gururaja.heb...@ti.com
 
 I can confirm that this fixes the crash on boot with CONFIG_RTC_DRV_OMAP=y 
 with 3.8-rc5

Could you please share the crash log for my reference?

 
 regards,
 
 Koen


Regards, 
Gururaja
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3] ARM: OMAP2: am33xx-hwmod: Fix register offset NULL check bug

2013-01-30 Thread Hebbar Gururaja
am33xx_cm_wait_module_ready() checks if register offset is NULL.

int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
{
int i = 0;

if (!clkctrl_offs)
return 0;

In case of AM33xx, CLKCTRL register offset for different clock domains
are not uniformly placed. An example of this would be the RTC clock
domain with CLKCTRL offset at 0x00.
In such cases the module ready check is skipped which leads to a data
abort during boot-up when RTC registers is accessed.

Remove this check here to avoid checking module readiness for modules
with clkctrl register offset at 0x00.

Signed-off-by: Hebbar Gururaja gururaja.heb...@ti.com
---
Changes in v3:
- Since now there is separate cm33xx.c file which handles module
ready checking for am33xx platform, use the same for the fix.
- Also update subject to indicate am33xx platform name

Changes in v2:
- update commit message to reflect the actual cause. Previous
message conveyed a wrong/opposite message.

:100644 100644 058ce3c... 325a515... M  arch/arm/mach-omap2/cm33xx.c
 arch/arm/mach-omap2/cm33xx.c |3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index 058ce3c..325a515 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -241,9 +241,6 @@ int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 
clkctrl_offs)
 {
int i = 0;
 
-   if (!clkctrl_offs)
-   return 0;
-
omap_test_timeout(_is_module_ready(inst, cdoffs, clkctrl_offs),
  MAX_MODULE_READY_TIME, i);
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] ARM: OMAP2: am33xx-hwmod: Fix register offset NULL check bug

2013-01-30 Thread Paul Walmsley
On Wed, 30 Jan 2013, Hebbar Gururaja wrote:

 am33xx_cm_wait_module_ready() checks if register offset is NULL.
 
 int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
 {
   int i = 0;
 
   if (!clkctrl_offs)
   return 0;
 
 In case of AM33xx, CLKCTRL register offset for different clock domains
 are not uniformly placed. An example of this would be the RTC clock
 domain with CLKCTRL offset at 0x00.
 In such cases the module ready check is skipped which leads to a data
 abort during boot-up when RTC registers is accessed.
 
 Remove this check here to avoid checking module readiness for modules
 with clkctrl register offset at 0x00.
 
 Signed-off-by: Hebbar Gururaja gururaja.heb...@ti.com

See 

http://marc.info/?l=linux-omapm=135956399407076w=2


- Paul
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] ARM: OMAP2: am33xx-hwmod: Fix register offset NULL check bug

2013-01-30 Thread Koen Kooi

Op 30 jan. 2013, om 15:39 heeft Hebbar Gururaja gururaja.heb...@ti.com het 
volgende geschreven:

 am33xx_cm_wait_module_ready() checks if register offset is NULL.
 
 int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
 {
   int i = 0;
 
   if (!clkctrl_offs)
   return 0;
 
 In case of AM33xx, CLKCTRL register offset for different clock domains
 are not uniformly placed. An example of this would be the RTC clock
 domain with CLKCTRL offset at 0x00.
 In such cases the module ready check is skipped which leads to a data
 abort during boot-up when RTC registers is accessed.
 
 Remove this check here to avoid checking module readiness for modules
 with clkctrl register offset at 0x00.
 
 Signed-off-by: Hebbar Gururaja gururaja.heb...@ti.com

I can confirm that this fixes the crash on boot with CONFIG_RTC_DRV_OMAP=y with 
3.8-rc5

regards,

Koen--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html