X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-ixp4xx%2Fcommon.c;h=f6d66dce68523f736056aa8d14c76f167fc02049;hb=13ef7b69b54aa8ae4ed264d0bf41339737f8543a;hp=23e7fba6d3e1ff31131854fcec2bec97a8c9a983;hpb=5e16e3f0e24dadb79b96b6134cd3303f0d42f0c5;p=linux-2.6-omap-h63xx.git diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 23e7fba6d3e..f6d66dce685 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -188,7 +188,7 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); /* Configure the line as an input */ - gpio_line_config(line, IXP4XX_GPIO_IN); + gpio_line_config(irq2gpio[irq], IXP4XX_GPIO_IN); return 0; } @@ -442,7 +442,8 @@ static int ixp4xx_set_next_event(unsigned long evt, static void ixp4xx_set_mode(enum clock_event_mode mode, 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) { case CLOCK_EVT_MODE_PERIODIC: @@ -455,12 +456,15 @@ static void ixp4xx_set_mode(enum clock_event_mode mode, opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT; break; 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: default: osrt = opts = 0; break; - case CLOCK_EVT_MODE_RESUME: - break; } *IXP4XX_OSRT1 = osrt | opts;