aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r--arch/arm/mach-ixp4xx/common.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index c1271c449246..f6d66dce6852 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -442,7 +442,8 @@ static int ixp4xx_set_next_event(unsigned long evt,
442static void ixp4xx_set_mode(enum clock_event_mode mode, 442static void ixp4xx_set_mode(enum clock_event_mode mode,
443 struct clock_event_device *evt) 443 struct clock_event_device *evt)
444{ 444{
445 unsigned long opts, osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK; 445 unsigned long opts = *IXP4XX_OSRT1 & IXP4XX_OST_RELOAD_MASK;
446 unsigned long osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK;
446 447
447 switch (mode) { 448 switch (mode) {
448 case CLOCK_EVT_MODE_PERIODIC: 449 case CLOCK_EVT_MODE_PERIODIC:
@@ -455,12 +456,15 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
455 opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT; 456 opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT;
456 break; 457 break;
457 case CLOCK_EVT_MODE_SHUTDOWN: 458 case CLOCK_EVT_MODE_SHUTDOWN:
459 opts &= ~IXP4XX_OST_ENABLE;
460 break;
461 case CLOCK_EVT_MODE_RESUME:
462 opts |= IXP4XX_OST_ENABLE;
463 break;
458 case CLOCK_EVT_MODE_UNUSED: 464 case CLOCK_EVT_MODE_UNUSED:
459 default: 465 default:
460 osrt = opts = 0; 466 osrt = opts = 0;
461 break; 467 break;
462 case CLOCK_EVT_MODE_RESUME:
463 break;
464 } 468 }
465 469
466 *IXP4XX_OSRT1 = osrt | opts; 470 *IXP4XX_OSRT1 = osrt | opts;