Skip to contentSkip to conversation

ARM: OMAP2+: remove redundant sysconfig context restore

PATCH New Tarun Kanti DebBarma 3 participants 4 messages Apr 11, 2012 – Apr 12, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP2+: remove redundant sysconfig context restore

Since hwmod framework now manages sysconfig context save/restore there is no more need to touch this register in driver. Hence, remove restore of sysconfig register in omap_timer_restore_context. This was causing incorrect context restore of sysconfig register.

---
 arch/arm/plat-omap/dmtimer.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dmtimer.c +0 -2
index 652139c..15e7882 100644
@@ -82,8 +82,6 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
 
 static void omap_timer_restore_context(struct omap_dm_timer *timer)
 {
-	__raw_writel(timer->context.tiocp_cfg,
-			timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET);
 	if (timer->revision == 1)
 		__raw_writel(timer->context.tistat, timer->sys_stat);
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ARM: OMAP2+: remove redundant sysconfig context restore

CC'ing LAKML

Quoted 15 lines · Tarun Kanti DebBarma

Since hwmod framework now manages sysconfig context save/restore there is no more need to touch this register in driver. Hence, remove restore of sysconfig register in omap_timer_restore_context. This was causing incorrect context restore of sysconfig register.

---
?arch/arm/plat-omap/dmtimer.c | ? ?2 --
?1 files changed, 0 insertions(+), 2 deletions(-)

arch/arm/plat-omap/dmtimer.c +0 -0
index 652139c..15e7882 100644

arch/arm/plat-omap/dmtimer.c static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, · line 87

Quoted 8 lines
arch/arm/plat-omap/dmtimer.c +0 -2
@@ -82,8 +82,6 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
 
 ?static void omap_timer_restore_context(struct omap_dm_timer *timer)
 ?{
- ? ? ? __raw_writel(timer->context.tiocp_cfg,
- ? ? ? ? ? ? ? ? ? ? ? timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET);
 ? ? ? ?if (timer->revision == 1)
 ? ? ? ? ? ? ? ?__raw_writel(timer->context.tistat, timer->sys_stat);
 

Looks good to me.

#2 lore raw

PATCH 1/1 ARM: OMAP2+: remove redundant sysconfig context restore

In reply to Tarun Kanti DebBarma
Quoted 6 lines · Tarun Kanti DebBarma

Since hwmod framework now manages sysconfig context save/restore there is no more need to touch this register in driver. Hence, remove restore of sysconfig register in omap_timer_restore_context. This was causing incorrect context restore of sysconfig register.

While cleaning this up, you can remove it from 'struct timer_regs' in <plat/dmtimer.h> as well, since the code you remove is the only user.

Kevin

Quoted 16 lines
---
 arch/arm/plat-omap/dmtimer.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dmtimer.c +0 -2
index 652139c..15e7882 100644
@@ -82,8 +82,6 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
 
 static void omap_timer_restore_context(struct omap_dm_timer *timer)
 {
-	__raw_writel(timer->context.tiocp_cfg,
-			timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET);
 	if (timer->revision == 1)
 		__raw_writel(timer->context.tistat, timer->sys_stat);
#3 lore raw

PATCH 1/1 ARM: OMAP2+: remove redundant sysconfig context restore

Quoted 11 lines · Kevin Hilman
Quoted 6 lines · Tarun Kanti DebBarma

Since hwmod framework now manages sysconfig context save/restore there is no more need to touch this register in driver. Hence, remove restore of sysconfig register in omap_timer_restore_context. This was causing incorrect context restore of sysconfig register.

While cleaning this up, you can remove it from 'struct timer_regs' ?in <plat/dmtimer.h> as well, since the code you remove is the only user.

Oh yes I missed that. Thanks.
--
Tarun

Quoted 19 lines

Kevin

Quoted 16 lines

---
?arch/arm/plat-omap/dmtimer.c | ? ?2 --
?1 files changed, 0 insertions(+), 2 deletions(-)

arch/arm/plat-omap/dmtimer.c +0 -2
index 652139c..15e7882 100644
@@ -82,8 +82,6 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
 
 ?static void omap_timer_restore_context(struct omap_dm_timer *timer)
 ?{
- ? ? __raw_writel(timer->context.tiocp_cfg,
- ? ? ? ? ? ? ? ? ? ? timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET);
 ? ? ? if (timer->revision == 1)
 ? ? ? ? ? ? ? __raw_writel(timer->context.tistat, timer->sys_stat);