Merge branch 'for_linus' of git://git.infradead.org/~dedekind/ubifs-2.6
[pandora-kernel.git] / arch / arm / mach-ixp4xx / common.c
index 8112f72..3781b3d 100644 (file)
@@ -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;
 }
@@ -326,11 +326,11 @@ static struct resource ixp4xx_udc_resources[] = {
 };
 
 /*
- * USB device controller. The IXP4xx uses the same controller as PXA2XX,
+ * USB device controller. The IXP4xx uses the same controller as PXA25X,
  * so we just use the same device.
  */
 static struct platform_device ixp4xx_udc_device = {
-       .name           = "pxa2xx-udc",
+       .name           = "pxa25x-udc",
        .id             = -1,
        .num_resources  = 2,
        .resource       = ixp4xx_udc_resources,
@@ -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,6 +456,11 @@ 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;