Commit 553876c8 authored by Kevin Hilman's avatar Kevin Hilman Committed by Russell King

[ARM] 4694/1: IXP4xx: Update clockevent support for shutdown and resume

Add proper support for CLOCK_EVT_MODE_RESUME and in the process fix
CLOCK_EVT_MODE_SHUTDOWN so that only the enable bits are toggled for both.
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 41a9e680
...@@ -442,7 +442,8 @@ static int ixp4xx_set_next_event(unsigned long evt, ...@@ -442,7 +442,8 @@ static int ixp4xx_set_next_event(unsigned long evt,
static void ixp4xx_set_mode(enum clock_event_mode mode, static void ixp4xx_set_mode(enum clock_event_mode mode,
struct clock_event_device *evt) struct clock_event_device *evt)
{ {
unsigned long opts, osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK; unsigned long opts = *IXP4XX_OSRT1 & IXP4XX_OST_RELOAD_MASK;
unsigned long osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK;
switch (mode) { switch (mode) {
case CLOCK_EVT_MODE_PERIODIC: case CLOCK_EVT_MODE_PERIODIC:
...@@ -455,12 +456,15 @@ static void ixp4xx_set_mode(enum clock_event_mode mode, ...@@ -455,12 +456,15 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT; opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT;
break; break;
case CLOCK_EVT_MODE_SHUTDOWN: case CLOCK_EVT_MODE_SHUTDOWN:
opts &= ~IXP4XX_OST_ENABLE;
break;
case CLOCK_EVT_MODE_RESUME:
opts |= IXP4XX_OST_ENABLE;
break;
case CLOCK_EVT_MODE_UNUSED: case CLOCK_EVT_MODE_UNUSED:
default: default:
osrt = opts = 0; osrt = opts = 0;
break; break;
case CLOCK_EVT_MODE_RESUME:
break;
} }
*IXP4XX_OSRT1 = osrt | opts; *IXP4XX_OSRT1 = osrt | opts;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment