]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-ixp4xx/common.c
Merge Paulus' tree
[karo-tx-linux.git] / arch / arm / mach-ixp4xx / common.c
index 0422e906cc9a64e4ff11d43e866049a72ba52cd0..f3c687cf00713dcbcaf20eb4689aac5f05818b98 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/serial.h>
 #include <linux/sched.h>
 #include <linux/tty.h>
+#include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/bootmem.h>
 #include <linux/interrupt.h>
 static struct map_desc ixp4xx_io_desc[] __initdata = {
        {       /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACs, USB .... */
                .virtual        = IXP4XX_PERIPHERAL_BASE_VIRT,
-               .physical       = IXP4XX_PERIPHERAL_BASE_PHYS,
+               .pfn            = __phys_to_pfn(IXP4XX_PERIPHERAL_BASE_PHYS),
                .length         = IXP4XX_PERIPHERAL_REGION_SIZE,
                .type           = MT_DEVICE
        }, {    /* Expansion Bus Config Registers */
                .virtual        = IXP4XX_EXP_CFG_BASE_VIRT,
-               .physical       = IXP4XX_EXP_CFG_BASE_PHYS,
+               .pfn            = __phys_to_pfn(IXP4XX_EXP_CFG_BASE_PHYS),
                .length         = IXP4XX_EXP_CFG_REGION_SIZE,
                .type           = MT_DEVICE
        }, {    /* PCI Registers */
                .virtual        = IXP4XX_PCI_CFG_BASE_VIRT,
-               .physical       = IXP4XX_PCI_CFG_BASE_PHYS,
+               .pfn            = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS),
                .length         = IXP4XX_PCI_CFG_REGION_SIZE,
                .type           = MT_DEVICE
        },
 #ifdef CONFIG_DEBUG_LL
        {       /* Debug UART mapping */
                .virtual        = IXP4XX_DEBUG_UART_BASE_VIRT,
-               .physical       = IXP4XX_DEBUG_UART_BASE_PHYS,
+               .pfn            = __phys_to_pfn(IXP4XX_DEBUG_UART_BASE_PHYS),
                .length         = IXP4XX_DEBUG_UART_REGION_SIZE,
                .type           = MT_DEVICE
        }
@@ -125,7 +126,8 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
        } else if (type & IRQT_LOW) {
                int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW;
                irq_type = IXP4XX_IRQ_LEVEL;
-       }
+       } else
+               return -EINVAL;
 
        ixp4xx_config_irq(irq, irq_type);
 
@@ -142,6 +144,8 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
 
        /* Set the new style */
        *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE));
+
+       return 0;
 }
 
 static void ixp4xx_irq_mask(unsigned int irq)
@@ -179,17 +183,17 @@ static void ixp4xx_irq_level_unmask(unsigned int irq)
 }
 
 static struct irqchip ixp4xx_irq_level_chip = {
-       .ack    = ixp4xx_irq_mask,
-       .mask   = ixp4xx_irq_mask,
-       .unmask = ixp4xx_irq_level_unmask,
-       .type   = ixp4xx_set_irq_type
+       .ack            = ixp4xx_irq_mask,
+       .mask           = ixp4xx_irq_mask,
+       .unmask         = ixp4xx_irq_level_unmask,
+       .set_type       = ixp4xx_set_irq_type,
 };
 
 static struct irqchip ixp4xx_irq_edge_chip = {
-       .ack    = ixp4xx_irq_ack,
-       .mask   = ixp4xx_irq_mask,
-       .unmask = ixp4xx_irq_unmask,
-       .type   = ixp4xx_set_irq_type
+       .ack            = ixp4xx_irq_ack,
+       .mask           = ixp4xx_irq_mask,
+       .unmask         = ixp4xx_irq_unmask,
+       .set_type       = ixp4xx_set_irq_type,
 };
 
 static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type)