diff options
Diffstat (limited to 'arch/arm/mach-orion5x/irq.c')
-rw-r--r-- | arch/arm/mach-orion5x/irq.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index dd21f38c5d37..e2a0084ab4a3 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -82,7 +82,7 @@ static int orion5x_gpio_set_irq_type(u32 irq, u32 type) | |||
82 | int pin = irq_to_gpio(irq); | 82 | int pin = irq_to_gpio(irq); |
83 | struct irq_desc *desc; | 83 | struct irq_desc *desc; |
84 | 84 | ||
85 | if ((orion5x_read(GPIO_IO_CONF) & (1 << pin)) == 0) { | 85 | if ((readl(GPIO_IO_CONF) & (1 << pin)) == 0) { |
86 | printk(KERN_ERR "orion5x_gpio_set_irq_type failed " | 86 | printk(KERN_ERR "orion5x_gpio_set_irq_type failed " |
87 | "(irq %d, pin %d).\n", irq, pin); | 87 | "(irq %d, pin %d).\n", irq, pin); |
88 | return -EINVAL; | 88 | return -EINVAL; |
@@ -117,7 +117,7 @@ static int orion5x_gpio_set_irq_type(u32 irq, u32 type) | |||
117 | /* | 117 | /* |
118 | * set initial polarity based on current input level | 118 | * set initial polarity based on current input level |
119 | */ | 119 | */ |
120 | if ((orion5x_read(GPIO_IN_POL) ^ orion5x_read(GPIO_DATA_IN)) | 120 | if ((readl(GPIO_IN_POL) ^ readl(GPIO_DATA_IN)) |
121 | & (1 << pin)) | 121 | & (1 << pin)) |
122 | orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */ | 122 | orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */ |
123 | else | 123 | else |
@@ -149,8 +149,8 @@ static void orion5x_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
149 | 149 | ||
150 | BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31); | 150 | BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31); |
151 | offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8; | 151 | offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8; |
152 | cause = (orion5x_read(GPIO_DATA_IN) & orion5x_read(GPIO_LEVEL_MASK)) | | 152 | cause = (readl(GPIO_DATA_IN) & readl(GPIO_LEVEL_MASK)) | |
153 | (orion5x_read(GPIO_EDGE_CAUSE) & orion5x_read(GPIO_EDGE_MASK)); | 153 | (readl(GPIO_EDGE_CAUSE) & readl(GPIO_EDGE_MASK)); |
154 | 154 | ||
155 | for (pin = offs; pin < offs + 8; pin++) { | 155 | for (pin = offs; pin < offs + 8; pin++) { |
156 | if (cause & (1 << pin)) { | 156 | if (cause & (1 << pin)) { |
@@ -158,9 +158,9 @@ static void orion5x_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
158 | desc = irq_desc + irq; | 158 | desc = irq_desc + irq; |
159 | if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) { | 159 | if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) { |
160 | /* Swap polarity (race with GPIO line) */ | 160 | /* Swap polarity (race with GPIO line) */ |
161 | u32 polarity = orion5x_read(GPIO_IN_POL); | 161 | u32 polarity = readl(GPIO_IN_POL); |
162 | polarity ^= 1 << pin; | 162 | polarity ^= 1 << pin; |
163 | orion5x_write(GPIO_IN_POL, polarity); | 163 | writel(polarity, GPIO_IN_POL); |
164 | } | 164 | } |
165 | desc_handle_irq(irq, desc); | 165 | desc_handle_irq(irq, desc); |
166 | } | 166 | } |
@@ -175,9 +175,9 @@ static void __init orion5x_init_gpio_irq(void) | |||
175 | /* | 175 | /* |
176 | * Mask and clear GPIO IRQ interrupts | 176 | * Mask and clear GPIO IRQ interrupts |
177 | */ | 177 | */ |
178 | orion5x_write(GPIO_LEVEL_MASK, 0x0); | 178 | writel(0x0, GPIO_LEVEL_MASK); |
179 | orion5x_write(GPIO_EDGE_MASK, 0x0); | 179 | writel(0x0, GPIO_EDGE_MASK); |
180 | orion5x_write(GPIO_EDGE_CAUSE, 0x0); | 180 | writel(0x0, GPIO_EDGE_CAUSE); |
181 | 181 | ||
182 | /* | 182 | /* |
183 | * Register chained level handlers for GPIO IRQs by default. | 183 | * Register chained level handlers for GPIO IRQs by default. |