diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-15 15:33:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-15 15:33:40 -0500 |
commit | 16c1020362083b320868c0deef492249089c3cd3 (patch) | |
tree | ff200df3502e6010745713275d69fd0a07e399cf /arch/arm/plat-omap | |
parent | 65e5d002b5ad220db2bf9557f53de5a98f7dab86 (diff) | |
parent | bbba75606963c82febf7bd2761ea848ac5d1a1bb (diff) |
Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (161 commits)
ARM: pxa: fix building issue of missing physmap.h
ARM: mmp: PXA910 drive strength FAST using wrong value
ARM: mmp: MMP2 drive strength FAST using wrong value
ARM: pxa: fix recursive calls in pxa_low_gpio_chip
AT91: Support for gsia18s board
AT91: Acme Systems FOX Board G20 board files
AT91: board-sam9m10g45ek.c: Remove duplicate inclusion of mach/hardware.h
ARM: pxa: fix suspend/resume array index miscalculation
ARM: pxa: use cpu_has_ipr() consistently in irq.c
ARM: pxa: remove unused variable in clock-pxa3xx.c
ARM: pxa: fix warning in zeus.c
ARM: sa1111: fix typo in sa1111_retrigger_lowirq()
ARM mxs: clkdev related compile fixes
ARM i.MX mx31_3ds: Fix MC13783 regulator names
ARM: plat-stmp3xxx: irq_data conversion.
ARM: plat-spear: irq_data conversion.
ARM: plat-orion: irq_data conversion.
ARM: plat-omap: irq_data conversion.
ARM: plat-nomadik: irq_data conversion.
ARM: plat-mxc: irq_data conversion.
...
Fix up trivial conflict in arch/arm/plat-omap/gpio.c (Lennert
Buytenhek's irq_data conversion clashing with some omap irq updates)
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 95 |
1 files changed, 47 insertions, 48 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index ccf2660f4151..971d18636942 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -729,17 +729,17 @@ bad: | |||
729 | return -EINVAL; | 729 | return -EINVAL; |
730 | } | 730 | } |
731 | 731 | ||
732 | static int gpio_irq_type(unsigned irq, unsigned type) | 732 | static int gpio_irq_type(struct irq_data *d, unsigned type) |
733 | { | 733 | { |
734 | struct gpio_bank *bank; | 734 | struct gpio_bank *bank; |
735 | unsigned gpio; | 735 | unsigned gpio; |
736 | int retval; | 736 | int retval; |
737 | unsigned long flags; | 737 | unsigned long flags; |
738 | 738 | ||
739 | if (!cpu_class_is_omap2() && irq > IH_MPUIO_BASE) | 739 | if (!cpu_class_is_omap2() && d->irq > IH_MPUIO_BASE) |
740 | gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); | 740 | gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE); |
741 | else | 741 | else |
742 | gpio = irq - IH_GPIO_BASE; | 742 | gpio = d->irq - IH_GPIO_BASE; |
743 | 743 | ||
744 | if (check_gpio(gpio) < 0) | 744 | if (check_gpio(gpio) < 0) |
745 | return -EINVAL; | 745 | return -EINVAL; |
@@ -752,21 +752,21 @@ static int gpio_irq_type(unsigned irq, unsigned type) | |||
752 | && (type & (IRQ_TYPE_LEVEL_LOW|IRQ_TYPE_LEVEL_HIGH))) | 752 | && (type & (IRQ_TYPE_LEVEL_LOW|IRQ_TYPE_LEVEL_HIGH))) |
753 | return -EINVAL; | 753 | return -EINVAL; |
754 | 754 | ||
755 | bank = get_irq_chip_data(irq); | 755 | bank = irq_data_get_irq_chip_data(d); |
756 | spin_lock_irqsave(&bank->lock, flags); | 756 | spin_lock_irqsave(&bank->lock, flags); |
757 | retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type); | 757 | retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type); |
758 | if (retval == 0) { | 758 | if (retval == 0) { |
759 | struct irq_desc *d = irq_to_desc(irq); | 759 | struct irq_desc *desc = irq_to_desc(d->irq); |
760 | 760 | ||
761 | d->status &= ~IRQ_TYPE_SENSE_MASK; | 761 | desc->status &= ~IRQ_TYPE_SENSE_MASK; |
762 | d->status |= type; | 762 | desc->status |= type; |
763 | } | 763 | } |
764 | spin_unlock_irqrestore(&bank->lock, flags); | 764 | spin_unlock_irqrestore(&bank->lock, flags); |
765 | 765 | ||
766 | if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) | 766 | if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) |
767 | __set_irq_handler_unlocked(irq, handle_level_irq); | 767 | __set_irq_handler_unlocked(d->irq, handle_level_irq); |
768 | else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | 768 | else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) |
769 | __set_irq_handler_unlocked(irq, handle_edge_irq); | 769 | __set_irq_handler_unlocked(d->irq, handle_edge_irq); |
770 | 770 | ||
771 | return retval; | 771 | return retval; |
772 | } | 772 | } |
@@ -1023,15 +1023,15 @@ static void _reset_gpio(struct gpio_bank *bank, int gpio) | |||
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | /* Use disable_irq_wake() and enable_irq_wake() functions from drivers */ | 1025 | /* Use disable_irq_wake() and enable_irq_wake() functions from drivers */ |
1026 | static int gpio_wake_enable(unsigned int irq, unsigned int enable) | 1026 | static int gpio_wake_enable(struct irq_data *d, unsigned int enable) |
1027 | { | 1027 | { |
1028 | unsigned int gpio = irq - IH_GPIO_BASE; | 1028 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1029 | struct gpio_bank *bank; | 1029 | struct gpio_bank *bank; |
1030 | int retval; | 1030 | int retval; |
1031 | 1031 | ||
1032 | if (check_gpio(gpio) < 0) | 1032 | if (check_gpio(gpio) < 0) |
1033 | return -ENODEV; | 1033 | return -ENODEV; |
1034 | bank = get_irq_chip_data(irq); | 1034 | bank = irq_data_get_irq_chip_data(d); |
1035 | retval = _set_gpio_wakeup(bank, get_gpio_index(gpio), enable); | 1035 | retval = _set_gpio_wakeup(bank, get_gpio_index(gpio), enable); |
1036 | 1036 | ||
1037 | return retval; | 1037 | return retval; |
@@ -1144,7 +1144,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1144 | u32 retrigger = 0; | 1144 | u32 retrigger = 0; |
1145 | int unmasked = 0; | 1145 | int unmasked = 0; |
1146 | 1146 | ||
1147 | desc->chip->ack(irq); | 1147 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
1148 | 1148 | ||
1149 | bank = get_irq_data(irq); | 1149 | bank = get_irq_data(irq); |
1150 | #ifdef CONFIG_ARCH_OMAP1 | 1150 | #ifdef CONFIG_ARCH_OMAP1 |
@@ -1201,7 +1201,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1201 | configured, we could unmask GPIO bank interrupt immediately */ | 1201 | configured, we could unmask GPIO bank interrupt immediately */ |
1202 | if (!level_mask && !unmasked) { | 1202 | if (!level_mask && !unmasked) { |
1203 | unmasked = 1; | 1203 | unmasked = 1; |
1204 | desc->chip->unmask(irq); | 1204 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | isr |= retrigger; | 1207 | isr |= retrigger; |
@@ -1237,41 +1237,40 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1237 | interrupt */ | 1237 | interrupt */ |
1238 | exit: | 1238 | exit: |
1239 | if (!unmasked) | 1239 | if (!unmasked) |
1240 | desc->chip->unmask(irq); | 1240 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
1241 | |||
1242 | } | 1241 | } |
1243 | 1242 | ||
1244 | static void gpio_irq_shutdown(unsigned int irq) | 1243 | static void gpio_irq_shutdown(struct irq_data *d) |
1245 | { | 1244 | { |
1246 | unsigned int gpio = irq - IH_GPIO_BASE; | 1245 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1247 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1246 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1248 | 1247 | ||
1249 | _reset_gpio(bank, gpio); | 1248 | _reset_gpio(bank, gpio); |
1250 | } | 1249 | } |
1251 | 1250 | ||
1252 | static void gpio_ack_irq(unsigned int irq) | 1251 | static void gpio_ack_irq(struct irq_data *d) |
1253 | { | 1252 | { |
1254 | unsigned int gpio = irq - IH_GPIO_BASE; | 1253 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1255 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1254 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1256 | 1255 | ||
1257 | _clear_gpio_irqstatus(bank, gpio); | 1256 | _clear_gpio_irqstatus(bank, gpio); |
1258 | } | 1257 | } |
1259 | 1258 | ||
1260 | static void gpio_mask_irq(unsigned int irq) | 1259 | static void gpio_mask_irq(struct irq_data *d) |
1261 | { | 1260 | { |
1262 | unsigned int gpio = irq - IH_GPIO_BASE; | 1261 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1263 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1262 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1264 | 1263 | ||
1265 | _set_gpio_irqenable(bank, gpio, 0); | 1264 | _set_gpio_irqenable(bank, gpio, 0); |
1266 | _set_gpio_triggering(bank, get_gpio_index(gpio), IRQ_TYPE_NONE); | 1265 | _set_gpio_triggering(bank, get_gpio_index(gpio), IRQ_TYPE_NONE); |
1267 | } | 1266 | } |
1268 | 1267 | ||
1269 | static void gpio_unmask_irq(unsigned int irq) | 1268 | static void gpio_unmask_irq(struct irq_data *d) |
1270 | { | 1269 | { |
1271 | unsigned int gpio = irq - IH_GPIO_BASE; | 1270 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1272 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1271 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1273 | unsigned int irq_mask = 1 << get_gpio_index(gpio); | 1272 | unsigned int irq_mask = 1 << get_gpio_index(gpio); |
1274 | struct irq_desc *desc = irq_to_desc(irq); | 1273 | struct irq_desc *desc = irq_to_desc(d->irq); |
1275 | u32 trigger = desc->status & IRQ_TYPE_SENSE_MASK; | 1274 | u32 trigger = desc->status & IRQ_TYPE_SENSE_MASK; |
1276 | 1275 | ||
1277 | if (trigger) | 1276 | if (trigger) |
@@ -1289,12 +1288,12 @@ static void gpio_unmask_irq(unsigned int irq) | |||
1289 | 1288 | ||
1290 | static struct irq_chip gpio_irq_chip = { | 1289 | static struct irq_chip gpio_irq_chip = { |
1291 | .name = "GPIO", | 1290 | .name = "GPIO", |
1292 | .shutdown = gpio_irq_shutdown, | 1291 | .irq_shutdown = gpio_irq_shutdown, |
1293 | .ack = gpio_ack_irq, | 1292 | .irq_ack = gpio_ack_irq, |
1294 | .mask = gpio_mask_irq, | 1293 | .irq_mask = gpio_mask_irq, |
1295 | .unmask = gpio_unmask_irq, | 1294 | .irq_unmask = gpio_unmask_irq, |
1296 | .set_type = gpio_irq_type, | 1295 | .irq_set_type = gpio_irq_type, |
1297 | .set_wake = gpio_wake_enable, | 1296 | .irq_set_wake = gpio_wake_enable, |
1298 | }; | 1297 | }; |
1299 | 1298 | ||
1300 | /*---------------------------------------------------------------------*/ | 1299 | /*---------------------------------------------------------------------*/ |
@@ -1303,36 +1302,36 @@ static struct irq_chip gpio_irq_chip = { | |||
1303 | 1302 | ||
1304 | /* MPUIO uses the always-on 32k clock */ | 1303 | /* MPUIO uses the always-on 32k clock */ |
1305 | 1304 | ||
1306 | static void mpuio_ack_irq(unsigned int irq) | 1305 | static void mpuio_ack_irq(struct irq_data *d) |
1307 | { | 1306 | { |
1308 | /* The ISR is reset automatically, so do nothing here. */ | 1307 | /* The ISR is reset automatically, so do nothing here. */ |
1309 | } | 1308 | } |
1310 | 1309 | ||
1311 | static void mpuio_mask_irq(unsigned int irq) | 1310 | static void mpuio_mask_irq(struct irq_data *d) |
1312 | { | 1311 | { |
1313 | unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); | 1312 | unsigned int gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE); |
1314 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1313 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1315 | 1314 | ||
1316 | _set_gpio_irqenable(bank, gpio, 0); | 1315 | _set_gpio_irqenable(bank, gpio, 0); |
1317 | } | 1316 | } |
1318 | 1317 | ||
1319 | static void mpuio_unmask_irq(unsigned int irq) | 1318 | static void mpuio_unmask_irq(struct irq_data *d) |
1320 | { | 1319 | { |
1321 | unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); | 1320 | unsigned int gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE); |
1322 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1321 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1323 | 1322 | ||
1324 | _set_gpio_irqenable(bank, gpio, 1); | 1323 | _set_gpio_irqenable(bank, gpio, 1); |
1325 | } | 1324 | } |
1326 | 1325 | ||
1327 | static struct irq_chip mpuio_irq_chip = { | 1326 | static struct irq_chip mpuio_irq_chip = { |
1328 | .name = "MPUIO", | 1327 | .name = "MPUIO", |
1329 | .ack = mpuio_ack_irq, | 1328 | .irq_ack = mpuio_ack_irq, |
1330 | .mask = mpuio_mask_irq, | 1329 | .irq_mask = mpuio_mask_irq, |
1331 | .unmask = mpuio_unmask_irq, | 1330 | .irq_unmask = mpuio_unmask_irq, |
1332 | .set_type = gpio_irq_type, | 1331 | .irq_set_type = gpio_irq_type, |
1333 | #ifdef CONFIG_ARCH_OMAP16XX | 1332 | #ifdef CONFIG_ARCH_OMAP16XX |
1334 | /* REVISIT: assuming only 16xx supports MPUIO wake events */ | 1333 | /* REVISIT: assuming only 16xx supports MPUIO wake events */ |
1335 | .set_wake = gpio_wake_enable, | 1334 | .irq_set_wake = gpio_wake_enable, |
1336 | #endif | 1335 | #endif |
1337 | }; | 1336 | }; |
1338 | 1337 | ||