diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-21 16:56:56 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-21 16:56:56 -0500 |
commit | 2d13ccaa8797d7e599f3792aed4b1e44b47f94a5 (patch) | |
tree | 7079c1610373fc6709c3a285a53099beaf21295a /arch | |
parent | 59136ef3c596606d3eef920dc3e0fdfa2ce52c6f (diff) | |
parent | 11f1c5de7be06bbb51363002ebc4d00edc2677df (diff) |
Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable
Conflicts:
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/include/mach/omap4-common.h
arch/arm/plat-omap/include/plat/irqs.h
The changes to omap4-common.h were moved to arch/arm/mach-omap2/common.h
and the other trivial conflicts resolved. The now empty ifdef in irqs.h
was also eliminated.
Diffstat (limited to 'arch')
268 files changed, 2061 insertions, 2691 deletions
diff --git a/arch/arm/boot/dts/tegra-ventana.dts b/arch/arm/boot/dts/tegra-ventana.dts index 9b29a623aaf1..3f9abd6b6964 100644 --- a/arch/arm/boot/dts/tegra-ventana.dts +++ b/arch/arm/boot/dts/tegra-ventana.dts | |||
@@ -22,11 +22,10 @@ | |||
22 | sdhci@c8000400 { | 22 | sdhci@c8000400 { |
23 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | 23 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
24 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 24 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
25 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ | 25 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ |
26 | }; | 26 | }; |
27 | 27 | ||
28 | sdhci@c8000600 { | 28 | sdhci@c8000600 { |
29 | power-gpios = <&gpio 70 0>; /* gpio PI6 */ | ||
30 | support-8bit; | 29 | support-8bit; |
31 | }; | 30 | }; |
32 | }; | 31 | }; |
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 74df9ca2be31..81a933eb0903 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -1,8 +1,14 @@ | |||
1 | config ARM_GIC | 1 | config ARM_GIC |
2 | select IRQ_DOMAIN | 2 | select IRQ_DOMAIN |
3 | select MULTI_IRQ_HANDLER | ||
4 | bool | ||
5 | |||
6 | config GIC_NON_BANKED | ||
3 | bool | 7 | bool |
4 | 8 | ||
5 | config ARM_VIC | 9 | config ARM_VIC |
10 | select IRQ_DOMAIN | ||
11 | select MULTI_IRQ_HANDLER | ||
6 | bool | 12 | bool |
7 | 13 | ||
8 | config ARM_VIC_NR | 14 | config ARM_VIC_NR |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 0e6ae470c94f..a1feb6b4f9f5 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -40,13 +40,36 @@ | |||
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | 41 | ||
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | #include <asm/exception.h> | ||
43 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
44 | #include <asm/hardware/gic.h> | 45 | #include <asm/hardware/gic.h> |
45 | 46 | ||
46 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); | 47 | union gic_base { |
48 | void __iomem *common_base; | ||
49 | void __percpu __iomem **percpu_base; | ||
50 | }; | ||
47 | 51 | ||
48 | /* Address of GIC 0 CPU interface */ | 52 | struct gic_chip_data { |
49 | void __iomem *gic_cpu_base_addr __read_mostly; | 53 | unsigned int irq_offset; |
54 | union gic_base dist_base; | ||
55 | union gic_base cpu_base; | ||
56 | #ifdef CONFIG_CPU_PM | ||
57 | u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; | ||
58 | u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; | ||
59 | u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; | ||
60 | u32 __percpu *saved_ppi_enable; | ||
61 | u32 __percpu *saved_ppi_conf; | ||
62 | #endif | ||
63 | #ifdef CONFIG_IRQ_DOMAIN | ||
64 | struct irq_domain domain; | ||
65 | #endif | ||
66 | unsigned int gic_irqs; | ||
67 | #ifdef CONFIG_GIC_NON_BANKED | ||
68 | void __iomem *(*get_base)(union gic_base *); | ||
69 | #endif | ||
70 | }; | ||
71 | |||
72 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); | ||
50 | 73 | ||
51 | /* | 74 | /* |
52 | * Supported arch specific GIC irq extension. | 75 | * Supported arch specific GIC irq extension. |
@@ -67,16 +90,48 @@ struct irq_chip gic_arch_extn = { | |||
67 | 90 | ||
68 | static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; | 91 | static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; |
69 | 92 | ||
93 | #ifdef CONFIG_GIC_NON_BANKED | ||
94 | static void __iomem *gic_get_percpu_base(union gic_base *base) | ||
95 | { | ||
96 | return *__this_cpu_ptr(base->percpu_base); | ||
97 | } | ||
98 | |||
99 | static void __iomem *gic_get_common_base(union gic_base *base) | ||
100 | { | ||
101 | return base->common_base; | ||
102 | } | ||
103 | |||
104 | static inline void __iomem *gic_data_dist_base(struct gic_chip_data *data) | ||
105 | { | ||
106 | return data->get_base(&data->dist_base); | ||
107 | } | ||
108 | |||
109 | static inline void __iomem *gic_data_cpu_base(struct gic_chip_data *data) | ||
110 | { | ||
111 | return data->get_base(&data->cpu_base); | ||
112 | } | ||
113 | |||
114 | static inline void gic_set_base_accessor(struct gic_chip_data *data, | ||
115 | void __iomem *(*f)(union gic_base *)) | ||
116 | { | ||
117 | data->get_base = f; | ||
118 | } | ||
119 | #else | ||
120 | #define gic_data_dist_base(d) ((d)->dist_base.common_base) | ||
121 | #define gic_data_cpu_base(d) ((d)->cpu_base.common_base) | ||
122 | #define gic_set_base_accessor(d,f) | ||
123 | #endif | ||
124 | |||
70 | static inline void __iomem *gic_dist_base(struct irq_data *d) | 125 | static inline void __iomem *gic_dist_base(struct irq_data *d) |
71 | { | 126 | { |
72 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); | 127 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
73 | return gic_data->dist_base; | 128 | return gic_data_dist_base(gic_data); |
74 | } | 129 | } |
75 | 130 | ||
76 | static inline void __iomem *gic_cpu_base(struct irq_data *d) | 131 | static inline void __iomem *gic_cpu_base(struct irq_data *d) |
77 | { | 132 | { |
78 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); | 133 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
79 | return gic_data->cpu_base; | 134 | return gic_data_cpu_base(gic_data); |
80 | } | 135 | } |
81 | 136 | ||
82 | static inline unsigned int gic_irq(struct irq_data *d) | 137 | static inline unsigned int gic_irq(struct irq_data *d) |
@@ -215,6 +270,32 @@ static int gic_set_wake(struct irq_data *d, unsigned int on) | |||
215 | #define gic_set_wake NULL | 270 | #define gic_set_wake NULL |
216 | #endif | 271 | #endif |
217 | 272 | ||
273 | asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) | ||
274 | { | ||
275 | u32 irqstat, irqnr; | ||
276 | struct gic_chip_data *gic = &gic_data[0]; | ||
277 | void __iomem *cpu_base = gic_data_cpu_base(gic); | ||
278 | |||
279 | do { | ||
280 | irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK); | ||
281 | irqnr = irqstat & ~0x1c00; | ||
282 | |||
283 | if (likely(irqnr > 15 && irqnr < 1021)) { | ||
284 | irqnr = irq_domain_to_irq(&gic->domain, irqnr); | ||
285 | handle_IRQ(irqnr, regs); | ||
286 | continue; | ||
287 | } | ||
288 | if (irqnr < 16) { | ||
289 | writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI); | ||
290 | #ifdef CONFIG_SMP | ||
291 | handle_IPI(irqnr, regs); | ||
292 | #endif | ||
293 | continue; | ||
294 | } | ||
295 | break; | ||
296 | } while (1); | ||
297 | } | ||
298 | |||
218 | static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | 299 | static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) |
219 | { | 300 | { |
220 | struct gic_chip_data *chip_data = irq_get_handler_data(irq); | 301 | struct gic_chip_data *chip_data = irq_get_handler_data(irq); |
@@ -225,7 +306,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
225 | chained_irq_enter(chip, desc); | 306 | chained_irq_enter(chip, desc); |
226 | 307 | ||
227 | raw_spin_lock(&irq_controller_lock); | 308 | raw_spin_lock(&irq_controller_lock); |
228 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); | 309 | status = readl_relaxed(gic_data_cpu_base(chip_data) + GIC_CPU_INTACK); |
229 | raw_spin_unlock(&irq_controller_lock); | 310 | raw_spin_unlock(&irq_controller_lock); |
230 | 311 | ||
231 | gic_irq = (status & 0x3ff); | 312 | gic_irq = (status & 0x3ff); |
@@ -270,7 +351,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic) | |||
270 | u32 cpumask; | 351 | u32 cpumask; |
271 | unsigned int gic_irqs = gic->gic_irqs; | 352 | unsigned int gic_irqs = gic->gic_irqs; |
272 | struct irq_domain *domain = &gic->domain; | 353 | struct irq_domain *domain = &gic->domain; |
273 | void __iomem *base = gic->dist_base; | 354 | void __iomem *base = gic_data_dist_base(gic); |
274 | u32 cpu = 0; | 355 | u32 cpu = 0; |
275 | 356 | ||
276 | #ifdef CONFIG_SMP | 357 | #ifdef CONFIG_SMP |
@@ -330,8 +411,8 @@ static void __init gic_dist_init(struct gic_chip_data *gic) | |||
330 | 411 | ||
331 | static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) | 412 | static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) |
332 | { | 413 | { |
333 | void __iomem *dist_base = gic->dist_base; | 414 | void __iomem *dist_base = gic_data_dist_base(gic); |
334 | void __iomem *base = gic->cpu_base; | 415 | void __iomem *base = gic_data_cpu_base(gic); |
335 | int i; | 416 | int i; |
336 | 417 | ||
337 | /* | 418 | /* |
@@ -368,7 +449,7 @@ static void gic_dist_save(unsigned int gic_nr) | |||
368 | BUG(); | 449 | BUG(); |
369 | 450 | ||
370 | gic_irqs = gic_data[gic_nr].gic_irqs; | 451 | gic_irqs = gic_data[gic_nr].gic_irqs; |
371 | dist_base = gic_data[gic_nr].dist_base; | 452 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
372 | 453 | ||
373 | if (!dist_base) | 454 | if (!dist_base) |
374 | return; | 455 | return; |
@@ -403,7 +484,7 @@ static void gic_dist_restore(unsigned int gic_nr) | |||
403 | BUG(); | 484 | BUG(); |
404 | 485 | ||
405 | gic_irqs = gic_data[gic_nr].gic_irqs; | 486 | gic_irqs = gic_data[gic_nr].gic_irqs; |
406 | dist_base = gic_data[gic_nr].dist_base; | 487 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
407 | 488 | ||
408 | if (!dist_base) | 489 | if (!dist_base) |
409 | return; | 490 | return; |
@@ -439,8 +520,8 @@ static void gic_cpu_save(unsigned int gic_nr) | |||
439 | if (gic_nr >= MAX_GIC_NR) | 520 | if (gic_nr >= MAX_GIC_NR) |
440 | BUG(); | 521 | BUG(); |
441 | 522 | ||
442 | dist_base = gic_data[gic_nr].dist_base; | 523 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
443 | cpu_base = gic_data[gic_nr].cpu_base; | 524 | cpu_base = gic_data_cpu_base(&gic_data[gic_nr]); |
444 | 525 | ||
445 | if (!dist_base || !cpu_base) | 526 | if (!dist_base || !cpu_base) |
446 | return; | 527 | return; |
@@ -465,8 +546,8 @@ static void gic_cpu_restore(unsigned int gic_nr) | |||
465 | if (gic_nr >= MAX_GIC_NR) | 546 | if (gic_nr >= MAX_GIC_NR) |
466 | BUG(); | 547 | BUG(); |
467 | 548 | ||
468 | dist_base = gic_data[gic_nr].dist_base; | 549 | dist_base = gic_data_dist_base(&gic_data[gic_nr]); |
469 | cpu_base = gic_data[gic_nr].cpu_base; | 550 | cpu_base = gic_data_cpu_base(&gic_data[gic_nr]); |
470 | 551 | ||
471 | if (!dist_base || !cpu_base) | 552 | if (!dist_base || !cpu_base) |
472 | return; | 553 | return; |
@@ -491,6 +572,11 @@ static int gic_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
491 | int i; | 572 | int i; |
492 | 573 | ||
493 | for (i = 0; i < MAX_GIC_NR; i++) { | 574 | for (i = 0; i < MAX_GIC_NR; i++) { |
575 | #ifdef CONFIG_GIC_NON_BANKED | ||
576 | /* Skip over unused GICs */ | ||
577 | if (!gic_data[i].get_base) | ||
578 | continue; | ||
579 | #endif | ||
494 | switch (cmd) { | 580 | switch (cmd) { |
495 | case CPU_PM_ENTER: | 581 | case CPU_PM_ENTER: |
496 | gic_cpu_save(i); | 582 | gic_cpu_save(i); |
@@ -563,8 +649,9 @@ const struct irq_domain_ops gic_irq_domain_ops = { | |||
563 | #endif | 649 | #endif |
564 | }; | 650 | }; |
565 | 651 | ||
566 | void __init gic_init(unsigned int gic_nr, int irq_start, | 652 | void __init gic_init_bases(unsigned int gic_nr, int irq_start, |
567 | void __iomem *dist_base, void __iomem *cpu_base) | 653 | void __iomem *dist_base, void __iomem *cpu_base, |
654 | u32 percpu_offset) | ||
568 | { | 655 | { |
569 | struct gic_chip_data *gic; | 656 | struct gic_chip_data *gic; |
570 | struct irq_domain *domain; | 657 | struct irq_domain *domain; |
@@ -574,15 +661,42 @@ void __init gic_init(unsigned int gic_nr, int irq_start, | |||
574 | 661 | ||
575 | gic = &gic_data[gic_nr]; | 662 | gic = &gic_data[gic_nr]; |
576 | domain = &gic->domain; | 663 | domain = &gic->domain; |
577 | gic->dist_base = dist_base; | 664 | #ifdef CONFIG_GIC_NON_BANKED |
578 | gic->cpu_base = cpu_base; | 665 | if (percpu_offset) { /* Frankein-GIC without banked registers... */ |
666 | unsigned int cpu; | ||
667 | |||
668 | gic->dist_base.percpu_base = alloc_percpu(void __iomem *); | ||
669 | gic->cpu_base.percpu_base = alloc_percpu(void __iomem *); | ||
670 | if (WARN_ON(!gic->dist_base.percpu_base || | ||
671 | !gic->cpu_base.percpu_base)) { | ||
672 | free_percpu(gic->dist_base.percpu_base); | ||
673 | free_percpu(gic->cpu_base.percpu_base); | ||
674 | return; | ||
675 | } | ||
676 | |||
677 | for_each_possible_cpu(cpu) { | ||
678 | unsigned long offset = percpu_offset * cpu_logical_map(cpu); | ||
679 | *per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset; | ||
680 | *per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset; | ||
681 | } | ||
682 | |||
683 | gic_set_base_accessor(gic, gic_get_percpu_base); | ||
684 | } else | ||
685 | #endif | ||
686 | { /* Normal, sane GIC... */ | ||
687 | WARN(percpu_offset, | ||
688 | "GIC_NON_BANKED not enabled, ignoring %08x offset!", | ||
689 | percpu_offset); | ||
690 | gic->dist_base.common_base = dist_base; | ||
691 | gic->cpu_base.common_base = cpu_base; | ||
692 | gic_set_base_accessor(gic, gic_get_common_base); | ||
693 | } | ||
579 | 694 | ||
580 | /* | 695 | /* |
581 | * For primary GICs, skip over SGIs. | 696 | * For primary GICs, skip over SGIs. |
582 | * For secondary GICs, skip over PPIs, too. | 697 | * For secondary GICs, skip over PPIs, too. |
583 | */ | 698 | */ |
584 | if (gic_nr == 0) { | 699 | if (gic_nr == 0) { |
585 | gic_cpu_base_addr = cpu_base; | ||
586 | domain->hwirq_base = 16; | 700 | domain->hwirq_base = 16; |
587 | if (irq_start > 0) | 701 | if (irq_start > 0) |
588 | irq_start = (irq_start & ~31) + 16; | 702 | irq_start = (irq_start & ~31) + 16; |
@@ -593,7 +707,7 @@ void __init gic_init(unsigned int gic_nr, int irq_start, | |||
593 | * Find out how many interrupts are supported. | 707 | * Find out how many interrupts are supported. |
594 | * The GIC only supports up to 1020 interrupt sources. | 708 | * The GIC only supports up to 1020 interrupt sources. |
595 | */ | 709 | */ |
596 | gic_irqs = readl_relaxed(dist_base + GIC_DIST_CTR) & 0x1f; | 710 | gic_irqs = readl_relaxed(gic_data_dist_base(gic) + GIC_DIST_CTR) & 0x1f; |
597 | gic_irqs = (gic_irqs + 1) * 32; | 711 | gic_irqs = (gic_irqs + 1) * 32; |
598 | if (gic_irqs > 1020) | 712 | if (gic_irqs > 1020) |
599 | gic_irqs = 1020; | 713 | gic_irqs = 1020; |
@@ -641,7 +755,7 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) | |||
641 | dsb(); | 755 | dsb(); |
642 | 756 | ||
643 | /* this always happens on GIC0 */ | 757 | /* this always happens on GIC0 */ |
644 | writel_relaxed(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT); | 758 | writel_relaxed(map << 16 | irq, gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT); |
645 | } | 759 | } |
646 | #endif | 760 | #endif |
647 | 761 | ||
@@ -652,6 +766,7 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent) | |||
652 | { | 766 | { |
653 | void __iomem *cpu_base; | 767 | void __iomem *cpu_base; |
654 | void __iomem *dist_base; | 768 | void __iomem *dist_base; |
769 | u32 percpu_offset; | ||
655 | int irq; | 770 | int irq; |
656 | struct irq_domain *domain = &gic_data[gic_cnt].domain; | 771 | struct irq_domain *domain = &gic_data[gic_cnt].domain; |
657 | 772 | ||
@@ -664,9 +779,12 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent) | |||
664 | cpu_base = of_iomap(node, 1); | 779 | cpu_base = of_iomap(node, 1); |
665 | WARN(!cpu_base, "unable to map gic cpu registers\n"); | 780 | WARN(!cpu_base, "unable to map gic cpu registers\n"); |
666 | 781 | ||
782 | if (of_property_read_u32(node, "cpu-offset", &percpu_offset)) | ||
783 | percpu_offset = 0; | ||
784 | |||
667 | domain->of_node = of_node_get(node); | 785 | domain->of_node = of_node_get(node); |
668 | 786 | ||
669 | gic_init(gic_cnt, -1, dist_base, cpu_base); | 787 | gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset); |
670 | 788 | ||
671 | if (parent) { | 789 | if (parent) { |
672 | irq = irq_of_parse_and_map(node, 0); | 790 | irq = irq_of_parse_and_map(node, 0); |
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 01f18a421b17..6ed41ec2bbf5 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -19,17 +19,22 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/export.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/irqdomain.h> | ||
27 | #include <linux/of.h> | ||
28 | #include <linux/of_address.h> | ||
29 | #include <linux/of_irq.h> | ||
25 | #include <linux/syscore_ops.h> | 30 | #include <linux/syscore_ops.h> |
26 | #include <linux/device.h> | 31 | #include <linux/device.h> |
27 | #include <linux/amba/bus.h> | 32 | #include <linux/amba/bus.h> |
28 | 33 | ||
34 | #include <asm/exception.h> | ||
29 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
30 | #include <asm/hardware/vic.h> | 36 | #include <asm/hardware/vic.h> |
31 | 37 | ||
32 | #ifdef CONFIG_PM | ||
33 | /** | 38 | /** |
34 | * struct vic_device - VIC PM device | 39 | * struct vic_device - VIC PM device |
35 | * @irq: The IRQ number for the base of the VIC. | 40 | * @irq: The IRQ number for the base of the VIC. |
@@ -40,6 +45,7 @@ | |||
40 | * @int_enable: Save for VIC_INT_ENABLE. | 45 | * @int_enable: Save for VIC_INT_ENABLE. |
41 | * @soft_int: Save for VIC_INT_SOFT. | 46 | * @soft_int: Save for VIC_INT_SOFT. |
42 | * @protect: Save for VIC_PROTECT. | 47 | * @protect: Save for VIC_PROTECT. |
48 | * @domain: The IRQ domain for the VIC. | ||
43 | */ | 49 | */ |
44 | struct vic_device { | 50 | struct vic_device { |
45 | void __iomem *base; | 51 | void __iomem *base; |
@@ -50,13 +56,13 @@ struct vic_device { | |||
50 | u32 int_enable; | 56 | u32 int_enable; |
51 | u32 soft_int; | 57 | u32 soft_int; |
52 | u32 protect; | 58 | u32 protect; |
59 | struct irq_domain domain; | ||
53 | }; | 60 | }; |
54 | 61 | ||
55 | /* we cannot allocate memory when VICs are initially registered */ | 62 | /* we cannot allocate memory when VICs are initially registered */ |
56 | static struct vic_device vic_devices[CONFIG_ARM_VIC_NR]; | 63 | static struct vic_device vic_devices[CONFIG_ARM_VIC_NR]; |
57 | 64 | ||
58 | static int vic_id; | 65 | static int vic_id; |
59 | #endif /* CONFIG_PM */ | ||
60 | 66 | ||
61 | /** | 67 | /** |
62 | * vic_init2 - common initialisation code | 68 | * vic_init2 - common initialisation code |
@@ -156,39 +162,50 @@ static int __init vic_pm_init(void) | |||
156 | return 0; | 162 | return 0; |
157 | } | 163 | } |
158 | late_initcall(vic_pm_init); | 164 | late_initcall(vic_pm_init); |
165 | #endif /* CONFIG_PM */ | ||
159 | 166 | ||
160 | /** | 167 | /** |
161 | * vic_pm_register - Register a VIC for later power management control | 168 | * vic_register() - Register a VIC. |
162 | * @base: The base address of the VIC. | 169 | * @base: The base address of the VIC. |
163 | * @irq: The base IRQ for the VIC. | 170 | * @irq: The base IRQ for the VIC. |
164 | * @resume_sources: bitmask of interrupts allowed for resume sources. | 171 | * @resume_sources: bitmask of interrupts allowed for resume sources. |
172 | * @node: The device tree node associated with the VIC. | ||
165 | * | 173 | * |
166 | * Register the VIC with the system device tree so that it can be notified | 174 | * Register the VIC with the system device tree so that it can be notified |
167 | * of suspend and resume requests and ensure that the correct actions are | 175 | * of suspend and resume requests and ensure that the correct actions are |
168 | * taken to re-instate the settings on resume. | 176 | * taken to re-instate the settings on resume. |
177 | * | ||
178 | * This also configures the IRQ domain for the VIC. | ||
169 | */ | 179 | */ |
170 | static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 resume_sources) | 180 | static void __init vic_register(void __iomem *base, unsigned int irq, |
181 | u32 resume_sources, struct device_node *node) | ||
171 | { | 182 | { |
172 | struct vic_device *v; | 183 | struct vic_device *v; |
173 | 184 | ||
174 | if (vic_id >= ARRAY_SIZE(vic_devices)) | 185 | if (vic_id >= ARRAY_SIZE(vic_devices)) { |
175 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); | 186 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); |
176 | else { | 187 | return; |
177 | v = &vic_devices[vic_id]; | ||
178 | v->base = base; | ||
179 | v->resume_sources = resume_sources; | ||
180 | v->irq = irq; | ||
181 | vic_id++; | ||
182 | } | 188 | } |
189 | |||
190 | v = &vic_devices[vic_id]; | ||
191 | v->base = base; | ||
192 | v->resume_sources = resume_sources; | ||
193 | v->irq = irq; | ||
194 | vic_id++; | ||
195 | |||
196 | v->domain.irq_base = irq; | ||
197 | v->domain.nr_irq = 32; | ||
198 | #ifdef CONFIG_OF_IRQ | ||
199 | v->domain.of_node = of_node_get(node); | ||
200 | v->domain.ops = &irq_domain_simple_ops; | ||
201 | #endif /* CONFIG_OF */ | ||
202 | irq_domain_add(&v->domain); | ||
183 | } | 203 | } |
184 | #else | ||
185 | static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { } | ||
186 | #endif /* CONFIG_PM */ | ||
187 | 204 | ||
188 | static void vic_ack_irq(struct irq_data *d) | 205 | static void vic_ack_irq(struct irq_data *d) |
189 | { | 206 | { |
190 | void __iomem *base = irq_data_get_irq_chip_data(d); | 207 | void __iomem *base = irq_data_get_irq_chip_data(d); |
191 | unsigned int irq = d->irq & 31; | 208 | unsigned int irq = d->hwirq; |
192 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | 209 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); |
193 | /* moreover, clear the soft-triggered, in case it was the reason */ | 210 | /* moreover, clear the soft-triggered, in case it was the reason */ |
194 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); | 211 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); |
@@ -197,14 +214,14 @@ static void vic_ack_irq(struct irq_data *d) | |||
197 | static void vic_mask_irq(struct irq_data *d) | 214 | static void vic_mask_irq(struct irq_data *d) |
198 | { | 215 | { |
199 | void __iomem *base = irq_data_get_irq_chip_data(d); | 216 | void __iomem *base = irq_data_get_irq_chip_data(d); |
200 | unsigned int irq = d->irq & 31; | 217 | unsigned int irq = d->hwirq; |
201 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | 218 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); |
202 | } | 219 | } |
203 | 220 | ||
204 | static void vic_unmask_irq(struct irq_data *d) | 221 | static void vic_unmask_irq(struct irq_data *d) |
205 | { | 222 | { |
206 | void __iomem *base = irq_data_get_irq_chip_data(d); | 223 | void __iomem *base = irq_data_get_irq_chip_data(d); |
207 | unsigned int irq = d->irq & 31; | 224 | unsigned int irq = d->hwirq; |
208 | writel(1 << irq, base + VIC_INT_ENABLE); | 225 | writel(1 << irq, base + VIC_INT_ENABLE); |
209 | } | 226 | } |
210 | 227 | ||
@@ -226,7 +243,7 @@ static struct vic_device *vic_from_irq(unsigned int irq) | |||
226 | static int vic_set_wake(struct irq_data *d, unsigned int on) | 243 | static int vic_set_wake(struct irq_data *d, unsigned int on) |
227 | { | 244 | { |
228 | struct vic_device *v = vic_from_irq(d->irq); | 245 | struct vic_device *v = vic_from_irq(d->irq); |
229 | unsigned int off = d->irq & 31; | 246 | unsigned int off = d->hwirq; |
230 | u32 bit = 1 << off; | 247 | u32 bit = 1 << off; |
231 | 248 | ||
232 | if (!v) | 249 | if (!v) |
@@ -330,15 +347,9 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
330 | vic_set_irq_sources(base, irq_start, vic_sources); | 347 | vic_set_irq_sources(base, irq_start, vic_sources); |
331 | } | 348 | } |
332 | 349 | ||
333 | /** | 350 | static void __init __vic_init(void __iomem *base, unsigned int irq_start, |
334 | * vic_init - initialise a vectored interrupt controller | 351 | u32 vic_sources, u32 resume_sources, |
335 | * @base: iomem base address | 352 | struct device_node *node) |
336 | * @irq_start: starting interrupt number, must be muliple of 32 | ||
337 | * @vic_sources: bitmask of interrupt sources to allow | ||
338 | * @resume_sources: bitmask of interrupt sources to allow for resume | ||
339 | */ | ||
340 | void __init vic_init(void __iomem *base, unsigned int irq_start, | ||
341 | u32 vic_sources, u32 resume_sources) | ||
342 | { | 353 | { |
343 | unsigned int i; | 354 | unsigned int i; |
344 | u32 cellid = 0; | 355 | u32 cellid = 0; |
@@ -375,5 +386,81 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
375 | 386 | ||
376 | vic_set_irq_sources(base, irq_start, vic_sources); | 387 | vic_set_irq_sources(base, irq_start, vic_sources); |
377 | 388 | ||
378 | vic_pm_register(base, irq_start, resume_sources); | 389 | vic_register(base, irq_start, resume_sources, node); |
390 | } | ||
391 | |||
392 | /** | ||
393 | * vic_init() - initialise a vectored interrupt controller | ||
394 | * @base: iomem base address | ||
395 | * @irq_start: starting interrupt number, must be muliple of 32 | ||
396 | * @vic_sources: bitmask of interrupt sources to allow | ||
397 | * @resume_sources: bitmask of interrupt sources to allow for resume | ||
398 | */ | ||
399 | void __init vic_init(void __iomem *base, unsigned int irq_start, | ||
400 | u32 vic_sources, u32 resume_sources) | ||
401 | { | ||
402 | __vic_init(base, irq_start, vic_sources, resume_sources, NULL); | ||
403 | } | ||
404 | |||
405 | #ifdef CONFIG_OF | ||
406 | int __init vic_of_init(struct device_node *node, struct device_node *parent) | ||
407 | { | ||
408 | void __iomem *regs; | ||
409 | int irq_base; | ||
410 | |||
411 | if (WARN(parent, "non-root VICs are not supported")) | ||
412 | return -EINVAL; | ||
413 | |||
414 | regs = of_iomap(node, 0); | ||
415 | if (WARN_ON(!regs)) | ||
416 | return -EIO; | ||
417 | |||
418 | irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id()); | ||
419 | if (WARN_ON(irq_base < 0)) | ||
420 | goto out_unmap; | ||
421 | |||
422 | __vic_init(regs, irq_base, ~0, ~0, node); | ||
423 | |||
424 | return 0; | ||
425 | |||
426 | out_unmap: | ||
427 | iounmap(regs); | ||
428 | |||
429 | return -EIO; | ||
430 | } | ||
431 | #endif /* CONFIG OF */ | ||
432 | |||
433 | /* | ||
434 | * Handle each interrupt in a single VIC. Returns non-zero if we've | ||
435 | * handled at least one interrupt. This does a single read of the | ||
436 | * status register and handles all interrupts in order from LSB first. | ||
437 | */ | ||
438 | static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs) | ||
439 | { | ||
440 | u32 stat, irq; | ||
441 | int handled = 0; | ||
442 | |||
443 | stat = readl_relaxed(vic->base + VIC_IRQ_STATUS); | ||
444 | while (stat) { | ||
445 | irq = ffs(stat) - 1; | ||
446 | handle_IRQ(irq_domain_to_irq(&vic->domain, irq), regs); | ||
447 | stat &= ~(1 << irq); | ||
448 | handled = 1; | ||
449 | } | ||
450 | |||
451 | return handled; | ||
452 | } | ||
453 | |||
454 | /* | ||
455 | * Keep iterating over all registered VIC's until there are no pending | ||
456 | * interrupts. | ||
457 | */ | ||
458 | asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs) | ||
459 | { | ||
460 | int i, handled; | ||
461 | |||
462 | do { | ||
463 | for (i = 0, handled = 0; i < vic_id; ++i) | ||
464 | handled |= handle_one_vic(&vic_devices[i], regs); | ||
465 | } while (handled); | ||
379 | } | 466 | } |
diff --git a/arch/arm/include/asm/entry-macro-vic2.S b/arch/arm/include/asm/entry-macro-vic2.S deleted file mode 100644 index 3ceb85e43850..000000000000 --- a/arch/arm/include/asm/entry-macro-vic2.S +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* arch/arm/include/asm/entry-macro-vic2.S | ||
2 | * | ||
3 | * Originally arch/arm/mach-s3c6400/include/mach/entry-macro.S | ||
4 | * | ||
5 | * Copyright 2008 Openmoko, Inc. | ||
6 | * Copyright 2008 Simtec Electronics | ||
7 | * http://armlinux.simtec.co.uk/ | ||
8 | * Ben Dooks <ben@simtec.co.uk> | ||
9 | * | ||
10 | * Low-level IRQ helper macros for a device with two VICs | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | /* This should be included from <mach/entry-macro.S> with the necessary | ||
18 | * defines for virtual addresses and IRQ bases for the two vics. | ||
19 | * | ||
20 | * The code needs the following defined: | ||
21 | * IRQ_VIC0_BASE IRQ number of VIC0's first IRQ | ||
22 | * IRQ_VIC1_BASE IRQ number of VIC1's first IRQ | ||
23 | * VA_VIC0 Virtual address of VIC0 | ||
24 | * VA_VIC1 Virtual address of VIC1 | ||
25 | * | ||
26 | * Note, code assumes VIC0's virtual address is an ARM immediate constant | ||
27 | * away from VIC1. | ||
28 | */ | ||
29 | |||
30 | #include <asm/hardware/vic.h> | ||
31 | |||
32 | .macro disable_fiq | ||
33 | .endm | ||
34 | |||
35 | .macro get_irqnr_preamble, base, tmp | ||
36 | ldr \base, =VA_VIC0 | ||
37 | .endm | ||
38 | |||
39 | .macro arch_ret_to_user, tmp1, tmp2 | ||
40 | .endm | ||
41 | |||
42 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
43 | |||
44 | @ check the vic0 | ||
45 | mov \irqnr, #IRQ_VIC0_BASE + 31 | ||
46 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
47 | teq \irqstat, #0 | ||
48 | |||
49 | @ otherwise try vic1 | ||
50 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
51 | addeq \irqnr, \irqnr, #(IRQ_VIC1_BASE - IRQ_VIC0_BASE) | ||
52 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
53 | teqeq \irqstat, #0 | ||
54 | |||
55 | clzne \irqstat, \irqstat | ||
56 | subne \irqnr, \irqnr, \irqstat | ||
57 | .endm | ||
diff --git a/arch/arm/include/asm/hardware/entry-macro-gic.S b/arch/arm/include/asm/hardware/entry-macro-gic.S deleted file mode 100644 index 74ebc803904d..000000000000 --- a/arch/arm/include/asm/hardware/entry-macro-gic.S +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/entry-macro-gic.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for GIC | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/hardware/gic.h> | ||
12 | |||
13 | #ifndef HAVE_GET_IRQNR_PREAMBLE | ||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | ldr \base, =gic_cpu_base_addr | ||
16 | ldr \base, [\base] | ||
17 | .endm | ||
18 | #endif | ||
19 | |||
20 | /* | ||
21 | * The interrupt numbering scheme is defined in the | ||
22 | * interrupt controller spec. To wit: | ||
23 | * | ||
24 | * Interrupts 0-15 are IPI | ||
25 | * 16-31 are local. We allow 30 to be used for the watchdog. | ||
26 | * 32-1020 are global | ||
27 | * 1021-1022 are reserved | ||
28 | * 1023 is "spurious" (no interrupt) | ||
29 | * | ||
30 | * A simple read from the controller will tell us the number of the highest | ||
31 | * priority enabled interrupt. We then just need to check whether it is in the | ||
32 | * valid range for an IRQ (30-1020 inclusive). | ||
33 | */ | ||
34 | |||
35 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
36 | |||
37 | ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
38 | /* bits 12-10 = src CPU, 9-0 = int # */ | ||
39 | |||
40 | ldr \tmp, =1021 | ||
41 | bic \irqnr, \irqstat, #0x1c00 | ||
42 | cmp \irqnr, #15 | ||
43 | cmpcc \irqnr, \irqnr | ||
44 | cmpne \irqnr, \tmp | ||
45 | cmpcs \irqnr, \irqnr | ||
46 | .endm | ||
47 | |||
48 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
49 | * register) is preserved from the macro above. | ||
50 | * If there is an IPI, we immediately signal end of interrupt on the | ||
51 | * controller, since this requires the original irqstat value which | ||
52 | * we won't easily be able to recreate later. | ||
53 | */ | ||
54 | |||
55 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
56 | bic \irqnr, \irqstat, #0x1c00 | ||
57 | cmp \irqnr, #16 | ||
58 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
59 | cmpcs \irqnr, \irqnr | ||
60 | .endm | ||
diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h index 3e91f22046f5..4bdfe0018696 100644 --- a/arch/arm/include/asm/hardware/gic.h +++ b/arch/arm/include/asm/hardware/gic.h | |||
@@ -36,30 +36,22 @@ | |||
36 | #include <linux/irqdomain.h> | 36 | #include <linux/irqdomain.h> |
37 | struct device_node; | 37 | struct device_node; |
38 | 38 | ||
39 | extern void __iomem *gic_cpu_base_addr; | ||
40 | extern struct irq_chip gic_arch_extn; | 39 | extern struct irq_chip gic_arch_extn; |
41 | 40 | ||
42 | void gic_init(unsigned int, int, void __iomem *, void __iomem *); | 41 | void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, |
42 | u32 offset); | ||
43 | int gic_of_init(struct device_node *node, struct device_node *parent); | 43 | int gic_of_init(struct device_node *node, struct device_node *parent); |
44 | void gic_secondary_init(unsigned int); | 44 | void gic_secondary_init(unsigned int); |
45 | void gic_handle_irq(struct pt_regs *regs); | ||
45 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); | 46 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); |
46 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); | 47 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); |
47 | 48 | ||
48 | struct gic_chip_data { | 49 | static inline void gic_init(unsigned int nr, int start, |
49 | void __iomem *dist_base; | 50 | void __iomem *dist , void __iomem *cpu) |
50 | void __iomem *cpu_base; | 51 | { |
51 | #ifdef CONFIG_CPU_PM | 52 | gic_init_bases(nr, start, dist, cpu, 0); |
52 | u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; | 53 | } |
53 | u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; | 54 | |
54 | u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; | ||
55 | u32 __percpu *saved_ppi_enable; | ||
56 | u32 __percpu *saved_ppi_conf; | ||
57 | #endif | ||
58 | #ifdef CONFIG_IRQ_DOMAIN | ||
59 | struct irq_domain domain; | ||
60 | #endif | ||
61 | unsigned int gic_irqs; | ||
62 | }; | ||
63 | #endif | 55 | #endif |
64 | 56 | ||
65 | #endif | 57 | #endif |
diff --git a/arch/arm/include/asm/hardware/vic.h b/arch/arm/include/asm/hardware/vic.h index 5d72550a8097..f42ebd619590 100644 --- a/arch/arm/include/asm/hardware/vic.h +++ b/arch/arm/include/asm/hardware/vic.h | |||
@@ -41,7 +41,15 @@ | |||
41 | #define VIC_PL192_VECT_ADDR 0xF00 | 41 | #define VIC_PL192_VECT_ADDR 0xF00 |
42 | 42 | ||
43 | #ifndef __ASSEMBLY__ | 43 | #ifndef __ASSEMBLY__ |
44 | #include <linux/compiler.h> | ||
45 | #include <linux/types.h> | ||
46 | |||
47 | struct device_node; | ||
48 | struct pt_regs; | ||
49 | |||
44 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); | 50 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); |
45 | #endif | 51 | int vic_of_init(struct device_node *node, struct device_node *parent); |
52 | void vic_handle_irq(struct pt_regs *regs); | ||
46 | 53 | ||
54 | #endif /* __ASSEMBLY__ */ | ||
47 | #endif | 55 | #endif |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 9ad50c4208ae..bd49a6a2a17d 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -36,12 +36,11 @@ | |||
36 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 36 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
37 | ldr r1, =handle_arch_irq | 37 | ldr r1, =handle_arch_irq |
38 | mov r0, sp | 38 | mov r0, sp |
39 | ldr r1, [r1] | ||
40 | adr lr, BSYM(9997f) | 39 | adr lr, BSYM(9997f) |
41 | teq r1, #0 | 40 | ldr pc, [r1] |
42 | movne pc, r1 | 41 | #else |
43 | #endif | ||
44 | arch_irq_handler_default | 42 | arch_irq_handler_default |
43 | #endif | ||
45 | 9997: | 44 | 9997: |
46 | .endm | 45 | .endm |
47 | 46 | ||
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index a4401d6b5b07..adad70db70eb 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -98,7 +98,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
98 | * USB HS Device (Gadget) | 98 | * USB HS Device (Gadget) |
99 | * -------------------------------------------------------------------- */ | 99 | * -------------------------------------------------------------------- */ |
100 | 100 | ||
101 | #if defined(CONFIG_USB_GADGET_ATMEL_USBA) || defined(CONFIG_USB_GADGET_ATMEL_USBA_MODULE) | 101 | #if defined(CONFIG_USB_ATMEL_USBA) || defined(CONFIG_USB_ATMEL_USBA_MODULE) |
102 | 102 | ||
103 | static struct resource usba_udc_resources[] = { | 103 | static struct resource usba_udc_resources[] = { |
104 | [0] = { | 104 | [0] = { |
@@ -1021,8 +1021,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | |||
1021 | #if defined(CONFIG_SERIAL_ATMEL) | 1021 | #if defined(CONFIG_SERIAL_ATMEL) |
1022 | static struct resource dbgu_resources[] = { | 1022 | static struct resource dbgu_resources[] = { |
1023 | [0] = { | 1023 | [0] = { |
1024 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 1024 | .start = AT91_BASE_SYS + AT91_DBGU, |
1025 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | 1025 | .end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1, |
1026 | .flags = IORESOURCE_MEM, | 1026 | .flags = IORESOURCE_MEM, |
1027 | }, | 1027 | }, |
1028 | [1] = { | 1028 | [1] = { |
@@ -1035,7 +1035,6 @@ static struct resource dbgu_resources[] = { | |||
1035 | static struct atmel_uart_data dbgu_data = { | 1035 | static struct atmel_uart_data dbgu_data = { |
1036 | .use_dma_tx = 0, | 1036 | .use_dma_tx = 0, |
1037 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 1037 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
1038 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
1039 | }; | 1038 | }; |
1040 | 1039 | ||
1041 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 1040 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 01d8bbd1468b..66591fa53e05 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -877,8 +877,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | |||
877 | #if defined(CONFIG_SERIAL_ATMEL) | 877 | #if defined(CONFIG_SERIAL_ATMEL) |
878 | static struct resource dbgu_resources[] = { | 878 | static struct resource dbgu_resources[] = { |
879 | [0] = { | 879 | [0] = { |
880 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 880 | .start = AT91_BASE_SYS + AT91_DBGU, |
881 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | 881 | .end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1, |
882 | .flags = IORESOURCE_MEM, | 882 | .flags = IORESOURCE_MEM, |
883 | }, | 883 | }, |
884 | [1] = { | 884 | [1] = { |
@@ -891,7 +891,6 @@ static struct resource dbgu_resources[] = { | |||
891 | static struct atmel_uart_data dbgu_data = { | 891 | static struct atmel_uart_data dbgu_data = { |
892 | .use_dma_tx = 0, | 892 | .use_dma_tx = 0, |
893 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 893 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
894 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
895 | }; | 894 | }; |
896 | 895 | ||
897 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 896 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 24b6f8c0440d..25e3464fb07f 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -837,8 +837,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | |||
837 | #if defined(CONFIG_SERIAL_ATMEL) | 837 | #if defined(CONFIG_SERIAL_ATMEL) |
838 | static struct resource dbgu_resources[] = { | 838 | static struct resource dbgu_resources[] = { |
839 | [0] = { | 839 | [0] = { |
840 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 840 | .start = AT91_BASE_SYS + AT91_DBGU, |
841 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | 841 | .end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1, |
842 | .flags = IORESOURCE_MEM, | 842 | .flags = IORESOURCE_MEM, |
843 | }, | 843 | }, |
844 | [1] = { | 844 | [1] = { |
@@ -851,7 +851,6 @@ static struct resource dbgu_resources[] = { | |||
851 | static struct atmel_uart_data dbgu_data = { | 851 | static struct atmel_uart_data dbgu_data = { |
852 | .use_dma_tx = 0, | 852 | .use_dma_tx = 0, |
853 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 853 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
854 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
855 | }; | 854 | }; |
856 | 855 | ||
857 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 856 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 3b70b3897d95..ae78f4d03b73 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -816,8 +816,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | |||
816 | #if defined(CONFIG_SERIAL_ATMEL) | 816 | #if defined(CONFIG_SERIAL_ATMEL) |
817 | static struct resource dbgu_resources[] = { | 817 | static struct resource dbgu_resources[] = { |
818 | [0] = { | 818 | [0] = { |
819 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 819 | .start = AT91_BASE_SYS + AT91_DBGU, |
820 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | 820 | .end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1, |
821 | .flags = IORESOURCE_MEM, | 821 | .flags = IORESOURCE_MEM, |
822 | }, | 822 | }, |
823 | [1] = { | 823 | [1] = { |
@@ -830,7 +830,6 @@ static struct resource dbgu_resources[] = { | |||
830 | static struct atmel_uart_data dbgu_data = { | 830 | static struct atmel_uart_data dbgu_data = { |
831 | .use_dma_tx = 0, | 831 | .use_dma_tx = 0, |
832 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 832 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
833 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
834 | }; | 833 | }; |
835 | 834 | ||
836 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 835 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 3faa1fde9ad9..ad017eb1f8df 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -1196,8 +1196,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | |||
1196 | 1196 | ||
1197 | static struct resource dbgu_resources[] = { | 1197 | static struct resource dbgu_resources[] = { |
1198 | [0] = { | 1198 | [0] = { |
1199 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 1199 | .start = AT91_BASE_SYS + AT91_DBGU, |
1200 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | 1200 | .end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1, |
1201 | .flags = IORESOURCE_MEM, | 1201 | .flags = IORESOURCE_MEM, |
1202 | }, | 1202 | }, |
1203 | [1] = { | 1203 | [1] = { |
@@ -1210,7 +1210,6 @@ static struct resource dbgu_resources[] = { | |||
1210 | static struct atmel_uart_data dbgu_data = { | 1210 | static struct atmel_uart_data dbgu_data = { |
1211 | .use_dma_tx = 0, | 1211 | .use_dma_tx = 0, |
1212 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 1212 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
1213 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
1214 | }; | 1213 | }; |
1215 | 1214 | ||
1216 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 1215 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 000b5e1da965..09a16d6bd5cd 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -197,7 +197,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {} | |||
197 | * USB HS Device (Gadget) | 197 | * USB HS Device (Gadget) |
198 | * -------------------------------------------------------------------- */ | 198 | * -------------------------------------------------------------------- */ |
199 | 199 | ||
200 | #if defined(CONFIG_USB_GADGET_ATMEL_USBA) || defined(CONFIG_USB_GADGET_ATMEL_USBA_MODULE) | 200 | #if defined(CONFIG_USB_ATMEL_USBA) || defined(CONFIG_USB_ATMEL_USBA_MODULE) |
201 | static struct resource usba_udc_resources[] = { | 201 | static struct resource usba_udc_resources[] = { |
202 | [0] = { | 202 | [0] = { |
203 | .start = AT91SAM9G45_UDPHS_FIFO, | 203 | .start = AT91SAM9G45_UDPHS_FIFO, |
@@ -1332,8 +1332,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | |||
1332 | #if defined(CONFIG_SERIAL_ATMEL) | 1332 | #if defined(CONFIG_SERIAL_ATMEL) |
1333 | static struct resource dbgu_resources[] = { | 1333 | static struct resource dbgu_resources[] = { |
1334 | [0] = { | 1334 | [0] = { |
1335 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 1335 | .start = AT91_BASE_SYS + AT91_DBGU, |
1336 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | 1336 | .end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1, |
1337 | .flags = IORESOURCE_MEM, | 1337 | .flags = IORESOURCE_MEM, |
1338 | }, | 1338 | }, |
1339 | [1] = { | 1339 | [1] = { |
@@ -1346,7 +1346,6 @@ static struct resource dbgu_resources[] = { | |||
1346 | static struct atmel_uart_data dbgu_data = { | 1346 | static struct atmel_uart_data dbgu_data = { |
1347 | .use_dma_tx = 0, | 1347 | .use_dma_tx = 0, |
1348 | .use_dma_rx = 0, | 1348 | .use_dma_rx = 0, |
1349 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
1350 | }; | 1349 | }; |
1351 | 1350 | ||
1352 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 1351 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 305a851b5bff..628eb566d60c 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -75,7 +75,7 @@ void __init at91_add_device_hdmac(void) {} | |||
75 | * USB HS Device (Gadget) | 75 | * USB HS Device (Gadget) |
76 | * -------------------------------------------------------------------- */ | 76 | * -------------------------------------------------------------------- */ |
77 | 77 | ||
78 | #if defined(CONFIG_USB_GADGET_ATMEL_USBA) || defined(CONFIG_USB_GADGET_ATMEL_USBA_MODULE) | 78 | #if defined(CONFIG_USB_ATMEL_USBA) || defined(CONFIG_USB_ATMEL_USBA_MODULE) |
79 | 79 | ||
80 | static struct resource usba_udc_resources[] = { | 80 | static struct resource usba_udc_resources[] = { |
81 | [0] = { | 81 | [0] = { |
@@ -908,8 +908,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | |||
908 | #if defined(CONFIG_SERIAL_ATMEL) | 908 | #if defined(CONFIG_SERIAL_ATMEL) |
909 | static struct resource dbgu_resources[] = { | 909 | static struct resource dbgu_resources[] = { |
910 | [0] = { | 910 | [0] = { |
911 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 911 | .start = AT91_BASE_SYS + AT91_DBGU, |
912 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | 912 | .end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1, |
913 | .flags = IORESOURCE_MEM, | 913 | .flags = IORESOURCE_MEM, |
914 | }, | 914 | }, |
915 | [1] = { | 915 | [1] = { |
@@ -922,7 +922,6 @@ static struct resource dbgu_resources[] = { | |||
922 | static struct atmel_uart_data dbgu_data = { | 922 | static struct atmel_uart_data dbgu_data = { |
923 | .use_dma_tx = 0, | 923 | .use_dma_tx = 0, |
924 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 924 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
925 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
926 | }; | 925 | }; |
927 | 926 | ||
928 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 927 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 649b052231f5..12a3f955162b 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -384,7 +384,7 @@ static struct spi_board_info yl9200_spi_devices[] = { | |||
384 | #include <video/s1d13xxxfb.h> | 384 | #include <video/s1d13xxxfb.h> |
385 | 385 | ||
386 | 386 | ||
387 | static void __init yl9200_init_video(void) | 387 | static void yl9200_init_video(void) |
388 | { | 388 | { |
389 | /* NWAIT Signal */ | 389 | /* NWAIT Signal */ |
390 | at91_set_A_periph(AT91_PIN_PC6, 0); | 390 | at91_set_A_periph(AT91_PIN_PC6, 0); |
diff --git a/arch/arm/mach-at91/include/mach/vmalloc.h b/arch/arm/mach-at91/include/mach/vmalloc.h index 8eb459f3f5b7..8e4a1bd0ab1d 100644 --- a/arch/arm/mach-at91/include/mach/vmalloc.h +++ b/arch/arm/mach-at91/include/mach/vmalloc.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #ifndef __ASM_ARCH_VMALLOC_H | 21 | #ifndef __ASM_ARCH_VMALLOC_H |
22 | #define __ASM_ARCH_VMALLOC_H | 22 | #define __ASM_ARCH_VMALLOC_H |
23 | 23 | ||
24 | #include <mach/hardware.h> | ||
25 | |||
24 | #define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK) | 26 | #define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK) |
25 | 27 | ||
26 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c index 55f7b4b08ab9..594852fe24cc 100644 --- a/arch/arm/mach-cns3xxx/cns3420vb.c +++ b/arch/arm/mach-cns3xxx/cns3420vb.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mtd/partitions.h> | 26 | #include <linux/mtd/partitions.h> |
27 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | #include <asm/hardware/gic.h> | ||
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
31 | #include <asm/mach/time.h> | 32 | #include <asm/mach/time.h> |
@@ -201,5 +202,6 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board") | |||
201 | .map_io = cns3420_map_io, | 202 | .map_io = cns3420_map_io, |
202 | .init_irq = cns3xxx_init_irq, | 203 | .init_irq = cns3xxx_init_irq, |
203 | .timer = &cns3xxx_timer, | 204 | .timer = &cns3xxx_timer, |
205 | .handle_irq = gic_handle_irq, | ||
204 | .init_machine = cns3420_init, | 206 | .init_machine = cns3420_init, |
205 | MACHINE_END | 207 | MACHINE_END |
diff --git a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S index d87bfc397d39..01c57df5f716 100644 --- a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S +++ b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S | |||
@@ -8,8 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/hardware/entry-macro-gic.S> | ||
12 | |||
13 | .macro disable_fiq | 11 | .macro disable_fiq |
14 | .endm | 12 | .endm |
15 | 13 | ||
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index 0713448206a5..d9b0ea2ba4d8 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | 18 | ||
19 | #include <asm/hardware/vic.h> | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | 22 | ||
@@ -36,6 +37,7 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board") | |||
36 | .atag_offset = 0x100, | 37 | .atag_offset = 0x100, |
37 | .map_io = ep93xx_map_io, | 38 | .map_io = ep93xx_map_io, |
38 | .init_irq = ep93xx_init_irq, | 39 | .init_irq = ep93xx_init_irq, |
40 | .handle_irq = vic_handle_irq, | ||
39 | .timer = &ep93xx_timer, | 41 | .timer = &ep93xx_timer, |
40 | .init_machine = adssphere_init_machine, | 42 | .init_machine = adssphere_init_machine, |
41 | MACHINE_END | 43 | MACHINE_END |
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 70ef8c527d27..9bbae0835f27 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <mach/ep93xx_spi.h> | 39 | #include <mach/ep93xx_spi.h> |
40 | #include <mach/gpio-ep93xx.h> | 40 | #include <mach/gpio-ep93xx.h> |
41 | 41 | ||
42 | #include <asm/hardware/vic.h> | ||
42 | #include <asm/mach-types.h> | 43 | #include <asm/mach-types.h> |
43 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
44 | 45 | ||
@@ -250,6 +251,7 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board") | |||
250 | .atag_offset = 0x100, | 251 | .atag_offset = 0x100, |
251 | .map_io = ep93xx_map_io, | 252 | .map_io = ep93xx_map_io, |
252 | .init_irq = ep93xx_init_irq, | 253 | .init_irq = ep93xx_init_irq, |
254 | .handle_irq = vic_handle_irq, | ||
253 | .timer = &ep93xx_timer, | 255 | .timer = &ep93xx_timer, |
254 | .init_machine = edb93xx_init_machine, | 256 | .init_machine = edb93xx_init_machine, |
255 | MACHINE_END | 257 | MACHINE_END |
@@ -261,6 +263,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") | |||
261 | .atag_offset = 0x100, | 263 | .atag_offset = 0x100, |
262 | .map_io = ep93xx_map_io, | 264 | .map_io = ep93xx_map_io, |
263 | .init_irq = ep93xx_init_irq, | 265 | .init_irq = ep93xx_init_irq, |
266 | .handle_irq = vic_handle_irq, | ||
264 | .timer = &ep93xx_timer, | 267 | .timer = &ep93xx_timer, |
265 | .init_machine = edb93xx_init_machine, | 268 | .init_machine = edb93xx_init_machine, |
266 | MACHINE_END | 269 | MACHINE_END |
@@ -272,6 +275,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") | |||
272 | .atag_offset = 0x100, | 275 | .atag_offset = 0x100, |
273 | .map_io = ep93xx_map_io, | 276 | .map_io = ep93xx_map_io, |
274 | .init_irq = ep93xx_init_irq, | 277 | .init_irq = ep93xx_init_irq, |
278 | .handle_irq = vic_handle_irq, | ||
275 | .timer = &ep93xx_timer, | 279 | .timer = &ep93xx_timer, |
276 | .init_machine = edb93xx_init_machine, | 280 | .init_machine = edb93xx_init_machine, |
277 | MACHINE_END | 281 | MACHINE_END |
@@ -283,6 +287,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") | |||
283 | .atag_offset = 0x100, | 287 | .atag_offset = 0x100, |
284 | .map_io = ep93xx_map_io, | 288 | .map_io = ep93xx_map_io, |
285 | .init_irq = ep93xx_init_irq, | 289 | .init_irq = ep93xx_init_irq, |
290 | .handle_irq = vic_handle_irq, | ||
286 | .timer = &ep93xx_timer, | 291 | .timer = &ep93xx_timer, |
287 | .init_machine = edb93xx_init_machine, | 292 | .init_machine = edb93xx_init_machine, |
288 | MACHINE_END | 293 | MACHINE_END |
@@ -294,6 +299,7 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board") | |||
294 | .atag_offset = 0x100, | 299 | .atag_offset = 0x100, |
295 | .map_io = ep93xx_map_io, | 300 | .map_io = ep93xx_map_io, |
296 | .init_irq = ep93xx_init_irq, | 301 | .init_irq = ep93xx_init_irq, |
302 | .handle_irq = vic_handle_irq, | ||
297 | .timer = &ep93xx_timer, | 303 | .timer = &ep93xx_timer, |
298 | .init_machine = edb93xx_init_machine, | 304 | .init_machine = edb93xx_init_machine, |
299 | MACHINE_END | 305 | MACHINE_END |
@@ -305,6 +311,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") | |||
305 | .atag_offset = 0x100, | 311 | .atag_offset = 0x100, |
306 | .map_io = ep93xx_map_io, | 312 | .map_io = ep93xx_map_io, |
307 | .init_irq = ep93xx_init_irq, | 313 | .init_irq = ep93xx_init_irq, |
314 | .handle_irq = vic_handle_irq, | ||
308 | .timer = &ep93xx_timer, | 315 | .timer = &ep93xx_timer, |
309 | .init_machine = edb93xx_init_machine, | 316 | .init_machine = edb93xx_init_machine, |
310 | MACHINE_END | 317 | MACHINE_END |
@@ -316,6 +323,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") | |||
316 | .atag_offset = 0x100, | 323 | .atag_offset = 0x100, |
317 | .map_io = ep93xx_map_io, | 324 | .map_io = ep93xx_map_io, |
318 | .init_irq = ep93xx_init_irq, | 325 | .init_irq = ep93xx_init_irq, |
326 | .handle_irq = vic_handle_irq, | ||
319 | .timer = &ep93xx_timer, | 327 | .timer = &ep93xx_timer, |
320 | .init_machine = edb93xx_init_machine, | 328 | .init_machine = edb93xx_init_machine, |
321 | MACHINE_END | 329 | MACHINE_END |
@@ -327,6 +335,7 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") | |||
327 | .atag_offset = 0x100, | 335 | .atag_offset = 0x100, |
328 | .map_io = ep93xx_map_io, | 336 | .map_io = ep93xx_map_io, |
329 | .init_irq = ep93xx_init_irq, | 337 | .init_irq = ep93xx_init_irq, |
338 | .handle_irq = vic_handle_irq, | ||
330 | .timer = &ep93xx_timer, | 339 | .timer = &ep93xx_timer, |
331 | .init_machine = edb93xx_init_machine, | 340 | .init_machine = edb93xx_init_machine, |
332 | MACHINE_END | 341 | MACHINE_END |
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index 45ee205856f8..1dd32a7c5f15 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | 18 | ||
19 | #include <asm/hardware/vic.h> | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | 22 | ||
@@ -36,6 +37,7 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") | |||
36 | .atag_offset = 0x100, | 37 | .atag_offset = 0x100, |
37 | .map_io = ep93xx_map_io, | 38 | .map_io = ep93xx_map_io, |
38 | .init_irq = ep93xx_init_irq, | 39 | .init_irq = ep93xx_init_irq, |
40 | .handle_irq = vic_handle_irq, | ||
39 | .timer = &ep93xx_timer, | 41 | .timer = &ep93xx_timer, |
40 | .init_machine = gesbc9312_init_machine, | 42 | .init_machine = gesbc9312_init_machine, |
41 | MACHINE_END | 43 | MACHINE_END |
diff --git a/arch/arm/mach-ep93xx/include/mach/entry-macro.S b/arch/arm/mach-ep93xx/include/mach/entry-macro.S index 96b85e2c2c0b..9be6edcf9045 100644 --- a/arch/arm/mach-ep93xx/include/mach/entry-macro.S +++ b/arch/arm/mach-ep93xx/include/mach/entry-macro.S | |||
@@ -9,51 +9,9 @@ | |||
9 | * the Free Software Foundation; either version 2 of the License, or (at | 9 | * the Free Software Foundation; either version 2 of the License, or (at |
10 | * your option) any later version. | 10 | * your option) any later version. |
11 | */ | 11 | */ |
12 | #include <mach/ep93xx-regs.h> | ||
13 | 12 | ||
14 | .macro disable_fiq | 13 | .macro disable_fiq |
15 | .endm | 14 | .endm |
16 | 15 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 17 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \base, =(EP93XX_AHB_VIRT_BASE) | ||
25 | orr \base, \base, #0x000b0000 | ||
26 | mov \irqnr, #0 | ||
27 | ldr \irqstat, [\base] @ lower 32 interrupts | ||
28 | cmp \irqstat, #0 | ||
29 | bne 1001f | ||
30 | |||
31 | eor \base, \base, #0x00070000 | ||
32 | ldr \irqstat, [\base] @ upper 32 interrupts | ||
33 | cmp \irqstat, #0 | ||
34 | beq 1002f | ||
35 | mov \irqnr, #0x20 | ||
36 | |||
37 | 1001: | ||
38 | movs \tmp, \irqstat, lsl #16 | ||
39 | movne \irqstat, \tmp | ||
40 | addeq \irqnr, \irqnr, #16 | ||
41 | |||
42 | movs \tmp, \irqstat, lsl #8 | ||
43 | movne \irqstat, \tmp | ||
44 | addeq \irqnr, \irqnr, #8 | ||
45 | |||
46 | movs \tmp, \irqstat, lsl #4 | ||
47 | movne \irqstat, \tmp | ||
48 | addeq \irqnr, \irqnr, #4 | ||
49 | |||
50 | movs \tmp, \irqstat, lsl #2 | ||
51 | movne \irqstat, \tmp | ||
52 | addeq \irqnr, \irqnr, #2 | ||
53 | |||
54 | movs \tmp, \irqstat, lsl #1 | ||
55 | addeq \irqnr, \irqnr, #1 | ||
56 | orrs \base, \base, #1 | ||
57 | |||
58 | 1002: | ||
59 | .endm | ||
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index e72f7368876e..a6dae6c2e3c1 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
20 | 20 | ||
21 | #include <asm/hardware/vic.h> | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
23 | 24 | ||
@@ -80,6 +81,7 @@ MACHINE_START(MICRO9, "Contec Micro9-High") | |||
80 | .atag_offset = 0x100, | 81 | .atag_offset = 0x100, |
81 | .map_io = ep93xx_map_io, | 82 | .map_io = ep93xx_map_io, |
82 | .init_irq = ep93xx_init_irq, | 83 | .init_irq = ep93xx_init_irq, |
84 | .handle_irq = vic_handle_irq, | ||
83 | .timer = &ep93xx_timer, | 85 | .timer = &ep93xx_timer, |
84 | .init_machine = micro9_init_machine, | 86 | .init_machine = micro9_init_machine, |
85 | MACHINE_END | 87 | MACHINE_END |
@@ -91,6 +93,7 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid") | |||
91 | .atag_offset = 0x100, | 93 | .atag_offset = 0x100, |
92 | .map_io = ep93xx_map_io, | 94 | .map_io = ep93xx_map_io, |
93 | .init_irq = ep93xx_init_irq, | 95 | .init_irq = ep93xx_init_irq, |
96 | .handle_irq = vic_handle_irq, | ||
94 | .timer = &ep93xx_timer, | 97 | .timer = &ep93xx_timer, |
95 | .init_machine = micro9_init_machine, | 98 | .init_machine = micro9_init_machine, |
96 | MACHINE_END | 99 | MACHINE_END |
@@ -102,6 +105,7 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite") | |||
102 | .atag_offset = 0x100, | 105 | .atag_offset = 0x100, |
103 | .map_io = ep93xx_map_io, | 106 | .map_io = ep93xx_map_io, |
104 | .init_irq = ep93xx_init_irq, | 107 | .init_irq = ep93xx_init_irq, |
108 | .handle_irq = vic_handle_irq, | ||
105 | .timer = &ep93xx_timer, | 109 | .timer = &ep93xx_timer, |
106 | .init_machine = micro9_init_machine, | 110 | .init_machine = micro9_init_machine, |
107 | MACHINE_END | 111 | MACHINE_END |
@@ -113,6 +117,7 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim") | |||
113 | .atag_offset = 0x100, | 117 | .atag_offset = 0x100, |
114 | .map_io = ep93xx_map_io, | 118 | .map_io = ep93xx_map_io, |
115 | .init_irq = ep93xx_init_irq, | 119 | .init_irq = ep93xx_init_irq, |
120 | .handle_irq = vic_handle_irq, | ||
116 | .timer = &ep93xx_timer, | 121 | .timer = &ep93xx_timer, |
117 | .init_machine = micro9_init_machine, | 122 | .init_machine = micro9_init_machine, |
118 | MACHINE_END | 123 | MACHINE_END |
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index 52e090dc9d27..40121ba8e711 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <mach/fb.h> | 25 | #include <mach/fb.h> |
26 | #include <mach/gpio-ep93xx.h> | 26 | #include <mach/gpio-ep93xx.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | 31 | ||
@@ -80,6 +81,7 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") | |||
80 | .atag_offset = 0x100, | 81 | .atag_offset = 0x100, |
81 | .map_io = ep93xx_map_io, | 82 | .map_io = ep93xx_map_io, |
82 | .init_irq = ep93xx_init_irq, | 83 | .init_irq = ep93xx_init_irq, |
84 | .handle_irq = vic_handle_irq, | ||
83 | .timer = &ep93xx_timer, | 85 | .timer = &ep93xx_timer, |
84 | .init_machine = simone_init_machine, | 86 | .init_machine = simone_init_machine, |
85 | MACHINE_END | 87 | MACHINE_END |
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c index 8121e3aedc0a..ec7c63ff01e2 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c +++ b/arch/arm/mach-ep93xx/snappercl15.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <mach/fb.h> | 31 | #include <mach/fb.h> |
32 | #include <mach/gpio-ep93xx.h> | 32 | #include <mach/gpio-ep93xx.h> |
33 | 33 | ||
34 | #include <asm/hardware/vic.h> | ||
34 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
36 | 37 | ||
@@ -177,6 +178,7 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15") | |||
177 | .atag_offset = 0x100, | 178 | .atag_offset = 0x100, |
178 | .map_io = ep93xx_map_io, | 179 | .map_io = ep93xx_map_io, |
179 | .init_irq = ep93xx_init_irq, | 180 | .init_irq = ep93xx_init_irq, |
181 | .handle_irq = vic_handle_irq, | ||
180 | .timer = &ep93xx_timer, | 182 | .timer = &ep93xx_timer, |
181 | .init_machine = snappercl15_init_machine, | 183 | .init_machine = snappercl15_init_machine, |
182 | MACHINE_END | 184 | MACHINE_END |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 8b2f1435bcac..760384e6407d 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/ts72xx.h> | 24 | #include <mach/ts72xx.h> |
25 | 25 | ||
26 | #include <asm/hardware/vic.h> | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
@@ -247,6 +248,7 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") | |||
247 | .atag_offset = 0x100, | 248 | .atag_offset = 0x100, |
248 | .map_io = ts72xx_map_io, | 249 | .map_io = ts72xx_map_io, |
249 | .init_irq = ep93xx_init_irq, | 250 | .init_irq = ep93xx_init_irq, |
251 | .handle_irq = vic_handle_irq, | ||
250 | .timer = &ep93xx_timer, | 252 | .timer = &ep93xx_timer, |
251 | .init_machine = ts72xx_init_machine, | 253 | .init_machine = ts72xx_init_machine, |
252 | MACHINE_END | 254 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/cpu.c b/arch/arm/mach-exynos/cpu.c index 90ec247f3b37..6e34485caa36 100644 --- a/arch/arm/mach-exynos/cpu.c +++ b/arch/arm/mach-exynos/cpu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/mach/irq.h> | 15 | #include <asm/mach/irq.h> |
16 | 16 | ||
17 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
18 | #include <asm/exception.h> | ||
18 | #include <asm/hardware/cache-l2x0.h> | 19 | #include <asm/hardware/cache-l2x0.h> |
19 | #include <asm/hardware/gic.h> | 20 | #include <asm/hardware/gic.h> |
20 | 21 | ||
@@ -33,8 +34,6 @@ | |||
33 | #include <mach/regs-irq.h> | 34 | #include <mach/regs-irq.h> |
34 | #include <mach/regs-pmu.h> | 35 | #include <mach/regs-pmu.h> |
35 | 36 | ||
36 | unsigned int gic_bank_offset __read_mostly; | ||
37 | |||
38 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, | 37 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, |
39 | unsigned int irq_start); | 38 | unsigned int irq_start); |
40 | extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); | 39 | extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); |
@@ -207,27 +206,14 @@ void __init exynos4_init_clocks(int xtal) | |||
207 | exynos4_setup_clocks(); | 206 | exynos4_setup_clocks(); |
208 | } | 207 | } |
209 | 208 | ||
210 | static void exynos4_gic_irq_fix_base(struct irq_data *d) | ||
211 | { | ||
212 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); | ||
213 | |||
214 | gic_data->cpu_base = S5P_VA_GIC_CPU + | ||
215 | (gic_bank_offset * smp_processor_id()); | ||
216 | |||
217 | gic_data->dist_base = S5P_VA_GIC_DIST + | ||
218 | (gic_bank_offset * smp_processor_id()); | ||
219 | } | ||
220 | |||
221 | void __init exynos4_init_irq(void) | 209 | void __init exynos4_init_irq(void) |
222 | { | 210 | { |
223 | int irq; | 211 | int irq; |
212 | unsigned int bank_offset; | ||
224 | 213 | ||
225 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; | 214 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; |
226 | 215 | ||
227 | gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); | 216 | gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset); |
228 | gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base; | ||
229 | gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base; | ||
230 | gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base; | ||
231 | 217 | ||
232 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { | 218 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { |
233 | 219 | ||
diff --git a/arch/arm/mach-exynos/include/mach/entry-macro.S b/arch/arm/mach-exynos/include/mach/entry-macro.S index f5e9fd8e37b4..3ba4f547534b 100644 --- a/arch/arm/mach-exynos/include/mach/entry-macro.S +++ b/arch/arm/mach-exynos/include/mach/entry-macro.S | |||
@@ -9,83 +9,8 @@ | |||
9 | * warranty of any kind, whether express or implied. | 9 | * warranty of any kind, whether express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/map.h> | ||
14 | #include <asm/hardware/gic.h> | ||
15 | |||
16 | .macro disable_fiq | 12 | .macro disable_fiq |
17 | .endm | 13 | .endm |
18 | 14 | ||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | mov \tmp, #0 | ||
21 | |||
22 | mrc p15, 0, \base, c0, c0, 5 | ||
23 | and \base, \base, #3 | ||
24 | cmp \base, #0 | ||
25 | beq 1f | ||
26 | |||
27 | ldr \tmp, =gic_bank_offset | ||
28 | ldr \tmp, [\tmp] | ||
29 | cmp \base, #1 | ||
30 | beq 1f | ||
31 | |||
32 | cmp \base, #2 | ||
33 | addeq \tmp, \tmp, \tmp | ||
34 | addne \tmp, \tmp, \tmp, LSL #1 | ||
35 | |||
36 | 1: ldr \base, =gic_cpu_base_addr | ||
37 | ldr \base, [\base] | ||
38 | add \base, \base, \tmp | ||
39 | .endm | ||
40 | |||
41 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
42 | .endm | 16 | .endm |
43 | |||
44 | /* | ||
45 | * The interrupt numbering scheme is defined in the | ||
46 | * interrupt controller spec. To wit: | ||
47 | * | ||
48 | * Interrupts 0-15 are IPI | ||
49 | * 16-28 are reserved | ||
50 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
51 | * 32-1020 are global | ||
52 | * 1021-1022 are reserved | ||
53 | * 1023 is "spurious" (no interrupt) | ||
54 | * | ||
55 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
56 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
57 | * | ||
58 | * A simple read from the controller will tell us the number of the highest | ||
59 | * priority enabled interrupt. We then just need to check whether it is in the | ||
60 | * valid range for an IRQ (30-1020 inclusive). | ||
61 | */ | ||
62 | |||
63 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
64 | |||
65 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
66 | |||
67 | ldr \tmp, =1021 | ||
68 | |||
69 | bic \irqnr, \irqstat, #0x1c00 | ||
70 | |||
71 | cmp \irqnr, #15 | ||
72 | cmpcc \irqnr, \irqnr | ||
73 | cmpne \irqnr, \tmp | ||
74 | cmpcs \irqnr, \irqnr | ||
75 | addne \irqnr, \irqnr, #32 | ||
76 | |||
77 | .endm | ||
78 | |||
79 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
80 | * register) is preserved from the macro above. | ||
81 | * If there is an IPI, we immediately signal end of interrupt on the | ||
82 | * controller, since this requires the original irqstat value which | ||
83 | * we won't easily be able to recreate later. | ||
84 | */ | ||
85 | |||
86 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
87 | bic \irqnr, \irqstat, #0x1c00 | ||
88 | cmp \irqnr, #16 | ||
89 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
90 | cmpcs \irqnr, \irqnr | ||
91 | .endm | ||
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c index f0ca6c157d29..49da3089249a 100644 --- a/arch/arm/mach-exynos/mach-armlex4210.c +++ b/arch/arm/mach-exynos/mach-armlex4210.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smsc911x.h> | 16 | #include <linux/smsc911x.h> |
17 | 17 | ||
18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include <asm/hardware/gic.h> | ||
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | 21 | ||
21 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
@@ -210,6 +211,7 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") | |||
210 | .atag_offset = 0x100, | 211 | .atag_offset = 0x100, |
211 | .init_irq = exynos4_init_irq, | 212 | .init_irq = exynos4_init_irq, |
212 | .map_io = armlex4210_map_io, | 213 | .map_io = armlex4210_map_io, |
214 | .handle_irq = gic_handle_irq, | ||
213 | .init_machine = armlex4210_machine_init, | 215 | .init_machine = armlex4210_machine_init, |
214 | .timer = &exynos4_timer, | 216 | .timer = &exynos4_timer, |
215 | MACHINE_END | 217 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 236bbe187163..5acec11821a4 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <media/v4l2-mediabus.h> | 32 | #include <media/v4l2-mediabus.h> |
33 | 33 | ||
34 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
35 | #include <asm/hardware/gic.h> | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
36 | 37 | ||
37 | #include <plat/adc.h> | 38 | #include <plat/adc.h> |
@@ -1333,6 +1334,7 @@ MACHINE_START(NURI, "NURI") | |||
1333 | .atag_offset = 0x100, | 1334 | .atag_offset = 0x100, |
1334 | .init_irq = exynos4_init_irq, | 1335 | .init_irq = exynos4_init_irq, |
1335 | .map_io = nuri_map_io, | 1336 | .map_io = nuri_map_io, |
1337 | .handle_irq = gic_handle_irq, | ||
1336 | .init_machine = nuri_machine_init, | 1338 | .init_machine = nuri_machine_init, |
1337 | .timer = &exynos4_timer, | 1339 | .timer = &exynos4_timer, |
1338 | .reserve = &nuri_reserve, | 1340 | .reserve = &nuri_reserve, |
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index f80b563f2be7..5561b06c38ec 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/lcd.h> | 22 | #include <linux/lcd.h> |
23 | 23 | ||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/hardware/gic.h> | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | 27 | ||
27 | #include <video/platform_lcd.h> | 28 | #include <video/platform_lcd.h> |
@@ -694,6 +695,7 @@ MACHINE_START(ORIGEN, "ORIGEN") | |||
694 | .atag_offset = 0x100, | 695 | .atag_offset = 0x100, |
695 | .init_irq = exynos4_init_irq, | 696 | .init_irq = exynos4_init_irq, |
696 | .map_io = origen_map_io, | 697 | .map_io = origen_map_io, |
698 | .handle_irq = gic_handle_irq, | ||
697 | .init_machine = origen_machine_init, | 699 | .init_machine = origen_machine_init, |
698 | .timer = &exynos4_timer, | 700 | .timer = &exynos4_timer, |
699 | .reserve = &origen_reserve, | 701 | .reserve = &origen_reserve, |
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index fcf2e0e23d53..722d82d7f217 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | 22 | ||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/hardware/gic.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | 26 | ||
26 | #include <plat/backlight.h> | 27 | #include <plat/backlight.h> |
@@ -287,6 +288,7 @@ MACHINE_START(SMDK4212, "SMDK4212") | |||
287 | .atag_offset = 0x100, | 288 | .atag_offset = 0x100, |
288 | .init_irq = exynos4_init_irq, | 289 | .init_irq = exynos4_init_irq, |
289 | .map_io = smdk4x12_map_io, | 290 | .map_io = smdk4x12_map_io, |
291 | .handle_irq = gic_handle_irq, | ||
290 | .init_machine = smdk4x12_machine_init, | 292 | .init_machine = smdk4x12_machine_init, |
291 | .timer = &exynos4_timer, | 293 | .timer = &exynos4_timer, |
292 | MACHINE_END | 294 | MACHINE_END |
@@ -297,6 +299,7 @@ MACHINE_START(SMDK4412, "SMDK4412") | |||
297 | .atag_offset = 0x100, | 299 | .atag_offset = 0x100, |
298 | .init_irq = exynos4_init_irq, | 300 | .init_irq = exynos4_init_irq, |
299 | .map_io = smdk4x12_map_io, | 301 | .map_io = smdk4x12_map_io, |
302 | .handle_irq = gic_handle_irq, | ||
300 | .init_machine = smdk4x12_machine_init, | 303 | .init_machine = smdk4x12_machine_init, |
301 | .timer = &exynos4_timer, | 304 | .timer = &exynos4_timer, |
302 | MACHINE_END | 305 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index cec2afabe7b4..edc60b6108ed 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
22 | 22 | ||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/hardware/gic.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | 26 | ||
26 | #include <video/platform_lcd.h> | 27 | #include <video/platform_lcd.h> |
@@ -375,6 +376,7 @@ MACHINE_START(SMDKV310, "SMDKV310") | |||
375 | .atag_offset = 0x100, | 376 | .atag_offset = 0x100, |
376 | .init_irq = exynos4_init_irq, | 377 | .init_irq = exynos4_init_irq, |
377 | .map_io = smdkv310_map_io, | 378 | .map_io = smdkv310_map_io, |
379 | .handle_irq = gic_handle_irq, | ||
378 | .init_machine = smdkv310_machine_init, | 380 | .init_machine = smdkv310_machine_init, |
379 | .timer = &exynos4_timer, | 381 | .timer = &exynos4_timer, |
380 | .reserve = &smdkv310_reserve, | 382 | .reserve = &smdkv310_reserve, |
@@ -385,6 +387,7 @@ MACHINE_START(SMDKC210, "SMDKC210") | |||
385 | .atag_offset = 0x100, | 387 | .atag_offset = 0x100, |
386 | .init_irq = exynos4_init_irq, | 388 | .init_irq = exynos4_init_irq, |
387 | .map_io = smdkv310_map_io, | 389 | .map_io = smdkv310_map_io, |
390 | .handle_irq = gic_handle_irq, | ||
388 | .init_machine = smdkv310_machine_init, | 391 | .init_machine = smdkv310_machine_init, |
389 | .timer = &exynos4_timer, | 392 | .timer = &exynos4_timer, |
390 | MACHINE_END | 393 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index a2a177ff4b44..48e85b03cb16 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -21,9 +21,10 @@ | |||
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/i2c-gpio.h> | 22 | #include <linux/i2c-gpio.h> |
23 | #include <linux/i2c/mcs.h> | 23 | #include <linux/i2c/mcs.h> |
24 | #include <linux/i2c/atmel_mxt_ts.h> | 24 | <linux/i2c/atmel_mxt_ts.h> |
25 | 25 | ||
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include <asm/hardware/gic.h> | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | 29 | ||
29 | #include <plat/regs-serial.h> | 30 | #include <plat/regs-serial.h> |
@@ -1058,6 +1059,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") | |||
1058 | .atag_offset = 0x100, | 1059 | .atag_offset = 0x100, |
1059 | .init_irq = exynos4_init_irq, | 1060 | .init_irq = exynos4_init_irq, |
1060 | .map_io = universal_map_io, | 1061 | .map_io = universal_map_io, |
1062 | .handle_irq = gic_handle_irq, | ||
1061 | .init_machine = universal_machine_init, | 1063 | .init_machine = universal_machine_init, |
1062 | .timer = &exynos4_timer, | 1064 | .timer = &exynos4_timer, |
1063 | .reserve = &universal_reserve, | 1065 | .reserve = &universal_reserve, |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 69ffb2fb3875..60bc45e3e709 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <plat/cpu.h> | 33 | #include <plat/cpu.h> |
34 | 34 | ||
35 | extern unsigned int gic_bank_offset; | ||
36 | extern void exynos4_secondary_startup(void); | 35 | extern void exynos4_secondary_startup(void); |
37 | 36 | ||
38 | #define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ | 37 | #define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ |
@@ -65,31 +64,6 @@ static void __iomem *scu_base_addr(void) | |||
65 | 64 | ||
66 | static DEFINE_SPINLOCK(boot_lock); | 65 | static DEFINE_SPINLOCK(boot_lock); |
67 | 66 | ||
68 | static void __cpuinit exynos4_gic_secondary_init(void) | ||
69 | { | ||
70 | void __iomem *dist_base = S5P_VA_GIC_DIST + | ||
71 | (gic_bank_offset * smp_processor_id()); | ||
72 | void __iomem *cpu_base = S5P_VA_GIC_CPU + | ||
73 | (gic_bank_offset * smp_processor_id()); | ||
74 | int i; | ||
75 | |||
76 | /* | ||
77 | * Deal with the banked PPI and SGI interrupts - disable all | ||
78 | * PPI interrupts, ensure all SGI interrupts are enabled. | ||
79 | */ | ||
80 | __raw_writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR); | ||
81 | __raw_writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET); | ||
82 | |||
83 | /* | ||
84 | * Set priority on PPI and SGI interrupts | ||
85 | */ | ||
86 | for (i = 0; i < 32; i += 4) | ||
87 | __raw_writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4); | ||
88 | |||
89 | __raw_writel(0xf0, cpu_base + GIC_CPU_PRIMASK); | ||
90 | __raw_writel(1, cpu_base + GIC_CPU_CTRL); | ||
91 | } | ||
92 | |||
93 | void __cpuinit platform_secondary_init(unsigned int cpu) | 67 | void __cpuinit platform_secondary_init(unsigned int cpu) |
94 | { | 68 | { |
95 | /* | 69 | /* |
@@ -97,7 +71,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
97 | * core (e.g. timer irq), then they will not have been enabled | 71 | * core (e.g. timer irq), then they will not have been enabled |
98 | * for us: do so | 72 | * for us: do so |
99 | */ | 73 | */ |
100 | exynos4_gic_secondary_init(); | 74 | gic_secondary_init(0); |
101 | 75 | ||
102 | /* | 76 | /* |
103 | * let the primary processor know we're out of the | 77 | * let the primary processor know we're out of the |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index b82dcf08e747..89bdf0039f7b 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -140,6 +140,7 @@ DT_MACHINE_START(HIGHBANK, "Highbank") | |||
140 | .map_io = highbank_map_io, | 140 | .map_io = highbank_map_io, |
141 | .init_irq = highbank_init_irq, | 141 | .init_irq = highbank_init_irq, |
142 | .timer = &highbank_timer, | 142 | .timer = &highbank_timer, |
143 | .handle_irq = gic_handle_irq, | ||
143 | .init_machine = highbank_init, | 144 | .init_machine = highbank_init, |
144 | .dt_compat = highbank_match, | 145 | .dt_compat = highbank_match, |
145 | MACHINE_END | 146 | MACHINE_END |
diff --git a/arch/arm/mach-highbank/include/mach/entry-macro.S b/arch/arm/mach-highbank/include/mach/entry-macro.S index 73c11297509e..a14f9e62ca92 100644 --- a/arch/arm/mach-highbank/include/mach/entry-macro.S +++ b/arch/arm/mach-highbank/include/mach/entry-macro.S | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <asm/hardware/entry-macro-gic.S> | ||
2 | |||
3 | .macro disable_fiq | 1 | .macro disable_fiq |
4 | .endm | 2 | .endm |
5 | 3 | ||
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index 22d85889f622..cfede5768aa0 100644 --- a/arch/arm/mach-imx/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot | |||
@@ -1,22 +1,26 @@ | |||
1 | zreladdr-$(CONFIG_ARCH_MX1) += 0x08008000 | 1 | zreladdr-$(CONFIG_SOC_IMX1) += 0x08008000 |
2 | params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 | 2 | params_phys-$(CONFIG_SOC_IMX1) := 0x08000100 |
3 | initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 | 3 | initrd_phys-$(CONFIG_SOC_IMX1) := 0x08800000 |
4 | 4 | ||
5 | zreladdr-$(CONFIG_MACH_MX21) += 0xC0008000 | 5 | zreladdr-$(CONFIG_SOC_IMX21) += 0xC0008000 |
6 | params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 | 6 | params_phys-$(CONFIG_SOC_IMX21) := 0xC0000100 |
7 | initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 | 7 | initrd_phys-$(CONFIG_SOC_IMX21) := 0xC0800000 |
8 | 8 | ||
9 | zreladdr-$(CONFIG_ARCH_MX25) += 0x80008000 | 9 | zreladdr-$(CONFIG_SOC_IMX25) += 0x80008000 |
10 | params_phys-$(CONFIG_ARCH_MX25) := 0x80000100 | 10 | params_phys-$(CONFIG_SOC_IMX25) := 0x80000100 |
11 | initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 | 11 | initrd_phys-$(CONFIG_SOC_IMX25) := 0x80800000 |
12 | 12 | ||
13 | zreladdr-$(CONFIG_MACH_MX27) += 0xA0008000 | 13 | zreladdr-$(CONFIG_SOC_IMX27) += 0xA0008000 |
14 | params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 | 14 | params_phys-$(CONFIG_SOC_IMX27) := 0xA0000100 |
15 | initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 | 15 | initrd_phys-$(CONFIG_SOC_IMX27) := 0xA0800000 |
16 | 16 | ||
17 | zreladdr-$(CONFIG_ARCH_MX3) += 0x80008000 | 17 | zreladdr-$(CONFIG_SOC_IMX31) += 0x80008000 |
18 | params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 | 18 | params_phys-$(CONFIG_SOC_IMX31) := 0x80000100 |
19 | initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 | 19 | initrd_phys-$(CONFIG_SOC_IMX31) := 0x80800000 |
20 | |||
21 | zreladdr-$(CONFIG_SOC_IMX35) += 0x80008000 | ||
22 | params_phys-$(CONFIG_SOC_IMX35) := 0x80000100 | ||
23 | initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000 | ||
20 | 24 | ||
21 | zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000 | 25 | zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000 |
22 | params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100 | 26 | params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100 |
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index e0b926dfeced..613a1b993bff 100644 --- a/arch/arm/mach-imx/clock-imx6q.c +++ b/arch/arm/mach-imx/clock-imx6q.c | |||
@@ -1139,7 +1139,7 @@ static int _clk_set_rate(struct clk *clk, unsigned long rate) | |||
1139 | return -EINVAL; | 1139 | return -EINVAL; |
1140 | 1140 | ||
1141 | max_div = ((d->bm_pred >> d->bp_pred) + 1) * | 1141 | max_div = ((d->bm_pred >> d->bp_pred) + 1) * |
1142 | ((d->bm_pred >> d->bp_pred) + 1); | 1142 | ((d->bm_podf >> d->bp_podf) + 1); |
1143 | 1143 | ||
1144 | div = parent_rate / rate; | 1144 | div = parent_rate / rate; |
1145 | if (div == 0) | 1145 | if (div == 0) |
@@ -2002,6 +2002,21 @@ int __init mx6q_clocks_init(void) | |||
2002 | clk_set_rate(&asrc_serial_clk, 1500000); | 2002 | clk_set_rate(&asrc_serial_clk, 1500000); |
2003 | clk_set_rate(&enfc_clk, 11000000); | 2003 | clk_set_rate(&enfc_clk, 11000000); |
2004 | 2004 | ||
2005 | /* | ||
2006 | * Before pinctrl API is available, we have to rely on the pad | ||
2007 | * configuration set up by bootloader. For usdhc example here, | ||
2008 | * u-boot sets up the pads for 49.5 MHz case, and we have to lower | ||
2009 | * the usdhc clock from 198 to 49.5 MHz to match the pad configuration. | ||
2010 | * | ||
2011 | * FIXME: This is should be removed after pinctrl API is available. | ||
2012 | * At that time, usdhc driver can call pinctrl API to change pad | ||
2013 | * configuration dynamically per different usdhc clock settings. | ||
2014 | */ | ||
2015 | clk_set_rate(&usdhc1_clk, 49500000); | ||
2016 | clk_set_rate(&usdhc2_clk, 49500000); | ||
2017 | clk_set_rate(&usdhc3_clk, 49500000); | ||
2018 | clk_set_rate(&usdhc4_clk, 49500000); | ||
2019 | |||
2005 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | 2020 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); |
2006 | base = of_iomap(np, 0); | 2021 | base = of_iomap(np, 0); |
2007 | WARN_ON(!base); | 2022 | WARN_ON(!base); |
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index 4285dfd80b6f..4ad3969b9881 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile | |||
@@ -15,6 +15,8 @@ obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o | |||
15 | obj-$(CONFIG_MSM_SMD) += last_radio_log.o | 15 | obj-$(CONFIG_MSM_SMD) += last_radio_log.o |
16 | obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o | 16 | obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o |
17 | 17 | ||
18 | CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1) | ||
19 | |||
18 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 20 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
19 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | 21 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
20 | 22 | ||
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index 71de5062c71e..db81ed531031 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -42,8 +42,8 @@ | |||
42 | 42 | ||
43 | extern struct sys_timer msm_timer; | 43 | extern struct sys_timer msm_timer; |
44 | 44 | ||
45 | static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag, | 45 | static void __init msm7x30_fixup(struct tag *tag, char **cmdline, |
46 | char **cmdline, struct meminfo *mi) | 46 | struct meminfo *mi) |
47 | { | 47 | { |
48 | for (; tag->hdr.size; tag = tag_next(tag)) | 48 | for (; tag->hdr.size; tag = tag_next(tag)) |
49 | if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) { | 49 | if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) { |
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c index b04468e7d00e..ed3598128530 100644 --- a/arch/arm/mach-msm/board-msm8960.c +++ b/arch/arm/mach-msm/board-msm8960.c | |||
@@ -32,8 +32,8 @@ | |||
32 | 32 | ||
33 | #include "devices.h" | 33 | #include "devices.h" |
34 | 34 | ||
35 | static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag, | 35 | static void __init msm8960_fixup(struct tag *tag, char **cmdline, |
36 | char **cmdline, struct meminfo *mi) | 36 | struct meminfo *mi) |
37 | { | 37 | { |
38 | for (; tag->hdr.size; tag = tag_next(tag)) | 38 | for (; tag->hdr.size; tag = tag_next(tag)) |
39 | if (tag->hdr.tag == ATAG_MEM && | 39 | if (tag->hdr.tag == ATAG_MEM && |
@@ -99,6 +99,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | |||
99 | .map_io = msm8960_map_io, | 99 | .map_io = msm8960_map_io, |
100 | .init_irq = msm8960_init_irq, | 100 | .init_irq = msm8960_init_irq, |
101 | .timer = &msm_timer, | 101 | .timer = &msm_timer, |
102 | .handle_irq = gic_handle_irq, | ||
102 | .init_machine = msm8960_sim_init, | 103 | .init_machine = msm8960_sim_init, |
103 | MACHINE_END | 104 | MACHINE_END |
104 | 105 | ||
@@ -108,6 +109,7 @@ MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") | |||
108 | .map_io = msm8960_map_io, | 109 | .map_io = msm8960_map_io, |
109 | .init_irq = msm8960_init_irq, | 110 | .init_irq = msm8960_init_irq, |
110 | .timer = &msm_timer, | 111 | .timer = &msm_timer, |
112 | .handle_irq = gic_handle_irq, | ||
111 | .init_machine = msm8960_rumi3_init, | 113 | .init_machine = msm8960_rumi3_init, |
112 | MACHINE_END | 114 | MACHINE_END |
113 | 115 | ||
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index cf38e2284fa9..0a113424632c 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -28,8 +28,8 @@ | |||
28 | #include <mach/board.h> | 28 | #include <mach/board.h> |
29 | #include <mach/msm_iomap.h> | 29 | #include <mach/msm_iomap.h> |
30 | 30 | ||
31 | static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag, | 31 | static void __init msm8x60_fixup(struct tag *tag, char **cmdline, |
32 | char **cmdline, struct meminfo *mi) | 32 | struct meminfo *mi) |
33 | { | 33 | { |
34 | for (; tag->hdr.size; tag = tag_next(tag)) | 34 | for (; tag->hdr.size; tag = tag_next(tag)) |
35 | if (tag->hdr.tag == ATAG_MEM && | 35 | if (tag->hdr.tag == ATAG_MEM && |
@@ -108,6 +108,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | |||
108 | .reserve = msm8x60_reserve, | 108 | .reserve = msm8x60_reserve, |
109 | .map_io = msm8x60_map_io, | 109 | .map_io = msm8x60_map_io, |
110 | .init_irq = msm8x60_init_irq, | 110 | .init_irq = msm8x60_init_irq, |
111 | .handle_irq = gic_handle_irq, | ||
111 | .init_machine = msm8x60_init, | 112 | .init_machine = msm8x60_init, |
112 | .timer = &msm_timer, | 113 | .timer = &msm_timer, |
113 | MACHINE_END | 114 | MACHINE_END |
@@ -117,6 +118,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | |||
117 | .reserve = msm8x60_reserve, | 118 | .reserve = msm8x60_reserve, |
118 | .map_io = msm8x60_map_io, | 119 | .map_io = msm8x60_map_io, |
119 | .init_irq = msm8x60_init_irq, | 120 | .init_irq = msm8x60_init_irq, |
121 | .handle_irq = gic_handle_irq, | ||
120 | .init_machine = msm8x60_init, | 122 | .init_machine = msm8x60_init, |
121 | .timer = &msm_timer, | 123 | .timer = &msm_timer, |
122 | MACHINE_END | 124 | MACHINE_END |
@@ -126,6 +128,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | |||
126 | .reserve = msm8x60_reserve, | 128 | .reserve = msm8x60_reserve, |
127 | .map_io = msm8x60_map_io, | 129 | .map_io = msm8x60_map_io, |
128 | .init_irq = msm8x60_init_irq, | 130 | .init_irq = msm8x60_init_irq, |
131 | .handle_irq = gic_handle_irq, | ||
129 | .init_machine = msm8x60_init, | 132 | .init_machine = msm8x60_init, |
130 | .timer = &msm_timer, | 133 | .timer = &msm_timer, |
131 | MACHINE_END | 134 | MACHINE_END |
@@ -135,6 +138,7 @@ MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") | |||
135 | .reserve = msm8x60_reserve, | 138 | .reserve = msm8x60_reserve, |
136 | .map_io = msm8x60_map_io, | 139 | .map_io = msm8x60_map_io, |
137 | .init_irq = msm8x60_init_irq, | 140 | .init_irq = msm8x60_init_irq, |
141 | .handle_irq = gic_handle_irq, | ||
138 | .init_machine = msm8x60_init, | 142 | .init_machine = msm8x60_init, |
139 | .timer = &msm_timer, | 143 | .timer = &msm_timer, |
140 | MACHINE_END | 144 | MACHINE_END |
diff --git a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S b/arch/arm/mach-msm/include/mach/entry-macro-qgic.S deleted file mode 100644 index 717076f3ca73..000000000000 --- a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * Low-level IRQ helper macros | ||
3 | * | ||
4 | * Copyright (c) 2010, Code Aurora Forum. All rights reserved. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/hardware/entry-macro-gic.S> | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
diff --git a/arch/arm/mach-msm/include/mach/entry-macro-vic.S b/arch/arm/mach-msm/include/mach/entry-macro-vic.S deleted file mode 100644 index 70563ed11b36..000000000000 --- a/arch/arm/mach-msm/include/mach/entry-macro-vic.S +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Google, Inc. | ||
3 | * Author: Brian Swetland <swetland@google.com> | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <mach/msm_iomap.h> | ||
17 | |||
18 | .macro disable_fiq | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_preamble, base, tmp | ||
22 | @ enable imprecise aborts | ||
23 | cpsie a | ||
24 | mov \base, #MSM_VIC_BASE | ||
25 | .endm | ||
26 | |||
27 | .macro arch_ret_to_user, tmp1, tmp2 | ||
28 | .endm | ||
29 | |||
30 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
31 | @ 0xD0 has irq# or old irq# if the irq has been handled | ||
32 | @ 0xD4 has irq# or -1 if none pending *but* if you just | ||
33 | @ read 0xD4 you never get the first irq for some reason | ||
34 | ldr \irqnr, [\base, #0xD0] | ||
35 | ldr \irqnr, [\base, #0xD4] | ||
36 | cmp \irqnr, #0xffffffff | ||
37 | .endm | ||
diff --git a/arch/arm/mach-msm/include/mach/entry-macro.S b/arch/arm/mach-msm/include/mach/entry-macro.S index b16f082eeb6f..41f7003ef34f 100644 --- a/arch/arm/mach-msm/include/mach/entry-macro.S +++ b/arch/arm/mach-msm/include/mach/entry-macro.S | |||
@@ -16,8 +16,27 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #if defined(CONFIG_ARM_GIC) | 19 | .macro disable_fiq |
20 | #include <mach/entry-macro-qgic.S> | 20 | .endm |
21 | #else | 21 | |
22 | #include <mach/entry-macro-vic.S> | 22 | .macro arch_ret_to_user, tmp1, tmp2 |
23 | .endm | ||
24 | |||
25 | #if !defined(CONFIG_ARM_GIC) | ||
26 | #include <mach/msm_iomap.h> | ||
27 | |||
28 | .macro get_irqnr_preamble, base, tmp | ||
29 | @ enable imprecise aborts | ||
30 | cpsie a | ||
31 | mov \base, #MSM_VIC_BASE | ||
32 | .endm | ||
33 | |||
34 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
35 | @ 0xD0 has irq# or old irq# if the irq has been handled | ||
36 | @ 0xD4 has irq# or -1 if none pending *but* if you just | ||
37 | @ read 0xD4 you never get the first irq for some reason | ||
38 | ldr \irqnr, [\base, #0xD0] | ||
39 | ldr \irqnr, [\base, #0xD4] | ||
40 | cmp \irqnr, #0xffffffff | ||
41 | .endm | ||
23 | #endif | 42 | #endif |
diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c index 232f97a04504..bafabb502580 100644 --- a/arch/arm/mach-msm/scm.c +++ b/arch/arm/mach-msm/scm.c | |||
@@ -180,6 +180,9 @@ static u32 smc(u32 cmd_addr) | |||
180 | __asmeq("%1", "r0") | 180 | __asmeq("%1", "r0") |
181 | __asmeq("%2", "r1") | 181 | __asmeq("%2", "r1") |
182 | __asmeq("%3", "r2") | 182 | __asmeq("%3", "r2") |
183 | #ifdef REQUIRES_SEC | ||
184 | ".arch_extension sec\n" | ||
185 | #endif | ||
183 | "smc #0 @ switch to secure world\n" | 186 | "smc #0 @ switch to secure world\n" |
184 | : "=r" (r0) | 187 | : "=r" (r0) |
185 | : "r" (r0), "r" (r1), "r" (r2) | 188 | : "r" (r0), "r" (r1), "r" (r2) |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 2aacf41c48e7..4cb276977190 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -1281,9 +1281,9 @@ DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, | |||
1281 | NULL, NULL, &ipg_clk, &gpt_ipg_clk); | 1281 | NULL, NULL, &ipg_clk, &gpt_ipg_clk); |
1282 | 1282 | ||
1283 | DEFINE_CLOCK(pwm1_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG6_OFFSET, | 1283 | DEFINE_CLOCK(pwm1_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG6_OFFSET, |
1284 | NULL, NULL, &ipg_clk, NULL); | 1284 | NULL, NULL, &ipg_perclk, NULL); |
1285 | DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET, | 1285 | DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET, |
1286 | NULL, NULL, &ipg_clk, NULL); | 1286 | NULL, NULL, &ipg_perclk, NULL); |
1287 | 1287 | ||
1288 | /* I2C */ | 1288 | /* I2C */ |
1289 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, | 1289 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, |
@@ -1634,6 +1634,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc, | |||
1634 | return 0; | 1634 | return 0; |
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | #ifdef CONFIG_OF | ||
1637 | static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc, | 1638 | static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc, |
1638 | unsigned long *ckih1, unsigned long *ckih2) | 1639 | unsigned long *ckih1, unsigned long *ckih2) |
1639 | { | 1640 | { |
@@ -1671,3 +1672,4 @@ int __init mx53_clocks_init_dt(void) | |||
1671 | clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); | 1672 | clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); |
1672 | return mx53_clocks_init(ckil, osc, ckih1, ckih2); | 1673 | return mx53_clocks_init(ckil, osc, ckih1, ckih2); |
1673 | } | 1674 | } |
1675 | #endif | ||
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index ac2316d53d3c..064ec5abaa55 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c | |||
@@ -471,7 +471,8 @@ static void __init mx28evk_init(void) | |||
471 | "mmc0-slot-power"); | 471 | "mmc0-slot-power"); |
472 | if (ret) | 472 | if (ret) |
473 | pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret); | 473 | pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret); |
474 | mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]); | 474 | else |
475 | mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]); | ||
475 | 476 | ||
476 | ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW, | 477 | ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW, |
477 | "mmc1-slot-power"); | 478 | "mmc1-slot-power"); |
@@ -480,7 +481,6 @@ static void __init mx28evk_init(void) | |||
480 | else | 481 | else |
481 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); | 482 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); |
482 | 483 | ||
483 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); | ||
484 | mx28_add_rtc_stmp3xxx(); | 484 | mx28_add_rtc_stmp3xxx(); |
485 | 485 | ||
486 | gpio_led_register_device(0, &mx28evk_led_data); | 486 | gpio_led_register_device(0, &mx28evk_led_data); |
diff --git a/arch/arm/mach-netx/include/mach/entry-macro.S b/arch/arm/mach-netx/include/mach/entry-macro.S index 844f1f9acbdf..6e9f1cbe1634 100644 --- a/arch/arm/mach-netx/include/mach/entry-macro.S +++ b/arch/arm/mach-netx/include/mach/entry-macro.S | |||
@@ -18,22 +18,9 @@ | |||
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | #include <mach/hardware.h> | ||
22 | 21 | ||
23 | .macro disable_fiq | 22 | .macro disable_fiq |
24 | .endm | 23 | .endm |
25 | 24 | ||
26 | .macro get_irqnr_preamble, base, tmp | ||
27 | ldr \base, =io_p2v(0x001ff000) | ||
28 | .endm | ||
29 | |||
30 | .macro arch_ret_to_user, tmp1, tmp2 | 25 | .macro arch_ret_to_user, tmp1, tmp2 |
31 | .endm | 26 | .endm |
32 | |||
33 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
34 | ldr \irqstat, [\base, #0] | ||
35 | clz \irqnr, \irqstat | ||
36 | rsb \irqnr, \irqnr, #31 | ||
37 | cmp \irqstat, #0 | ||
38 | .endm | ||
39 | |||
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c index 90903dd44cbc..ef8cf3574a02 100644 --- a/arch/arm/mach-netx/nxdb500.c +++ b/arch/arm/mach-netx/nxdb500.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <mach/netx-regs.h> | 32 | #include <mach/netx-regs.h> |
32 | #include <mach/eth.h> | 33 | #include <mach/eth.h> |
33 | 34 | ||
@@ -203,6 +204,7 @@ MACHINE_START(NXDB500, "Hilscher nxdb500") | |||
203 | .atag_offset = 0x100, | 204 | .atag_offset = 0x100, |
204 | .map_io = netx_map_io, | 205 | .map_io = netx_map_io, |
205 | .init_irq = netx_init_irq, | 206 | .init_irq = netx_init_irq, |
207 | .handle_irq = vic_handle_irq, | ||
206 | .timer = &netx_timer, | 208 | .timer = &netx_timer, |
207 | .init_machine = nxdb500_init, | 209 | .init_machine = nxdb500_init, |
208 | MACHINE_END | 210 | MACHINE_END |
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c index c63384aba500..588558bdd800 100644 --- a/arch/arm/mach-netx/nxdkn.c +++ b/arch/arm/mach-netx/nxdkn.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <mach/netx-regs.h> | 32 | #include <mach/netx-regs.h> |
32 | #include <mach/eth.h> | 33 | #include <mach/eth.h> |
33 | 34 | ||
@@ -96,6 +97,7 @@ MACHINE_START(NXDKN, "Hilscher nxdkn") | |||
96 | .atag_offset = 0x100, | 97 | .atag_offset = 0x100, |
97 | .map_io = netx_map_io, | 98 | .map_io = netx_map_io, |
98 | .init_irq = netx_init_irq, | 99 | .init_irq = netx_init_irq, |
100 | .handle_irq = vic_handle_irq, | ||
99 | .timer = &netx_timer, | 101 | .timer = &netx_timer, |
100 | .init_machine = nxdkn_init, | 102 | .init_machine = nxdkn_init, |
101 | MACHINE_END | 103 | MACHINE_END |
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c index 8f548ec83ad2..cfcbb5038648 100644 --- a/arch/arm/mach-netx/nxeb500hmi.c +++ b/arch/arm/mach-netx/nxeb500hmi.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <mach/netx-regs.h> | 32 | #include <mach/netx-regs.h> |
32 | #include <mach/eth.h> | 33 | #include <mach/eth.h> |
33 | 34 | ||
@@ -180,6 +181,7 @@ MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi") | |||
180 | .atag_offset = 0x100, | 181 | .atag_offset = 0x100, |
181 | .map_io = netx_map_io, | 182 | .map_io = netx_map_io, |
182 | .init_irq = netx_init_irq, | 183 | .init_irq = netx_init_irq, |
184 | .handle_irq = vic_handle_irq, | ||
183 | .timer = &netx_timer, | 185 | .timer = &netx_timer, |
184 | .init_machine = nxeb500hmi_init, | 186 | .init_machine = nxeb500hmi_init, |
185 | MACHINE_END | 187 | MACHINE_END |
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 0cbb74c96ef7..f98259c050ee 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mtd/onenand.h> | 21 | #include <linux/mtd/onenand.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <asm/hardware/vic.h> | ||
24 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -280,6 +281,7 @@ MACHINE_START(NOMADIK, "NHK8815") | |||
280 | .atag_offset = 0x100, | 281 | .atag_offset = 0x100, |
281 | .map_io = cpu8815_map_io, | 282 | .map_io = cpu8815_map_io, |
282 | .init_irq = cpu8815_init_irq, | 283 | .init_irq = cpu8815_init_irq, |
284 | .handle_irq = vic_handle_irq, | ||
283 | .timer = &nomadik_timer, | 285 | .timer = &nomadik_timer, |
284 | .init_machine = nhk8815_platform_init, | 286 | .init_machine = nhk8815_platform_init, |
285 | MACHINE_END | 287 | MACHINE_END |
diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S index 49f1aa3bb420..98ea1c1fbbab 100644 --- a/arch/arm/mach-nomadik/include/mach/entry-macro.S +++ b/arch/arm/mach-nomadik/include/mach/entry-macro.S | |||
@@ -6,38 +6,8 @@ | |||
6 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <mach/hardware.h> | ||
10 | #include <mach/irqs.h> | ||
11 | |||
12 | .macro disable_fiq | 9 | .macro disable_fiq |
13 | .endm | 10 | .endm |
14 | 11 | ||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | ldr \base, =IO_ADDRESS(NOMADIK_IC_BASE) | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | 12 | .macro arch_ret_to_user, tmp1, tmp2 |
20 | .endm | 13 | .endm |
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
23 | |||
24 | /* This stanza gets the irq mask from one of two status registers */ | ||
25 | mov \irqnr, #0 | ||
26 | ldr \irqstat, [\base, #VIC_REG_IRQSR0] @ get masked status | ||
27 | cmp \irqstat, #0 | ||
28 | bne 1001f | ||
29 | add \irqnr, \irqnr, #32 | ||
30 | ldr \irqstat, [\base, #VIC_REG_IRQSR1] @ get masked status | ||
31 | |||
32 | 1001: tst \irqstat, #15 | ||
33 | bne 1002f | ||
34 | add \irqnr, \irqnr, #4 | ||
35 | movs \irqstat, \irqstat, lsr #4 | ||
36 | bne 1001b | ||
37 | 1002: tst \irqstat, #1 | ||
38 | bne 1003f | ||
39 | add \irqnr, \irqnr, #1 | ||
40 | movs \irqstat, \irqstat, lsr #1 | ||
41 | bne 1002b | ||
42 | 1003: /* EQ will be set if no irqs pending */ | ||
43 | .endm | ||
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 503414718905..22f7c97a2728 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -25,6 +25,7 @@ config ARCH_OMAP2 | |||
25 | depends on ARCH_OMAP2PLUS | 25 | depends on ARCH_OMAP2PLUS |
26 | default y | 26 | default y |
27 | select CPU_V6 | 27 | select CPU_V6 |
28 | select MULTI_IRQ_HANDLER | ||
28 | 29 | ||
29 | config ARCH_OMAP3 | 30 | config ARCH_OMAP3 |
30 | bool "TI OMAP3" | 31 | bool "TI OMAP3" |
@@ -36,6 +37,7 @@ config ARCH_OMAP3 | |||
36 | select ARCH_HAS_OPP | 37 | select ARCH_HAS_OPP |
37 | select PM_OPP if PM | 38 | select PM_OPP if PM |
38 | select ARM_CPU_SUSPEND if PM | 39 | select ARM_CPU_SUSPEND if PM |
40 | select MULTI_IRQ_HANDLER | ||
39 | 41 | ||
40 | config ARCH_OMAP4 | 42 | config ARCH_OMAP4 |
41 | bool "TI OMAP4" | 43 | bool "TI OMAP4" |
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index a17a6c49e18d..d88143faca59 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -301,6 +301,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") | |||
301 | .map_io = omap243x_map_io, | 301 | .map_io = omap243x_map_io, |
302 | .init_early = omap2430_init_early, | 302 | .init_early = omap2430_init_early, |
303 | .init_irq = omap2_init_irq, | 303 | .init_irq = omap2_init_irq, |
304 | .handle_irq = omap2_intc_handle_irq, | ||
304 | .init_machine = omap_2430sdp_init, | 305 | .init_machine = omap_2430sdp_init, |
305 | .timer = &omap2_timer, | 306 | .timer = &omap2_timer, |
306 | MACHINE_END | 307 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 670919c04851..83126368ed99 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -728,6 +728,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") | |||
728 | .map_io = omap3_map_io, | 728 | .map_io = omap3_map_io, |
729 | .init_early = omap3430_init_early, | 729 | .init_early = omap3430_init_early, |
730 | .init_irq = omap3_init_irq, | 730 | .init_irq = omap3_init_irq, |
731 | .handle_irq = omap3_intc_handle_irq, | ||
731 | .init_machine = omap_3430sdp_init, | 732 | .init_machine = omap_3430sdp_init, |
732 | .timer = &omap3_timer, | 733 | .timer = &omap3_timer, |
733 | MACHINE_END | 734 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 63f4b4fefb46..7969dd904bd3 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -215,6 +215,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | |||
215 | .map_io = omap3_map_io, | 215 | .map_io = omap3_map_io, |
216 | .init_early = omap3630_init_early, | 216 | .init_early = omap3630_init_early, |
217 | .init_irq = omap3_init_irq, | 217 | .init_irq = omap3_init_irq, |
218 | .handle_irq = omap3_intc_handle_irq, | ||
218 | .init_machine = omap_sdp_init, | 219 | .init_machine = omap_sdp_init, |
219 | .timer = &omap3_timer, | 220 | .timer = &omap3_timer, |
220 | MACHINE_END | 221 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index cff2e3249fee..ef2bbc09428a 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/leds_pwm.h> | 27 | #include <linux/leds_pwm.h> |
28 | 28 | ||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <asm/hardware/gic.h> | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
@@ -983,6 +984,7 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") | |||
983 | .map_io = omap4_map_io, | 984 | .map_io = omap4_map_io, |
984 | .init_early = omap4430_init_early, | 985 | .init_early = omap4430_init_early, |
985 | .init_irq = gic_init_irq, | 986 | .init_irq = gic_init_irq, |
987 | .handle_irq = gic_handle_irq, | ||
986 | .init_machine = omap_4430sdp_init, | 988 | .init_machine = omap_4430sdp_init, |
987 | .timer = &omap4_timer, | 989 | .timer = &omap4_timer, |
988 | MACHINE_END | 990 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 25704759d241..7e90f93263db 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
@@ -98,6 +98,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") | |||
98 | .map_io = omap3_map_io, | 98 | .map_io = omap3_map_io, |
99 | .init_early = am35xx_init_early, | 99 | .init_early = am35xx_init_early, |
100 | .init_irq = omap3_init_irq, | 100 | .init_irq = omap3_init_irq, |
101 | .handle_irq = omap3_intc_handle_irq, | ||
101 | .init_machine = am3517_crane_init, | 102 | .init_machine = am3517_crane_init, |
102 | .timer = &omap3_timer, | 103 | .timer = &omap3_timer, |
103 | MACHINE_END | 104 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 56ea01184ec9..551cae8d9b8a 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -491,6 +491,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") | |||
491 | .map_io = omap3_map_io, | 491 | .map_io = omap3_map_io, |
492 | .init_early = am35xx_init_early, | 492 | .init_early = am35xx_init_early, |
493 | .init_irq = omap3_init_irq, | 493 | .init_irq = omap3_init_irq, |
494 | .handle_irq = omap3_intc_handle_irq, | ||
494 | .init_machine = am3517_evm_init, | 495 | .init_machine = am3517_evm_init, |
495 | .timer = &omap3_timer, | 496 | .timer = &omap3_timer, |
496 | MACHINE_END | 497 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 9aea158ba514..5a66480feed0 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -354,6 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") | |||
354 | .map_io = omap242x_map_io, | 354 | .map_io = omap242x_map_io, |
355 | .init_early = omap2420_init_early, | 355 | .init_early = omap2420_init_early, |
356 | .init_irq = omap2_init_irq, | 356 | .init_irq = omap2_init_irq, |
357 | .handle_irq = omap2_intc_handle_irq, | ||
357 | .init_machine = omap_apollon_init, | 358 | .init_machine = omap_apollon_init, |
358 | .timer = &omap2_timer, | 359 | .timer = &omap2_timer, |
359 | MACHINE_END | 360 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index e1de33ebf95a..510b6a2ff0fa 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -634,6 +634,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35") | |||
634 | .map_io = omap3_map_io, | 634 | .map_io = omap3_map_io, |
635 | .init_early = omap35xx_init_early, | 635 | .init_early = omap35xx_init_early, |
636 | .init_irq = omap3_init_irq, | 636 | .init_irq = omap3_init_irq, |
637 | .handle_irq = omap3_intc_handle_irq, | ||
637 | .init_machine = cm_t35_init, | 638 | .init_machine = cm_t35_init, |
638 | .timer = &omap3_timer, | 639 | .timer = &omap3_timer, |
639 | MACHINE_END | 640 | MACHINE_END |
@@ -644,6 +645,7 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730") | |||
644 | .map_io = omap3_map_io, | 645 | .map_io = omap3_map_io, |
645 | .init_early = omap3630_init_early, | 646 | .init_early = omap3630_init_early, |
646 | .init_irq = omap3_init_irq, | 647 | .init_irq = omap3_init_irq, |
648 | .handle_irq = omap3_intc_handle_irq, | ||
647 | .init_machine = cm_t3730_init, | 649 | .init_machine = cm_t3730_init, |
648 | .timer = &omap3_timer, | 650 | .timer = &omap3_timer, |
649 | MACHINE_END | 651 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 952df9b6c020..efc5cedb1fbb 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -299,6 +299,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") | |||
299 | .map_io = omap3_map_io, | 299 | .map_io = omap3_map_io, |
300 | .init_early = am35xx_init_early, | 300 | .init_early = am35xx_init_early, |
301 | .init_irq = omap3_init_irq, | 301 | .init_irq = omap3_init_irq, |
302 | .handle_irq = omap3_intc_handle_irq, | ||
302 | .init_machine = cm_t3517_init, | 303 | .init_machine = cm_t3517_init, |
303 | .timer = &omap3_timer, | 304 | .timer = &omap3_timer, |
304 | MACHINE_END | 305 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 99e6e7a76d2e..d81ea7fa75ef 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -660,6 +660,7 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") | |||
660 | .map_io = omap3_map_io, | 660 | .map_io = omap3_map_io, |
661 | .init_early = omap35xx_init_early, | 661 | .init_early = omap35xx_init_early, |
662 | .init_irq = omap3_init_irq, | 662 | .init_irq = omap3_init_irq, |
663 | .handle_irq = omap3_intc_handle_irq, | ||
663 | .init_machine = devkit8000_init, | 664 | .init_machine = devkit8000_init, |
664 | .timer = &omap3_secure_timer, | 665 | .timer = &omap3_secure_timer, |
665 | MACHINE_END | 666 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index a89d72309de2..63b54163b993 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -121,6 +121,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)") | |||
121 | .map_io = omap243x_map_io, | 121 | .map_io = omap243x_map_io, |
122 | .init_early = omap2430_init_early, | 122 | .init_early = omap2430_init_early, |
123 | .init_irq = omap2_init_irq, | 123 | .init_irq = omap2_init_irq, |
124 | .handle_irq = omap2_intc_handle_irq, | ||
124 | .init_machine = omap_generic_init, | 125 | .init_machine = omap_generic_init, |
125 | .timer = &omap2_timer, | 126 | .timer = &omap2_timer, |
126 | .dt_compat = omap243x_boards_compat, | 127 | .dt_compat = omap243x_boards_compat, |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 199a174e1ba8..ec4018362e8e 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -396,6 +396,7 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board") | |||
396 | .map_io = omap242x_map_io, | 396 | .map_io = omap242x_map_io, |
397 | .init_early = omap2420_init_early, | 397 | .init_early = omap2420_init_early, |
398 | .init_irq = omap2_init_irq, | 398 | .init_irq = omap2_init_irq, |
399 | .handle_irq = omap2_intc_handle_irq, | ||
399 | .init_machine = omap_h4_init, | 400 | .init_machine = omap_h4_init, |
400 | .timer = &omap2_timer, | 401 | .timer = &omap2_timer, |
401 | MACHINE_END | 402 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 6434bdcd7ade..5949f6ae3edf 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -672,6 +672,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board") | |||
672 | .map_io = omap3_map_io, | 672 | .map_io = omap3_map_io, |
673 | .init_early = omap35xx_init_early, | 673 | .init_early = omap35xx_init_early, |
674 | .init_irq = omap3_init_irq, | 674 | .init_irq = omap3_init_irq, |
675 | .handle_irq = omap3_intc_handle_irq, | ||
675 | .init_machine = igep_init, | 676 | .init_machine = igep_init, |
676 | .timer = &omap3_timer, | 677 | .timer = &omap3_timer, |
677 | MACHINE_END | 678 | MACHINE_END |
@@ -682,6 +683,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") | |||
682 | .map_io = omap3_map_io, | 683 | .map_io = omap3_map_io, |
683 | .init_early = omap35xx_init_early, | 684 | .init_early = omap35xx_init_early, |
684 | .init_irq = omap3_init_irq, | 685 | .init_irq = omap3_init_irq, |
686 | .handle_irq = omap3_intc_handle_irq, | ||
685 | .init_machine = igep_init, | 687 | .init_machine = igep_init, |
686 | .timer = &omap3_timer, | 688 | .timer = &omap3_timer, |
687 | MACHINE_END | 689 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index e75102a5eb0a..13bde0e66934 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -434,6 +434,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board") | |||
434 | .map_io = omap3_map_io, | 434 | .map_io = omap3_map_io, |
435 | .init_early = omap3430_init_early, | 435 | .init_early = omap3430_init_early, |
436 | .init_irq = omap3_init_irq, | 436 | .init_irq = omap3_init_irq, |
437 | .handle_irq = omap3_intc_handle_irq, | ||
437 | .init_machine = omap_ldp_init, | 438 | .init_machine = omap_ldp_init, |
438 | .timer = &omap3_timer, | 439 | .timer = &omap3_timer, |
439 | MACHINE_END | 440 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 736861463b34..bebd3d84365e 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -689,6 +689,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800") | |||
689 | .map_io = omap242x_map_io, | 689 | .map_io = omap242x_map_io, |
690 | .init_early = omap2420_init_early, | 690 | .init_early = omap2420_init_early, |
691 | .init_irq = omap2_init_irq, | 691 | .init_irq = omap2_init_irq, |
692 | .handle_irq = omap2_intc_handle_irq, | ||
692 | .init_machine = n8x0_init_machine, | 693 | .init_machine = n8x0_init_machine, |
693 | .timer = &omap2_timer, | 694 | .timer = &omap2_timer, |
694 | MACHINE_END | 695 | MACHINE_END |
@@ -699,6 +700,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810") | |||
699 | .map_io = omap242x_map_io, | 700 | .map_io = omap242x_map_io, |
700 | .init_early = omap2420_init_early, | 701 | .init_early = omap2420_init_early, |
701 | .init_irq = omap2_init_irq, | 702 | .init_irq = omap2_init_irq, |
703 | .handle_irq = omap2_intc_handle_irq, | ||
702 | .init_machine = n8x0_init_machine, | 704 | .init_machine = n8x0_init_machine, |
703 | .timer = &omap2_timer, | 705 | .timer = &omap2_timer, |
704 | MACHINE_END | 706 | MACHINE_END |
@@ -709,6 +711,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") | |||
709 | .map_io = omap242x_map_io, | 711 | .map_io = omap242x_map_io, |
710 | .init_early = omap2420_init_early, | 712 | .init_early = omap2420_init_early, |
711 | .init_irq = omap2_init_irq, | 713 | .init_irq = omap2_init_irq, |
714 | .handle_irq = omap2_intc_handle_irq, | ||
712 | .init_machine = n8x0_init_machine, | 715 | .init_machine = n8x0_init_machine, |
713 | .timer = &omap2_timer, | 716 | .timer = &omap2_timer, |
714 | MACHINE_END | 717 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 1843e141f3a7..c34f56588284 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -559,6 +559,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | |||
559 | .map_io = omap3_map_io, | 559 | .map_io = omap3_map_io, |
560 | .init_early = omap3_init_early, | 560 | .init_early = omap3_init_early, |
561 | .init_irq = omap3_init_irq, | 561 | .init_irq = omap3_init_irq, |
562 | .handle_irq = omap3_intc_handle_irq, | ||
562 | .init_machine = omap3_beagle_init, | 563 | .init_machine = omap3_beagle_init, |
563 | .timer = &omap3_secure_timer, | 564 | .timer = &omap3_secure_timer, |
564 | MACHINE_END | 565 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 1653d1813308..f11bc444e7be 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -681,6 +681,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM") | |||
681 | .map_io = omap3_map_io, | 681 | .map_io = omap3_map_io, |
682 | .init_early = omap35xx_init_early, | 682 | .init_early = omap35xx_init_early, |
683 | .init_irq = omap3_init_irq, | 683 | .init_irq = omap3_init_irq, |
684 | .handle_irq = omap3_intc_handle_irq, | ||
684 | .init_machine = omap3_evm_init, | 685 | .init_machine = omap3_evm_init, |
685 | .timer = &omap3_timer, | 686 | .timer = &omap3_timer, |
686 | MACHINE_END | 687 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 1b2a77621626..5fa6bad9574e 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -208,6 +208,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") | |||
208 | .map_io = omap3_map_io, | 208 | .map_io = omap3_map_io, |
209 | .init_early = omap35xx_init_early, | 209 | .init_early = omap35xx_init_early, |
210 | .init_irq = omap3_init_irq, | 210 | .init_irq = omap3_init_irq, |
211 | .handle_irq = omap3_intc_handle_irq, | ||
211 | .init_machine = omap3logic_init, | 212 | .init_machine = omap3logic_init, |
212 | .timer = &omap3_timer, | 213 | .timer = &omap3_timer, |
213 | MACHINE_END | 214 | MACHINE_END |
@@ -217,6 +218,7 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") | |||
217 | .map_io = omap3_map_io, | 218 | .map_io = omap3_map_io, |
218 | .init_early = omap35xx_init_early, | 219 | .init_early = omap35xx_init_early, |
219 | .init_irq = omap3_init_irq, | 220 | .init_irq = omap3_init_irq, |
221 | .handle_irq = omap3_intc_handle_irq, | ||
220 | .init_machine = omap3logic_init, | 222 | .init_machine = omap3logic_init, |
221 | .timer = &omap3_timer, | 223 | .timer = &omap3_timer, |
222 | MACHINE_END | 224 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 6297e814cddd..ef315c585b75 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -606,6 +606,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") | |||
606 | .map_io = omap3_map_io, | 606 | .map_io = omap3_map_io, |
607 | .init_early = omap35xx_init_early, | 607 | .init_early = omap35xx_init_early, |
608 | .init_irq = omap3_init_irq, | 608 | .init_irq = omap3_init_irq, |
609 | .handle_irq = omap3_intc_handle_irq, | ||
609 | .init_machine = omap3pandora_init, | 610 | .init_machine = omap3pandora_init, |
610 | .timer = &omap3_timer, | 611 | .timer = &omap3_timer, |
611 | MACHINE_END | 612 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index ab226473deeb..b21d70a2e4a7 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -454,6 +454,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") | |||
454 | .map_io = omap3_map_io, | 454 | .map_io = omap3_map_io, |
455 | .init_early = omap35xx_init_early, | 455 | .init_early = omap35xx_init_early, |
456 | .init_irq = omap3_init_irq, | 456 | .init_irq = omap3_init_irq, |
457 | .handle_irq = omap3_intc_handle_irq, | ||
457 | .init_machine = omap3_stalker_init, | 458 | .init_machine = omap3_stalker_init, |
458 | .timer = &omap3_secure_timer, | 459 | .timer = &omap3_secure_timer, |
459 | MACHINE_END | 460 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 2741a34630b1..18cd340f9b7b 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -381,6 +381,7 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") | |||
381 | .map_io = omap3_map_io, | 381 | .map_io = omap3_map_io, |
382 | .init_early = omap3430_init_early, | 382 | .init_early = omap3430_init_early, |
383 | .init_irq = omap3_init_irq, | 383 | .init_irq = omap3_init_irq, |
384 | .handle_irq = omap3_intc_handle_irq, | ||
384 | .init_machine = omap3_touchbook_init, | 385 | .init_machine = omap3_touchbook_init, |
385 | .timer = &omap3_secure_timer, | 386 | .timer = &omap3_secure_timer, |
386 | MACHINE_END | 387 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 7722d4d97fb9..b6f114436dbc 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/wl12xx.h> | 30 | #include <linux/wl12xx.h> |
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <asm/hardware/gic.h> | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
@@ -576,6 +577,7 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") | |||
576 | .map_io = omap4_map_io, | 577 | .map_io = omap4_map_io, |
577 | .init_early = omap4430_init_early, | 578 | .init_early = omap4430_init_early, |
578 | .init_irq = gic_init_irq, | 579 | .init_irq = gic_init_irq, |
580 | .handle_irq = gic_handle_irq, | ||
579 | .init_machine = omap4_panda_init, | 581 | .init_machine = omap4_panda_init, |
580 | .timer = &omap4_timer, | 582 | .timer = &omap4_timer, |
581 | MACHINE_END | 583 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 26c5cbb4f2bb..60a61ea759bf 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -562,6 +562,7 @@ MACHINE_START(OVERO, "Gumstix Overo") | |||
562 | .map_io = omap3_map_io, | 562 | .map_io = omap3_map_io, |
563 | .init_early = omap35xx_init_early, | 563 | .init_early = omap35xx_init_early, |
564 | .init_irq = omap3_init_irq, | 564 | .init_irq = omap3_init_irq, |
565 | .handle_irq = omap3_intc_handle_irq, | ||
565 | .init_machine = overo_init, | 566 | .init_machine = overo_init, |
566 | .timer = &omap3_timer, | 567 | .timer = &omap3_timer, |
567 | MACHINE_END | 568 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 6ffb6405285e..a79d49e3fe09 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -149,6 +149,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") | |||
149 | .map_io = omap3_map_io, | 149 | .map_io = omap3_map_io, |
150 | .init_early = omap3630_init_early, | 150 | .init_early = omap3630_init_early, |
151 | .init_irq = omap3_init_irq, | 151 | .init_irq = omap3_init_irq, |
152 | .handle_irq = omap3_intc_handle_irq, | ||
152 | .init_machine = rm680_init, | 153 | .init_machine = rm680_init, |
153 | .timer = &omap3_timer, | 154 | .timer = &omap3_timer, |
154 | MACHINE_END | 155 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 847731377af7..4e3c0965edf3 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -127,6 +127,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") | |||
127 | .map_io = omap3_map_io, | 127 | .map_io = omap3_map_io, |
128 | .init_early = omap3430_init_early, | 128 | .init_early = omap3430_init_early, |
129 | .init_irq = omap3_init_irq, | 129 | .init_irq = omap3_init_irq, |
130 | .handle_irq = omap3_intc_handle_irq, | ||
130 | .init_machine = rx51_init, | 131 | .init_machine = rx51_init, |
131 | .timer = &omap3_timer, | 132 | .timer = &omap3_timer, |
132 | MACHINE_END | 133 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index bd58f9205175..70e5b54a2115 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c | |||
@@ -135,6 +135,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") | |||
135 | .map_io = omap3_map_io, | 135 | .map_io = omap3_map_io, |
136 | .init_early = omap3430_init_early, | 136 | .init_early = omap3430_init_early, |
137 | .init_irq = omap3_init_irq, | 137 | .init_irq = omap3_init_irq, |
138 | .handle_irq = omap3_intc_handle_irq, | ||
138 | .init_machine = omap_zoom_init, | 139 | .init_machine = omap_zoom_init, |
139 | .timer = &omap3_timer, | 140 | .timer = &omap3_timer, |
140 | MACHINE_END | 141 | MACHINE_END |
@@ -145,6 +146,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") | |||
145 | .map_io = omap3_map_io, | 146 | .map_io = omap3_map_io, |
146 | .init_early = omap3630_init_early, | 147 | .init_early = omap3630_init_early, |
147 | .init_irq = omap3_init_irq, | 148 | .init_irq = omap3_init_irq, |
149 | .handle_irq = omap3_intc_handle_irq, | ||
148 | .init_machine = omap_zoom_init, | 150 | .init_machine = omap_zoom_init, |
149 | .timer = &omap3_timer, | 151 | .timer = &omap3_timer, |
150 | MACHINE_END | 152 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 950b39d76e94..18c4d5d20faf 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -169,8 +169,6 @@ void omap3_intc_resume_idle(void); | |||
169 | extern void __iomem *l2cache_base; | 169 | extern void __iomem *l2cache_base; |
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | extern void __iomem *gic_dist_base_addr; | ||
173 | |||
174 | extern void __init gic_init_irq(void); | 172 | extern void __init gic_init_irq(void); |
175 | extern void omap_smc1(u32 fn, u32 arg); | 173 | extern void omap_smc1(u32 fn, u32 arg); |
176 | 174 | ||
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S index feb90a10945a..56964a0c4c7e 100644 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S | |||
@@ -10,146 +10,9 @@ | |||
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | ||
14 | #include <mach/io.h> | ||
15 | #include <mach/irqs.h> | ||
16 | #include <asm/hardware/gic.h> | ||
17 | |||
18 | #include <plat/omap24xx.h> | ||
19 | #include <plat/omap34xx.h> | ||
20 | #include <plat/omap44xx.h> | ||
21 | |||
22 | #include <plat/multi.h> | ||
23 | |||
24 | #define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) | ||
25 | #define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) | ||
26 | #define OMAP4_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) | ||
27 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ | ||
28 | #define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ | ||
29 | 13 | ||
30 | .macro disable_fiq | 14 | .macro disable_fiq |
31 | .endm | 15 | .endm |
32 | 16 | ||
33 | .macro arch_ret_to_user, tmp1, tmp2 | 17 | .macro arch_ret_to_user, tmp1, tmp2 |
34 | .endm | 18 | .endm |
35 | |||
36 | /* | ||
37 | * Unoptimized irq functions for multi-omap2, 3 and 4 | ||
38 | */ | ||
39 | |||
40 | #ifdef MULTI_OMAP2 | ||
41 | /* | ||
42 | * Configure the interrupt base on the first interrupt. | ||
43 | * See also omap_irq_base_init for setting omap_irq_base. | ||
44 | */ | ||
45 | .macro get_irqnr_preamble, base, tmp | ||
46 | ldr \base, =omap_irq_base @ irq base address | ||
47 | ldr \base, [\base, #0] @ irq base value | ||
48 | .endm | ||
49 | |||
50 | /* Check the pending interrupts. Note that base already set */ | ||
51 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
52 | tst \base, #0x100 @ gic address? | ||
53 | bne 4401f @ found gic | ||
54 | |||
55 | /* Handle omap2 and omap3 */ | ||
56 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | ||
57 | cmp \irqnr, #0x0 | ||
58 | bne 9998f | ||
59 | ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ | ||
60 | cmp \irqnr, #0x0 | ||
61 | bne 9998f | ||
62 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | ||
63 | cmp \irqnr, #0x0 | ||
64 | bne 9998f | ||
65 | |||
66 | /* | ||
67 | * ti816x has additional IRQ pending register. Checking this | ||
68 | * register on omap2 & omap3 has no effect (read as 0). | ||
69 | */ | ||
70 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
71 | cmp \irqnr, #0x0 | ||
72 | 9998: | ||
73 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | ||
74 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | ||
75 | b 9999f | ||
76 | |||
77 | /* Handle omap4 */ | ||
78 | 4401: ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
79 | ldr \tmp, =1021 | ||
80 | bic \irqnr, \irqstat, #0x1c00 | ||
81 | cmp \irqnr, #15 | ||
82 | cmpcc \irqnr, \irqnr | ||
83 | cmpne \irqnr, \tmp | ||
84 | cmpcs \irqnr, \irqnr | ||
85 | 9999: | ||
86 | .endm | ||
87 | |||
88 | #ifdef CONFIG_SMP | ||
89 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
90 | * register) is preserved from the macro above. | ||
91 | * If there is an IPI, we immediately signal end of interrupt | ||
92 | * on the controller, since this requires the original irqstat | ||
93 | * value which we won't easily be able to recreate later. | ||
94 | */ | ||
95 | |||
96 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
97 | bic \irqnr, \irqstat, #0x1c00 | ||
98 | cmp \irqnr, #16 | ||
99 | it cc | ||
100 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
101 | it cs | ||
102 | cmpcs \irqnr, \irqnr | ||
103 | .endm | ||
104 | #endif /* CONFIG_SMP */ | ||
105 | |||
106 | #else /* MULTI_OMAP2 */ | ||
107 | |||
108 | |||
109 | /* | ||
110 | * Optimized irq functions for omap2, 3 and 4 | ||
111 | */ | ||
112 | |||
113 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
114 | .macro get_irqnr_preamble, base, tmp | ||
115 | #ifdef CONFIG_ARCH_OMAP2 | ||
116 | ldr \base, =OMAP2_IRQ_BASE | ||
117 | #else | ||
118 | ldr \base, =OMAP3_IRQ_BASE | ||
119 | #endif | ||
120 | .endm | ||
121 | |||
122 | /* Check the pending interrupts. Note that base already set */ | ||
123 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
124 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | ||
125 | cmp \irqnr, #0x0 | ||
126 | bne 9999f | ||
127 | ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ | ||
128 | cmp \irqnr, #0x0 | ||
129 | bne 9999f | ||
130 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | ||
131 | cmp \irqnr, #0x0 | ||
132 | #ifdef CONFIG_SOC_OMAPTI816X | ||
133 | bne 9999f | ||
134 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
135 | cmp \irqnr, #0x0 | ||
136 | #endif | ||
137 | 9999: | ||
138 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | ||
139 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | ||
140 | |||
141 | .endm | ||
142 | #endif | ||
143 | |||
144 | |||
145 | #ifdef CONFIG_ARCH_OMAP4 | ||
146 | #define HAVE_GET_IRQNR_PREAMBLE | ||
147 | #include <asm/hardware/entry-macro-gic.S> | ||
148 | |||
149 | .macro get_irqnr_preamble, base, tmp | ||
150 | ldr \base, =OMAP4_IRQ_BASE | ||
151 | .endm | ||
152 | |||
153 | #endif | ||
154 | |||
155 | #endif /* MULTI_OMAP2 */ | ||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 33f090ce0226..8907c4ac1767 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -316,9 +316,6 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) | |||
316 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); | 316 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); |
317 | } | 317 | } |
318 | 318 | ||
319 | /* See irq.c, omap4-common.c and entry-macro.S */ | ||
320 | void __iomem *omap_irq_base; | ||
321 | |||
322 | static void __init omap_common_init_early(void) | 319 | static void __init omap_common_init_early(void) |
323 | { | 320 | { |
324 | omap2_check_revision(); | 321 | omap2_check_revision(); |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 65f1be6a182c..42b1d6591912 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <asm/exception.h> | ||
18 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
19 | 20 | ||
20 | 21 | ||
@@ -35,6 +36,11 @@ | |||
35 | /* Number of IRQ state bits in each MIR register */ | 36 | /* Number of IRQ state bits in each MIR register */ |
36 | #define IRQ_BITS_PER_REG 32 | 37 | #define IRQ_BITS_PER_REG 32 |
37 | 38 | ||
39 | #define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) | ||
40 | #define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) | ||
41 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ | ||
42 | #define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ | ||
43 | |||
38 | /* | 44 | /* |
39 | * OMAP2 has a number of different interrupt controllers, each interrupt | 45 | * OMAP2 has a number of different interrupt controllers, each interrupt |
40 | * controller is identified as its own "bank". Register definitions are | 46 | * controller is identified as its own "bank". Register definitions are |
@@ -143,6 +149,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) | |||
143 | 149 | ||
144 | static void __init omap_init_irq(u32 base, int nr_irqs) | 150 | static void __init omap_init_irq(u32 base, int nr_irqs) |
145 | { | 151 | { |
152 | void __iomem *omap_irq_base; | ||
146 | unsigned long nr_of_irqs = 0; | 153 | unsigned long nr_of_irqs = 0; |
147 | unsigned int nr_banks = 0; | 154 | unsigned int nr_banks = 0; |
148 | int i, j; | 155 | int i, j; |
@@ -191,6 +198,44 @@ void __init ti816x_init_irq(void) | |||
191 | omap_init_irq(OMAP34XX_IC_BASE, 128); | 198 | omap_init_irq(OMAP34XX_IC_BASE, 128); |
192 | } | 199 | } |
193 | 200 | ||
201 | static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs *regs) | ||
202 | { | ||
203 | u32 irqnr; | ||
204 | |||
205 | do { | ||
206 | irqnr = readl_relaxed(base_addr + 0x98); | ||
207 | if (irqnr) | ||
208 | goto out; | ||
209 | |||
210 | irqnr = readl_relaxed(base_addr + 0xb8); | ||
211 | if (irqnr) | ||
212 | goto out; | ||
213 | |||
214 | irqnr = readl_relaxed(base_addr + 0xd8); | ||
215 | #ifdef CONFIG_SOC_OMAPTI816X | ||
216 | if (irqnr) | ||
217 | goto out; | ||
218 | irqnr = readl_relaxed(base_addr + 0xf8); | ||
219 | #endif | ||
220 | |||
221 | out: | ||
222 | if (!irqnr) | ||
223 | break; | ||
224 | |||
225 | irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET); | ||
226 | irqnr &= ACTIVEIRQ_MASK; | ||
227 | |||
228 | if (irqnr) | ||
229 | handle_IRQ(irqnr, regs); | ||
230 | } while (irqnr); | ||
231 | } | ||
232 | |||
233 | asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs) | ||
234 | { | ||
235 | void __iomem *base_addr = OMAP2_IRQ_BASE; | ||
236 | omap_intc_handle_irq(base_addr, regs); | ||
237 | } | ||
238 | |||
194 | #ifdef CONFIG_ARCH_OMAP3 | 239 | #ifdef CONFIG_ARCH_OMAP3 |
195 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; | 240 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; |
196 | 241 | ||
@@ -263,4 +308,10 @@ void omap3_intc_resume_idle(void) | |||
263 | /* Re-enable autoidle */ | 308 | /* Re-enable autoidle */ |
264 | intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG); | 309 | intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG); |
265 | } | 310 | } |
311 | |||
312 | asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) | ||
313 | { | ||
314 | void __iomem *base_addr = OMAP3_IRQ_BASE; | ||
315 | omap_intc_handle_irq(base_addr, regs); | ||
316 | } | ||
266 | #endif /* CONFIG_ARCH_OMAP3 */ | 317 | #endif /* CONFIG_ARCH_OMAP3 */ |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index f327d7472ca7..beecfdd56ea3 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -29,11 +29,11 @@ | |||
29 | void __iomem *l2cache_base; | 29 | void __iomem *l2cache_base; |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | void __iomem *gic_dist_base_addr; | ||
33 | |||
34 | |||
35 | void __init gic_init_irq(void) | 32 | void __init gic_init_irq(void) |
36 | { | 33 | { |
34 | void __iomem *omap_irq_base; | ||
35 | void __iomem *gic_dist_base_addr; | ||
36 | |||
37 | /* Static mapping, never released */ | 37 | /* Static mapping, never released */ |
38 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); | 38 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); |
39 | BUG_ON(!gic_dist_base_addr); | 39 | BUG_ON(!gic_dist_base_addr); |
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c index 34d08347be5f..ad871bd7b1ab 100644 --- a/arch/arm/mach-picoxcell/common.c +++ b/arch/arm/mach-picoxcell/common.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/irqdomain.h> | 11 | #include <linux/irqdomain.h> |
12 | #include <linux/of.h> | 12 | #include <linux/of.h> |
13 | #include <linux/of_address.h> | 13 | #include <linux/of_address.h> |
14 | #include <linux/of_irq.h> | ||
14 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
15 | 16 | ||
16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
@@ -33,22 +34,20 @@ static const char *picoxcell_dt_match[] = { | |||
33 | }; | 34 | }; |
34 | 35 | ||
35 | static const struct of_device_id vic_of_match[] __initconst = { | 36 | static const struct of_device_id vic_of_match[] __initconst = { |
36 | { .compatible = "arm,pl192-vic" }, | 37 | { .compatible = "arm,pl192-vic", .data = vic_of_init, }, |
37 | { /* Sentinel */ } | 38 | { /* Sentinel */ } |
38 | }; | 39 | }; |
39 | 40 | ||
40 | static void __init picoxcell_init_irq(void) | 41 | static void __init picoxcell_init_irq(void) |
41 | { | 42 | { |
42 | vic_init(IO_ADDRESS(PICOXCELL_VIC0_BASE), 0, ~0, 0); | 43 | of_irq_init(vic_of_match); |
43 | vic_init(IO_ADDRESS(PICOXCELL_VIC1_BASE), 32, ~0, 0); | ||
44 | irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC0_BASE, 0); | ||
45 | irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC1_BASE, 32); | ||
46 | } | 44 | } |
47 | 45 | ||
48 | DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") | 46 | DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") |
49 | .map_io = picoxcell_map_io, | 47 | .map_io = picoxcell_map_io, |
50 | .nr_irqs = ARCH_NR_IRQS, | 48 | .nr_irqs = ARCH_NR_IRQS, |
51 | .init_irq = picoxcell_init_irq, | 49 | .init_irq = picoxcell_init_irq, |
50 | .handle_irq = vic_handle_irq, | ||
52 | .timer = &picoxcell_timer, | 51 | .timer = &picoxcell_timer, |
53 | .init_machine = picoxcell_init_machine, | 52 | .init_machine = picoxcell_init_machine, |
54 | .dt_compat = picoxcell_dt_match, | 53 | .dt_compat = picoxcell_dt_match, |
diff --git a/arch/arm/mach-picoxcell/include/mach/debug-macro.S b/arch/arm/mach-picoxcell/include/mach/debug-macro.S index 8f2c234ed9d9..58d4ee3ae949 100644 --- a/arch/arm/mach-picoxcell/include/mach/debug-macro.S +++ b/arch/arm/mach-picoxcell/include/mach/debug-macro.S | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #define UART_SHIFT 2 | 15 | #define UART_SHIFT 2 |
16 | 16 | ||
17 | .macro addruart, rp, rv | 17 | .macro addruart, rp, rv, tmp |
18 | ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) | 18 | ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) |
19 | ldr \rp, =PICOXCELL_UART1_BASE | 19 | ldr \rp, =PICOXCELL_UART1_BASE |
20 | .endm | 20 | .endm |
diff --git a/arch/arm/mach-picoxcell/include/mach/entry-macro.S b/arch/arm/mach-picoxcell/include/mach/entry-macro.S index a6b09f75d9df..9b505ac00be9 100644 --- a/arch/arm/mach-picoxcell/include/mach/entry-macro.S +++ b/arch/arm/mach-picoxcell/include/mach/entry-macro.S | |||
@@ -9,11 +9,8 @@ | |||
9 | * License version 2. This program is licensed "as is" without any | 9 | * License version 2. This program is licensed "as is" without any |
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | #include <mach/hardware.h> | 12 | .macro disable_fiq |
13 | #include <mach/irqs.h> | 13 | .endm |
14 | #include <mach/map.h> | ||
15 | 14 | ||
16 | #define VA_VIC0 IO_ADDRESS(PICOXCELL_VIC0_BASE) | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
17 | #define VA_VIC1 IO_ADDRESS(PICOXCELL_VIC1_BASE) | 16 | .endm |
18 | |||
19 | #include <asm/entry-macro-vic2.S> | ||
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S index a73bc86a3c26..260c0c17692a 100644 --- a/arch/arm/mach-pxa/include/mach/entry-macro.S +++ b/arch/arm/mach-pxa/include/mach/entry-macro.S | |||
@@ -7,45 +7,9 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | ||
11 | #include <mach/irqs.h> | ||
12 | 10 | ||
13 | .macro disable_fiq | 11 | .macro disable_fiq |
14 | .endm | 12 | .endm |
15 | 13 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | 14 | .macro arch_ret_to_user, tmp1, tmp2 |
20 | .endm | 15 | .endm |
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
23 | mrc p15, 0, \tmp, c0, c0, 0 @ CPUID | ||
24 | mov \tmp, \tmp, lsr #13 | ||
25 | and \tmp, \tmp, #0x7 @ Core G | ||
26 | cmp \tmp, #1 | ||
27 | bhi 1002f | ||
28 | |||
29 | @ Core Generation 1 (PXA25x) | ||
30 | mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 | ||
31 | add \base, \base, #0x00d00000 | ||
32 | ldr \irqstat, [\base, #0] @ ICIP | ||
33 | ldr \irqnr, [\base, #4] @ ICMR | ||
34 | |||
35 | ands \irqnr, \irqstat, \irqnr | ||
36 | beq 1001f | ||
37 | rsb \irqstat, \irqnr, #0 | ||
38 | and \irqstat, \irqstat, \irqnr | ||
39 | clz \irqnr, \irqstat | ||
40 | rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0)) | ||
41 | b 1001f | ||
42 | 1002: | ||
43 | @ Core Generation 2 (PXA27x) or Core Generation 3 (PXA3xx) | ||
44 | mrc p6, 0, \irqstat, c5, c0, 0 @ ICHP | ||
45 | tst \irqstat, #0x80000000 | ||
46 | beq 1001f | ||
47 | bic \irqstat, \irqstat, #0x80000000 | ||
48 | mov \irqnr, \irqstat, lsr #16 | ||
49 | add \irqnr, \irqnr, #(PXA_IRQ(0)) | ||
50 | 1001: | ||
51 | .endm | ||
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S index 4071164aebaa..e8a5179c2653 100644 --- a/arch/arm/mach-realview/include/mach/entry-macro.S +++ b/arch/arm/mach-realview/include/mach/entry-macro.S | |||
@@ -7,8 +7,6 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | ||
11 | #include <asm/hardware/entry-macro-gic.S> | ||
12 | 10 | ||
13 | .macro disable_fiq | 11 | .macro disable_fiq |
14 | .endm | 12 | .endm |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 026c66ad7ec2..10ef2e74cce5 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -469,6 +469,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | |||
469 | .init_early = realview_init_early, | 469 | .init_early = realview_init_early, |
470 | .init_irq = gic_init_irq, | 470 | .init_irq = gic_init_irq, |
471 | .timer = &realview_eb_timer, | 471 | .timer = &realview_eb_timer, |
472 | .handle_irq = gic_handle_irq, | ||
472 | .init_machine = realview_eb_init, | 473 | .init_machine = realview_eb_init, |
473 | #ifdef CONFIG_ZONE_DMA | 474 | #ifdef CONFIG_ZONE_DMA |
474 | .dma_zone_size = SZ_256M, | 475 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index c057540ec776..bd8fec8b20d9 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -392,6 +392,7 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | |||
392 | .init_early = realview_init_early, | 392 | .init_early = realview_init_early, |
393 | .init_irq = gic_init_irq, | 393 | .init_irq = gic_init_irq, |
394 | .timer = &realview_pb1176_timer, | 394 | .timer = &realview_pb1176_timer, |
395 | .handle_irq = gic_handle_irq, | ||
395 | .init_machine = realview_pb1176_init, | 396 | .init_machine = realview_pb1176_init, |
396 | #ifdef CONFIG_ZONE_DMA | 397 | #ifdef CONFIG_ZONE_DMA |
397 | .dma_zone_size = SZ_256M, | 398 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 671ad6d6ff00..fa73ba81a449 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -366,6 +366,7 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | |||
366 | .init_early = realview_init_early, | 366 | .init_early = realview_init_early, |
367 | .init_irq = gic_init_irq, | 367 | .init_irq = gic_init_irq, |
368 | .timer = &realview_pb11mp_timer, | 368 | .timer = &realview_pb11mp_timer, |
369 | .handle_irq = gic_handle_irq, | ||
369 | .init_machine = realview_pb11mp_init, | 370 | .init_machine = realview_pb11mp_init, |
370 | #ifdef CONFIG_ZONE_DMA | 371 | #ifdef CONFIG_ZONE_DMA |
371 | .dma_zone_size = SZ_256M, | 372 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index cbf22df4ad5b..6e5f2b9ddb7e 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -316,6 +316,7 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | |||
316 | .init_early = realview_init_early, | 316 | .init_early = realview_init_early, |
317 | .init_irq = gic_init_irq, | 317 | .init_irq = gic_init_irq, |
318 | .timer = &realview_pba8_timer, | 318 | .timer = &realview_pba8_timer, |
319 | .handle_irq = gic_handle_irq, | ||
319 | .init_machine = realview_pba8_init, | 320 | .init_machine = realview_pba8_init, |
320 | #ifdef CONFIG_ZONE_DMA | 321 | #ifdef CONFIG_ZONE_DMA |
321 | .dma_zone_size = SZ_256M, | 322 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 63c4114afae9..291bf1a8f2f0 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -399,6 +399,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | |||
399 | .init_early = realview_init_early, | 399 | .init_early = realview_init_early, |
400 | .init_irq = gic_init_irq, | 400 | .init_irq = gic_init_irq, |
401 | .timer = &realview_pbx_timer, | 401 | .timer = &realview_pbx_timer, |
402 | .handle_irq = gic_handle_irq, | ||
402 | .init_machine = realview_pbx_init, | 403 | .init_machine = realview_pbx_init, |
403 | #ifdef CONFIG_ZONE_DMA | 404 | #ifdef CONFIG_ZONE_DMA |
404 | .dma_zone_size = SZ_256M, | 405 | .dma_zone_size = SZ_256M, |
diff --git a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S b/arch/arm/mach-s3c64xx/include/mach/entry-macro.S index dd362604dcce..dc2bc15142ce 100644 --- a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S +++ b/arch/arm/mach-s3c64xx/include/mach/entry-macro.S | |||
@@ -12,7 +12,8 @@ | |||
12 | * warranty of any kind, whether express or implied. | 12 | * warranty of any kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <mach/map.h> | 15 | .macro disable_fiq |
16 | #include <mach/irqs.h> | 16 | .endm |
17 | 17 | ||
18 | #include <asm/entry-macro-vic2.S> | 18 | .macro arch_ret_to_user, tmp1, tmp2 |
19 | .endm | ||
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 8eba88e7209e..2bbc14d93428 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <video/platform_lcd.h> | 31 | #include <video/platform_lcd.h> |
32 | 32 | ||
33 | #include <asm/hardware/vic.h> | ||
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
35 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
@@ -236,6 +237,7 @@ MACHINE_START(ANW6410, "A&W6410") | |||
236 | .atag_offset = 0x100, | 237 | .atag_offset = 0x100, |
237 | 238 | ||
238 | .init_irq = s3c6410_init_irq, | 239 | .init_irq = s3c6410_init_irq, |
240 | .handle_irq = vic_handle_irq, | ||
239 | .map_io = anw6410_map_io, | 241 | .map_io = anw6410_map_io, |
240 | .init_machine = anw6410_machine_init, | 242 | .init_machine = anw6410_machine_init, |
241 | .timer = &s3c24xx_timer, | 243 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index d04b65448510..988ac2e48f08 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/mfd/wm831x/irq.h> | 37 | #include <linux/mfd/wm831x/irq.h> |
38 | #include <linux/mfd/wm831x/gpio.h> | 38 | #include <linux/mfd/wm831x/gpio.h> |
39 | 39 | ||
40 | #include <asm/hardware/vic.h> | ||
40 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
41 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
42 | 43 | ||
@@ -711,6 +712,7 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") | |||
711 | /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */ | 712 | /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */ |
712 | .atag_offset = 0x100, | 713 | .atag_offset = 0x100, |
713 | .init_irq = s3c6410_init_irq, | 714 | .init_irq = s3c6410_init_irq, |
715 | .handle_irq = vic_handle_irq, | ||
714 | .map_io = crag6410_map_io, | 716 | .map_io = crag6410_map_io, |
715 | .init_machine = crag6410_machine_init, | 717 | .init_machine = crag6410_machine_init, |
716 | .timer = &s3c24xx_timer, | 718 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 952f75ff5deb..c5955f301709 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/map.h> | 30 | #include <mach/map.h> |
31 | 31 | ||
32 | #include <asm/hardware/vic.h> | ||
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | 35 | ||
@@ -267,6 +268,7 @@ MACHINE_START(HMT, "Airgoo-HMT") | |||
267 | /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */ | 268 | /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */ |
268 | .atag_offset = 0x100, | 269 | .atag_offset = 0x100, |
269 | .init_irq = s3c6410_init_irq, | 270 | .init_irq = s3c6410_init_irq, |
271 | .handle_irq = vic_handle_irq, | ||
270 | .map_io = hmt_map_io, | 272 | .map_io = hmt_map_io, |
271 | .init_machine = hmt_machine_init, | 273 | .init_machine = hmt_machine_init, |
272 | .timer = &s3c24xx_timer, | 274 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 1bc85c359498..4415c85e3f6f 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | 26 | ||
27 | #include <asm/hardware/vic.h> | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
@@ -345,6 +346,7 @@ MACHINE_START(MINI6410, "MINI6410") | |||
345 | /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ | 346 | /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ |
346 | .atag_offset = 0x100, | 347 | .atag_offset = 0x100, |
347 | .init_irq = s3c6410_init_irq, | 348 | .init_irq = s3c6410_init_irq, |
349 | .handle_irq = vic_handle_irq, | ||
348 | .map_io = mini6410_map_io, | 350 | .map_io = mini6410_map_io, |
349 | .init_machine = mini6410_machine_init, | 351 | .init_machine = mini6410_machine_init, |
350 | .timer = &s3c24xx_timer, | 352 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index cb13cba98b3d..9b2c610eac2a 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <video/platform_lcd.h> | 26 | #include <video/platform_lcd.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
30 | #include <asm/mach/irq.h> | 31 | #include <asm/mach/irq.h> |
@@ -99,6 +100,7 @@ MACHINE_START(NCP, "NCP") | |||
99 | /* Maintainer: Samsung Electronics */ | 100 | /* Maintainer: Samsung Electronics */ |
100 | .atag_offset = 0x100, | 101 | .atag_offset = 0x100, |
101 | .init_irq = s3c6410_init_irq, | 102 | .init_irq = s3c6410_init_irq, |
103 | .handle_irq = vic_handle_irq, | ||
102 | .map_io = ncp_map_io, | 104 | .map_io = ncp_map_io, |
103 | .init_machine = ncp_machine_init, | 105 | .init_machine = ncp_machine_init, |
104 | .timer = &s3c24xx_timer, | 106 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 87281e4b8471..dbab49f2713e 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/serial_core.h> | 25 | #include <linux/serial_core.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
@@ -326,6 +327,7 @@ MACHINE_START(REAL6410, "REAL6410") | |||
326 | .atag_offset = 0x100, | 327 | .atag_offset = 0x100, |
327 | 328 | ||
328 | .init_irq = s3c6410_init_irq, | 329 | .init_irq = s3c6410_init_irq, |
330 | .handle_irq = vic_handle_irq, | ||
329 | .map_io = real6410_map_io, | 331 | .map_io = real6410_map_io, |
330 | .init_machine = real6410_machine_init, | 332 | .init_machine = real6410_machine_init, |
331 | .timer = &s3c24xx_timer, | 333 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index 94c831d88365..053945282652 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <asm/hardware/vic.h> | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | 23 | ||
@@ -148,6 +149,7 @@ MACHINE_START(SMARTQ5, "SmartQ 5") | |||
148 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ | 149 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ |
149 | .atag_offset = 0x100, | 150 | .atag_offset = 0x100, |
150 | .init_irq = s3c6410_init_irq, | 151 | .init_irq = s3c6410_init_irq, |
152 | .handle_irq = vic_handle_irq, | ||
151 | .map_io = smartq_map_io, | 153 | .map_io = smartq_map_io, |
152 | .init_machine = smartq5_machine_init, | 154 | .init_machine = smartq5_machine_init, |
153 | .timer = &s3c24xx_timer, | 155 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index f112547ce80a..a58d1ba5cba2 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <asm/hardware/vic.h> | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | 23 | ||
@@ -164,6 +165,7 @@ MACHINE_START(SMARTQ7, "SmartQ 7") | |||
164 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ | 165 | /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ |
165 | .atag_offset = 0x100, | 166 | .atag_offset = 0x100, |
166 | .init_irq = s3c6410_init_irq, | 167 | .init_irq = s3c6410_init_irq, |
168 | .handle_irq = vic_handle_irq, | ||
167 | .map_io = smartq_map_io, | 169 | .map_io = smartq_map_io, |
168 | .init_machine = smartq7_machine_init, | 170 | .init_machine = smartq7_machine_init, |
169 | .timer = &s3c24xx_timer, | 171 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index 73450c2b530a..be28a59e3f57 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | 24 | ||
25 | #include <asm/hardware/vic.h> | ||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
@@ -88,6 +89,7 @@ MACHINE_START(SMDK6400, "SMDK6400") | |||
88 | .atag_offset = 0x100, | 89 | .atag_offset = 0x100, |
89 | 90 | ||
90 | .init_irq = s3c6400_init_irq, | 91 | .init_irq = s3c6400_init_irq, |
92 | .handle_irq = vic_handle_irq, | ||
91 | .map_io = smdk6400_map_io, | 93 | .map_io = smdk6400_map_io, |
92 | .init_machine = smdk6400_machine_init, | 94 | .init_machine = smdk6400_machine_init, |
93 | .timer = &s3c24xx_timer, | 95 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 8bc8edd85e5a..08309155d087 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #include <video/platform_lcd.h> | 44 | #include <video/platform_lcd.h> |
45 | 45 | ||
46 | #include <asm/hardware/vic.h> | ||
46 | #include <asm/mach/arch.h> | 47 | #include <asm/mach/arch.h> |
47 | #include <asm/mach/map.h> | 48 | #include <asm/mach/map.h> |
48 | #include <asm/mach/irq.h> | 49 | #include <asm/mach/irq.h> |
@@ -700,6 +701,7 @@ MACHINE_START(SMDK6410, "SMDK6410") | |||
700 | .atag_offset = 0x100, | 701 | .atag_offset = 0x100, |
701 | 702 | ||
702 | .init_irq = s3c6410_init_irq, | 703 | .init_irq = s3c6410_init_irq, |
704 | .handle_irq = vic_handle_irq, | ||
703 | .map_io = smdk6410_map_io, | 705 | .map_io = smdk6410_map_io, |
704 | .init_machine = smdk6410_machine_init, | 706 | .init_machine = smdk6410_machine_init, |
705 | .timer = &s3c24xx_timer, | 707 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s5p64x0/include/mach/entry-macro.S b/arch/arm/mach-s5p64x0/include/mach/entry-macro.S index 10b62b4f8211..fbb246d0a3df 100644 --- a/arch/arm/mach-s5p64x0/include/mach/entry-macro.S +++ b/arch/arm/mach-s5p64x0/include/mach/entry-macro.S | |||
@@ -10,7 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <mach/map.h> | 13 | .macro disable_fiq |
14 | #include <plat/irqs.h> | 14 | .endm |
15 | 15 | ||
16 | #include <asm/entry-macro-vic2.S> | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
17 | .endm | ||
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 4a1250cd1356..c272c3f7d6de 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <video/platform_lcd.h> | 28 | #include <video/platform_lcd.h> |
29 | 29 | ||
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
@@ -242,6 +243,7 @@ MACHINE_START(SMDK6440, "SMDK6440") | |||
242 | .atag_offset = 0x100, | 243 | .atag_offset = 0x100, |
243 | 244 | ||
244 | .init_irq = s5p6440_init_irq, | 245 | .init_irq = s5p6440_init_irq, |
246 | .handle_irq = vic_handle_irq, | ||
245 | .map_io = smdk6440_map_io, | 247 | .map_io = smdk6440_map_io, |
246 | .init_machine = smdk6440_machine_init, | 248 | .init_machine = smdk6440_machine_init, |
247 | .timer = &s5p_timer, | 249 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index 0ab129ecf009..7a4700959616 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <video/platform_lcd.h> | 28 | #include <video/platform_lcd.h> |
29 | 29 | ||
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
@@ -262,6 +263,7 @@ MACHINE_START(SMDK6450, "SMDK6450") | |||
262 | .atag_offset = 0x100, | 263 | .atag_offset = 0x100, |
263 | 264 | ||
264 | .init_irq = s5p6450_init_irq, | 265 | .init_irq = s5p6450_init_irq, |
266 | .handle_irq = vic_handle_irq, | ||
265 | .map_io = smdk6450_map_io, | 267 | .map_io = smdk6450_map_io, |
266 | .init_machine = smdk6450_machine_init, | 268 | .init_machine = smdk6450_machine_init, |
267 | .timer = &s5p_timer, | 269 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pc100/include/mach/entry-macro.S b/arch/arm/mach-s5pc100/include/mach/entry-macro.S index ba76af052c81..b8c242edfa22 100644 --- a/arch/arm/mach-s5pc100/include/mach/entry-macro.S +++ b/arch/arm/mach-s5pc100/include/mach/entry-macro.S | |||
@@ -12,39 +12,14 @@ | |||
12 | * warranty of any kind, whether express or implied. | 12 | * warranty of any kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/hardware/vic.h> | ||
16 | #include <mach/map.h> | ||
17 | #include <plat/irqs.h> | ||
18 | |||
19 | .macro disable_fiq | 15 | .macro disable_fiq |
20 | .endm | 16 | .endm |
21 | 17 | ||
22 | .macro get_irqnr_preamble, base, tmp | 18 | .macro get_irqnr_preamble, base, tmp |
23 | ldr \base, =VA_VIC0 | ||
24 | .endm | 19 | .endm |
25 | 20 | ||
26 | .macro arch_ret_to_user, tmp1, tmp2 | 21 | .macro arch_ret_to_user, tmp1, tmp2 |
27 | .endm | 22 | .endm |
28 | 23 | ||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
30 | |||
31 | @ check the vic0 | ||
32 | mov \irqnr, # S5P_IRQ_OFFSET + 31 | ||
33 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
34 | teq \irqstat, #0 | ||
35 | |||
36 | @ otherwise try vic1 | ||
37 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
38 | addeq \irqnr, \irqnr, #32 | ||
39 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
40 | teqeq \irqstat, #0 | ||
41 | |||
42 | @ otherwise try vic2 | ||
43 | addeq \tmp, \base, #(VA_VIC2 - VA_VIC0) | ||
44 | addeq \irqnr, \irqnr, #32 | ||
45 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
46 | teqeq \irqstat, #0 | ||
47 | |||
48 | clzne \irqstat, \irqstat | ||
49 | subne \irqnr, \irqnr, \irqstat | ||
50 | .endm | 25 | .endm |
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 26f5c91c9427..93ebe3a92d10 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/pwm_backlight.h> | 26 | #include <linux/pwm_backlight.h> |
27 | 27 | ||
28 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
30 | 31 | ||
@@ -250,6 +251,7 @@ MACHINE_START(SMDKC100, "SMDKC100") | |||
250 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ | 251 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ |
251 | .atag_offset = 0x100, | 252 | .atag_offset = 0x100, |
252 | .init_irq = s5pc100_init_irq, | 253 | .init_irq = s5pc100_init_irq, |
254 | .handle_irq = vic_handle_irq, | ||
253 | .map_io = smdkc100_map_io, | 255 | .map_io = smdkc100_map_io, |
254 | .init_machine = smdkc100_machine_init, | 256 | .init_machine = smdkc100_machine_init, |
255 | .timer = &s3c24xx_timer, | 257 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s5pv210/include/mach/entry-macro.S b/arch/arm/mach-s5pv210/include/mach/entry-macro.S index 3aa41ac59f07..bebca1b5d0b1 100644 --- a/arch/arm/mach-s5pv210/include/mach/entry-macro.S +++ b/arch/arm/mach-s5pv210/include/mach/entry-macro.S | |||
@@ -10,45 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm/hardware/vic.h> | ||
14 | #include <mach/map.h> | ||
15 | #include <plat/irqs.h> | ||
16 | |||
17 | .macro disable_fiq | 13 | .macro disable_fiq |
18 | .endm | 14 | .endm |
19 | 15 | ||
20 | .macro get_irqnr_preamble, base, tmp | ||
21 | ldr \base, =VA_VIC0 | ||
22 | .endm | ||
23 | |||
24 | .macro arch_ret_to_user, tmp1, tmp2 | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
25 | .endm | 17 | .endm |
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
28 | |||
29 | @ check the vic0 | ||
30 | mov \irqnr, # S5P_IRQ_OFFSET + 31 | ||
31 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
32 | teq \irqstat, #0 | ||
33 | |||
34 | @ otherwise try vic1 | ||
35 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
36 | addeq \irqnr, \irqnr, #32 | ||
37 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
38 | teqeq \irqstat, #0 | ||
39 | |||
40 | @ otherwise try vic2 | ||
41 | addeq \tmp, \base, #(VA_VIC2 - VA_VIC0) | ||
42 | addeq \irqnr, \irqnr, #32 | ||
43 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
44 | teqeq \irqstat, #0 | ||
45 | |||
46 | @ otherwise try vic3 | ||
47 | addeq \tmp, \base, #(VA_VIC3 - VA_VIC0) | ||
48 | addeq \irqnr, \irqnr, #32 | ||
49 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
50 | teqeq \irqstat, #0 | ||
51 | |||
52 | clzne \irqstat, \irqstat | ||
53 | subne \irqnr, \irqnr, \irqstat | ||
54 | .endm | ||
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 5811a96125f0..71ca95604d63 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | 24 | ||
25 | #include <asm/hardware/vic.h> | ||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
@@ -680,6 +681,7 @@ MACHINE_START(AQUILA, "Aquila") | |||
680 | Kyungmin Park <kyungmin.park@samsung.com> */ | 681 | Kyungmin Park <kyungmin.park@samsung.com> */ |
681 | .atag_offset = 0x100, | 682 | .atag_offset = 0x100, |
682 | .init_irq = s5pv210_init_irq, | 683 | .init_irq = s5pv210_init_irq, |
684 | .handle_irq = vic_handle_irq, | ||
683 | .map_io = aquila_map_io, | 685 | .map_io = aquila_map_io, |
684 | .init_machine = aquila_machine_init, | 686 | .init_machine = aquila_machine_init, |
685 | .timer = &s5p_timer, | 687 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 15edcae448b9..448fd9ea96f2 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | 29 | ||
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
@@ -956,6 +957,7 @@ MACHINE_START(GONI, "GONI") | |||
956 | /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */ | 957 | /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */ |
957 | .atag_offset = 0x100, | 958 | .atag_offset = 0x100, |
958 | .init_irq = s5pv210_init_irq, | 959 | .init_irq = s5pv210_init_irq, |
960 | .handle_irq = vic_handle_irq, | ||
959 | .map_io = goni_map_io, | 961 | .map_io = goni_map_io, |
960 | .init_machine = goni_machine_init, | 962 | .init_machine = goni_machine_init, |
961 | .timer = &s5p_timer, | 963 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index f7266bb0cac8..c2531ffc720b 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | 17 | ||
18 | #include <asm/hardware/vic.h> | ||
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
@@ -138,6 +139,7 @@ MACHINE_START(SMDKC110, "SMDKC110") | |||
138 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 139 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
139 | .atag_offset = 0x100, | 140 | .atag_offset = 0x100, |
140 | .init_irq = s5pv210_init_irq, | 141 | .init_irq = s5pv210_init_irq, |
142 | .handle_irq = vic_handle_irq, | ||
141 | .map_io = smdkc110_map_io, | 143 | .map_io = smdkc110_map_io, |
142 | .init_machine = smdkc110_machine_init, | 144 | .init_machine = smdkc110_machine_init, |
143 | .timer = &s5p_timer, | 145 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index a9106c392398..4ca77c41d499 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
22 | 22 | ||
23 | #include <asm/hardware/vic.h> | ||
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
25 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
@@ -315,6 +316,7 @@ MACHINE_START(SMDKV210, "SMDKV210") | |||
315 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 316 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
316 | .atag_offset = 0x100, | 317 | .atag_offset = 0x100, |
317 | .init_irq = s5pv210_init_irq, | 318 | .init_irq = s5pv210_init_irq, |
319 | .handle_irq = vic_handle_irq, | ||
318 | .map_io = smdkv210_map_io, | 320 | .map_io = smdkv210_map_io, |
319 | .init_machine = smdkv210_machine_init, | 321 | .init_machine = smdkv210_machine_init, |
320 | .timer = &s5p_timer, | 322 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c index 97cc066c5369..df70fcb34516 100644 --- a/arch/arm/mach-s5pv210/mach-torbreck.c +++ b/arch/arm/mach-s5pv210/mach-torbreck.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
16 | 16 | ||
17 | #include <asm/hardware/vic.h> | ||
17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
19 | #include <asm/setup.h> | 20 | #include <asm/setup.h> |
@@ -127,6 +128,7 @@ MACHINE_START(TORBRECK, "TORBRECK") | |||
127 | /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */ | 128 | /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */ |
128 | .atag_offset = 0x100, | 129 | .atag_offset = 0x100, |
129 | .init_irq = s5pv210_init_irq, | 130 | .init_irq = s5pv210_init_irq, |
131 | .handle_irq = vic_handle_irq, | ||
130 | .map_io = torbreck_map_io, | 132 | .map_io = torbreck_map_io, |
131 | .init_machine = torbreck_machine_init, | 133 | .init_machine = torbreck_machine_init, |
132 | .timer = &s5p_timer, | 134 | .timer = &s5p_timer, |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 2aec2f732515..5ca1f9d66995 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common objects | 5 | # Common objects |
6 | obj-y := timer.o console.o clock.o pm_runtime.o | 6 | obj-y := timer.o console.o clock.o |
7 | 7 | ||
8 | # CPU objects | 8 | # CPU objects |
9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o | 9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o |
@@ -28,7 +28,6 @@ pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o | |||
28 | obj-$(CONFIG_ARCH_SH7367) += entry-intc.o | 28 | obj-$(CONFIG_ARCH_SH7367) += entry-intc.o |
29 | obj-$(CONFIG_ARCH_SH7377) += entry-intc.o | 29 | obj-$(CONFIG_ARCH_SH7377) += entry-intc.o |
30 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | 30 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o |
31 | obj-$(CONFIG_ARCH_SH73A0) += entry-gic.o | ||
32 | 31 | ||
33 | # PM objects | 32 | # PM objects |
34 | obj-$(CONFIG_SUSPEND) += suspend.o | 33 | obj-$(CONFIG_SUSPEND) += suspend.o |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 83624e26b884..202c3c6ec9d8 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -515,14 +515,14 @@ static void __init ag5evm_init(void) | |||
515 | /* enable MMCIF */ | 515 | /* enable MMCIF */ |
516 | gpio_request(GPIO_FN_MMCCLK0, NULL); | 516 | gpio_request(GPIO_FN_MMCCLK0, NULL); |
517 | gpio_request(GPIO_FN_MMCCMD0_PU, NULL); | 517 | gpio_request(GPIO_FN_MMCCMD0_PU, NULL); |
518 | gpio_request(GPIO_FN_MMCD0_0, NULL); | 518 | gpio_request(GPIO_FN_MMCD0_0_PU, NULL); |
519 | gpio_request(GPIO_FN_MMCD0_1, NULL); | 519 | gpio_request(GPIO_FN_MMCD0_1_PU, NULL); |
520 | gpio_request(GPIO_FN_MMCD0_2, NULL); | 520 | gpio_request(GPIO_FN_MMCD0_2_PU, NULL); |
521 | gpio_request(GPIO_FN_MMCD0_3, NULL); | 521 | gpio_request(GPIO_FN_MMCD0_3_PU, NULL); |
522 | gpio_request(GPIO_FN_MMCD0_4, NULL); | 522 | gpio_request(GPIO_FN_MMCD0_4_PU, NULL); |
523 | gpio_request(GPIO_FN_MMCD0_5, NULL); | 523 | gpio_request(GPIO_FN_MMCD0_5_PU, NULL); |
524 | gpio_request(GPIO_FN_MMCD0_6, NULL); | 524 | gpio_request(GPIO_FN_MMCD0_6_PU, NULL); |
525 | gpio_request(GPIO_FN_MMCD0_7, NULL); | 525 | gpio_request(GPIO_FN_MMCD0_7_PU, NULL); |
526 | gpio_request(GPIO_PORT208, NULL); /* Reset */ | 526 | gpio_request(GPIO_PORT208, NULL); /* Reset */ |
527 | gpio_direction_output(GPIO_PORT208, 1); | 527 | gpio_direction_output(GPIO_PORT208, 1); |
528 | 528 | ||
@@ -608,7 +608,7 @@ struct sys_timer ag5evm_timer = { | |||
608 | MACHINE_START(AG5EVM, "ag5evm") | 608 | MACHINE_START(AG5EVM, "ag5evm") |
609 | .map_io = ag5evm_map_io, | 609 | .map_io = ag5evm_map_io, |
610 | .init_irq = sh73a0_init_irq, | 610 | .init_irq = sh73a0_init_irq, |
611 | .handle_irq = shmobile_handle_irq_gic, | 611 | .handle_irq = gic_handle_irq, |
612 | .init_machine = ag5evm_init, | 612 | .init_machine = ag5evm_init, |
613 | .timer = &ag5evm_timer, | 613 | .timer = &ag5evm_timer, |
614 | MACHINE_END | 614 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index a3aa0f6df964..4c865ece9ac4 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -201,7 +201,7 @@ static struct physmap_flash_data nor_flash_data = { | |||
201 | static struct resource nor_flash_resources[] = { | 201 | static struct resource nor_flash_resources[] = { |
202 | [0] = { | 202 | [0] = { |
203 | .start = 0x20000000, /* CS0 shadow instead of regular CS0 */ | 203 | .start = 0x20000000, /* CS0 shadow instead of regular CS0 */ |
204 | .end = 0x28000000 - 1, /* needed by USB MASK ROM boot */ | 204 | .end = 0x28000000 - 1, /* needed by USB MASK ROM boot */ |
205 | .flags = IORESOURCE_MEM, | 205 | .flags = IORESOURCE_MEM, |
206 | } | 206 | } |
207 | }; | 207 | }; |
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index adc73122bf20..1b4439d3f9d5 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <asm/hardware/cache-l2x0.h> | 48 | #include <asm/hardware/cache-l2x0.h> |
49 | #include <asm/traps.h> | 49 | #include <asm/traps.h> |
50 | 50 | ||
51 | /* SMSC 9220 */ | ||
51 | static struct resource smsc9220_resources[] = { | 52 | static struct resource smsc9220_resources[] = { |
52 | [0] = { | 53 | [0] = { |
53 | .start = 0x14000000, /* CS5A */ | 54 | .start = 0x14000000, /* CS5A */ |
@@ -77,6 +78,7 @@ static struct platform_device eth_device = { | |||
77 | .num_resources = ARRAY_SIZE(smsc9220_resources), | 78 | .num_resources = ARRAY_SIZE(smsc9220_resources), |
78 | }; | 79 | }; |
79 | 80 | ||
81 | /* KEYSC */ | ||
80 | static struct sh_keysc_info keysc_platdata = { | 82 | static struct sh_keysc_info keysc_platdata = { |
81 | .mode = SH_KEYSC_MODE_6, | 83 | .mode = SH_KEYSC_MODE_6, |
82 | .scan_timing = 3, | 84 | .scan_timing = 3, |
@@ -120,6 +122,7 @@ static struct platform_device keysc_device = { | |||
120 | }, | 122 | }, |
121 | }; | 123 | }; |
122 | 124 | ||
125 | /* GPIO KEY */ | ||
123 | #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 } | 126 | #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 } |
124 | 127 | ||
125 | static struct gpio_keys_button gpio_buttons[] = { | 128 | static struct gpio_keys_button gpio_buttons[] = { |
@@ -150,6 +153,7 @@ static struct platform_device gpio_keys_device = { | |||
150 | }, | 153 | }, |
151 | }; | 154 | }; |
152 | 155 | ||
156 | /* GPIO LED */ | ||
153 | #define GPIO_LED(n, g) { .name = n, .gpio = g } | 157 | #define GPIO_LED(n, g) { .name = n, .gpio = g } |
154 | 158 | ||
155 | static struct gpio_led gpio_leds[] = { | 159 | static struct gpio_led gpio_leds[] = { |
@@ -175,6 +179,7 @@ static struct platform_device gpio_leds_device = { | |||
175 | }, | 179 | }, |
176 | }; | 180 | }; |
177 | 181 | ||
182 | /* MMCIF */ | ||
178 | static struct resource mmcif_resources[] = { | 183 | static struct resource mmcif_resources[] = { |
179 | [0] = { | 184 | [0] = { |
180 | .name = "MMCIF", | 185 | .name = "MMCIF", |
@@ -207,6 +212,7 @@ static struct platform_device mmcif_device = { | |||
207 | .resource = mmcif_resources, | 212 | .resource = mmcif_resources, |
208 | }; | 213 | }; |
209 | 214 | ||
215 | /* SDHI0 */ | ||
210 | static struct sh_mobile_sdhi_info sdhi0_info = { | 216 | static struct sh_mobile_sdhi_info sdhi0_info = { |
211 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 217 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
212 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, | 218 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
@@ -243,6 +249,7 @@ static struct platform_device sdhi0_device = { | |||
243 | }, | 249 | }, |
244 | }; | 250 | }; |
245 | 251 | ||
252 | /* SDHI1 */ | ||
246 | static struct sh_mobile_sdhi_info sdhi1_info = { | 253 | static struct sh_mobile_sdhi_info sdhi1_info = { |
247 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, | 254 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, |
248 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, | 255 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
@@ -441,7 +448,7 @@ struct sys_timer kota2_timer = { | |||
441 | MACHINE_START(KOTA2, "kota2") | 448 | MACHINE_START(KOTA2, "kota2") |
442 | .map_io = kota2_map_io, | 449 | .map_io = kota2_map_io, |
443 | .init_irq = kota2_init_irq, | 450 | .init_irq = kota2_init_irq, |
444 | .handle_irq = shmobile_handle_irq_gic, | 451 | .handle_irq = gic_handle_irq, |
445 | .init_machine = kota2_init, | 452 | .init_machine = kota2_init, |
446 | .timer = &kota2_timer, | 453 | .timer = &kota2_timer, |
447 | MACHINE_END | 454 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 66975921e646..995a9c3aec8f 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -476,7 +476,7 @@ static struct clk_ops fsidiv_clk_ops = { | |||
476 | .disable = fsidiv_disable, | 476 | .disable = fsidiv_disable, |
477 | }; | 477 | }; |
478 | 478 | ||
479 | static struct clk_mapping sh7372_fsidiva_clk_mapping = { | 479 | static struct clk_mapping fsidiva_clk_mapping = { |
480 | .phys = FSIDIVA, | 480 | .phys = FSIDIVA, |
481 | .len = 8, | 481 | .len = 8, |
482 | }; | 482 | }; |
@@ -484,10 +484,10 @@ static struct clk_mapping sh7372_fsidiva_clk_mapping = { | |||
484 | struct clk sh7372_fsidiva_clk = { | 484 | struct clk sh7372_fsidiva_clk = { |
485 | .ops = &fsidiv_clk_ops, | 485 | .ops = &fsidiv_clk_ops, |
486 | .parent = &div6_reparent_clks[DIV6_FSIA], /* late install */ | 486 | .parent = &div6_reparent_clks[DIV6_FSIA], /* late install */ |
487 | .mapping = &sh7372_fsidiva_clk_mapping, | 487 | .mapping = &fsidiva_clk_mapping, |
488 | }; | 488 | }; |
489 | 489 | ||
490 | static struct clk_mapping sh7372_fsidivb_clk_mapping = { | 490 | static struct clk_mapping fsidivb_clk_mapping = { |
491 | .phys = FSIDIVB, | 491 | .phys = FSIDIVB, |
492 | .len = 8, | 492 | .len = 8, |
493 | }; | 493 | }; |
@@ -495,7 +495,7 @@ static struct clk_mapping sh7372_fsidivb_clk_mapping = { | |||
495 | struct clk sh7372_fsidivb_clk = { | 495 | struct clk sh7372_fsidivb_clk = { |
496 | .ops = &fsidiv_clk_ops, | 496 | .ops = &fsidiv_clk_ops, |
497 | .parent = &div6_reparent_clks[DIV6_FSIB], /* late install */ | 497 | .parent = &div6_reparent_clks[DIV6_FSIB], /* late install */ |
498 | .mapping = &sh7372_fsidivb_clk_mapping, | 498 | .mapping = &fsidivb_clk_mapping, |
499 | }; | 499 | }; |
500 | 500 | ||
501 | static struct clk *late_main_clks[] = { | 501 | static struct clk *late_main_clks[] = { |
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c index 2e44f11f592e..1b2334277e85 100644 --- a/arch/arm/mach-shmobile/cpuidle.c +++ b/arch/arm/mach-shmobile/cpuidle.c | |||
@@ -26,65 +26,59 @@ void (*shmobile_cpuidle_modes[CPUIDLE_STATE_MAX])(void) = { | |||
26 | }; | 26 | }; |
27 | 27 | ||
28 | static int shmobile_cpuidle_enter(struct cpuidle_device *dev, | 28 | static int shmobile_cpuidle_enter(struct cpuidle_device *dev, |
29 | struct cpuidle_state *state) | 29 | struct cpuidle_driver *drv, |
30 | int index) | ||
30 | { | 31 | { |
31 | ktime_t before, after; | 32 | ktime_t before, after; |
32 | int requested_state = state - &dev->states[0]; | ||
33 | 33 | ||
34 | dev->last_state = &dev->states[requested_state]; | ||
35 | before = ktime_get(); | 34 | before = ktime_get(); |
36 | 35 | ||
37 | local_irq_disable(); | 36 | local_irq_disable(); |
38 | local_fiq_disable(); | 37 | local_fiq_disable(); |
39 | 38 | ||
40 | shmobile_cpuidle_modes[requested_state](); | 39 | shmobile_cpuidle_modes[index](); |
41 | 40 | ||
42 | local_irq_enable(); | 41 | local_irq_enable(); |
43 | local_fiq_enable(); | 42 | local_fiq_enable(); |
44 | 43 | ||
45 | after = ktime_get(); | 44 | after = ktime_get(); |
46 | return ktime_to_ns(ktime_sub(after, before)) >> 10; | 45 | dev->last_residency = ktime_to_ns(ktime_sub(after, before)) >> 10; |
46 | |||
47 | return index; | ||
47 | } | 48 | } |
48 | 49 | ||
49 | static struct cpuidle_device shmobile_cpuidle_dev; | 50 | static struct cpuidle_device shmobile_cpuidle_dev; |
50 | static struct cpuidle_driver shmobile_cpuidle_driver = { | 51 | static struct cpuidle_driver shmobile_cpuidle_driver = { |
51 | .name = "shmobile_cpuidle", | 52 | .name = "shmobile_cpuidle", |
52 | .owner = THIS_MODULE, | 53 | .owner = THIS_MODULE, |
54 | .states[0] = { | ||
55 | .name = "C1", | ||
56 | .desc = "WFI", | ||
57 | .exit_latency = 1, | ||
58 | .target_residency = 1 * 2, | ||
59 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
60 | }, | ||
61 | .safe_state_index = 0, /* C1 */ | ||
62 | .state_count = 1, | ||
53 | }; | 63 | }; |
54 | 64 | ||
55 | void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev); | 65 | void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); |
56 | 66 | ||
57 | static int shmobile_cpuidle_init(void) | 67 | static int shmobile_cpuidle_init(void) |
58 | { | 68 | { |
59 | struct cpuidle_device *dev = &shmobile_cpuidle_dev; | 69 | struct cpuidle_device *dev = &shmobile_cpuidle_dev; |
60 | struct cpuidle_state *state; | 70 | struct cpuidle_driver *drv = &shmobile_cpuidle_driver; |
61 | int i; | 71 | int i; |
62 | 72 | ||
63 | cpuidle_register_driver(&shmobile_cpuidle_driver); | 73 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) |
64 | 74 | drv->states[i].enter = shmobile_cpuidle_enter; | |
65 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { | ||
66 | dev->states[i].name[0] = '\0'; | ||
67 | dev->states[i].desc[0] = '\0'; | ||
68 | dev->states[i].enter = shmobile_cpuidle_enter; | ||
69 | } | ||
70 | |||
71 | i = CPUIDLE_DRIVER_STATE_START; | ||
72 | |||
73 | state = &dev->states[i++]; | ||
74 | snprintf(state->name, CPUIDLE_NAME_LEN, "C1"); | ||
75 | strncpy(state->desc, "WFI", CPUIDLE_DESC_LEN); | ||
76 | state->exit_latency = 1; | ||
77 | state->target_residency = 1 * 2; | ||
78 | state->power_usage = 3; | ||
79 | state->flags = 0; | ||
80 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | ||
81 | |||
82 | dev->safe_state = state; | ||
83 | dev->state_count = i; | ||
84 | 75 | ||
85 | if (shmobile_cpuidle_setup) | 76 | if (shmobile_cpuidle_setup) |
86 | shmobile_cpuidle_setup(dev); | 77 | shmobile_cpuidle_setup(drv); |
78 | |||
79 | cpuidle_register_driver(drv); | ||
87 | 80 | ||
81 | dev->state_count = drv->state_count; | ||
88 | cpuidle_register_device(dev); | 82 | cpuidle_register_device(dev); |
89 | 83 | ||
90 | return 0; | 84 | return 0; |
diff --git a/arch/arm/mach-shmobile/entry-gic.S b/arch/arm/mach-shmobile/entry-gic.S deleted file mode 100644 index e20239b08c83..000000000000 --- a/arch/arm/mach-shmobile/entry-gic.S +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * ARM Interrupt demux handler using GIC | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2011 Paul Mundt | ||
6 | * Copyright (C) 2010 - 2011 Renesas Solutions Corp. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <asm/assembler.h> | ||
14 | #include <asm/entry-macro-multi.S> | ||
15 | #include <asm/hardware/gic.h> | ||
16 | #include <asm/hardware/entry-macro-gic.S> | ||
17 | |||
18 | arch_irq_handler shmobile_handle_irq_gic | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index c0cdbf997c91..4bf82c156771 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -7,11 +7,10 @@ extern void shmobile_secondary_vector(void); | |||
7 | struct clk; | 7 | struct clk; |
8 | extern int clk_init(void); | 8 | extern int clk_init(void); |
9 | extern void shmobile_handle_irq_intc(struct pt_regs *); | 9 | extern void shmobile_handle_irq_intc(struct pt_regs *); |
10 | extern void shmobile_handle_irq_gic(struct pt_regs *); | ||
11 | extern struct platform_suspend_ops shmobile_suspend_ops; | 10 | extern struct platform_suspend_ops shmobile_suspend_ops; |
12 | struct cpuidle_device; | 11 | struct cpuidle_driver; |
13 | extern void (*shmobile_cpuidle_modes[])(void); | 12 | extern void (*shmobile_cpuidle_modes[])(void); |
14 | extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev); | 13 | extern void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); |
15 | 14 | ||
16 | extern void sh7367_init_irq(void); | 15 | extern void sh7367_init_irq(void); |
17 | extern void sh7367_add_early_devices(void); | 16 | extern void sh7367_add_early_devices(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/entry-macro.S b/arch/arm/mach-shmobile/include/mach/entry-macro.S index 8d4a416d4285..2a57b2964ee9 100644 --- a/arch/arm/mach-shmobile/include/mach/entry-macro.S +++ b/arch/arm/mach-shmobile/include/mach/entry-macro.S | |||
@@ -18,14 +18,5 @@ | |||
18 | .macro disable_fiq | 18 | .macro disable_fiq |
19 | .endm | 19 | .endm |
20 | 20 | ||
21 | .macro get_irqnr_preamble, base, tmp | ||
22 | .endm | ||
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | .endm | ||
26 | |||
27 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
28 | .endm | ||
29 | |||
30 | .macro arch_ret_to_user, tmp1, tmp2 | 21 | .macro arch_ret_to_user, tmp1, tmp2 |
31 | .endm | 22 | .endm |
diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/include/mach/sh73a0.h index 18ae6a990bc2..881d515a9686 100644 --- a/arch/arm/mach-shmobile/include/mach/sh73a0.h +++ b/arch/arm/mach-shmobile/include/mach/sh73a0.h | |||
@@ -470,6 +470,14 @@ enum { | |||
470 | GPIO_FN_SDHICMD2_PU, | 470 | GPIO_FN_SDHICMD2_PU, |
471 | GPIO_FN_MMCCMD0_PU, | 471 | GPIO_FN_MMCCMD0_PU, |
472 | GPIO_FN_MMCCMD1_PU, | 472 | GPIO_FN_MMCCMD1_PU, |
473 | GPIO_FN_MMCD0_0_PU, | ||
474 | GPIO_FN_MMCD0_1_PU, | ||
475 | GPIO_FN_MMCD0_2_PU, | ||
476 | GPIO_FN_MMCD0_3_PU, | ||
477 | GPIO_FN_MMCD0_4_PU, | ||
478 | GPIO_FN_MMCD0_5_PU, | ||
479 | GPIO_FN_MMCD0_6_PU, | ||
480 | GPIO_FN_MMCD0_7_PU, | ||
473 | GPIO_FN_FSIACK_PU, | 481 | GPIO_FN_FSIACK_PU, |
474 | GPIO_FN_FSIAILR_PU, | 482 | GPIO_FN_FSIAILR_PU, |
475 | GPIO_FN_FSIAIBT_PU, | 483 | GPIO_FN_FSIAIBT_PU, |
diff --git a/arch/arm/mach-shmobile/pfc-sh7367.c b/arch/arm/mach-shmobile/pfc-sh7367.c index 128555e76e43..e6e524654e67 100644 --- a/arch/arm/mach-shmobile/pfc-sh7367.c +++ b/arch/arm/mach-shmobile/pfc-sh7367.c | |||
@@ -21,68 +21,49 @@ | |||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <mach/sh7367.h> | 22 | #include <mach/sh7367.h> |
23 | 23 | ||
24 | #define _1(fn, pfx, sfx) fn(pfx, sfx) | 24 | #define CPU_ALL_PORT(fn, pfx, sfx) \ |
25 | 25 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | |
26 | #define _10(fn, pfx, sfx) \ | 26 | PORT_10(fn, pfx##10, sfx), PORT_90(fn, pfx##1, sfx), \ |
27 | _1(fn, pfx##0, sfx), _1(fn, pfx##1, sfx), \ | 27 | PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \ |
28 | _1(fn, pfx##2, sfx), _1(fn, pfx##3, sfx), \ | 28 | PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \ |
29 | _1(fn, pfx##4, sfx), _1(fn, pfx##5, sfx), \ | 29 | PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \ |
30 | _1(fn, pfx##6, sfx), _1(fn, pfx##7, sfx), \ | 30 | PORT_10(fn, pfx##26, sfx), PORT_1(fn, pfx##270, sfx), \ |
31 | _1(fn, pfx##8, sfx), _1(fn, pfx##9, sfx) | 31 | PORT_1(fn, pfx##271, sfx), PORT_1(fn, pfx##272, sfx) |
32 | |||
33 | #define _90(fn, pfx, sfx) \ | ||
34 | _10(fn, pfx##1, sfx), _10(fn, pfx##2, sfx), \ | ||
35 | _10(fn, pfx##3, sfx), _10(fn, pfx##4, sfx), \ | ||
36 | _10(fn, pfx##5, sfx), _10(fn, pfx##6, sfx), \ | ||
37 | _10(fn, pfx##7, sfx), _10(fn, pfx##8, sfx), \ | ||
38 | _10(fn, pfx##9, sfx) | ||
39 | |||
40 | #define _273(fn, pfx, sfx) \ | ||
41 | _10(fn, pfx, sfx), _90(fn, pfx, sfx), \ | ||
42 | _10(fn, pfx##10, sfx), _90(fn, pfx##1, sfx), \ | ||
43 | _10(fn, pfx##20, sfx), _10(fn, pfx##21, sfx), \ | ||
44 | _10(fn, pfx##22, sfx), _10(fn, pfx##23, sfx), \ | ||
45 | _10(fn, pfx##24, sfx), _10(fn, pfx##25, sfx), \ | ||
46 | _10(fn, pfx##26, sfx), _1(fn, pfx##270, sfx), \ | ||
47 | _1(fn, pfx##271, sfx), _1(fn, pfx##272, sfx) | ||
48 | |||
49 | #define _PORT(pfx, sfx) pfx##_##sfx | ||
50 | #define PORT_273(str) _273(_PORT, PORT, str) | ||
51 | 32 | ||
52 | enum { | 33 | enum { |
53 | PINMUX_RESERVED = 0, | 34 | PINMUX_RESERVED = 0, |
54 | 35 | ||
55 | PINMUX_DATA_BEGIN, | 36 | PINMUX_DATA_BEGIN, |
56 | PORT_273(DATA), /* PORT0_DATA -> PORT272_DATA */ | 37 | PORT_ALL(DATA), /* PORT0_DATA -> PORT272_DATA */ |
57 | PINMUX_DATA_END, | 38 | PINMUX_DATA_END, |
58 | 39 | ||
59 | PINMUX_INPUT_BEGIN, | 40 | PINMUX_INPUT_BEGIN, |
60 | PORT_273(IN), /* PORT0_IN -> PORT272_IN */ | 41 | PORT_ALL(IN), /* PORT0_IN -> PORT272_IN */ |
61 | PINMUX_INPUT_END, | 42 | PINMUX_INPUT_END, |
62 | 43 | ||
63 | PINMUX_INPUT_PULLUP_BEGIN, | 44 | PINMUX_INPUT_PULLUP_BEGIN, |
64 | PORT_273(IN_PU), /* PORT0_IN_PU -> PORT272_IN_PU */ | 45 | PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT272_IN_PU */ |
65 | PINMUX_INPUT_PULLUP_END, | 46 | PINMUX_INPUT_PULLUP_END, |
66 | 47 | ||
67 | PINMUX_INPUT_PULLDOWN_BEGIN, | 48 | PINMUX_INPUT_PULLDOWN_BEGIN, |
68 | PORT_273(IN_PD), /* PORT0_IN_PD -> PORT272_IN_PD */ | 49 | PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT272_IN_PD */ |
69 | PINMUX_INPUT_PULLDOWN_END, | 50 | PINMUX_INPUT_PULLDOWN_END, |
70 | 51 | ||
71 | PINMUX_OUTPUT_BEGIN, | 52 | PINMUX_OUTPUT_BEGIN, |
72 | PORT_273(OUT), /* PORT0_OUT -> PORT272_OUT */ | 53 | PORT_ALL(OUT), /* PORT0_OUT -> PORT272_OUT */ |
73 | PINMUX_OUTPUT_END, | 54 | PINMUX_OUTPUT_END, |
74 | 55 | ||
75 | PINMUX_FUNCTION_BEGIN, | 56 | PINMUX_FUNCTION_BEGIN, |
76 | PORT_273(FN_IN), /* PORT0_FN_IN -> PORT272_FN_IN */ | 57 | PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT272_FN_IN */ |
77 | PORT_273(FN_OUT), /* PORT0_FN_OUT -> PORT272_FN_OUT */ | 58 | PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT272_FN_OUT */ |
78 | PORT_273(FN0), /* PORT0_FN0 -> PORT272_FN0 */ | 59 | PORT_ALL(FN0), /* PORT0_FN0 -> PORT272_FN0 */ |
79 | PORT_273(FN1), /* PORT0_FN1 -> PORT272_FN1 */ | 60 | PORT_ALL(FN1), /* PORT0_FN1 -> PORT272_FN1 */ |
80 | PORT_273(FN2), /* PORT0_FN2 -> PORT272_FN2 */ | 61 | PORT_ALL(FN2), /* PORT0_FN2 -> PORT272_FN2 */ |
81 | PORT_273(FN3), /* PORT0_FN3 -> PORT272_FN3 */ | 62 | PORT_ALL(FN3), /* PORT0_FN3 -> PORT272_FN3 */ |
82 | PORT_273(FN4), /* PORT0_FN4 -> PORT272_FN4 */ | 63 | PORT_ALL(FN4), /* PORT0_FN4 -> PORT272_FN4 */ |
83 | PORT_273(FN5), /* PORT0_FN5 -> PORT272_FN5 */ | 64 | PORT_ALL(FN5), /* PORT0_FN5 -> PORT272_FN5 */ |
84 | PORT_273(FN6), /* PORT0_FN6 -> PORT272_FN6 */ | 65 | PORT_ALL(FN6), /* PORT0_FN6 -> PORT272_FN6 */ |
85 | PORT_273(FN7), /* PORT0_FN7 -> PORT272_FN7 */ | 66 | PORT_ALL(FN7), /* PORT0_FN7 -> PORT272_FN7 */ |
86 | 67 | ||
87 | MSELBCR_MSEL2_1, MSELBCR_MSEL2_0, | 68 | MSELBCR_MSEL2_1, MSELBCR_MSEL2_0, |
88 | PINMUX_FUNCTION_END, | 69 | PINMUX_FUNCTION_END, |
@@ -327,41 +308,6 @@ enum { | |||
327 | PINMUX_MARK_END, | 308 | PINMUX_MARK_END, |
328 | }; | 309 | }; |
329 | 310 | ||
330 | #define PORT_DATA_I(nr) \ | ||
331 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | ||
332 | |||
333 | #define PORT_DATA_I_PD(nr) \ | ||
334 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
335 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
336 | |||
337 | #define PORT_DATA_I_PU(nr) \ | ||
338 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
339 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
340 | |||
341 | #define PORT_DATA_I_PU_PD(nr) \ | ||
342 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
343 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
344 | |||
345 | #define PORT_DATA_O(nr) \ | ||
346 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT) | ||
347 | |||
348 | #define PORT_DATA_IO(nr) \ | ||
349 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
350 | PORT##nr##_IN) | ||
351 | |||
352 | #define PORT_DATA_IO_PD(nr) \ | ||
353 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
354 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
355 | |||
356 | #define PORT_DATA_IO_PU(nr) \ | ||
357 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
358 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
359 | |||
360 | #define PORT_DATA_IO_PU_PD(nr) \ | ||
361 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
362 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
363 | |||
364 | |||
365 | static pinmux_enum_t pinmux_data[] = { | 311 | static pinmux_enum_t pinmux_data[] = { |
366 | 312 | ||
367 | /* specify valid pin states for each pin in GPIO mode */ | 313 | /* specify valid pin states for each pin in GPIO mode */ |
@@ -1098,13 +1044,9 @@ static pinmux_enum_t pinmux_data[] = { | |||
1098 | PINMUX_DATA(DIVLOCK_MARK, PORT272_FN1), | 1044 | PINMUX_DATA(DIVLOCK_MARK, PORT272_FN1), |
1099 | }; | 1045 | }; |
1100 | 1046 | ||
1101 | #define _GPIO_PORT(pfx, sfx) PINMUX_GPIO(GPIO_PORT##pfx, PORT##pfx##_DATA) | ||
1102 | #define GPIO_PORT_273() _273(_GPIO_PORT, , unused) | ||
1103 | #define GPIO_FN(str) PINMUX_GPIO(GPIO_FN_##str, str##_MARK) | ||
1104 | |||
1105 | static struct pinmux_gpio pinmux_gpios[] = { | 1047 | static struct pinmux_gpio pinmux_gpios[] = { |
1106 | /* 49-1 -> 49-6 (GPIO) */ | 1048 | /* 49-1 -> 49-6 (GPIO) */ |
1107 | GPIO_PORT_273(), | 1049 | GPIO_PORT_ALL(), |
1108 | 1050 | ||
1109 | /* Special Pull-up / Pull-down Functions */ | 1051 | /* Special Pull-up / Pull-down Functions */ |
1110 | GPIO_FN(PORT48_KEYIN0_PU), GPIO_FN(PORT49_KEYIN1_PU), | 1052 | GPIO_FN(PORT48_KEYIN0_PU), GPIO_FN(PORT49_KEYIN1_PU), |
@@ -1345,22 +1287,6 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
1345 | GPIO_FN(DIVLOCK), | 1287 | GPIO_FN(DIVLOCK), |
1346 | }; | 1288 | }; |
1347 | 1289 | ||
1348 | /* helper for top 4 bits in PORTnCR */ | ||
1349 | #define PCRH(in, in_pd, in_pu, out) \ | ||
1350 | 0, (out), (in), 0, \ | ||
1351 | 0, 0, 0, 0, \ | ||
1352 | 0, 0, (in_pd), 0, \ | ||
1353 | 0, 0, (in_pu), 0 | ||
1354 | |||
1355 | #define PORTCR(nr, reg) \ | ||
1356 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
1357 | PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
1358 | PORT##nr##_IN_PU, PORT##nr##_OUT), \ | ||
1359 | PORT##nr##_FN0, PORT##nr##_FN1, PORT##nr##_FN2, \ | ||
1360 | PORT##nr##_FN3, PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
1361 | PORT##nr##_FN6, PORT##nr##_FN7 } \ | ||
1362 | } | ||
1363 | |||
1364 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 1290 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
1365 | PORTCR(0, 0xe6050000), /* PORT0CR */ | 1291 | PORTCR(0, 0xe6050000), /* PORT0CR */ |
1366 | PORTCR(1, 0xe6050001), /* PORT1CR */ | 1292 | PORTCR(1, 0xe6050001), /* PORT1CR */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c index 9c265dae138a..1bd6585a6acf 100644 --- a/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/arch/arm/mach-shmobile/pfc-sh7372.c | |||
@@ -25,27 +25,13 @@ | |||
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <mach/sh7372.h> | 26 | #include <mach/sh7372.h> |
27 | 27 | ||
28 | #define _1(fn, pfx, sfx) fn(pfx, sfx) | 28 | #define CPU_ALL_PORT(fn, pfx, sfx) \ |
29 | 29 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | |
30 | #define _10(fn, pfx, sfx) \ | 30 | PORT_10(fn, pfx##10, sfx), PORT_10(fn, pfx##11, sfx), \ |
31 | _1(fn, pfx##0, sfx), _1(fn, pfx##1, sfx), \ | 31 | PORT_10(fn, pfx##12, sfx), PORT_10(fn, pfx##13, sfx), \ |
32 | _1(fn, pfx##2, sfx), _1(fn, pfx##3, sfx), \ | 32 | PORT_10(fn, pfx##14, sfx), PORT_10(fn, pfx##15, sfx), \ |
33 | _1(fn, pfx##4, sfx), _1(fn, pfx##5, sfx), \ | 33 | PORT_10(fn, pfx##16, sfx), PORT_10(fn, pfx##17, sfx), \ |
34 | _1(fn, pfx##6, sfx), _1(fn, pfx##7, sfx), \ | 34 | PORT_10(fn, pfx##18, sfx), PORT_1(fn, pfx##190, sfx) |
35 | _1(fn, pfx##8, sfx), _1(fn, pfx##9, sfx) | ||
36 | |||
37 | #define _80(fn, pfx, sfx) \ | ||
38 | _10(fn, pfx##1, sfx), _10(fn, pfx##2, sfx), \ | ||
39 | _10(fn, pfx##3, sfx), _10(fn, pfx##4, sfx), \ | ||
40 | _10(fn, pfx##5, sfx), _10(fn, pfx##6, sfx), \ | ||
41 | _10(fn, pfx##7, sfx), _10(fn, pfx##8, sfx) | ||
42 | |||
43 | #define _190(fn, pfx, sfx) \ | ||
44 | _10(fn, pfx, sfx), _80(fn, pfx, sfx), _10(fn, pfx##9, sfx), \ | ||
45 | _10(fn, pfx##10, sfx), _80(fn, pfx##1, sfx), _1(fn, pfx##190, sfx) | ||
46 | |||
47 | #define _PORT(pfx, sfx) pfx##_##sfx | ||
48 | #define PORT_ALL(str) _190(_PORT, PORT, str) | ||
49 | 35 | ||
50 | enum { | 36 | enum { |
51 | PINMUX_RESERVED = 0, | 37 | PINMUX_RESERVED = 0, |
@@ -381,108 +367,124 @@ enum { | |||
381 | PINMUX_MARK_END, | 367 | PINMUX_MARK_END, |
382 | }; | 368 | }; |
383 | 369 | ||
384 | /* PORT_DATA_I_PD(nr) */ | ||
385 | #define _I___D(nr) \ | ||
386 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
387 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
388 | |||
389 | /* PORT_DATA_I_PU(nr) */ | ||
390 | #define _I__U_(nr) \ | ||
391 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
392 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
393 | |||
394 | /* PORT_DATA_I_PU_PD(nr) */ | ||
395 | #define _I__UD(nr) \ | ||
396 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
397 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
398 | |||
399 | /* PORT_DATA_O(nr) */ | ||
400 | #define __O___(nr) \ | ||
401 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT) | ||
402 | |||
403 | /* PORT_DATA_IO(nr) */ | ||
404 | #define _IO___(nr) \ | ||
405 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
406 | PORT##nr##_IN) | ||
407 | |||
408 | /* PORT_DATA_IO_PD(nr) */ | ||
409 | #define _IO__D(nr) \ | ||
410 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
411 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
412 | |||
413 | /* PORT_DATA_IO_PU(nr) */ | ||
414 | #define _IO_U_(nr) \ | ||
415 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
416 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
417 | |||
418 | /* PORT_DATA_IO_PU_PD(nr) */ | ||
419 | #define _IO_UD(nr) \ | ||
420 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
421 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
422 | |||
423 | |||
424 | static pinmux_enum_t pinmux_data[] = { | 370 | static pinmux_enum_t pinmux_data[] = { |
425 | 371 | ||
426 | /* specify valid pin states for each pin in GPIO mode */ | 372 | /* specify valid pin states for each pin in GPIO mode */ |
427 | 373 | PORT_DATA_IO_PD(0), PORT_DATA_IO_PD(1), | |
428 | _IO__D(0), _IO__D(1), __O___(2), _I___D(3), _I___D(4), | 374 | PORT_DATA_O(2), PORT_DATA_I_PD(3), |
429 | _I___D(5), _IO_UD(6), _I___D(7), _IO__D(8), __O___(9), | 375 | PORT_DATA_I_PD(4), PORT_DATA_I_PD(5), |
430 | 376 | PORT_DATA_IO_PU_PD(6), PORT_DATA_I_PD(7), | |
431 | __O___(10), __O___(11), _IO_UD(12), _IO__D(13), _IO__D(14), | 377 | PORT_DATA_IO_PD(8), PORT_DATA_O(9), |
432 | __O___(15), _IO__D(16), _IO__D(17), _I___D(18), _IO___(19), | 378 | |
433 | 379 | PORT_DATA_O(10), PORT_DATA_O(11), | |
434 | _IO___(20), _IO___(21), _IO___(22), _IO___(23), _IO___(24), | 380 | PORT_DATA_IO_PU_PD(12), PORT_DATA_IO_PD(13), |
435 | _IO___(25), _IO___(26), _IO___(27), _IO___(28), _IO___(29), | 381 | PORT_DATA_IO_PD(14), PORT_DATA_O(15), |
436 | 382 | PORT_DATA_IO_PD(16), PORT_DATA_IO_PD(17), | |
437 | _IO___(30), _IO___(31), _IO___(32), _IO___(33), _IO___(34), | 383 | PORT_DATA_I_PD(18), PORT_DATA_IO(19), |
438 | _IO___(35), _IO___(36), _IO___(37), _IO___(38), _IO___(39), | 384 | |
439 | 385 | PORT_DATA_IO(20), PORT_DATA_IO(21), | |
440 | _IO___(40), _IO___(41), _IO___(42), _IO___(43), _IO___(44), | 386 | PORT_DATA_IO(22), PORT_DATA_IO(23), |
441 | _IO___(45), _IO_U_(46), _IO_U_(47), _IO_U_(48), _IO_U_(49), | 387 | PORT_DATA_IO(24), PORT_DATA_IO(25), |
442 | 388 | PORT_DATA_IO(26), PORT_DATA_IO(27), | |
443 | _IO_U_(50), _IO_U_(51), _IO_U_(52), _IO_U_(53), _IO_U_(54), | 389 | PORT_DATA_IO(28), PORT_DATA_IO(29), |
444 | _IO_U_(55), _IO_U_(56), _IO_U_(57), _IO_U_(58), _IO_U_(59), | 390 | |
445 | 391 | PORT_DATA_IO(30), PORT_DATA_IO(31), | |
446 | _IO_U_(60), _IO_U_(61), _IO___(62), __O___(63), __O___(64), | 392 | PORT_DATA_IO(32), PORT_DATA_IO(33), |
447 | _IO_U_(65), __O___(66), _IO_U_(67), __O___(68), _IO___(69), /*66?*/ | 393 | PORT_DATA_IO(34), PORT_DATA_IO(35), |
448 | 394 | PORT_DATA_IO(36), PORT_DATA_IO(37), | |
449 | _IO___(70), _IO___(71), __O___(72), _I__U_(73), _I__UD(74), | 395 | PORT_DATA_IO(38), PORT_DATA_IO(39), |
450 | _IO_UD(75), _IO_UD(76), _IO_UD(77), _IO_UD(78), _IO_UD(79), | 396 | |
451 | 397 | PORT_DATA_IO(40), PORT_DATA_IO(41), | |
452 | _IO_UD(80), _IO_UD(81), _IO_UD(82), _IO_UD(83), _IO_UD(84), | 398 | PORT_DATA_IO(42), PORT_DATA_IO(43), |
453 | _IO_UD(85), _IO_UD(86), _IO_UD(87), _IO_UD(88), _IO_UD(89), | 399 | PORT_DATA_IO(44), PORT_DATA_IO(45), |
454 | 400 | PORT_DATA_IO_PU(46), PORT_DATA_IO_PU(47), | |
455 | _IO_UD(90), _IO_UD(91), _IO_UD(92), _IO_UD(93), _IO_UD(94), | 401 | PORT_DATA_IO_PU(48), PORT_DATA_IO_PU(49), |
456 | _IO_UD(95), _IO_U_(96), _IO_UD(97), _IO_UD(98), __O___(99), /*99?*/ | 402 | |
457 | 403 | PORT_DATA_IO_PU(50), PORT_DATA_IO_PU(51), | |
458 | _IO__D(100), _IO__D(101), _IO__D(102), _IO__D(103), _IO__D(104), | 404 | PORT_DATA_IO_PU(52), PORT_DATA_IO_PU(53), |
459 | _IO__D(105), _IO_U_(106), _IO_U_(107), _IO_U_(108), _IO_U_(109), | 405 | PORT_DATA_IO_PU(54), PORT_DATA_IO_PU(55), |
460 | 406 | PORT_DATA_IO_PU(56), PORT_DATA_IO_PU(57), | |
461 | _IO_U_(110), _IO_U_(111), _IO__D(112), _IO__D(113), _IO_U_(114), | 407 | PORT_DATA_IO_PU(58), PORT_DATA_IO_PU(59), |
462 | _IO_U_(115), _IO_U_(116), _IO_U_(117), _IO_U_(118), _IO_U_(119), | 408 | |
463 | 409 | PORT_DATA_IO_PU(60), PORT_DATA_IO_PU(61), | |
464 | _IO_U_(120), _IO__D(121), _IO__D(122), _IO__D(123), _IO__D(124), | 410 | PORT_DATA_IO(62), PORT_DATA_O(63), |
465 | _IO__D(125), _IO__D(126), _IO__D(127), _IO__D(128), _IO_UD(129), | 411 | PORT_DATA_O(64), PORT_DATA_IO_PU(65), |
466 | 412 | PORT_DATA_O(66), PORT_DATA_IO_PU(67), /*66?*/ | |
467 | _IO_UD(130), _IO_UD(131), _IO_UD(132), _IO_UD(133), _IO_UD(134), | 413 | PORT_DATA_O(68), PORT_DATA_IO(69), |
468 | _IO_UD(135), _IO__D(136), _IO__D(137), _IO__D(138), _IO__D(139), | 414 | |
469 | 415 | PORT_DATA_IO(70), PORT_DATA_IO(71), | |
470 | _IO__D(140), _IO__D(141), _IO__D(142), _IO_UD(143), _IO__D(144), | 416 | PORT_DATA_O(72), PORT_DATA_I_PU(73), |
471 | _IO__D(145), _IO__D(146), _IO__D(147), _IO__D(148), _IO__D(149), | 417 | PORT_DATA_I_PU_PD(74), PORT_DATA_IO_PU_PD(75), |
472 | 418 | PORT_DATA_IO_PU_PD(76), PORT_DATA_IO_PU_PD(77), | |
473 | _IO__D(150), _IO__D(151), _IO_UD(152), _I___D(153), _IO_UD(154), | 419 | PORT_DATA_IO_PU_PD(78), PORT_DATA_IO_PU_PD(79), |
474 | _I___D(155), _IO__D(156), _IO__D(157), _I___D(158), _IO__D(159), | 420 | |
475 | 421 | PORT_DATA_IO_PU_PD(80), PORT_DATA_IO_PU_PD(81), | |
476 | __O___(160), _IO__D(161), _IO__D(162), _IO__D(163), _I___D(164), | 422 | PORT_DATA_IO_PU_PD(82), PORT_DATA_IO_PU_PD(83), |
477 | _IO__D(165), _I___D(166), _I___D(167), _I___D(168), _I___D(169), | 423 | PORT_DATA_IO_PU_PD(84), PORT_DATA_IO_PU_PD(85), |
478 | 424 | PORT_DATA_IO_PU_PD(86), PORT_DATA_IO_PU_PD(87), | |
479 | _I___D(170), __O___(171), _IO_UD(172), _IO_UD(173), _IO_UD(174), | 425 | PORT_DATA_IO_PU_PD(88), PORT_DATA_IO_PU_PD(89), |
480 | _IO_UD(175), _IO_UD(176), _IO_UD(177), _IO_UD(178), __O___(179), | 426 | |
481 | 427 | PORT_DATA_IO_PU_PD(90), PORT_DATA_IO_PU_PD(91), | |
482 | _IO_UD(180), _IO_UD(181), _IO_UD(182), _IO_UD(183), _IO_UD(184), | 428 | PORT_DATA_IO_PU_PD(92), PORT_DATA_IO_PU_PD(93), |
483 | __O___(185), _IO_UD(186), _IO_UD(187), _IO_UD(188), _IO_UD(189), | 429 | PORT_DATA_IO_PU_PD(94), PORT_DATA_IO_PU_PD(95), |
484 | 430 | PORT_DATA_IO_PU(96), PORT_DATA_IO_PU_PD(97), | |
485 | _IO_UD(190), | 431 | PORT_DATA_IO_PU_PD(98), PORT_DATA_O(99), /*99?*/ |
432 | |||
433 | PORT_DATA_IO_PD(100), PORT_DATA_IO_PD(101), | ||
434 | PORT_DATA_IO_PD(102), PORT_DATA_IO_PD(103), | ||
435 | PORT_DATA_IO_PD(104), PORT_DATA_IO_PD(105), | ||
436 | PORT_DATA_IO_PU(106), PORT_DATA_IO_PU(107), | ||
437 | PORT_DATA_IO_PU(108), PORT_DATA_IO_PU(109), | ||
438 | |||
439 | PORT_DATA_IO_PU(110), PORT_DATA_IO_PU(111), | ||
440 | PORT_DATA_IO_PD(112), PORT_DATA_IO_PD(113), | ||
441 | PORT_DATA_IO_PU(114), PORT_DATA_IO_PU(115), | ||
442 | PORT_DATA_IO_PU(116), PORT_DATA_IO_PU(117), | ||
443 | PORT_DATA_IO_PU(118), PORT_DATA_IO_PU(119), | ||
444 | |||
445 | PORT_DATA_IO_PU(120), PORT_DATA_IO_PD(121), | ||
446 | PORT_DATA_IO_PD(122), PORT_DATA_IO_PD(123), | ||
447 | PORT_DATA_IO_PD(124), PORT_DATA_IO_PD(125), | ||
448 | PORT_DATA_IO_PD(126), PORT_DATA_IO_PD(127), | ||
449 | PORT_DATA_IO_PD(128), PORT_DATA_IO_PU_PD(129), | ||
450 | |||
451 | PORT_DATA_IO_PU_PD(130), PORT_DATA_IO_PU_PD(131), | ||
452 | PORT_DATA_IO_PU_PD(132), PORT_DATA_IO_PU_PD(133), | ||
453 | PORT_DATA_IO_PU_PD(134), PORT_DATA_IO_PU_PD(135), | ||
454 | PORT_DATA_IO_PD(136), PORT_DATA_IO_PD(137), | ||
455 | PORT_DATA_IO_PD(138), PORT_DATA_IO_PD(139), | ||
456 | |||
457 | PORT_DATA_IO_PD(140), PORT_DATA_IO_PD(141), | ||
458 | PORT_DATA_IO_PD(142), PORT_DATA_IO_PU_PD(143), | ||
459 | PORT_DATA_IO_PD(144), PORT_DATA_IO_PD(145), | ||
460 | PORT_DATA_IO_PD(146), PORT_DATA_IO_PD(147), | ||
461 | PORT_DATA_IO_PD(148), PORT_DATA_IO_PD(149), | ||
462 | |||
463 | PORT_DATA_IO_PD(150), PORT_DATA_IO_PD(151), | ||
464 | PORT_DATA_IO_PU_PD(152), PORT_DATA_I_PD(153), | ||
465 | PORT_DATA_IO_PU_PD(154), PORT_DATA_I_PD(155), | ||
466 | PORT_DATA_IO_PD(156), PORT_DATA_IO_PD(157), | ||
467 | PORT_DATA_I_PD(158), PORT_DATA_IO_PD(159), | ||
468 | |||
469 | PORT_DATA_O(160), PORT_DATA_IO_PD(161), | ||
470 | PORT_DATA_IO_PD(162), PORT_DATA_IO_PD(163), | ||
471 | PORT_DATA_I_PD(164), PORT_DATA_IO_PD(165), | ||
472 | PORT_DATA_I_PD(166), PORT_DATA_I_PD(167), | ||
473 | PORT_DATA_I_PD(168), PORT_DATA_I_PD(169), | ||
474 | |||
475 | PORT_DATA_I_PD(170), PORT_DATA_O(171), | ||
476 | PORT_DATA_IO_PU_PD(172), PORT_DATA_IO_PU_PD(173), | ||
477 | PORT_DATA_IO_PU_PD(174), PORT_DATA_IO_PU_PD(175), | ||
478 | PORT_DATA_IO_PU_PD(176), PORT_DATA_IO_PU_PD(177), | ||
479 | PORT_DATA_IO_PU_PD(178), PORT_DATA_O(179), | ||
480 | |||
481 | PORT_DATA_IO_PU_PD(180), PORT_DATA_IO_PU_PD(181), | ||
482 | PORT_DATA_IO_PU_PD(182), PORT_DATA_IO_PU_PD(183), | ||
483 | PORT_DATA_IO_PU_PD(184), PORT_DATA_O(185), | ||
484 | PORT_DATA_IO_PU_PD(186), PORT_DATA_IO_PU_PD(187), | ||
485 | PORT_DATA_IO_PU_PD(188), PORT_DATA_IO_PU_PD(189), | ||
486 | |||
487 | PORT_DATA_IO_PU_PD(190), | ||
486 | 488 | ||
487 | /* IRQ */ | 489 | /* IRQ */ |
488 | PINMUX_DATA(IRQ0_6_MARK, PORT6_FN0, MSEL1CR_0_0), | 490 | PINMUX_DATA(IRQ0_6_MARK, PORT6_FN0, MSEL1CR_0_0), |
@@ -926,10 +928,6 @@ static pinmux_enum_t pinmux_data[] = { | |||
926 | PINMUX_DATA(MFIv4_MARK, MSEL4CR_6_1), | 928 | PINMUX_DATA(MFIv4_MARK, MSEL4CR_6_1), |
927 | }; | 929 | }; |
928 | 930 | ||
929 | #define _GPIO_PORT(pfx, sfx) PINMUX_GPIO(GPIO_PORT##pfx, PORT##pfx##_DATA) | ||
930 | #define GPIO_PORT_ALL() _190(_GPIO_PORT, , unused) | ||
931 | #define GPIO_FN(str) PINMUX_GPIO(GPIO_FN_##str, str##_MARK) | ||
932 | |||
933 | static struct pinmux_gpio pinmux_gpios[] = { | 931 | static struct pinmux_gpio pinmux_gpios[] = { |
934 | 932 | ||
935 | /* PORT */ | 933 | /* PORT */ |
@@ -1201,22 +1199,6 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
1201 | GPIO_FN(SDENC_DV_CLKI), | 1199 | GPIO_FN(SDENC_DV_CLKI), |
1202 | }; | 1200 | }; |
1203 | 1201 | ||
1204 | /* helper for top 4 bits in PORTnCR */ | ||
1205 | #define PCRH(in, in_pd, in_pu, out) \ | ||
1206 | 0, (out), (in), 0, \ | ||
1207 | 0, 0, 0, 0, \ | ||
1208 | 0, 0, (in_pd), 0, \ | ||
1209 | 0, 0, (in_pu), 0 | ||
1210 | |||
1211 | #define PORTCR(nr, reg) \ | ||
1212 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
1213 | PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
1214 | PORT##nr##_IN_PU, PORT##nr##_OUT), \ | ||
1215 | PORT##nr##_FN0, PORT##nr##_FN1, PORT##nr##_FN2, \ | ||
1216 | PORT##nr##_FN3, PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
1217 | PORT##nr##_FN6, PORT##nr##_FN7 } \ | ||
1218 | } | ||
1219 | |||
1220 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 1202 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
1221 | PORTCR(0, 0xE6051000), /* PORT0CR */ | 1203 | PORTCR(0, 0xE6051000), /* PORT0CR */ |
1222 | PORTCR(1, 0xE6051001), /* PORT1CR */ | 1204 | PORTCR(1, 0xE6051001), /* PORT1CR */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh7377.c b/arch/arm/mach-shmobile/pfc-sh7377.c index 613e6842ad05..2f10511946ad 100644 --- a/arch/arm/mach-shmobile/pfc-sh7377.c +++ b/arch/arm/mach-shmobile/pfc-sh7377.c | |||
@@ -22,84 +22,65 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <mach/sh7377.h> | 23 | #include <mach/sh7377.h> |
24 | 24 | ||
25 | #define _1(fn, pfx, sfx) fn(pfx, sfx) | 25 | #define CPU_ALL_PORT(fn, pfx, sfx) \ |
26 | 26 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | |
27 | #define _10(fn, pfx, sfx) \ | 27 | PORT_10(fn, pfx##10, sfx), \ |
28 | _1(fn, pfx##0, sfx), _1(fn, pfx##1, sfx), \ | 28 | PORT_1(fn, pfx##110, sfx), PORT_1(fn, pfx##111, sfx), \ |
29 | _1(fn, pfx##2, sfx), _1(fn, pfx##3, sfx), \ | 29 | PORT_1(fn, pfx##112, sfx), PORT_1(fn, pfx##113, sfx), \ |
30 | _1(fn, pfx##4, sfx), _1(fn, pfx##5, sfx), \ | 30 | PORT_1(fn, pfx##114, sfx), PORT_1(fn, pfx##115, sfx), \ |
31 | _1(fn, pfx##6, sfx), _1(fn, pfx##7, sfx), \ | 31 | PORT_1(fn, pfx##116, sfx), PORT_1(fn, pfx##117, sfx), \ |
32 | _1(fn, pfx##8, sfx), _1(fn, pfx##9, sfx) | 32 | PORT_1(fn, pfx##118, sfx), \ |
33 | 33 | PORT_1(fn, pfx##128, sfx), PORT_1(fn, pfx##129, sfx), \ | |
34 | #define _90(fn, pfx, sfx) \ | 34 | PORT_10(fn, pfx##13, sfx), PORT_10(fn, pfx##14, sfx), \ |
35 | _10(fn, pfx##1, sfx), _10(fn, pfx##2, sfx), \ | 35 | PORT_10(fn, pfx##15, sfx), \ |
36 | _10(fn, pfx##3, sfx), _10(fn, pfx##4, sfx), \ | 36 | PORT_1(fn, pfx##160, sfx), PORT_1(fn, pfx##161, sfx), \ |
37 | _10(fn, pfx##5, sfx), _10(fn, pfx##6, sfx), \ | 37 | PORT_1(fn, pfx##162, sfx), PORT_1(fn, pfx##163, sfx), \ |
38 | _10(fn, pfx##7, sfx), _10(fn, pfx##8, sfx), \ | 38 | PORT_1(fn, pfx##164, sfx), \ |
39 | _10(fn, pfx##9, sfx) | 39 | PORT_1(fn, pfx##192, sfx), PORT_1(fn, pfx##193, sfx), \ |
40 | 40 | PORT_1(fn, pfx##194, sfx), PORT_1(fn, pfx##195, sfx), \ | |
41 | #define _265(fn, pfx, sfx) \ | 41 | PORT_1(fn, pfx##196, sfx), PORT_1(fn, pfx##197, sfx), \ |
42 | _10(fn, pfx, sfx), _90(fn, pfx, sfx), \ | 42 | PORT_1(fn, pfx##198, sfx), PORT_1(fn, pfx##199, sfx), \ |
43 | _10(fn, pfx##10, sfx), \ | 43 | PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \ |
44 | _1(fn, pfx##110, sfx), _1(fn, pfx##111, sfx), \ | 44 | PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \ |
45 | _1(fn, pfx##112, sfx), _1(fn, pfx##113, sfx), \ | 45 | PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \ |
46 | _1(fn, pfx##114, sfx), _1(fn, pfx##115, sfx), \ | 46 | PORT_1(fn, pfx##260, sfx), PORT_1(fn, pfx##261, sfx), \ |
47 | _1(fn, pfx##116, sfx), _1(fn, pfx##117, sfx), \ | 47 | PORT_1(fn, pfx##262, sfx), PORT_1(fn, pfx##263, sfx), \ |
48 | _1(fn, pfx##118, sfx), \ | 48 | PORT_1(fn, pfx##264, sfx) |
49 | _1(fn, pfx##128, sfx), _1(fn, pfx##129, sfx), \ | ||
50 | _10(fn, pfx##13, sfx), _10(fn, pfx##14, sfx), \ | ||
51 | _10(fn, pfx##15, sfx), \ | ||
52 | _1(fn, pfx##160, sfx), _1(fn, pfx##161, sfx), \ | ||
53 | _1(fn, pfx##162, sfx), _1(fn, pfx##163, sfx), \ | ||
54 | _1(fn, pfx##164, sfx), \ | ||
55 | _1(fn, pfx##192, sfx), _1(fn, pfx##193, sfx), \ | ||
56 | _1(fn, pfx##194, sfx), _1(fn, pfx##195, sfx), \ | ||
57 | _1(fn, pfx##196, sfx), _1(fn, pfx##197, sfx), \ | ||
58 | _1(fn, pfx##198, sfx), _1(fn, pfx##199, sfx), \ | ||
59 | _10(fn, pfx##20, sfx), _10(fn, pfx##21, sfx), \ | ||
60 | _10(fn, pfx##22, sfx), _10(fn, pfx##23, sfx), \ | ||
61 | _10(fn, pfx##24, sfx), _10(fn, pfx##25, sfx), \ | ||
62 | _1(fn, pfx##260, sfx), _1(fn, pfx##261, sfx), \ | ||
63 | _1(fn, pfx##262, sfx), _1(fn, pfx##263, sfx), \ | ||
64 | _1(fn, pfx##264, sfx) | ||
65 | |||
66 | #define _PORT(pfx, sfx) pfx##_##sfx | ||
67 | #define PORT_265(str) _265(_PORT, PORT, str) | ||
68 | 49 | ||
69 | enum { | 50 | enum { |
70 | PINMUX_RESERVED = 0, | 51 | PINMUX_RESERVED = 0, |
71 | 52 | ||
72 | PINMUX_DATA_BEGIN, | 53 | PINMUX_DATA_BEGIN, |
73 | PORT_265(DATA), /* PORT0_DATA -> PORT264_DATA */ | 54 | PORT_ALL(DATA), /* PORT0_DATA -> PORT264_DATA */ |
74 | PINMUX_DATA_END, | 55 | PINMUX_DATA_END, |
75 | 56 | ||
76 | PINMUX_INPUT_BEGIN, | 57 | PINMUX_INPUT_BEGIN, |
77 | PORT_265(IN), /* PORT0_IN -> PORT264_IN */ | 58 | PORT_ALL(IN), /* PORT0_IN -> PORT264_IN */ |
78 | PINMUX_INPUT_END, | 59 | PINMUX_INPUT_END, |
79 | 60 | ||
80 | PINMUX_INPUT_PULLUP_BEGIN, | 61 | PINMUX_INPUT_PULLUP_BEGIN, |
81 | PORT_265(IN_PU), /* PORT0_IN_PU -> PORT264_IN_PU */ | 62 | PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT264_IN_PU */ |
82 | PINMUX_INPUT_PULLUP_END, | 63 | PINMUX_INPUT_PULLUP_END, |
83 | 64 | ||
84 | PINMUX_INPUT_PULLDOWN_BEGIN, | 65 | PINMUX_INPUT_PULLDOWN_BEGIN, |
85 | PORT_265(IN_PD), /* PORT0_IN_PD -> PORT264_IN_PD */ | 66 | PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT264_IN_PD */ |
86 | PINMUX_INPUT_PULLDOWN_END, | 67 | PINMUX_INPUT_PULLDOWN_END, |
87 | 68 | ||
88 | PINMUX_OUTPUT_BEGIN, | 69 | PINMUX_OUTPUT_BEGIN, |
89 | PORT_265(OUT), /* PORT0_OUT -> PORT264_OUT */ | 70 | PORT_ALL(OUT), /* PORT0_OUT -> PORT264_OUT */ |
90 | PINMUX_OUTPUT_END, | 71 | PINMUX_OUTPUT_END, |
91 | 72 | ||
92 | PINMUX_FUNCTION_BEGIN, | 73 | PINMUX_FUNCTION_BEGIN, |
93 | PORT_265(FN_IN), /* PORT0_FN_IN -> PORT264_FN_IN */ | 74 | PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT264_FN_IN */ |
94 | PORT_265(FN_OUT), /* PORT0_FN_OUT -> PORT264_FN_OUT */ | 75 | PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT264_FN_OUT */ |
95 | PORT_265(FN0), /* PORT0_FN0 -> PORT264_FN0 */ | 76 | PORT_ALL(FN0), /* PORT0_FN0 -> PORT264_FN0 */ |
96 | PORT_265(FN1), /* PORT0_FN1 -> PORT264_FN1 */ | 77 | PORT_ALL(FN1), /* PORT0_FN1 -> PORT264_FN1 */ |
97 | PORT_265(FN2), /* PORT0_FN2 -> PORT264_FN2 */ | 78 | PORT_ALL(FN2), /* PORT0_FN2 -> PORT264_FN2 */ |
98 | PORT_265(FN3), /* PORT0_FN3 -> PORT264_FN3 */ | 79 | PORT_ALL(FN3), /* PORT0_FN3 -> PORT264_FN3 */ |
99 | PORT_265(FN4), /* PORT0_FN4 -> PORT264_FN4 */ | 80 | PORT_ALL(FN4), /* PORT0_FN4 -> PORT264_FN4 */ |
100 | PORT_265(FN5), /* PORT0_FN5 -> PORT264_FN5 */ | 81 | PORT_ALL(FN5), /* PORT0_FN5 -> PORT264_FN5 */ |
101 | PORT_265(FN6), /* PORT0_FN6 -> PORT264_FN6 */ | 82 | PORT_ALL(FN6), /* PORT0_FN6 -> PORT264_FN6 */ |
102 | PORT_265(FN7), /* PORT0_FN7 -> PORT264_FN7 */ | 83 | PORT_ALL(FN7), /* PORT0_FN7 -> PORT264_FN7 */ |
103 | 84 | ||
104 | MSELBCR_MSEL17_1, MSELBCR_MSEL17_0, | 85 | MSELBCR_MSEL17_1, MSELBCR_MSEL17_0, |
105 | MSELBCR_MSEL16_1, MSELBCR_MSEL16_0, | 86 | MSELBCR_MSEL16_1, MSELBCR_MSEL16_0, |
@@ -360,45 +341,6 @@ enum { | |||
360 | PINMUX_MARK_END, | 341 | PINMUX_MARK_END, |
361 | }; | 342 | }; |
362 | 343 | ||
363 | #define PORT_DATA_I(nr) \ | ||
364 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | ||
365 | |||
366 | #define PORT_DATA_I_PD(nr) \ | ||
367 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
368 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
369 | |||
370 | #define PORT_DATA_I_PU(nr) \ | ||
371 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
372 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
373 | |||
374 | #define PORT_DATA_I_PU_PD(nr) \ | ||
375 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
376 | PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
377 | PORT##nr##_IN_PU) | ||
378 | |||
379 | #define PORT_DATA_O(nr) \ | ||
380 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
381 | PORT##nr##_OUT) | ||
382 | |||
383 | #define PORT_DATA_IO(nr) \ | ||
384 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
385 | PORT##nr##_OUT, PORT##nr##_IN) | ||
386 | |||
387 | #define PORT_DATA_IO_PD(nr) \ | ||
388 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
389 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
390 | PORT##nr##_IN_PD) | ||
391 | |||
392 | #define PORT_DATA_IO_PU(nr) \ | ||
393 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
394 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
395 | PORT##nr##_IN_PU) | ||
396 | |||
397 | #define PORT_DATA_IO_PU_PD(nr) \ | ||
398 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
399 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
400 | PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
401 | |||
402 | static pinmux_enum_t pinmux_data[] = { | 344 | static pinmux_enum_t pinmux_data[] = { |
403 | /* specify valid pin states for each pin in GPIO mode */ | 345 | /* specify valid pin states for each pin in GPIO mode */ |
404 | /* 55-1 (GPIO) */ | 346 | /* 55-1 (GPIO) */ |
@@ -1078,13 +1020,9 @@ static pinmux_enum_t pinmux_data[] = { | |||
1078 | PINMUX_DATA(RESETOUTS_MARK, PORT264_FN1), | 1020 | PINMUX_DATA(RESETOUTS_MARK, PORT264_FN1), |
1079 | }; | 1021 | }; |
1080 | 1022 | ||
1081 | #define _GPIO_PORT(pfx, sfx) PINMUX_GPIO(GPIO_PORT##pfx, PORT##pfx##_DATA) | ||
1082 | #define GPIO_PORT_265() _265(_GPIO_PORT, , unused) | ||
1083 | #define GPIO_FN(str) PINMUX_GPIO(GPIO_FN_##str, str##_MARK) | ||
1084 | |||
1085 | static struct pinmux_gpio pinmux_gpios[] = { | 1023 | static struct pinmux_gpio pinmux_gpios[] = { |
1086 | /* 55-1 -> 55-5 (GPIO) */ | 1024 | /* 55-1 -> 55-5 (GPIO) */ |
1087 | GPIO_PORT_265(), | 1025 | GPIO_PORT_ALL(), |
1088 | 1026 | ||
1089 | /* Special Pull-up / Pull-down Functions */ | 1027 | /* Special Pull-up / Pull-down Functions */ |
1090 | GPIO_FN(PORT66_KEYIN0_PU), GPIO_FN(PORT67_KEYIN1_PU), | 1028 | GPIO_FN(PORT66_KEYIN0_PU), GPIO_FN(PORT67_KEYIN1_PU), |
@@ -1362,23 +1300,6 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
1362 | GPIO_FN(RESETOUTS), | 1300 | GPIO_FN(RESETOUTS), |
1363 | }; | 1301 | }; |
1364 | 1302 | ||
1365 | /* helper for top 4 bits in PORTnCR */ | ||
1366 | #define PCRH(in, in_pd, in_pu, out) \ | ||
1367 | 0, (out), (in), 0, \ | ||
1368 | 0, 0, 0, 0, \ | ||
1369 | 0, 0, (in_pd), 0, \ | ||
1370 | 0, 0, (in_pu), 0 | ||
1371 | |||
1372 | #define PORTCR(nr, reg) \ | ||
1373 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
1374 | PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
1375 | PORT##nr##_IN_PU, PORT##nr##_OUT), \ | ||
1376 | PORT##nr##_FN0, PORT##nr##_FN1, \ | ||
1377 | PORT##nr##_FN2, PORT##nr##_FN3, \ | ||
1378 | PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
1379 | PORT##nr##_FN6, PORT##nr##_FN7 } \ | ||
1380 | } | ||
1381 | |||
1382 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 1303 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
1383 | PORTCR(0, 0xe6050000), /* PORT0CR */ | 1304 | PORTCR(0, 0xe6050000), /* PORT0CR */ |
1384 | PORTCR(1, 0xe6050001), /* PORT1CR */ | 1305 | PORTCR(1, 0xe6050001), /* PORT1CR */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh73a0.c b/arch/arm/mach-shmobile/pfc-sh73a0.c index 5abe02fbd6b9..e05634ce2e0d 100644 --- a/arch/arm/mach-shmobile/pfc-sh73a0.c +++ b/arch/arm/mach-shmobile/pfc-sh73a0.c | |||
@@ -24,83 +24,71 @@ | |||
24 | #include <mach/sh73a0.h> | 24 | #include <mach/sh73a0.h> |
25 | #include <mach/irqs.h> | 25 | #include <mach/irqs.h> |
26 | 26 | ||
27 | #define _1(fn, pfx, sfx) fn(pfx, sfx) | 27 | #define CPU_ALL_PORT(fn, pfx, sfx) \ |
28 | 28 | PORT_10(fn, pfx, sfx), PORT_10(fn, pfx##1, sfx), \ | |
29 | #define _10(fn, pfx, sfx) \ | 29 | PORT_10(fn, pfx##2, sfx), PORT_10(fn, pfx##3, sfx), \ |
30 | _1(fn, pfx##0, sfx), _1(fn, pfx##1, sfx), \ | 30 | PORT_10(fn, pfx##4, sfx), PORT_10(fn, pfx##5, sfx), \ |
31 | _1(fn, pfx##2, sfx), _1(fn, pfx##3, sfx), \ | 31 | PORT_10(fn, pfx##6, sfx), PORT_10(fn, pfx##7, sfx), \ |
32 | _1(fn, pfx##4, sfx), _1(fn, pfx##5, sfx), \ | 32 | PORT_10(fn, pfx##8, sfx), PORT_10(fn, pfx##9, sfx), \ |
33 | _1(fn, pfx##6, sfx), _1(fn, pfx##7, sfx), \ | 33 | PORT_10(fn, pfx##10, sfx), \ |
34 | _1(fn, pfx##8, sfx), _1(fn, pfx##9, sfx) | 34 | PORT_1(fn, pfx##110, sfx), PORT_1(fn, pfx##111, sfx), \ |
35 | 35 | PORT_1(fn, pfx##112, sfx), PORT_1(fn, pfx##113, sfx), \ | |
36 | #define _310(fn, pfx, sfx) \ | 36 | PORT_1(fn, pfx##114, sfx), PORT_1(fn, pfx##115, sfx), \ |
37 | _10(fn, pfx, sfx), _10(fn, pfx##1, sfx), \ | 37 | PORT_1(fn, pfx##116, sfx), PORT_1(fn, pfx##117, sfx), \ |
38 | _10(fn, pfx##2, sfx), _10(fn, pfx##3, sfx), \ | 38 | PORT_1(fn, pfx##118, sfx), \ |
39 | _10(fn, pfx##4, sfx), _10(fn, pfx##5, sfx), \ | 39 | PORT_1(fn, pfx##128, sfx), PORT_1(fn, pfx##129, sfx), \ |
40 | _10(fn, pfx##6, sfx), _10(fn, pfx##7, sfx), \ | 40 | PORT_10(fn, pfx##13, sfx), PORT_10(fn, pfx##14, sfx), \ |
41 | _10(fn, pfx##8, sfx), _10(fn, pfx##9, sfx), \ | 41 | PORT_10(fn, pfx##15, sfx), \ |
42 | _10(fn, pfx##10, sfx), \ | 42 | PORT_1(fn, pfx##160, sfx), PORT_1(fn, pfx##161, sfx), \ |
43 | _1(fn, pfx##110, sfx), _1(fn, pfx##111, sfx), \ | 43 | PORT_1(fn, pfx##162, sfx), PORT_1(fn, pfx##163, sfx), \ |
44 | _1(fn, pfx##112, sfx), _1(fn, pfx##113, sfx), \ | 44 | PORT_1(fn, pfx##164, sfx), \ |
45 | _1(fn, pfx##114, sfx), _1(fn, pfx##115, sfx), \ | 45 | PORT_1(fn, pfx##192, sfx), PORT_1(fn, pfx##193, sfx), \ |
46 | _1(fn, pfx##116, sfx), _1(fn, pfx##117, sfx), \ | 46 | PORT_1(fn, pfx##194, sfx), PORT_1(fn, pfx##195, sfx), \ |
47 | _1(fn, pfx##118, sfx), \ | 47 | PORT_1(fn, pfx##196, sfx), PORT_1(fn, pfx##197, sfx), \ |
48 | _1(fn, pfx##128, sfx), _1(fn, pfx##129, sfx), \ | 48 | PORT_1(fn, pfx##198, sfx), PORT_1(fn, pfx##199, sfx), \ |
49 | _10(fn, pfx##13, sfx), _10(fn, pfx##14, sfx), \ | 49 | PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \ |
50 | _10(fn, pfx##15, sfx), \ | 50 | PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \ |
51 | _1(fn, pfx##160, sfx), _1(fn, pfx##161, sfx), \ | 51 | PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \ |
52 | _1(fn, pfx##162, sfx), _1(fn, pfx##163, sfx), \ | 52 | PORT_10(fn, pfx##26, sfx), PORT_10(fn, pfx##27, sfx), \ |
53 | _1(fn, pfx##164, sfx), \ | 53 | PORT_1(fn, pfx##280, sfx), PORT_1(fn, pfx##281, sfx), \ |
54 | _1(fn, pfx##192, sfx), _1(fn, pfx##193, sfx), \ | 54 | PORT_1(fn, pfx##282, sfx), \ |
55 | _1(fn, pfx##194, sfx), _1(fn, pfx##195, sfx), \ | 55 | PORT_1(fn, pfx##288, sfx), PORT_1(fn, pfx##289, sfx), \ |
56 | _1(fn, pfx##196, sfx), _1(fn, pfx##197, sfx), \ | 56 | PORT_10(fn, pfx##29, sfx), PORT_10(fn, pfx##30, sfx) |
57 | _1(fn, pfx##198, sfx), _1(fn, pfx##199, sfx), \ | ||
58 | _10(fn, pfx##20, sfx), _10(fn, pfx##21, sfx), \ | ||
59 | _10(fn, pfx##22, sfx), _10(fn, pfx##23, sfx), \ | ||
60 | _10(fn, pfx##24, sfx), _10(fn, pfx##25, sfx), \ | ||
61 | _10(fn, pfx##26, sfx), _10(fn, pfx##27, sfx), \ | ||
62 | _1(fn, pfx##280, sfx), _1(fn, pfx##281, sfx), \ | ||
63 | _1(fn, pfx##282, sfx), \ | ||
64 | _1(fn, pfx##288, sfx), _1(fn, pfx##289, sfx), \ | ||
65 | _10(fn, pfx##29, sfx), _10(fn, pfx##30, sfx) | ||
66 | |||
67 | #define _PORT(pfx, sfx) pfx##_##sfx | ||
68 | #define PORT_310(str) _310(_PORT, PORT, str) | ||
69 | 57 | ||
70 | enum { | 58 | enum { |
71 | PINMUX_RESERVED = 0, | 59 | PINMUX_RESERVED = 0, |
72 | 60 | ||
73 | PINMUX_DATA_BEGIN, | 61 | PINMUX_DATA_BEGIN, |
74 | PORT_310(DATA), /* PORT0_DATA -> PORT309_DATA */ | 62 | PORT_ALL(DATA), /* PORT0_DATA -> PORT309_DATA */ |
75 | PINMUX_DATA_END, | 63 | PINMUX_DATA_END, |
76 | 64 | ||
77 | PINMUX_INPUT_BEGIN, | 65 | PINMUX_INPUT_BEGIN, |
78 | PORT_310(IN), /* PORT0_IN -> PORT309_IN */ | 66 | PORT_ALL(IN), /* PORT0_IN -> PORT309_IN */ |
79 | PINMUX_INPUT_END, | 67 | PINMUX_INPUT_END, |
80 | 68 | ||
81 | PINMUX_INPUT_PULLUP_BEGIN, | 69 | PINMUX_INPUT_PULLUP_BEGIN, |
82 | PORT_310(IN_PU), /* PORT0_IN_PU -> PORT309_IN_PU */ | 70 | PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT309_IN_PU */ |
83 | PINMUX_INPUT_PULLUP_END, | 71 | PINMUX_INPUT_PULLUP_END, |
84 | 72 | ||
85 | PINMUX_INPUT_PULLDOWN_BEGIN, | 73 | PINMUX_INPUT_PULLDOWN_BEGIN, |
86 | PORT_310(IN_PD), /* PORT0_IN_PD -> PORT309_IN_PD */ | 74 | PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT309_IN_PD */ |
87 | PINMUX_INPUT_PULLDOWN_END, | 75 | PINMUX_INPUT_PULLDOWN_END, |
88 | 76 | ||
89 | PINMUX_OUTPUT_BEGIN, | 77 | PINMUX_OUTPUT_BEGIN, |
90 | PORT_310(OUT), /* PORT0_OUT -> PORT309_OUT */ | 78 | PORT_ALL(OUT), /* PORT0_OUT -> PORT309_OUT */ |
91 | PINMUX_OUTPUT_END, | 79 | PINMUX_OUTPUT_END, |
92 | 80 | ||
93 | PINMUX_FUNCTION_BEGIN, | 81 | PINMUX_FUNCTION_BEGIN, |
94 | PORT_310(FN_IN), /* PORT0_FN_IN -> PORT309_FN_IN */ | 82 | PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT309_FN_IN */ |
95 | PORT_310(FN_OUT), /* PORT0_FN_OUT -> PORT309_FN_OUT */ | 83 | PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT309_FN_OUT */ |
96 | PORT_310(FN0), /* PORT0_FN0 -> PORT309_FN0 */ | 84 | PORT_ALL(FN0), /* PORT0_FN0 -> PORT309_FN0 */ |
97 | PORT_310(FN1), /* PORT0_FN1 -> PORT309_FN1 */ | 85 | PORT_ALL(FN1), /* PORT0_FN1 -> PORT309_FN1 */ |
98 | PORT_310(FN2), /* PORT0_FN2 -> PORT309_FN2 */ | 86 | PORT_ALL(FN2), /* PORT0_FN2 -> PORT309_FN2 */ |
99 | PORT_310(FN3), /* PORT0_FN3 -> PORT309_FN3 */ | 87 | PORT_ALL(FN3), /* PORT0_FN3 -> PORT309_FN3 */ |
100 | PORT_310(FN4), /* PORT0_FN4 -> PORT309_FN4 */ | 88 | PORT_ALL(FN4), /* PORT0_FN4 -> PORT309_FN4 */ |
101 | PORT_310(FN5), /* PORT0_FN5 -> PORT309_FN5 */ | 89 | PORT_ALL(FN5), /* PORT0_FN5 -> PORT309_FN5 */ |
102 | PORT_310(FN6), /* PORT0_FN6 -> PORT309_FN6 */ | 90 | PORT_ALL(FN6), /* PORT0_FN6 -> PORT309_FN6 */ |
103 | PORT_310(FN7), /* PORT0_FN7 -> PORT309_FN7 */ | 91 | PORT_ALL(FN7), /* PORT0_FN7 -> PORT309_FN7 */ |
104 | 92 | ||
105 | MSEL2CR_MSEL19_0, MSEL2CR_MSEL19_1, | 93 | MSEL2CR_MSEL19_0, MSEL2CR_MSEL19_1, |
106 | MSEL2CR_MSEL18_0, MSEL2CR_MSEL18_1, | 94 | MSEL2CR_MSEL18_0, MSEL2CR_MSEL18_1, |
@@ -508,6 +496,14 @@ enum { | |||
508 | SDHICMD2_PU_MARK, | 496 | SDHICMD2_PU_MARK, |
509 | MMCCMD0_PU_MARK, | 497 | MMCCMD0_PU_MARK, |
510 | MMCCMD1_PU_MARK, | 498 | MMCCMD1_PU_MARK, |
499 | MMCD0_0_PU_MARK, | ||
500 | MMCD0_1_PU_MARK, | ||
501 | MMCD0_2_PU_MARK, | ||
502 | MMCD0_3_PU_MARK, | ||
503 | MMCD0_4_PU_MARK, | ||
504 | MMCD0_5_PU_MARK, | ||
505 | MMCD0_6_PU_MARK, | ||
506 | MMCD0_7_PU_MARK, | ||
511 | FSIBISLD_PU_MARK, | 507 | FSIBISLD_PU_MARK, |
512 | FSIACK_PU_MARK, | 508 | FSIACK_PU_MARK, |
513 | FSIAILR_PU_MARK, | 509 | FSIAILR_PU_MARK, |
@@ -517,45 +513,6 @@ enum { | |||
517 | PINMUX_MARK_END, | 513 | PINMUX_MARK_END, |
518 | }; | 514 | }; |
519 | 515 | ||
520 | #define PORT_DATA_I(nr) \ | ||
521 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | ||
522 | |||
523 | #define PORT_DATA_I_PD(nr) \ | ||
524 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
525 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
526 | |||
527 | #define PORT_DATA_I_PU(nr) \ | ||
528 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
529 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
530 | |||
531 | #define PORT_DATA_I_PU_PD(nr) \ | ||
532 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
533 | PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
534 | PORT##nr##_IN_PU) | ||
535 | |||
536 | #define PORT_DATA_O(nr) \ | ||
537 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
538 | PORT##nr##_OUT) | ||
539 | |||
540 | #define PORT_DATA_IO(nr) \ | ||
541 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
542 | PORT##nr##_OUT, PORT##nr##_IN) | ||
543 | |||
544 | #define PORT_DATA_IO_PD(nr) \ | ||
545 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
546 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
547 | PORT##nr##_IN_PD) | ||
548 | |||
549 | #define PORT_DATA_IO_PU(nr) \ | ||
550 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
551 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
552 | PORT##nr##_IN_PU) | ||
553 | |||
554 | #define PORT_DATA_IO_PU_PD(nr) \ | ||
555 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
556 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
557 | PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
558 | |||
559 | static pinmux_enum_t pinmux_data[] = { | 516 | static pinmux_enum_t pinmux_data[] = { |
560 | /* specify valid pin states for each pin in GPIO mode */ | 517 | /* specify valid pin states for each pin in GPIO mode */ |
561 | 518 | ||
@@ -1561,6 +1518,24 @@ static pinmux_enum_t pinmux_data[] = { | |||
1561 | MSEL4CR_MSEL15_0), | 1518 | MSEL4CR_MSEL15_0), |
1562 | PINMUX_DATA(MMCCMD1_PU_MARK, PORT297_FN2, PORT297_IN_PU, | 1519 | PINMUX_DATA(MMCCMD1_PU_MARK, PORT297_FN2, PORT297_IN_PU, |
1563 | MSEL4CR_MSEL15_1), | 1520 | MSEL4CR_MSEL15_1), |
1521 | |||
1522 | PINMUX_DATA(MMCD0_0_PU_MARK, | ||
1523 | PORT271_FN1, PORT271_IN_PU, MSEL4CR_MSEL15_0), | ||
1524 | PINMUX_DATA(MMCD0_1_PU_MARK, | ||
1525 | PORT272_FN1, PORT272_IN_PU, MSEL4CR_MSEL15_0), | ||
1526 | PINMUX_DATA(MMCD0_2_PU_MARK, | ||
1527 | PORT273_FN1, PORT273_IN_PU, MSEL4CR_MSEL15_0), | ||
1528 | PINMUX_DATA(MMCD0_3_PU_MARK, | ||
1529 | PORT274_FN1, PORT274_IN_PU, MSEL4CR_MSEL15_0), | ||
1530 | PINMUX_DATA(MMCD0_4_PU_MARK, | ||
1531 | PORT275_FN1, PORT275_IN_PU, MSEL4CR_MSEL15_0), | ||
1532 | PINMUX_DATA(MMCD0_5_PU_MARK, | ||
1533 | PORT276_FN1, PORT276_IN_PU, MSEL4CR_MSEL15_0), | ||
1534 | PINMUX_DATA(MMCD0_6_PU_MARK, | ||
1535 | PORT277_FN1, PORT277_IN_PU, MSEL4CR_MSEL15_0), | ||
1536 | PINMUX_DATA(MMCD0_7_PU_MARK, | ||
1537 | PORT278_FN1, PORT278_IN_PU, MSEL4CR_MSEL15_0), | ||
1538 | |||
1564 | PINMUX_DATA(FSIBISLD_PU_MARK, PORT39_FN1, PORT39_IN_PU), | 1539 | PINMUX_DATA(FSIBISLD_PU_MARK, PORT39_FN1, PORT39_IN_PU), |
1565 | PINMUX_DATA(FSIACK_PU_MARK, PORT49_FN1, PORT49_IN_PU), | 1540 | PINMUX_DATA(FSIACK_PU_MARK, PORT49_FN1, PORT49_IN_PU), |
1566 | PINMUX_DATA(FSIAILR_PU_MARK, PORT50_FN5, PORT50_IN_PU), | 1541 | PINMUX_DATA(FSIAILR_PU_MARK, PORT50_FN5, PORT50_IN_PU), |
@@ -1568,12 +1543,8 @@ static pinmux_enum_t pinmux_data[] = { | |||
1568 | PINMUX_DATA(FSIAISLD_PU_MARK, PORT55_FN1, PORT55_IN_PU), | 1543 | PINMUX_DATA(FSIAISLD_PU_MARK, PORT55_FN1, PORT55_IN_PU), |
1569 | }; | 1544 | }; |
1570 | 1545 | ||
1571 | #define _GPIO_PORT(pfx, sfx) PINMUX_GPIO(GPIO_PORT##pfx, PORT##pfx##_DATA) | ||
1572 | #define GPIO_PORT_310() _310(_GPIO_PORT, , unused) | ||
1573 | #define GPIO_FN(str) PINMUX_GPIO(GPIO_FN_##str, str##_MARK) | ||
1574 | |||
1575 | static struct pinmux_gpio pinmux_gpios[] = { | 1546 | static struct pinmux_gpio pinmux_gpios[] = { |
1576 | GPIO_PORT_310(), | 1547 | GPIO_PORT_ALL(), |
1577 | 1548 | ||
1578 | /* Table 25-1 (Functions 0-7) */ | 1549 | /* Table 25-1 (Functions 0-7) */ |
1579 | GPIO_FN(VBUS_0), | 1550 | GPIO_FN(VBUS_0), |
@@ -2236,24 +2207,20 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
2236 | GPIO_FN(SDHICMD2_PU), | 2207 | GPIO_FN(SDHICMD2_PU), |
2237 | GPIO_FN(MMCCMD0_PU), | 2208 | GPIO_FN(MMCCMD0_PU), |
2238 | GPIO_FN(MMCCMD1_PU), | 2209 | GPIO_FN(MMCCMD1_PU), |
2210 | GPIO_FN(MMCD0_0_PU), | ||
2211 | GPIO_FN(MMCD0_1_PU), | ||
2212 | GPIO_FN(MMCD0_2_PU), | ||
2213 | GPIO_FN(MMCD0_3_PU), | ||
2214 | GPIO_FN(MMCD0_4_PU), | ||
2215 | GPIO_FN(MMCD0_5_PU), | ||
2216 | GPIO_FN(MMCD0_6_PU), | ||
2217 | GPIO_FN(MMCD0_7_PU), | ||
2239 | GPIO_FN(FSIACK_PU), | 2218 | GPIO_FN(FSIACK_PU), |
2240 | GPIO_FN(FSIAILR_PU), | 2219 | GPIO_FN(FSIAILR_PU), |
2241 | GPIO_FN(FSIAIBT_PU), | 2220 | GPIO_FN(FSIAIBT_PU), |
2242 | GPIO_FN(FSIAISLD_PU), | 2221 | GPIO_FN(FSIAISLD_PU), |
2243 | }; | 2222 | }; |
2244 | 2223 | ||
2245 | #define PORTCR(nr, reg) \ | ||
2246 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
2247 | 0, \ | ||
2248 | /*0001*/ PORT##nr##_OUT , \ | ||
2249 | /*0010*/ PORT##nr##_IN , 0, 0, 0, 0, 0, 0, 0, \ | ||
2250 | /*1010*/ PORT##nr##_IN_PD, 0, 0, 0, \ | ||
2251 | /*1110*/ PORT##nr##_IN_PU, 0, \ | ||
2252 | PORT##nr##_FN0, PORT##nr##_FN1, PORT##nr##_FN2, \ | ||
2253 | PORT##nr##_FN3, PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
2254 | PORT##nr##_FN6, PORT##nr##_FN7, 0, 0, 0, 0, 0, 0, 0, 0 } \ | ||
2255 | } | ||
2256 | |||
2257 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 2224 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
2258 | PORTCR(0, 0xe6050000), /* PORT0CR */ | 2225 | PORTCR(0, 0xe6050000), /* PORT0CR */ |
2259 | PORTCR(1, 0xe6050001), /* PORT1CR */ | 2226 | PORTCR(1, 0xe6050001), /* PORT1CR */ |
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 79612737c5b2..0a5b22942fd3 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -402,22 +402,18 @@ static void sh7372_setup_a3sm(unsigned long msk, unsigned long msk2) | |||
402 | 402 | ||
403 | #ifdef CONFIG_CPU_IDLE | 403 | #ifdef CONFIG_CPU_IDLE |
404 | 404 | ||
405 | static void sh7372_cpuidle_setup(struct cpuidle_device *dev) | 405 | static void sh7372_cpuidle_setup(struct cpuidle_driver *drv) |
406 | { | 406 | { |
407 | struct cpuidle_state *state; | 407 | struct cpuidle_state *state = &drv->states[drv->state_count]; |
408 | int i = dev->state_count; | ||
409 | 408 | ||
410 | state = &dev->states[i]; | ||
411 | snprintf(state->name, CPUIDLE_NAME_LEN, "C2"); | 409 | snprintf(state->name, CPUIDLE_NAME_LEN, "C2"); |
412 | strncpy(state->desc, "Core Standby Mode", CPUIDLE_DESC_LEN); | 410 | strncpy(state->desc, "Core Standby Mode", CPUIDLE_DESC_LEN); |
413 | state->exit_latency = 10; | 411 | state->exit_latency = 10; |
414 | state->target_residency = 20 + 10; | 412 | state->target_residency = 20 + 10; |
415 | state->power_usage = 1; /* perhaps not */ | 413 | state->flags = CPUIDLE_FLAG_TIME_VALID; |
416 | state->flags = 0; | 414 | shmobile_cpuidle_modes[drv->state_count] = sh7372_enter_core_standby; |
417 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | ||
418 | shmobile_cpuidle_modes[i] = sh7372_enter_core_standby; | ||
419 | 415 | ||
420 | dev->state_count = i + 1; | 416 | drv->state_count++; |
421 | } | 417 | } |
422 | 418 | ||
423 | static void sh7372_cpuidle_init(void) | 419 | static void sh7372_cpuidle_init(void) |
diff --git a/arch/arm/mach-shmobile/pm_runtime.c b/arch/arm/mach-shmobile/pm_runtime.c deleted file mode 100644 index bd5c6a3b8c55..000000000000 --- a/arch/arm/mach-shmobile/pm_runtime.c +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shmobile/pm_runtime.c | ||
3 | * | ||
4 | * Runtime PM support code for SuperH Mobile ARM | ||
5 | * | ||
6 | * Copyright (C) 2009-2010 Magnus Damm | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/pm_runtime.h> | ||
17 | #include <linux/pm_domain.h> | ||
18 | #include <linux/pm_clock.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/clk.h> | ||
21 | #include <linux/sh_clk.h> | ||
22 | #include <linux/bitmap.h> | ||
23 | #include <linux/slab.h> | ||
24 | |||
25 | #ifdef CONFIG_PM_RUNTIME | ||
26 | |||
27 | static int default_platform_runtime_idle(struct device *dev) | ||
28 | { | ||
29 | /* suspend synchronously to disable clocks immediately */ | ||
30 | return pm_runtime_suspend(dev); | ||
31 | } | ||
32 | |||
33 | static struct dev_pm_domain default_pm_domain = { | ||
34 | .ops = { | ||
35 | .runtime_suspend = pm_clk_suspend, | ||
36 | .runtime_resume = pm_clk_resume, | ||
37 | .runtime_idle = default_platform_runtime_idle, | ||
38 | USE_PLATFORM_PM_SLEEP_OPS | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | #define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain) | ||
43 | |||
44 | #else | ||
45 | |||
46 | #define DEFAULT_PM_DOMAIN_PTR NULL | ||
47 | |||
48 | #endif /* CONFIG_PM_RUNTIME */ | ||
49 | |||
50 | static struct pm_clk_notifier_block platform_bus_notifier = { | ||
51 | .pm_domain = DEFAULT_PM_DOMAIN_PTR, | ||
52 | .con_ids = { NULL, }, | ||
53 | }; | ||
54 | |||
55 | static int __init sh_pm_runtime_init(void) | ||
56 | { | ||
57 | pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); | ||
58 | return 0; | ||
59 | } | ||
60 | core_initcall(sh_pm_runtime_init); | ||
61 | |||
62 | static int __init sh_pm_runtime_late_init(void) | ||
63 | { | ||
64 | pm_genpd_poweroff_unused(); | ||
65 | return 0; | ||
66 | } | ||
67 | late_initcall(sh_pm_runtime_late_init); | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/entry-macro.S b/arch/arm/mach-spear3xx/include/mach/entry-macro.S index 53da4224ba3d..de3bb41c8e9e 100644 --- a/arch/arm/mach-spear3xx/include/mach/entry-macro.S +++ b/arch/arm/mach-spear3xx/include/mach/entry-macro.S | |||
@@ -11,35 +11,8 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | .macro disable_fiq | 14 | .macro disable_fiq |
18 | .endm | 15 | .endm |
19 | 16 | ||
20 | .macro get_irqnr_preamble, base, tmp | ||
21 | .endm | ||
22 | |||
23 | .macro arch_ret_to_user, tmp1, tmp2 | 17 | .macro arch_ret_to_user, tmp1, tmp2 |
24 | .endm | 18 | .endm |
25 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
27 | ldr \base, =VA_SPEAR3XX_ML1_VIC_BASE | ||
28 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
29 | teq \irqstat, #0 | ||
30 | beq 1001f @ this will set/reset | ||
31 | @ zero register | ||
32 | /* | ||
33 | * Following code will find bit position of least significang | ||
34 | * bit set in irqstat, using following equation | ||
35 | * least significant bit set in n = (n & ~(n-1)) | ||
36 | */ | ||
37 | sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 | ||
38 | mvn \tmp, \tmp @ tmp = ~tmp | ||
39 | and \irqstat, \irqstat, \tmp @ irqstat &= tmp | ||
40 | /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ | ||
41 | clz \tmp, \irqstat @ tmp = leading zeros | ||
42 | rsb \irqnr, \tmp, #0x1F @ irqnr = 32 - tmp - 1 | ||
43 | |||
44 | 1001: /* EQ will be set if no irqs pending */ | ||
45 | .endm | ||
diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c index a5ff98eed1db..61068ba67923 100644 --- a/arch/arm/mach-spear3xx/spear300_evb.c +++ b/arch/arm/mach-spear3xx/spear300_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -67,6 +68,7 @@ MACHINE_START(SPEAR300, "ST-SPEAR300-EVB") | |||
67 | .atag_offset = 0x100, | 68 | .atag_offset = 0x100, |
68 | .map_io = spear3xx_map_io, | 69 | .map_io = spear3xx_map_io, |
69 | .init_irq = spear3xx_init_irq, | 70 | .init_irq = spear3xx_init_irq, |
71 | .handle_irq = vic_handle_irq, | ||
70 | .timer = &spear3xx_timer, | 72 | .timer = &spear3xx_timer, |
71 | .init_machine = spear300_evb_init, | 73 | .init_machine = spear300_evb_init, |
72 | MACHINE_END | 74 | MACHINE_END |
diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c index 45d180d59362..7903abe92bf6 100644 --- a/arch/arm/mach-spear3xx/spear310_evb.c +++ b/arch/arm/mach-spear3xx/spear310_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -73,6 +74,7 @@ MACHINE_START(SPEAR310, "ST-SPEAR310-EVB") | |||
73 | .atag_offset = 0x100, | 74 | .atag_offset = 0x100, |
74 | .map_io = spear3xx_map_io, | 75 | .map_io = spear3xx_map_io, |
75 | .init_irq = spear3xx_init_irq, | 76 | .init_irq = spear3xx_init_irq, |
77 | .handle_irq = vic_handle_irq, | ||
76 | .timer = &spear3xx_timer, | 78 | .timer = &spear3xx_timer, |
77 | .init_machine = spear310_evb_init, | 79 | .init_machine = spear310_evb_init, |
78 | MACHINE_END | 80 | MACHINE_END |
diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c index 22879848d73a..e9751f970933 100644 --- a/arch/arm/mach-spear3xx/spear320_evb.c +++ b/arch/arm/mach-spear3xx/spear320_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -71,6 +72,7 @@ MACHINE_START(SPEAR320, "ST-SPEAR320-EVB") | |||
71 | .atag_offset = 0x100, | 72 | .atag_offset = 0x100, |
72 | .map_io = spear3xx_map_io, | 73 | .map_io = spear3xx_map_io, |
73 | .init_irq = spear3xx_init_irq, | 74 | .init_irq = spear3xx_init_irq, |
75 | .handle_irq = vic_handle_irq, | ||
74 | .timer = &spear3xx_timer, | 76 | .timer = &spear3xx_timer, |
75 | .init_machine = spear320_evb_init, | 77 | .init_machine = spear320_evb_init, |
76 | MACHINE_END | 78 | MACHINE_END |
diff --git a/arch/arm/mach-spear6xx/include/mach/entry-macro.S b/arch/arm/mach-spear6xx/include/mach/entry-macro.S index 8a0b0ed7b203..d490a910d925 100644 --- a/arch/arm/mach-spear6xx/include/mach/entry-macro.S +++ b/arch/arm/mach-spear6xx/include/mach/entry-macro.S | |||
@@ -11,44 +11,8 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | .macro disable_fiq | 14 | .macro disable_fiq |
18 | .endm | 15 | .endm |
19 | 16 | ||
20 | .macro get_irqnr_preamble, base, tmp | ||
21 | .endm | ||
22 | |||
23 | .macro arch_ret_to_user, tmp1, tmp2 | 17 | .macro arch_ret_to_user, tmp1, tmp2 |
24 | .endm | 18 | .endm |
25 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
27 | ldr \base, =VA_SPEAR6XX_CPU_VIC_PRI_BASE | ||
28 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
29 | mov \irqnr, #0 | ||
30 | teq \irqstat, #0 | ||
31 | bne 1001f | ||
32 | ldr \base, =VA_SPEAR6XX_CPU_VIC_SEC_BASE | ||
33 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
34 | teq \irqstat, #0 | ||
35 | beq 1002f @ this will set/reset | ||
36 | @ zero register | ||
37 | mov \irqnr, #32 | ||
38 | 1001: | ||
39 | /* | ||
40 | * Following code will find bit position of least significang | ||
41 | * bit set in irqstat, using following equation | ||
42 | * least significant bit set in n = (n & ~(n-1)) | ||
43 | */ | ||
44 | sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 | ||
45 | mvn \tmp, \tmp @ tmp = ~tmp | ||
46 | and \irqstat, \irqstat, \tmp @ irqstat &= tmp | ||
47 | /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ | ||
48 | clz \tmp, \irqstat @ tmp = leading zeros | ||
49 | |||
50 | rsb \tmp, \tmp, #0x1F @ tmp = 32 - tmp - 1 | ||
51 | add \irqnr, \irqnr, \tmp | ||
52 | |||
53 | 1002: /* EQ will be set if no irqs pending */ | ||
54 | .endm | ||
diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c index 8238fe38e713..ff139ed0a61e 100644 --- a/arch/arm/mach-spear6xx/spear600_evb.c +++ b/arch/arm/mach-spear6xx/spear600_evb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware/vic.h> | ||
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
@@ -46,6 +47,7 @@ MACHINE_START(SPEAR600, "ST-SPEAR600-EVB") | |||
46 | .atag_offset = 0x100, | 47 | .atag_offset = 0x100, |
47 | .map_io = spear6xx_map_io, | 48 | .map_io = spear6xx_map_io, |
48 | .init_irq = spear6xx_init_irq, | 49 | .init_irq = spear6xx_init_irq, |
50 | .handle_irq = vic_handle_irq, | ||
49 | .timer = &spear6xx_timer, | 51 | .timer = &spear6xx_timer, |
50 | .init_machine = spear600_evb_init, | 52 | .init_machine = spear600_evb_init, |
51 | MACHINE_END | 53 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c index d368f8dafcfd..f6f03ce340fc 100644 --- a/arch/arm/mach-tegra/board-dt.c +++ b/arch/arm/mach-tegra/board-dt.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/i2c-tegra.h> | 33 | #include <linux/i2c-tegra.h> |
34 | 34 | ||
35 | #include <asm/hardware/gic.h> | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
37 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
@@ -101,6 +102,13 @@ static void __init tegra_dt_init(void) | |||
101 | 102 | ||
102 | tegra_clk_init_from_table(tegra_dt_clk_init_table); | 103 | tegra_clk_init_from_table(tegra_dt_clk_init_table); |
103 | 104 | ||
105 | /* | ||
106 | * Finished with the static registrations now; fill in the missing | ||
107 | * devices | ||
108 | */ | ||
109 | of_platform_populate(NULL, tegra_dt_match_table, | ||
110 | tegra20_auxdata_lookup, NULL); | ||
111 | |||
104 | for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) { | 112 | for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) { |
105 | if (of_machine_is_compatible(pinmux_configs[i].machine)) { | 113 | if (of_machine_is_compatible(pinmux_configs[i].machine)) { |
106 | pinmux_configs[i].init(); | 114 | pinmux_configs[i].init(); |
@@ -110,12 +118,6 @@ static void __init tegra_dt_init(void) | |||
110 | 118 | ||
111 | WARN(i == ARRAY_SIZE(pinmux_configs), | 119 | WARN(i == ARRAY_SIZE(pinmux_configs), |
112 | "Unknown platform! Pinmuxing not initialized\n"); | 120 | "Unknown platform! Pinmuxing not initialized\n"); |
113 | |||
114 | /* | ||
115 | * Finished with the static registrations now; fill in the missing | ||
116 | * devices | ||
117 | */ | ||
118 | of_platform_populate(NULL, tegra_dt_match_table, tegra20_auxdata_lookup, NULL); | ||
119 | } | 121 | } |
120 | 122 | ||
121 | static const char * tegra_dt_board_compat[] = { | 123 | static const char * tegra_dt_board_compat[] = { |
@@ -129,6 +131,7 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)") | |||
129 | .map_io = tegra_map_common_io, | 131 | .map_io = tegra_map_common_io, |
130 | .init_early = tegra_init_early, | 132 | .init_early = tegra_init_early, |
131 | .init_irq = tegra_init_irq, | 133 | .init_irq = tegra_init_irq, |
134 | .handle_irq = gic_handle_irq, | ||
132 | .timer = &tegra_timer, | 135 | .timer = &tegra_timer, |
133 | .init_machine = tegra_dt_init, | 136 | .init_machine = tegra_dt_init, |
134 | .dt_compat = tegra_dt_board_compat, | 137 | .dt_compat = tegra_dt_board_compat, |
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c index e99b45618cd0..7a4a26d5174c 100644 --- a/arch/arm/mach-tegra/board-harmony-pinmux.c +++ b/arch/arm/mach-tegra/board-harmony-pinmux.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/of.h> | ||
20 | |||
19 | #include <mach/pinmux.h> | 21 | #include <mach/pinmux.h> |
20 | 22 | ||
21 | #include "gpio-names.h" | 23 | #include "gpio-names.h" |
@@ -161,7 +163,9 @@ static struct tegra_gpio_table gpio_table[] = { | |||
161 | 163 | ||
162 | void harmony_pinmux_init(void) | 164 | void harmony_pinmux_init(void) |
163 | { | 165 | { |
164 | platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices)); | 166 | if (!of_machine_is_compatible("nvidia,tegra20")) |
167 | platform_add_devices(pinmux_devices, | ||
168 | ARRAY_SIZE(pinmux_devices)); | ||
165 | 169 | ||
166 | tegra_pinmux_config_table(harmony_pinmux, ARRAY_SIZE(harmony_pinmux)); | 170 | tegra_pinmux_config_table(harmony_pinmux, ARRAY_SIZE(harmony_pinmux)); |
167 | 171 | ||
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index f0bdc5e3fe52..fd190a8dc665 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
34 | #include <asm/hardware/gic.h> | ||
34 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
35 | 36 | ||
36 | #include <mach/tegra_wm8903_pdata.h> | 37 | #include <mach/tegra_wm8903_pdata.h> |
@@ -187,6 +188,7 @@ MACHINE_START(HARMONY, "harmony") | |||
187 | .map_io = tegra_map_common_io, | 188 | .map_io = tegra_map_common_io, |
188 | .init_early = tegra_init_early, | 189 | .init_early = tegra_init_early, |
189 | .init_irq = tegra_init_irq, | 190 | .init_irq = tegra_init_irq, |
191 | .handle_irq = gic_handle_irq, | ||
190 | .timer = &tegra_timer, | 192 | .timer = &tegra_timer, |
191 | .init_machine = tegra_harmony_init, | 193 | .init_machine = tegra_harmony_init, |
192 | MACHINE_END | 194 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c index fb20894862b0..be30e215f4b7 100644 --- a/arch/arm/mach-tegra/board-paz00-pinmux.c +++ b/arch/arm/mach-tegra/board-paz00-pinmux.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/of.h> | ||
20 | |||
19 | #include <mach/pinmux.h> | 21 | #include <mach/pinmux.h> |
20 | 22 | ||
21 | #include "gpio-names.h" | 23 | #include "gpio-names.h" |
@@ -158,7 +160,9 @@ static struct tegra_gpio_table gpio_table[] = { | |||
158 | 160 | ||
159 | void paz00_pinmux_init(void) | 161 | void paz00_pinmux_init(void) |
160 | { | 162 | { |
161 | platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices)); | 163 | if (!of_machine_is_compatible("nvidia,tegra20")) |
164 | platform_add_devices(pinmux_devices, | ||
165 | ARRAY_SIZE(pinmux_devices)); | ||
162 | 166 | ||
163 | tegra_pinmux_config_table(paz00_pinmux, ARRAY_SIZE(paz00_pinmux)); | 167 | tegra_pinmux_config_table(paz00_pinmux, ARRAY_SIZE(paz00_pinmux)); |
164 | 168 | ||
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 55c55ba89f1e..0b7e1cfee70d 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
30 | #include <linux/rfkill-gpio.h> | 30 | #include <linux/rfkill-gpio.h> |
31 | 31 | ||
32 | #include <asm/hardware/gic.h> | ||
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
@@ -190,6 +191,7 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ") | |||
190 | .map_io = tegra_map_common_io, | 191 | .map_io = tegra_map_common_io, |
191 | .init_early = tegra_init_early, | 192 | .init_early = tegra_init_early, |
192 | .init_irq = tegra_init_irq, | 193 | .init_irq = tegra_init_irq, |
194 | .handle_irq = gic_handle_irq, | ||
193 | .timer = &tegra_timer, | 195 | .timer = &tegra_timer, |
194 | .init_machine = tegra_paz00_init, | 196 | .init_machine = tegra_paz00_init, |
195 | MACHINE_END | 197 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-seaboard-pinmux.c b/arch/arm/mach-tegra/board-seaboard-pinmux.c index fbce31daa3c9..b1c2972f62fe 100644 --- a/arch/arm/mach-tegra/board-seaboard-pinmux.c +++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/of.h> | ||
19 | 20 | ||
20 | #include <mach/pinmux.h> | 21 | #include <mach/pinmux.h> |
21 | #include <mach/pinmux-t2.h> | 22 | #include <mach/pinmux-t2.h> |
@@ -191,6 +192,7 @@ static struct tegra_gpio_table common_gpio_table[] = { | |||
191 | { .gpio = TEGRA_GPIO_SD2_POWER, .enable = true }, | 192 | { .gpio = TEGRA_GPIO_SD2_POWER, .enable = true }, |
192 | { .gpio = TEGRA_GPIO_LIDSWITCH, .enable = true }, | 193 | { .gpio = TEGRA_GPIO_LIDSWITCH, .enable = true }, |
193 | { .gpio = TEGRA_GPIO_POWERKEY, .enable = true }, | 194 | { .gpio = TEGRA_GPIO_POWERKEY, .enable = true }, |
195 | { .gpio = TEGRA_GPIO_HP_DET, .enable = true }, | ||
194 | { .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true }, | 196 | { .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true }, |
195 | { .gpio = TEGRA_GPIO_CDC_IRQ, .enable = true }, | 197 | { .gpio = TEGRA_GPIO_CDC_IRQ, .enable = true }, |
196 | { .gpio = TEGRA_GPIO_USB1, .enable = true }, | 198 | { .gpio = TEGRA_GPIO_USB1, .enable = true }, |
@@ -218,7 +220,9 @@ static void __init update_pinmux(struct tegra_pingroup_config *newtbl, int size) | |||
218 | 220 | ||
219 | void __init seaboard_common_pinmux_init(void) | 221 | void __init seaboard_common_pinmux_init(void) |
220 | { | 222 | { |
221 | platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices)); | 223 | if (!of_machine_is_compatible("nvidia,tegra20")) |
224 | platform_add_devices(pinmux_devices, | ||
225 | ARRAY_SIZE(pinmux_devices)); | ||
222 | 226 | ||
223 | tegra_pinmux_config_table(seaboard_pinmux, ARRAY_SIZE(seaboard_pinmux)); | 227 | tegra_pinmux_config_table(seaboard_pinmux, ARRAY_SIZE(seaboard_pinmux)); |
224 | 228 | ||
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index bf13ea355efc..7328379b1356 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
37 | #include <asm/hardware/gic.h> | ||
37 | 38 | ||
38 | #include "board.h" | 39 | #include "board.h" |
39 | #include "board-seaboard.h" | 40 | #include "board-seaboard.h" |
@@ -284,6 +285,7 @@ MACHINE_START(SEABOARD, "seaboard") | |||
284 | .map_io = tegra_map_common_io, | 285 | .map_io = tegra_map_common_io, |
285 | .init_early = tegra_init_early, | 286 | .init_early = tegra_init_early, |
286 | .init_irq = tegra_init_irq, | 287 | .init_irq = tegra_init_irq, |
288 | .handle_irq = gic_handle_irq, | ||
287 | .timer = &tegra_timer, | 289 | .timer = &tegra_timer, |
288 | .init_machine = tegra_seaboard_init, | 290 | .init_machine = tegra_seaboard_init, |
289 | MACHINE_END | 291 | MACHINE_END |
@@ -293,6 +295,7 @@ MACHINE_START(KAEN, "kaen") | |||
293 | .map_io = tegra_map_common_io, | 295 | .map_io = tegra_map_common_io, |
294 | .init_early = tegra_init_early, | 296 | .init_early = tegra_init_early, |
295 | .init_irq = tegra_init_irq, | 297 | .init_irq = tegra_init_irq, |
298 | .handle_irq = gic_handle_irq, | ||
296 | .timer = &tegra_timer, | 299 | .timer = &tegra_timer, |
297 | .init_machine = tegra_kaen_init, | 300 | .init_machine = tegra_kaen_init, |
298 | MACHINE_END | 301 | MACHINE_END |
@@ -302,6 +305,7 @@ MACHINE_START(WARIO, "wario") | |||
302 | .map_io = tegra_map_common_io, | 305 | .map_io = tegra_map_common_io, |
303 | .init_early = tegra_init_early, | 306 | .init_early = tegra_init_early, |
304 | .init_irq = tegra_init_irq, | 307 | .init_irq = tegra_init_irq, |
308 | .handle_irq = gic_handle_irq, | ||
305 | .timer = &tegra_timer, | 309 | .timer = &tegra_timer, |
306 | .init_machine = tegra_wario_init, | 310 | .init_machine = tegra_wario_init, |
307 | MACHINE_END | 311 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c index 4969dd28a04c..7ab719d46da0 100644 --- a/arch/arm/mach-tegra/board-trimslice-pinmux.c +++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/of.h> | ||
19 | 20 | ||
20 | #include <mach/pinmux.h> | 21 | #include <mach/pinmux.h> |
21 | 22 | ||
@@ -157,7 +158,9 @@ static struct tegra_gpio_table gpio_table[] = { | |||
157 | 158 | ||
158 | void __init trimslice_pinmux_init(void) | 159 | void __init trimslice_pinmux_init(void) |
159 | { | 160 | { |
160 | platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices)); | 161 | if (!of_machine_is_compatible("nvidia,tegra20")) |
162 | platform_add_devices(pinmux_devices, | ||
163 | ARRAY_SIZE(pinmux_devices)); | ||
161 | tegra_pinmux_config_table(trimslice_pinmux, ARRAY_SIZE(trimslice_pinmux)); | 164 | tegra_pinmux_config_table(trimslice_pinmux, ARRAY_SIZE(trimslice_pinmux)); |
162 | tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table)); | 165 | tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table)); |
163 | } | 166 | } |
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c index 1a6617b7806f..60a36a2e0be1 100644 --- a/arch/arm/mach-tegra/board-trimslice.c +++ b/arch/arm/mach-tegra/board-trimslice.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | 28 | ||
29 | #include <asm/hardware/gic.h> | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -176,6 +177,7 @@ MACHINE_START(TRIMSLICE, "trimslice") | |||
176 | .map_io = tegra_map_common_io, | 177 | .map_io = tegra_map_common_io, |
177 | .init_early = tegra_init_early, | 178 | .init_early = tegra_init_early, |
178 | .init_irq = tegra_init_irq, | 179 | .init_irq = tegra_init_irq, |
180 | .handle_irq = gic_handle_irq, | ||
179 | .timer = &tegra_timer, | 181 | .timer = &tegra_timer, |
180 | .init_machine = tegra_trimslice_init, | 182 | .init_machine = tegra_trimslice_init, |
181 | MACHINE_END | 183 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/include/mach/entry-macro.S b/arch/arm/mach-tegra/include/mach/entry-macro.S index dd165c53889d..ac11262149c7 100644 --- a/arch/arm/mach-tegra/include/mach/entry-macro.S +++ b/arch/arm/mach-tegra/include/mach/entry-macro.S | |||
@@ -12,30 +12,15 @@ | |||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | #include <mach/iomap.h> | ||
16 | #include <mach/io.h> | ||
17 | |||
18 | #if defined(CONFIG_ARM_GIC) | ||
19 | #define HAVE_GET_IRQNR_PREAMBLE | ||
20 | #include <asm/hardware/entry-macro-gic.S> | ||
21 | |||
22 | /* Uses the GIC interrupt controller built into the cpu */ | ||
23 | #define ICTRL_BASE (IO_CPU_VIRT + 0x100) | ||
24 | 15 | ||
25 | .macro disable_fiq | 16 | .macro disable_fiq |
26 | .endm | 17 | .endm |
27 | 18 | ||
28 | .macro get_irqnr_preamble, base, tmp | 19 | .macro arch_ret_to_user, tmp1, tmp2 |
29 | movw \base, #(ICTRL_BASE & 0x0000ffff) | ||
30 | movt \base, #((ICTRL_BASE & 0xffff0000) >> 16) | ||
31 | .endm | 20 | .endm |
32 | 21 | ||
33 | .macro arch_ret_to_user, tmp1, tmp2 | 22 | #if !defined(CONFIG_ARM_GIC) |
34 | .endm | ||
35 | #else | ||
36 | /* legacy interrupt controller for AP16 */ | 23 | /* legacy interrupt controller for AP16 */ |
37 | .macro disable_fiq | ||
38 | .endm | ||
39 | 24 | ||
40 | .macro get_irqnr_preamble, base, tmp | 25 | .macro get_irqnr_preamble, base, tmp |
41 | @ enable imprecise aborts | 26 | @ enable imprecise aborts |
@@ -46,9 +31,6 @@ | |||
46 | orr \base, #0x0000f000 | 31 | orr \base, #0x0000f000 |
47 | .endm | 32 | .endm |
48 | 33 | ||
49 | .macro arch_ret_to_user, tmp1, tmp2 | ||
50 | .endm | ||
51 | |||
52 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 34 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
53 | ldr \irqnr, [\base, #0x20] @ EVT_IRQ_STS | 35 | ldr \irqnr, [\base, #0x20] @ EVT_IRQ_STS |
54 | cmp \irqnr, #0x80 | 36 | cmp \irqnr, #0x80 |
diff --git a/arch/arm/mach-u300/include/mach/entry-macro.S b/arch/arm/mach-u300/include/mach/entry-macro.S index 20731ae39d38..7181d6ac6651 100644 --- a/arch/arm/mach-u300/include/mach/entry-macro.S +++ b/arch/arm/mach-u300/include/mach/entry-macro.S | |||
@@ -8,33 +8,9 @@ | |||
8 | * Low-level IRQ helper macros for ST-Ericsson U300 | 8 | * Low-level IRQ helper macros for ST-Ericsson U300 |
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | ||
12 | #include <asm/hardware/vic.h> | ||
13 | 11 | ||
14 | .macro disable_fiq | 12 | .macro disable_fiq |
15 | .endm | 13 | .endm |
16 | 14 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 16 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON0_BASE | ||
25 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
26 | mov \irqnr, #0 | ||
27 | teq \irqstat, #0 | ||
28 | bne 1002f | ||
29 | 1001: ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON1_BASE | ||
30 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
31 | mov \irqnr, #32 | ||
32 | teq \irqstat, #0 | ||
33 | beq 1003f | ||
34 | 1002: tst \irqstat, #1 | ||
35 | bne 1003f | ||
36 | add \irqnr, \irqnr, #1 | ||
37 | movs \irqstat, \irqstat, lsr #1 | ||
38 | bne 1002b | ||
39 | 1003: /* EQ will be set if no irqs pending */ | ||
40 | .endm | ||
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c index 89422ee7f3a8..4a4fd334eb6e 100644 --- a/arch/arm/mach-u300/u300.c +++ b/arch/arm/mach-u300/u300.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
21 | #include <mach/platform.h> | 21 | #include <mach/platform.h> |
22 | #include <asm/hardware/vic.h> | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/memory.h> | 25 | #include <asm/memory.h> |
@@ -49,6 +50,7 @@ MACHINE_START(U300, MACH_U300_STRING) | |||
49 | .atag_offset = BOOT_PARAMS_OFFSET, | 50 | .atag_offset = BOOT_PARAMS_OFFSET, |
50 | .map_io = u300_map_io, | 51 | .map_io = u300_map_io, |
51 | .init_irq = u300_init_irq, | 52 | .init_irq = u300_init_irq, |
53 | .handle_irq = vic_handle_irq, | ||
52 | .timer = &u300_timer, | 54 | .timer = &u300_timer, |
53 | .init_machine = u300_init_machine, | 55 | .init_machine = u300_init_machine, |
54 | MACHINE_END | 56 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index bdd7b80dd7ad..de1f5f8f7330 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/leds.h> | 33 | #include <linux/leds.h> |
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/hardware/gic.h> | ||
36 | 37 | ||
37 | #include <plat/i2c.h> | 38 | #include <plat/i2c.h> |
38 | #include <plat/ste_dma40.h> | 39 | #include <plat/ste_dma40.h> |
@@ -695,6 +696,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
695 | .init_irq = ux500_init_irq, | 696 | .init_irq = ux500_init_irq, |
696 | /* we re-use nomadik timer here */ | 697 | /* we re-use nomadik timer here */ |
697 | .timer = &ux500_timer, | 698 | .timer = &ux500_timer, |
699 | .handle_irq = gic_handle_irq, | ||
698 | .init_machine = mop500_init_machine, | 700 | .init_machine = mop500_init_machine, |
699 | MACHINE_END | 701 | MACHINE_END |
700 | 702 | ||
@@ -703,6 +705,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | |||
703 | .map_io = u8500_map_io, | 705 | .map_io = u8500_map_io, |
704 | .init_irq = ux500_init_irq, | 706 | .init_irq = ux500_init_irq, |
705 | .timer = &ux500_timer, | 707 | .timer = &ux500_timer, |
708 | .handle_irq = gic_handle_irq, | ||
706 | .init_machine = hrefv60_init_machine, | 709 | .init_machine = hrefv60_init_machine, |
707 | MACHINE_END | 710 | MACHINE_END |
708 | 711 | ||
@@ -712,5 +715,6 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | |||
712 | .init_irq = ux500_init_irq, | 715 | .init_irq = ux500_init_irq, |
713 | /* we re-use nomadik timer here */ | 716 | /* we re-use nomadik timer here */ |
714 | .timer = &ux500_timer, | 717 | .timer = &ux500_timer, |
718 | .handle_irq = gic_handle_irq, | ||
715 | .init_machine = snowball_init_machine, | 719 | .init_machine = snowball_init_machine, |
716 | MACHINE_END | 720 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 82025ba70c03..fe1569b67c91 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
13 | #include <linux/mfd/ab5500/ab5500.h> | 13 | #include <linux/mfd/ab5500/ab5500.h> |
14 | 14 | ||
15 | #include <asm/hardware/gic.h> | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
16 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
17 | 18 | ||
@@ -149,5 +150,6 @@ MACHINE_START(U5500, "ST-Ericsson U5500 Platform") | |||
149 | .map_io = u5500_map_io, | 150 | .map_io = u5500_map_io, |
150 | .init_irq = ux500_init_irq, | 151 | .init_irq = ux500_init_irq, |
151 | .timer = &ux500_timer, | 152 | .timer = &ux500_timer, |
153 | .handle_irq = gic_handle_irq, | ||
152 | .init_machine = u5500_init_machine, | 154 | .init_machine = u5500_init_machine, |
153 | MACHINE_END | 155 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/include/mach/entry-macro.S b/arch/arm/mach-ux500/include/mach/entry-macro.S index 071bba94f727..e16299e1020a 100644 --- a/arch/arm/mach-ux500/include/mach/entry-macro.S +++ b/arch/arm/mach-ux500/include/mach/entry-macro.S | |||
@@ -10,8 +10,6 @@ | |||
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | ||
14 | #include <asm/hardware/entry-macro-gic.S> | ||
15 | 13 | ||
16 | .macro disable_fiq | 14 | .macro disable_fiq |
17 | .endm | 15 | .endm |
diff --git a/arch/arm/mach-versatile/include/mach/entry-macro.S b/arch/arm/mach-versatile/include/mach/entry-macro.S index e6f7c1663160..b6f0dbf122ee 100644 --- a/arch/arm/mach-versatile/include/mach/entry-macro.S +++ b/arch/arm/mach-versatile/include/mach/entry-macro.S | |||
@@ -7,39 +7,9 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | ||
11 | #include <mach/platform.h> | ||
12 | #include <asm/hardware/vic.h> | ||
13 | 10 | ||
14 | .macro disable_fiq | 11 | .macro disable_fiq |
15 | .endm | 12 | .endm |
16 | 13 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | 14 | .macro arch_ret_to_user, tmp1, tmp2 |
22 | .endm | 15 | .endm |
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | ||
26 | mov \irqnr, #0 | ||
27 | teq \irqstat, #0 | ||
28 | beq 1003f | ||
29 | |||
30 | 1001: tst \irqstat, #15 | ||
31 | bne 1002f | ||
32 | add \irqnr, \irqnr, #4 | ||
33 | movs \irqstat, \irqstat, lsr #4 | ||
34 | bne 1001b | ||
35 | 1002: tst \irqstat, #1 | ||
36 | bne 1003f | ||
37 | add \irqnr, \irqnr, #1 | ||
38 | movs \irqstat, \irqstat, lsr #1 | ||
39 | bne 1002b | ||
40 | 1003: /* EQ will be set if no irqs pending */ | ||
41 | |||
42 | @ clz \irqnr, \irqstat | ||
43 | @1003: /* EQ will be set if we reach MAXIRQNUM */ | ||
44 | .endm | ||
45 | |||
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c index fda4866703cd..c83a1f379f7a 100644 --- a/arch/arm/mach-versatile/versatile_ab.c +++ b/arch/arm/mach-versatile/versatile_ab.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/hardware/vic.h> | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | 32 | ||
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -39,6 +40,7 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") | |||
39 | .map_io = versatile_map_io, | 40 | .map_io = versatile_map_io, |
40 | .init_early = versatile_init_early, | 41 | .init_early = versatile_init_early, |
41 | .init_irq = versatile_init_irq, | 42 | .init_irq = versatile_init_irq, |
43 | .handle_irq = vic_handle_irq, | ||
42 | .timer = &versatile_timer, | 44 | .timer = &versatile_timer, |
43 | .init_machine = versatile_init, | 45 | .init_machine = versatile_init, |
44 | MACHINE_END | 46 | MACHINE_END |
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c index 54e037c090f5..f4d1e0f072c8 100644 --- a/arch/arm/mach-versatile/versatile_dt.c +++ b/arch/arm/mach-versatile/versatile_dt.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | #include <asm/hardware/vic.h> | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
29 | 30 | ||
@@ -45,6 +46,7 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)") | |||
45 | .map_io = versatile_map_io, | 46 | .map_io = versatile_map_io, |
46 | .init_early = versatile_init_early, | 47 | .init_early = versatile_init_early, |
47 | .init_irq = versatile_init_irq, | 48 | .init_irq = versatile_init_irq, |
49 | .handle_irq = vic_handle_irq, | ||
48 | .timer = &versatile_timer, | 50 | .timer = &versatile_timer, |
49 | .init_machine = versatile_dt_init, | 51 | .init_machine = versatile_dt_init, |
50 | .dt_compat = versatile_dt_match, | 52 | .dt_compat = versatile_dt_match, |
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index feaf9cbe60f6..4d31eeb6c101 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <asm/hardware/vic.h> | ||
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | 34 | ||
@@ -107,6 +108,7 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") | |||
107 | .map_io = versatile_map_io, | 108 | .map_io = versatile_map_io, |
108 | .init_early = versatile_init_early, | 109 | .init_early = versatile_init_early, |
109 | .init_irq = versatile_init_irq, | 110 | .init_irq = versatile_init_irq, |
111 | .handle_irq = vic_handle_irq, | ||
110 | .timer = &versatile_timer, | 112 | .timer = &versatile_timer, |
111 | .init_machine = versatile_pb_init, | 113 | .init_machine = versatile_pb_init, |
112 | MACHINE_END | 114 | MACHINE_END |
diff --git a/arch/arm/mach-vexpress/include/mach/entry-macro.S b/arch/arm/mach-vexpress/include/mach/entry-macro.S index 73c11297509e..a14f9e62ca92 100644 --- a/arch/arm/mach-vexpress/include/mach/entry-macro.S +++ b/arch/arm/mach-vexpress/include/mach/entry-macro.S | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <asm/hardware/entry-macro-gic.S> | ||
2 | |||
3 | .macro disable_fiq | 1 | .macro disable_fiq |
4 | .endm | 2 | .endm |
5 | 3 | ||
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 1fafc3244607..7aa07a8ce232 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/hardware/arm_timer.h> | 23 | #include <asm/hardware/arm_timer.h> |
24 | #include <asm/hardware/timer-sp.h> | 24 | #include <asm/hardware/timer-sp.h> |
25 | #include <asm/hardware/sp810.h> | 25 | #include <asm/hardware/sp810.h> |
26 | #include <asm/hardware/gic.h> | ||
26 | 27 | ||
27 | #include <mach/ct-ca9x4.h> | 28 | #include <mach/ct-ca9x4.h> |
28 | #include <mach/motherboard.h> | 29 | #include <mach/motherboard.h> |
@@ -448,5 +449,6 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express") | |||
448 | .init_early = v2m_init_early, | 449 | .init_early = v2m_init_early, |
449 | .init_irq = v2m_init_irq, | 450 | .init_irq = v2m_init_irq, |
450 | .timer = &v2m_timer, | 451 | .timer = &v2m_timer, |
452 | .handle_irq = gic_handle_irq, | ||
451 | .init_machine = v2m_init, | 453 | .init_machine = v2m_init, |
452 | MACHINE_END | 454 | MACHINE_END |
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 73e93687b81a..ab5cfddc0d7b 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
@@ -112,6 +112,7 @@ static const char *xilinx_dt_match[] = { | |||
112 | MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") | 112 | MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") |
113 | .map_io = xilinx_map_io, | 113 | .map_io = xilinx_map_io, |
114 | .init_irq = xilinx_irq_init, | 114 | .init_irq = xilinx_irq_init, |
115 | .handle_irq = gic_handle_irq, | ||
115 | .init_machine = xilinx_init_machine, | 116 | .init_machine = xilinx_init_machine, |
116 | .timer = &xttcpss_sys_timer, | 117 | .timer = &xttcpss_sys_timer, |
117 | .dt_compat = xilinx_dt_match, | 118 | .dt_compat = xilinx_dt_match, |
diff --git a/arch/arm/mach-zynq/include/mach/entry-macro.S b/arch/arm/mach-zynq/include/mach/entry-macro.S index 3cfc01b37461..d621fb732569 100644 --- a/arch/arm/mach-zynq/include/mach/entry-macro.S +++ b/arch/arm/mach-zynq/include/mach/entry-macro.S | |||
@@ -20,9 +20,6 @@ | |||
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/hardware/entry-macro-gic.S> | ||
25 | |||
26 | .macro disable_fiq | 23 | .macro disable_fiq |
27 | .endm | 24 | .endm |
28 | 25 | ||
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index a08a95107a63..b3a1f2b3ada3 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -10,7 +10,7 @@ choice | |||
10 | 10 | ||
11 | config ARCH_IMX_V4_V5 | 11 | config ARCH_IMX_V4_V5 |
12 | bool "i.MX1, i.MX21, i.MX25, i.MX27" | 12 | bool "i.MX1, i.MX21, i.MX25, i.MX27" |
13 | select AUTO_ZRELADDR | 13 | select AUTO_ZRELADDR if !ZBOOT_ROM |
14 | select ARM_PATCH_PHYS_VIRT | 14 | select ARM_PATCH_PHYS_VIRT |
15 | help | 15 | help |
16 | This enables support for systems based on the Freescale i.MX ARMv4 | 16 | This enables support for systems based on the Freescale i.MX ARMv4 |
@@ -26,7 +26,7 @@ config ARCH_IMX_V6_V7 | |||
26 | 26 | ||
27 | config ARCH_MX5 | 27 | config ARCH_MX5 |
28 | bool "i.MX50, i.MX51, i.MX53" | 28 | bool "i.MX50, i.MX51, i.MX53" |
29 | select AUTO_ZRELADDR | 29 | select AUTO_ZRELADDR if !ZBOOT_ROM |
30 | select ARM_PATCH_PHYS_VIRT | 30 | select ARM_PATCH_PHYS_VIRT |
31 | help | 31 | help |
32 | This enables support for machines using Freescale's i.MX50 and i.MX53 | 32 | This enables support for machines using Freescale's i.MX50 and i.MX53 |
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index b9f0f5f499a4..076db84f3e31 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -5,7 +5,6 @@ | |||
5 | # Common support | 5 | # Common support |
6 | obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o | 6 | obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o |
7 | 7 | ||
8 | obj-$(CONFIG_ARM_GIC) += gic.o | ||
9 | obj-$(CONFIG_MXC_TZIC) += tzic.o | 8 | obj-$(CONFIG_MXC_TZIC) += tzic.o |
10 | obj-$(CONFIG_MXC_AVIC) += avic.o | 9 | obj-$(CONFIG_MXC_AVIC) += avic.o |
11 | 10 | ||
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c index 8875fb415f68..55f15699a383 100644 --- a/arch/arm/plat-mxc/avic.c +++ b/arch/arm/plat-mxc/avic.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <mach/common.h> | 23 | #include <mach/common.h> |
24 | #include <asm/mach/irq.h> | 24 | #include <asm/mach/irq.h> |
25 | #include <asm/exception.h> | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | 27 | ||
27 | #include "irq-common.h" | 28 | #include "irq-common.h" |
diff --git a/arch/arm/plat-mxc/gic.c b/arch/arm/plat-mxc/gic.c deleted file mode 100644 index b3b8eed263b8..000000000000 --- a/arch/arm/plat-mxc/gic.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <asm/exception.h> | ||
15 | #include <asm/localtimer.h> | ||
16 | #include <asm/hardware/gic.h> | ||
17 | #ifdef CONFIG_SMP | ||
18 | #include <asm/smp.h> | ||
19 | #endif | ||
20 | |||
21 | asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) | ||
22 | { | ||
23 | u32 irqstat, irqnr; | ||
24 | |||
25 | do { | ||
26 | irqstat = readl_relaxed(gic_cpu_base_addr + GIC_CPU_INTACK); | ||
27 | irqnr = irqstat & 0x3ff; | ||
28 | if (irqnr == 1023) | ||
29 | break; | ||
30 | |||
31 | if (irqnr > 29 && irqnr < 1021) | ||
32 | handle_IRQ(irqnr, regs); | ||
33 | #ifdef CONFIG_SMP | ||
34 | else if (irqnr < 16) { | ||
35 | writel_relaxed(irqstat, gic_cpu_base_addr + | ||
36 | GIC_CPU_EOI); | ||
37 | handle_IPI(irqnr, regs); | ||
38 | } | ||
39 | #endif | ||
40 | #ifdef CONFIG_LOCAL_TIMERS | ||
41 | else if (irqnr == 29) { | ||
42 | writel_relaxed(irqstat, gic_cpu_base_addr + | ||
43 | GIC_CPU_EOI); | ||
44 | handle_local_timer(regs); | ||
45 | } | ||
46 | #endif | ||
47 | } while (1); | ||
48 | } | ||
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 83b745a5e1b7..14b4703e6e46 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -90,7 +90,6 @@ extern void imx_print_silicon_rev(const char *cpu, int srev); | |||
90 | 90 | ||
91 | void avic_handle_irq(struct pt_regs *); | 91 | void avic_handle_irq(struct pt_regs *); |
92 | void tzic_handle_irq(struct pt_regs *); | 92 | void tzic_handle_irq(struct pt_regs *); |
93 | void gic_handle_irq(struct pt_regs *); | ||
94 | 93 | ||
95 | #define imx1_handle_irq avic_handle_irq | 94 | #define imx1_handle_irq avic_handle_irq |
96 | #define imx21_handle_irq avic_handle_irq | 95 | #define imx21_handle_irq avic_handle_irq |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index 9fe0dfcf4e7e..def5d30cb67e 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -9,22 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* Unused, we use CONFIG_MULTI_IRQ_HANDLER */ | ||
13 | |||
14 | .macro disable_fiq | 12 | .macro disable_fiq |
15 | .endm | 13 | .endm |
16 | 14 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 16 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | .endm | ||
25 | |||
26 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
27 | .endm | ||
28 | |||
29 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
30 | .endm | ||
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c index e993a184189a..a3c164c7ba82 100644 --- a/arch/arm/plat-mxc/tzic.c +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | 18 | ||
19 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
20 | #include <asm/exception.h> | ||
20 | 21 | ||
21 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
22 | #include <mach/common.h> | 23 | #include <mach/common.h> |
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index d3a9fcd53c45..ebda7382c65b 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -436,10 +436,6 @@ | |||
436 | #define INTCPS_NR_MIR_REGS 3 | 436 | #define INTCPS_NR_MIR_REGS 3 |
437 | #define INTCPS_NR_IRQS 96 | 437 | #define INTCPS_NR_IRQS 96 |
438 | 438 | ||
439 | #ifndef __ASSEMBLY__ | ||
440 | extern void __iomem *omap_irq_base; | ||
441 | #endif | ||
442 | |||
443 | #include <mach/hardware.h> | 439 | #include <mach/hardware.h> |
444 | 440 | ||
445 | #ifdef CONFIG_FIQ | 441 | #ifdef CONFIG_FIQ |
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 9b9968fa8695..8167ce66188c 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -11,6 +11,7 @@ config PLAT_S5P | |||
11 | default y | 11 | default y |
12 | select ARM_VIC if !ARCH_EXYNOS4 | 12 | select ARM_VIC if !ARCH_EXYNOS4 |
13 | select ARM_GIC if ARCH_EXYNOS4 | 13 | select ARM_GIC if ARCH_EXYNOS4 |
14 | select GIC_NON_BANKED if ARCH_EXYNOS4 | ||
14 | select NO_IOPORT | 15 | select NO_IOPORT |
15 | select ARCH_REQUIRE_GPIOLIB | 16 | select ARCH_REQUIRE_GPIOLIB |
16 | select S3C_GPIO_TRACK | 17 | select S3C_GPIO_TRACK |
diff --git a/arch/blackfin/include/asm/bfin_serial.h b/arch/blackfin/include/asm/bfin_serial.h index 7fd0ec7b5b0f..ecacdf34768b 100644 --- a/arch/blackfin/include/asm/bfin_serial.h +++ b/arch/blackfin/include/asm/bfin_serial.h | |||
@@ -32,6 +32,8 @@ struct work_struct; | |||
32 | struct bfin_serial_port { | 32 | struct bfin_serial_port { |
33 | struct uart_port port; | 33 | struct uart_port port; |
34 | unsigned int old_status; | 34 | unsigned int old_status; |
35 | int tx_irq; | ||
36 | int rx_irq; | ||
35 | int status_irq; | 37 | int status_irq; |
36 | #ifndef BFIN_UART_BF54X_STYLE | 38 | #ifndef BFIN_UART_BF54X_STYLE |
37 | unsigned int lsr; | 39 | unsigned int lsr; |
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index 1082e49f7a9f..d1c0c0cff3ef 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -373,8 +373,13 @@ static struct resource bfin_uart0_resources[] = { | |||
373 | .flags = IORESOURCE_MEM, | 373 | .flags = IORESOURCE_MEM, |
374 | }, | 374 | }, |
375 | { | 375 | { |
376 | .start = IRQ_UART0_TX, | ||
377 | .end = IRQ_UART0_TX, | ||
378 | .flags = IORESOURCE_IRQ, | ||
379 | }, | ||
380 | { | ||
376 | .start = IRQ_UART0_RX, | 381 | .start = IRQ_UART0_RX, |
377 | .end = IRQ_UART0_RX+1, | 382 | .end = IRQ_UART0_RX, |
378 | .flags = IORESOURCE_IRQ, | 383 | .flags = IORESOURCE_IRQ, |
379 | }, | 384 | }, |
380 | { | 385 | { |
@@ -416,8 +421,13 @@ static struct resource bfin_uart1_resources[] = { | |||
416 | .flags = IORESOURCE_MEM, | 421 | .flags = IORESOURCE_MEM, |
417 | }, | 422 | }, |
418 | { | 423 | { |
424 | .start = IRQ_UART1_TX, | ||
425 | .end = IRQ_UART1_TX, | ||
426 | .flags = IORESOURCE_IRQ, | ||
427 | }, | ||
428 | { | ||
419 | .start = IRQ_UART1_RX, | 429 | .start = IRQ_UART1_RX, |
420 | .end = IRQ_UART1_RX+1, | 430 | .end = IRQ_UART1_RX, |
421 | .flags = IORESOURCE_IRQ, | 431 | .flags = IORESOURCE_IRQ, |
422 | }, | 432 | }, |
423 | { | 433 | { |
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c index 55c127908815..5470bf89e52e 100644 --- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c +++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c | |||
@@ -309,8 +309,13 @@ static struct resource bfin_uart0_resources[] = { | |||
309 | .flags = IORESOURCE_MEM, | 309 | .flags = IORESOURCE_MEM, |
310 | }, | 310 | }, |
311 | { | 311 | { |
312 | .start = IRQ_UART0_TX, | ||
313 | .end = IRQ_UART0_TX, | ||
314 | .flags = IORESOURCE_IRQ, | ||
315 | }, | ||
316 | { | ||
312 | .start = IRQ_UART0_RX, | 317 | .start = IRQ_UART0_RX, |
313 | .end = IRQ_UART0_RX+1, | 318 | .end = IRQ_UART0_RX, |
314 | .flags = IORESOURCE_IRQ, | 319 | .flags = IORESOURCE_IRQ, |
315 | }, | 320 | }, |
316 | { | 321 | { |
@@ -352,8 +357,13 @@ static struct resource bfin_uart1_resources[] = { | |||
352 | .flags = IORESOURCE_MEM, | 357 | .flags = IORESOURCE_MEM, |
353 | }, | 358 | }, |
354 | { | 359 | { |
360 | .start = IRQ_UART1_TX, | ||
361 | .end = IRQ_UART1_TX, | ||
362 | .flags = IORESOURCE_IRQ, | ||
363 | }, | ||
364 | { | ||
355 | .start = IRQ_UART1_RX, | 365 | .start = IRQ_UART1_RX, |
356 | .end = IRQ_UART1_RX+1, | 366 | .end = IRQ_UART1_RX, |
357 | .flags = IORESOURCE_IRQ, | 367 | .flags = IORESOURCE_IRQ, |
358 | }, | 368 | }, |
359 | { | 369 | { |
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c index 8d65d476f118..5bc6938157ad 100644 --- a/arch/blackfin/mach-bf527/boards/ad7160eval.c +++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c | |||
@@ -381,8 +381,13 @@ static struct resource bfin_uart0_resources[] = { | |||
381 | .flags = IORESOURCE_MEM, | 381 | .flags = IORESOURCE_MEM, |
382 | }, | 382 | }, |
383 | { | 383 | { |
384 | .start = IRQ_UART0_TX, | ||
385 | .end = IRQ_UART0_TX, | ||
386 | .flags = IORESOURCE_IRQ, | ||
387 | }, | ||
388 | { | ||
384 | .start = IRQ_UART0_RX, | 389 | .start = IRQ_UART0_RX, |
385 | .end = IRQ_UART0_RX+1, | 390 | .end = IRQ_UART0_RX, |
386 | .flags = IORESOURCE_IRQ, | 391 | .flags = IORESOURCE_IRQ, |
387 | }, | 392 | }, |
388 | { | 393 | { |
@@ -424,8 +429,13 @@ static struct resource bfin_uart1_resources[] = { | |||
424 | .flags = IORESOURCE_MEM, | 429 | .flags = IORESOURCE_MEM, |
425 | }, | 430 | }, |
426 | { | 431 | { |
432 | .start = IRQ_UART1_TX, | ||
433 | .end = IRQ_UART1_TX, | ||
434 | .flags = IORESOURCE_IRQ, | ||
435 | }, | ||
436 | { | ||
427 | .start = IRQ_UART1_RX, | 437 | .start = IRQ_UART1_RX, |
428 | .end = IRQ_UART1_RX+1, | 438 | .end = IRQ_UART1_RX, |
429 | .flags = IORESOURCE_IRQ, | 439 | .flags = IORESOURCE_IRQ, |
430 | }, | 440 | }, |
431 | { | 441 | { |
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index 6410fc1af8ed..cd289698b4dd 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
@@ -539,8 +540,13 @@ static struct resource bfin_uart0_resources[] = { | |||
539 | .flags = IORESOURCE_MEM, | 540 | .flags = IORESOURCE_MEM, |
540 | }, | 541 | }, |
541 | { | 542 | { |
543 | .start = IRQ_UART0_TX, | ||
544 | .end = IRQ_UART0_TX, | ||
545 | .flags = IORESOURCE_IRQ, | ||
546 | }, | ||
547 | { | ||
542 | .start = IRQ_UART0_RX, | 548 | .start = IRQ_UART0_RX, |
543 | .end = IRQ_UART0_RX+1, | 549 | .end = IRQ_UART0_RX, |
544 | .flags = IORESOURCE_IRQ, | 550 | .flags = IORESOURCE_IRQ, |
545 | }, | 551 | }, |
546 | { | 552 | { |
@@ -582,8 +588,13 @@ static struct resource bfin_uart1_resources[] = { | |||
582 | .flags = IORESOURCE_MEM, | 588 | .flags = IORESOURCE_MEM, |
583 | }, | 589 | }, |
584 | { | 590 | { |
591 | .start = IRQ_UART1_TX, | ||
592 | .end = IRQ_UART1_TX, | ||
593 | .flags = IORESOURCE_IRQ, | ||
594 | }, | ||
595 | { | ||
585 | .start = IRQ_UART1_RX, | 596 | .start = IRQ_UART1_RX, |
586 | .end = IRQ_UART1_RX+1, | 597 | .end = IRQ_UART1_RX, |
587 | .flags = IORESOURCE_IRQ, | 598 | .flags = IORESOURCE_IRQ, |
588 | }, | 599 | }, |
589 | { | 600 | { |
@@ -801,7 +812,6 @@ static struct platform_device bfin_sport1_uart_device = { | |||
801 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 812 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
802 | #include <linux/input.h> | 813 | #include <linux/input.h> |
803 | #include <linux/gpio_keys.h> | 814 | #include <linux/gpio_keys.h> |
804 | #include <linux/export.h> | ||
805 | 815 | ||
806 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | 816 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
807 | {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"}, | 817 | {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"}, |
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index 64f7278aba53..9f792eafd1cc 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/mtd/mtd.h> | 12 | #include <linux/mtd/mtd.h> |
12 | #include <linux/mtd/partitions.h> | 13 | #include <linux/mtd/partitions.h> |
@@ -417,8 +418,13 @@ static struct resource bfin_uart0_resources[] = { | |||
417 | .flags = IORESOURCE_MEM, | 418 | .flags = IORESOURCE_MEM, |
418 | }, | 419 | }, |
419 | { | 420 | { |
421 | .start = IRQ_UART0_TX, | ||
422 | .end = IRQ_UART0_TX, | ||
423 | .flags = IORESOURCE_IRQ, | ||
424 | }, | ||
425 | { | ||
420 | .start = IRQ_UART0_RX, | 426 | .start = IRQ_UART0_RX, |
421 | .end = IRQ_UART0_RX+1, | 427 | .end = IRQ_UART0_RX, |
422 | .flags = IORESOURCE_IRQ, | 428 | .flags = IORESOURCE_IRQ, |
423 | }, | 429 | }, |
424 | { | 430 | { |
@@ -460,8 +466,13 @@ static struct resource bfin_uart1_resources[] = { | |||
460 | .flags = IORESOURCE_MEM, | 466 | .flags = IORESOURCE_MEM, |
461 | }, | 467 | }, |
462 | { | 468 | { |
469 | .start = IRQ_UART1_TX, | ||
470 | .end = IRQ_UART1_TX, | ||
471 | .flags = IORESOURCE_IRQ, | ||
472 | }, | ||
473 | { | ||
463 | .start = IRQ_UART1_RX, | 474 | .start = IRQ_UART1_RX, |
464 | .end = IRQ_UART1_RX+1, | 475 | .end = IRQ_UART1_RX, |
465 | .flags = IORESOURCE_IRQ, | 476 | .flags = IORESOURCE_IRQ, |
466 | }, | 477 | }, |
467 | { | 478 | { |
@@ -674,7 +685,6 @@ static struct platform_device bfin_sport1_uart_device = { | |||
674 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 685 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
675 | #include <linux/input.h> | 686 | #include <linux/input.h> |
676 | #include <linux/gpio_keys.h> | 687 | #include <linux/gpio_keys.h> |
677 | #include <linux/export.h> | ||
678 | 688 | ||
679 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | 689 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
680 | {BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"}, | 690 | {BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"}, |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index e4c6a122b66c..3ecafff5d2ef 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -711,8 +711,13 @@ static struct resource bfin_uart0_resources[] = { | |||
711 | .flags = IORESOURCE_MEM, | 711 | .flags = IORESOURCE_MEM, |
712 | }, | 712 | }, |
713 | { | 713 | { |
714 | .start = IRQ_UART0_TX, | ||
715 | .end = IRQ_UART0_TX, | ||
716 | .flags = IORESOURCE_IRQ, | ||
717 | }, | ||
718 | { | ||
714 | .start = IRQ_UART0_RX, | 719 | .start = IRQ_UART0_RX, |
715 | .end = IRQ_UART0_RX+1, | 720 | .end = IRQ_UART0_RX, |
716 | .flags = IORESOURCE_IRQ, | 721 | .flags = IORESOURCE_IRQ, |
717 | }, | 722 | }, |
718 | { | 723 | { |
@@ -754,8 +759,13 @@ static struct resource bfin_uart1_resources[] = { | |||
754 | .flags = IORESOURCE_MEM, | 759 | .flags = IORESOURCE_MEM, |
755 | }, | 760 | }, |
756 | { | 761 | { |
762 | .start = IRQ_UART1_TX, | ||
763 | .end = IRQ_UART1_TX, | ||
764 | .flags = IORESOURCE_IRQ, | ||
765 | }, | ||
766 | { | ||
757 | .start = IRQ_UART1_RX, | 767 | .start = IRQ_UART1_RX, |
758 | .end = IRQ_UART1_RX+1, | 768 | .end = IRQ_UART1_RX, |
759 | .flags = IORESOURCE_IRQ, | 769 | .flags = IORESOURCE_IRQ, |
760 | }, | 770 | }, |
761 | { | 771 | { |
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c index 76dbc03a8d4d..3a92c4318d2d 100644 --- a/arch/blackfin/mach-bf527/boards/tll6527m.c +++ b/arch/blackfin/mach-bf527/boards/tll6527m.c | |||
@@ -496,8 +496,13 @@ static struct resource bfin_uart0_resources[] = { | |||
496 | .flags = IORESOURCE_MEM, | 496 | .flags = IORESOURCE_MEM, |
497 | }, | 497 | }, |
498 | { | 498 | { |
499 | .start = IRQ_UART0_TX, | ||
500 | .end = IRQ_UART0_TX, | ||
501 | .flags = IORESOURCE_IRQ, | ||
502 | }, | ||
503 | { | ||
499 | .start = IRQ_UART0_RX, | 504 | .start = IRQ_UART0_RX, |
500 | .end = IRQ_UART0_RX+1, | 505 | .end = IRQ_UART0_RX, |
501 | .flags = IORESOURCE_IRQ, | 506 | .flags = IORESOURCE_IRQ, |
502 | }, | 507 | }, |
503 | { | 508 | { |
@@ -540,8 +545,13 @@ static struct resource bfin_uart1_resources[] = { | |||
540 | .flags = IORESOURCE_MEM, | 545 | .flags = IORESOURCE_MEM, |
541 | }, | 546 | }, |
542 | { | 547 | { |
548 | .start = IRQ_UART1_TX, | ||
549 | .end = IRQ_UART1_TX, | ||
550 | .flags = IORESOURCE_IRQ, | ||
551 | }, | ||
552 | { | ||
543 | .start = IRQ_UART1_RX, | 553 | .start = IRQ_UART1_RX, |
544 | .end = IRQ_UART1_RX+1, | 554 | .end = IRQ_UART1_RX, |
545 | .flags = IORESOURCE_IRQ, | 555 | .flags = IORESOURCE_IRQ, |
546 | }, | 556 | }, |
547 | { | 557 | { |
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index 5da5787fc4ef..47cadd316e76 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c | |||
@@ -238,8 +238,13 @@ static struct resource bfin_uart0_resources[] = { | |||
238 | .flags = IORESOURCE_MEM, | 238 | .flags = IORESOURCE_MEM, |
239 | }, | 239 | }, |
240 | { | 240 | { |
241 | .start = IRQ_UART0_TX, | ||
242 | .end = IRQ_UART0_TX, | ||
243 | .flags = IORESOURCE_IRQ, | ||
244 | }, | ||
245 | { | ||
241 | .start = IRQ_UART0_RX, | 246 | .start = IRQ_UART0_RX, |
242 | .end = IRQ_UART0_RX + 1, | 247 | .end = IRQ_UART0_RX, |
243 | .flags = IORESOURCE_IRQ, | 248 | .flags = IORESOURCE_IRQ, |
244 | }, | 249 | }, |
245 | { | 250 | { |
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index b0ec825fb4ec..18817d57c7a1 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -193,8 +193,13 @@ static struct resource bfin_uart0_resources[] = { | |||
193 | .flags = IORESOURCE_MEM, | 193 | .flags = IORESOURCE_MEM, |
194 | }, | 194 | }, |
195 | { | 195 | { |
196 | .start = IRQ_UART0_TX, | ||
197 | .end = IRQ_UART0_TX, | ||
198 | .flags = IORESOURCE_IRQ, | ||
199 | }, | ||
200 | { | ||
196 | .start = IRQ_UART0_RX, | 201 | .start = IRQ_UART0_RX, |
197 | .end = IRQ_UART0_RX + 1, | 202 | .end = IRQ_UART0_RX, |
198 | .flags = IORESOURCE_IRQ, | 203 | .flags = IORESOURCE_IRQ, |
199 | }, | 204 | }, |
200 | { | 205 | { |
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index 14f54a31e74c..2c8f30ef6a7b 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
@@ -221,8 +221,13 @@ static struct resource bfin_uart0_resources[] = { | |||
221 | .flags = IORESOURCE_MEM, | 221 | .flags = IORESOURCE_MEM, |
222 | }, | 222 | }, |
223 | { | 223 | { |
224 | .start = IRQ_UART0_TX, | ||
225 | .end = IRQ_UART0_TX, | ||
226 | .flags = IORESOURCE_IRQ, | ||
227 | }, | ||
228 | { | ||
224 | .start = IRQ_UART0_RX, | 229 | .start = IRQ_UART0_RX, |
225 | .end = IRQ_UART0_RX + 1, | 230 | .end = IRQ_UART0_RX, |
226 | .flags = IORESOURCE_IRQ, | 231 | .flags = IORESOURCE_IRQ, |
227 | }, | 232 | }, |
228 | { | 233 | { |
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index ecd2801f050d..144556e14499 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -292,8 +292,13 @@ static struct resource bfin_uart0_resources[] = { | |||
292 | .flags = IORESOURCE_MEM, | 292 | .flags = IORESOURCE_MEM, |
293 | }, | 293 | }, |
294 | { | 294 | { |
295 | .start = IRQ_UART0_TX, | ||
296 | .end = IRQ_UART0_TX, | ||
297 | .flags = IORESOURCE_IRQ, | ||
298 | }, | ||
299 | { | ||
295 | .start = IRQ_UART0_RX, | 300 | .start = IRQ_UART0_RX, |
296 | .end = IRQ_UART0_RX + 1, | 301 | .end = IRQ_UART0_RX, |
297 | .flags = IORESOURCE_IRQ, | 302 | .flags = IORESOURCE_IRQ, |
298 | }, | 303 | }, |
299 | { | 304 | { |
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c index fbee77fa9211..b597d4e50d58 100644 --- a/arch/blackfin/mach-bf533/boards/ip0x.c +++ b/arch/blackfin/mach-bf533/boards/ip0x.c | |||
@@ -151,8 +151,13 @@ static struct resource bfin_uart0_resources[] = { | |||
151 | .flags = IORESOURCE_MEM, | 151 | .flags = IORESOURCE_MEM, |
152 | }, | 152 | }, |
153 | { | 153 | { |
154 | .start = IRQ_UART0_TX, | ||
155 | .end = IRQ_UART0_TX, | ||
156 | .flags = IORESOURCE_IRQ, | ||
157 | }, | ||
158 | { | ||
154 | .start = IRQ_UART0_RX, | 159 | .start = IRQ_UART0_RX, |
155 | .end = IRQ_UART0_RX + 1, | 160 | .end = IRQ_UART0_RX, |
156 | .flags = IORESOURCE_IRQ, | 161 | .flags = IORESOURCE_IRQ, |
157 | }, | 162 | }, |
158 | { | 163 | { |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 964a8e5f79b4..2afd02e14bd1 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -298,8 +298,13 @@ static struct resource bfin_uart0_resources[] = { | |||
298 | .flags = IORESOURCE_MEM, | 298 | .flags = IORESOURCE_MEM, |
299 | }, | 299 | }, |
300 | { | 300 | { |
301 | .start = IRQ_UART0_TX, | ||
302 | .end = IRQ_UART0_TX, | ||
303 | .flags = IORESOURCE_IRQ, | ||
304 | }, | ||
305 | { | ||
301 | .start = IRQ_UART0_RX, | 306 | .start = IRQ_UART0_RX, |
302 | .end = IRQ_UART0_RX + 1, | 307 | .end = IRQ_UART0_RX, |
303 | .flags = IORESOURCE_IRQ, | 308 | .flags = IORESOURCE_IRQ, |
304 | }, | 309 | }, |
305 | { | 310 | { |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c index 1471c51ea697..604a430038e1 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/etherdevice.h> | 12 | #include <linux/etherdevice.h> |
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
13 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
@@ -305,8 +306,13 @@ static struct resource bfin_uart0_resources[] = { | |||
305 | .flags = IORESOURCE_MEM, | 306 | .flags = IORESOURCE_MEM, |
306 | }, | 307 | }, |
307 | { | 308 | { |
309 | .start = IRQ_UART0_TX, | ||
310 | .end = IRQ_UART0_TX, | ||
311 | .flags = IORESOURCE_IRQ, | ||
312 | }, | ||
313 | { | ||
308 | .start = IRQ_UART0_RX, | 314 | .start = IRQ_UART0_RX, |
309 | .end = IRQ_UART0_RX+1, | 315 | .end = IRQ_UART0_RX, |
310 | .flags = IORESOURCE_IRQ, | 316 | .flags = IORESOURCE_IRQ, |
311 | }, | 317 | }, |
312 | { | 318 | { |
@@ -366,8 +372,13 @@ static struct resource bfin_uart1_resources[] = { | |||
366 | .flags = IORESOURCE_MEM, | 372 | .flags = IORESOURCE_MEM, |
367 | }, | 373 | }, |
368 | { | 374 | { |
375 | .start = IRQ_UART1_TX, | ||
376 | .end = IRQ_UART1_TX, | ||
377 | .flags = IORESOURCE_IRQ, | ||
378 | }, | ||
379 | { | ||
369 | .start = IRQ_UART1_RX, | 380 | .start = IRQ_UART1_RX, |
370 | .end = IRQ_UART1_RX+1, | 381 | .end = IRQ_UART1_RX, |
371 | .flags = IORESOURCE_IRQ, | 382 | .flags = IORESOURCE_IRQ, |
372 | }, | 383 | }, |
373 | { | 384 | { |
@@ -569,7 +580,6 @@ static struct platform_device bfin_sport1_uart_device = { | |||
569 | 580 | ||
570 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 581 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
571 | #include <linux/bfin_mac.h> | 582 | #include <linux/bfin_mac.h> |
572 | #include <linux/export.h> | ||
573 | static const unsigned short bfin_mac_peripherals[] = P_MII0; | 583 | static const unsigned short bfin_mac_peripherals[] = P_MII0; |
574 | 584 | ||
575 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { | 585 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c index 47cf37de33ba..d916b46a44fe 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/export.h> | ||
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
13 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
@@ -306,8 +307,13 @@ static struct resource bfin_uart0_resources[] = { | |||
306 | .flags = IORESOURCE_MEM, | 307 | .flags = IORESOURCE_MEM, |
307 | }, | 308 | }, |
308 | { | 309 | { |
310 | .start = IRQ_UART0_TX, | ||
311 | .end = IRQ_UART0_TX, | ||
312 | .flags = IORESOURCE_IRQ, | ||
313 | }, | ||
314 | { | ||
309 | .start = IRQ_UART0_RX, | 315 | .start = IRQ_UART0_RX, |
310 | .end = IRQ_UART0_RX+1, | 316 | .end = IRQ_UART0_RX, |
311 | .flags = IORESOURCE_IRQ, | 317 | .flags = IORESOURCE_IRQ, |
312 | }, | 318 | }, |
313 | { | 319 | { |
@@ -349,8 +355,13 @@ static struct resource bfin_uart1_resources[] = { | |||
349 | .flags = IORESOURCE_MEM, | 355 | .flags = IORESOURCE_MEM, |
350 | }, | 356 | }, |
351 | { | 357 | { |
358 | .start = IRQ_UART1_TX, | ||
359 | .end = IRQ_UART1_TX, | ||
360 | .flags = IORESOURCE_IRQ, | ||
361 | }, | ||
362 | { | ||
352 | .start = IRQ_UART1_RX, | 363 | .start = IRQ_UART1_RX, |
353 | .end = IRQ_UART1_RX+1, | 364 | .end = IRQ_UART1_RX, |
354 | .flags = IORESOURCE_IRQ, | 365 | .flags = IORESOURCE_IRQ, |
355 | }, | 366 | }, |
356 | { | 367 | { |
@@ -534,7 +545,6 @@ static struct platform_device bfin_sport1_uart_device = { | |||
534 | 545 | ||
535 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 546 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
536 | #include <linux/bfin_mac.h> | 547 | #include <linux/bfin_mac.h> |
537 | #include <linux/export.h> | ||
538 | static const unsigned short bfin_mac_peripherals[] = P_MII0; | 548 | static const unsigned short bfin_mac_peripherals[] = P_MII0; |
539 | 549 | ||
540 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { | 550 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
diff --git a/arch/blackfin/mach-bf537/boards/dnp5370.c b/arch/blackfin/mach-bf537/boards/dnp5370.c index 33e69e427e98..5f307228be63 100644 --- a/arch/blackfin/mach-bf537/boards/dnp5370.c +++ b/arch/blackfin/mach-bf537/boards/dnp5370.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/export.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
@@ -49,7 +50,6 @@ static struct platform_device rtc_device = { | |||
49 | 50 | ||
50 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 51 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
51 | #include <linux/bfin_mac.h> | 52 | #include <linux/bfin_mac.h> |
52 | #include <linux/export.h> | ||
53 | static const unsigned short bfin_mac_peripherals[] = P_RMII0; | 53 | static const unsigned short bfin_mac_peripherals[] = P_RMII0; |
54 | 54 | ||
55 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { | 55 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
@@ -237,8 +237,13 @@ static struct resource bfin_uart0_resources[] = { | |||
237 | .flags = IORESOURCE_MEM, | 237 | .flags = IORESOURCE_MEM, |
238 | }, | 238 | }, |
239 | { | 239 | { |
240 | .start = IRQ_UART0_TX, | ||
241 | .end = IRQ_UART0_TX, | ||
242 | .flags = IORESOURCE_IRQ, | ||
243 | }, | ||
244 | { | ||
240 | .start = IRQ_UART0_RX, | 245 | .start = IRQ_UART0_RX, |
241 | .end = IRQ_UART0_RX+1, | 246 | .end = IRQ_UART0_RX, |
242 | .flags = IORESOURCE_IRQ, | 247 | .flags = IORESOURCE_IRQ, |
243 | }, | 248 | }, |
244 | { | 249 | { |
@@ -281,8 +286,13 @@ static struct resource bfin_uart1_resources[] = { | |||
281 | .flags = IORESOURCE_MEM, | 286 | .flags = IORESOURCE_MEM, |
282 | }, | 287 | }, |
283 | { | 288 | { |
289 | .start = IRQ_UART1_TX, | ||
290 | .end = IRQ_UART1_TX, | ||
291 | .flags = IORESOURCE_IRQ, | ||
292 | }, | ||
293 | { | ||
284 | .start = IRQ_UART1_RX, | 294 | .start = IRQ_UART1_RX, |
285 | .end = IRQ_UART1_RX+1, | 295 | .end = IRQ_UART1_RX, |
286 | .flags = IORESOURCE_IRQ, | 296 | .flags = IORESOURCE_IRQ, |
287 | }, | 297 | }, |
288 | { | 298 | { |
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c index c62f9dccd9f7..3901dd093b90 100644 --- a/arch/blackfin/mach-bf537/boards/minotaur.c +++ b/arch/blackfin/mach-bf537/boards/minotaur.c | |||
@@ -240,8 +240,13 @@ static struct resource bfin_uart0_resources[] = { | |||
240 | .flags = IORESOURCE_MEM, | 240 | .flags = IORESOURCE_MEM, |
241 | }, | 241 | }, |
242 | { | 242 | { |
243 | .start = IRQ_UART0_TX, | ||
244 | .end = IRQ_UART0_TX, | ||
245 | .flags = IORESOURCE_IRQ, | ||
246 | }, | ||
247 | { | ||
243 | .start = IRQ_UART0_RX, | 248 | .start = IRQ_UART0_RX, |
244 | .end = IRQ_UART0_RX+1, | 249 | .end = IRQ_UART0_RX, |
245 | .flags = IORESOURCE_IRQ, | 250 | .flags = IORESOURCE_IRQ, |
246 | }, | 251 | }, |
247 | { | 252 | { |
@@ -283,8 +288,13 @@ static struct resource bfin_uart1_resources[] = { | |||
283 | .flags = IORESOURCE_MEM, | 288 | .flags = IORESOURCE_MEM, |
284 | }, | 289 | }, |
285 | { | 290 | { |
291 | .start = IRQ_UART1_TX, | ||
292 | .end = IRQ_UART1_TX, | ||
293 | .flags = IORESOURCE_IRQ, | ||
294 | }, | ||
295 | { | ||
286 | .start = IRQ_UART1_RX, | 296 | .start = IRQ_UART1_RX, |
287 | .end = IRQ_UART1_RX+1, | 297 | .end = IRQ_UART1_RX, |
288 | .flags = IORESOURCE_IRQ, | 298 | .flags = IORESOURCE_IRQ, |
289 | }, | 299 | }, |
290 | { | 300 | { |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 3099e91114fc..aebd31c845f0 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/etherdevice.h> | 10 | #include <linux/etherdevice.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
@@ -309,8 +310,13 @@ static struct resource bfin_uart0_resources[] = { | |||
309 | .flags = IORESOURCE_MEM, | 310 | .flags = IORESOURCE_MEM, |
310 | }, | 311 | }, |
311 | { | 312 | { |
313 | .start = IRQ_UART0_TX, | ||
314 | .end = IRQ_UART0_TX, | ||
315 | .flags = IORESOURCE_IRQ, | ||
316 | }, | ||
317 | { | ||
312 | .start = IRQ_UART0_RX, | 318 | .start = IRQ_UART0_RX, |
313 | .end = IRQ_UART0_RX+1, | 319 | .end = IRQ_UART0_RX, |
314 | .flags = IORESOURCE_IRQ, | 320 | .flags = IORESOURCE_IRQ, |
315 | }, | 321 | }, |
316 | { | 322 | { |
@@ -352,8 +358,13 @@ static struct resource bfin_uart1_resources[] = { | |||
352 | .flags = IORESOURCE_MEM, | 358 | .flags = IORESOURCE_MEM, |
353 | }, | 359 | }, |
354 | { | 360 | { |
361 | .start = IRQ_UART1_TX, | ||
362 | .end = IRQ_UART1_TX, | ||
363 | .flags = IORESOURCE_IRQ, | ||
364 | }, | ||
365 | { | ||
355 | .start = IRQ_UART1_RX, | 366 | .start = IRQ_UART1_RX, |
356 | .end = IRQ_UART1_RX+1, | 367 | .end = IRQ_UART1_RX, |
357 | .flags = IORESOURCE_IRQ, | 368 | .flags = IORESOURCE_IRQ, |
358 | }, | 369 | }, |
359 | { | 370 | { |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 27f955db9976..7fbb0bbf8676 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | #include <linux/io.h> | 13 | #include <linux/io.h> |
@@ -1566,8 +1567,13 @@ static struct resource bfin_uart0_resources[] = { | |||
1566 | .flags = IORESOURCE_MEM, | 1567 | .flags = IORESOURCE_MEM, |
1567 | }, | 1568 | }, |
1568 | { | 1569 | { |
1570 | .start = IRQ_UART0_TX, | ||
1571 | .end = IRQ_UART0_TX, | ||
1572 | .flags = IORESOURCE_IRQ, | ||
1573 | }, | ||
1574 | { | ||
1569 | .start = IRQ_UART0_RX, | 1575 | .start = IRQ_UART0_RX, |
1570 | .end = IRQ_UART0_RX+1, | 1576 | .end = IRQ_UART0_RX, |
1571 | .flags = IORESOURCE_IRQ, | 1577 | .flags = IORESOURCE_IRQ, |
1572 | }, | 1578 | }, |
1573 | { | 1579 | { |
@@ -1621,8 +1627,13 @@ static struct resource bfin_uart1_resources[] = { | |||
1621 | .flags = IORESOURCE_MEM, | 1627 | .flags = IORESOURCE_MEM, |
1622 | }, | 1628 | }, |
1623 | { | 1629 | { |
1630 | .start = IRQ_UART1_TX, | ||
1631 | .end = IRQ_UART1_TX, | ||
1632 | .flags = IORESOURCE_IRQ, | ||
1633 | }, | ||
1634 | { | ||
1624 | .start = IRQ_UART1_RX, | 1635 | .start = IRQ_UART1_RX, |
1625 | .end = IRQ_UART1_RX+1, | 1636 | .end = IRQ_UART1_RX, |
1626 | .flags = IORESOURCE_IRQ, | 1637 | .flags = IORESOURCE_IRQ, |
1627 | }, | 1638 | }, |
1628 | { | 1639 | { |
@@ -1992,7 +2003,6 @@ static struct adp8870_backlight_platform_data adp8870_pdata = { | |||
1992 | 2003 | ||
1993 | #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) | 2004 | #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) |
1994 | #include <linux/i2c/adp8860.h> | 2005 | #include <linux/i2c/adp8860.h> |
1995 | #include <linux/export.h> | ||
1996 | static struct led_info adp8860_leds[] = { | 2006 | static struct led_info adp8860_leds[] = { |
1997 | { | 2007 | { |
1998 | .name = "adp8860-led7", | 2008 | .name = "adp8860-led7", |
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c index 841803038d6f..6917ce2fa55e 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/export.h> | ||
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
13 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
@@ -306,8 +307,13 @@ static struct resource bfin_uart0_resources[] = { | |||
306 | .flags = IORESOURCE_MEM, | 307 | .flags = IORESOURCE_MEM, |
307 | }, | 308 | }, |
308 | { | 309 | { |
310 | .start = IRQ_UART0_TX, | ||
311 | .end = IRQ_UART0_TX, | ||
312 | .flags = IORESOURCE_IRQ, | ||
313 | }, | ||
314 | { | ||
309 | .start = IRQ_UART0_RX, | 315 | .start = IRQ_UART0_RX, |
310 | .end = IRQ_UART0_RX+1, | 316 | .end = IRQ_UART0_RX, |
311 | .flags = IORESOURCE_IRQ, | 317 | .flags = IORESOURCE_IRQ, |
312 | }, | 318 | }, |
313 | { | 319 | { |
@@ -349,8 +355,13 @@ static struct resource bfin_uart1_resources[] = { | |||
349 | .flags = IORESOURCE_MEM, | 355 | .flags = IORESOURCE_MEM, |
350 | }, | 356 | }, |
351 | { | 357 | { |
358 | .start = IRQ_UART1_TX, | ||
359 | .end = IRQ_UART1_TX, | ||
360 | .flags = IORESOURCE_IRQ, | ||
361 | }, | ||
362 | { | ||
352 | .start = IRQ_UART1_RX, | 363 | .start = IRQ_UART1_RX, |
353 | .end = IRQ_UART1_RX+1, | 364 | .end = IRQ_UART1_RX, |
354 | .flags = IORESOURCE_IRQ, | 365 | .flags = IORESOURCE_IRQ, |
355 | }, | 366 | }, |
356 | { | 367 | { |
@@ -536,7 +547,6 @@ static struct platform_device bfin_sport1_uart_device = { | |||
536 | 547 | ||
537 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 548 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
538 | #include <linux/bfin_mac.h> | 549 | #include <linux/bfin_mac.h> |
539 | #include <linux/export.h> | ||
540 | static const unsigned short bfin_mac_peripherals[] = P_MII0; | 550 | static const unsigned short bfin_mac_peripherals[] = P_MII0; |
541 | 551 | ||
542 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { | 552 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index 629f3c333415..8356eb599f19 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -49,8 +49,13 @@ static struct resource bfin_uart0_resources[] = { | |||
49 | .flags = IORESOURCE_MEM, | 49 | .flags = IORESOURCE_MEM, |
50 | }, | 50 | }, |
51 | { | 51 | { |
52 | .start = IRQ_UART0_TX, | ||
53 | .end = IRQ_UART0_TX, | ||
54 | .flags = IORESOURCE_IRQ, | ||
55 | }, | ||
56 | { | ||
52 | .start = IRQ_UART0_RX, | 57 | .start = IRQ_UART0_RX, |
53 | .end = IRQ_UART0_RX+1, | 58 | .end = IRQ_UART0_RX, |
54 | .flags = IORESOURCE_IRQ, | 59 | .flags = IORESOURCE_IRQ, |
55 | }, | 60 | }, |
56 | { | 61 | { |
@@ -104,8 +109,13 @@ static struct resource bfin_uart1_resources[] = { | |||
104 | .flags = IORESOURCE_MEM, | 109 | .flags = IORESOURCE_MEM, |
105 | }, | 110 | }, |
106 | { | 111 | { |
112 | .start = IRQ_UART1_TX, | ||
113 | .end = IRQ_UART1_TX, | ||
114 | .flags = IORESOURCE_IRQ, | ||
115 | }, | ||
116 | { | ||
107 | .start = IRQ_UART1_RX, | 117 | .start = IRQ_UART1_RX, |
108 | .end = IRQ_UART1_RX+1, | 118 | .end = IRQ_UART1_RX, |
109 | .flags = IORESOURCE_IRQ, | 119 | .flags = IORESOURCE_IRQ, |
110 | }, | 120 | }, |
111 | { | 121 | { |
@@ -147,8 +157,13 @@ static struct resource bfin_uart2_resources[] = { | |||
147 | .flags = IORESOURCE_MEM, | 157 | .flags = IORESOURCE_MEM, |
148 | }, | 158 | }, |
149 | { | 159 | { |
160 | .start = IRQ_UART2_TX, | ||
161 | .end = IRQ_UART2_TX, | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | { | ||
150 | .start = IRQ_UART2_RX, | 165 | .start = IRQ_UART2_RX, |
151 | .end = IRQ_UART2_RX+1, | 166 | .end = IRQ_UART2_RX, |
152 | .flags = IORESOURCE_IRQ, | 167 | .flags = IORESOURCE_IRQ, |
153 | }, | 168 | }, |
154 | { | 169 | { |
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index 212b9e0a08c8..0350eacec21b 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c | |||
@@ -135,8 +135,13 @@ static struct resource bfin_uart0_resources[] = { | |||
135 | .flags = IORESOURCE_MEM, | 135 | .flags = IORESOURCE_MEM, |
136 | }, | 136 | }, |
137 | { | 137 | { |
138 | .start = IRQ_UART0_TX, | ||
139 | .end = IRQ_UART0_TX, | ||
140 | .flags = IORESOURCE_IRQ, | ||
141 | }, | ||
142 | { | ||
138 | .start = IRQ_UART0_RX, | 143 | .start = IRQ_UART0_RX, |
139 | .end = IRQ_UART0_RX+1, | 144 | .end = IRQ_UART0_RX, |
140 | .flags = IORESOURCE_IRQ, | 145 | .flags = IORESOURCE_IRQ, |
141 | }, | 146 | }, |
142 | { | 147 | { |
@@ -178,8 +183,13 @@ static struct resource bfin_uart1_resources[] = { | |||
178 | .flags = IORESOURCE_MEM, | 183 | .flags = IORESOURCE_MEM, |
179 | }, | 184 | }, |
180 | { | 185 | { |
186 | .start = IRQ_UART1_TX, | ||
187 | .end = IRQ_UART1_TX, | ||
188 | .flags = IORESOURCE_IRQ, | ||
189 | }, | ||
190 | { | ||
181 | .start = IRQ_UART1_RX, | 191 | .start = IRQ_UART1_RX, |
182 | .end = IRQ_UART1_RX+1, | 192 | .end = IRQ_UART1_RX, |
183 | .flags = IORESOURCE_IRQ, | 193 | .flags = IORESOURCE_IRQ, |
184 | }, | 194 | }, |
185 | { | 195 | { |
@@ -237,8 +247,13 @@ static struct resource bfin_uart2_resources[] = { | |||
237 | .flags = IORESOURCE_MEM, | 247 | .flags = IORESOURCE_MEM, |
238 | }, | 248 | }, |
239 | { | 249 | { |
250 | .start = IRQ_UART2_TX, | ||
251 | .end = IRQ_UART2_TX, | ||
252 | .flags = IORESOURCE_IRQ, | ||
253 | }, | ||
254 | { | ||
240 | .start = IRQ_UART2_RX, | 255 | .start = IRQ_UART2_RX, |
241 | .end = IRQ_UART2_RX+1, | 256 | .end = IRQ_UART2_RX, |
242 | .flags = IORESOURCE_IRQ, | 257 | .flags = IORESOURCE_IRQ, |
243 | }, | 258 | }, |
244 | { | 259 | { |
@@ -280,8 +295,13 @@ static struct resource bfin_uart3_resources[] = { | |||
280 | .flags = IORESOURCE_MEM, | 295 | .flags = IORESOURCE_MEM, |
281 | }, | 296 | }, |
282 | { | 297 | { |
298 | .start = IRQ_UART3_TX, | ||
299 | .end = IRQ_UART3_TX, | ||
300 | .flags = IORESOURCE_IRQ, | ||
301 | }, | ||
302 | { | ||
283 | .start = IRQ_UART3_RX, | 303 | .start = IRQ_UART3_RX, |
284 | .end = IRQ_UART3_RX+1, | 304 | .end = IRQ_UART3_RX, |
285 | .flags = IORESOURCE_IRQ, | 305 | .flags = IORESOURCE_IRQ, |
286 | }, | 306 | }, |
287 | { | 307 | { |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index cd9cbb68de69..bb868ac0fe2d 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -241,8 +241,13 @@ static struct resource bfin_uart0_resources[] = { | |||
241 | .flags = IORESOURCE_MEM, | 241 | .flags = IORESOURCE_MEM, |
242 | }, | 242 | }, |
243 | { | 243 | { |
244 | .start = IRQ_UART0_TX, | ||
245 | .end = IRQ_UART0_TX, | ||
246 | .flags = IORESOURCE_IRQ, | ||
247 | }, | ||
248 | { | ||
244 | .start = IRQ_UART0_RX, | 249 | .start = IRQ_UART0_RX, |
245 | .end = IRQ_UART0_RX+1, | 250 | .end = IRQ_UART0_RX, |
246 | .flags = IORESOURCE_IRQ, | 251 | .flags = IORESOURCE_IRQ, |
247 | }, | 252 | }, |
248 | { | 253 | { |
@@ -284,8 +289,13 @@ static struct resource bfin_uart1_resources[] = { | |||
284 | .flags = IORESOURCE_MEM, | 289 | .flags = IORESOURCE_MEM, |
285 | }, | 290 | }, |
286 | { | 291 | { |
292 | .start = IRQ_UART1_TX, | ||
293 | .end = IRQ_UART1_TX, | ||
294 | .flags = IORESOURCE_IRQ, | ||
295 | }, | ||
296 | { | ||
287 | .start = IRQ_UART1_RX, | 297 | .start = IRQ_UART1_RX, |
288 | .end = IRQ_UART1_RX+1, | 298 | .end = IRQ_UART1_RX, |
289 | .flags = IORESOURCE_IRQ, | 299 | .flags = IORESOURCE_IRQ, |
290 | }, | 300 | }, |
291 | { | 301 | { |
@@ -343,8 +353,13 @@ static struct resource bfin_uart2_resources[] = { | |||
343 | .flags = IORESOURCE_MEM, | 353 | .flags = IORESOURCE_MEM, |
344 | }, | 354 | }, |
345 | { | 355 | { |
356 | .start = IRQ_UART2_TX, | ||
357 | .end = IRQ_UART2_TX, | ||
358 | .flags = IORESOURCE_IRQ, | ||
359 | }, | ||
360 | { | ||
346 | .start = IRQ_UART2_RX, | 361 | .start = IRQ_UART2_RX, |
347 | .end = IRQ_UART2_RX+1, | 362 | .end = IRQ_UART2_RX, |
348 | .flags = IORESOURCE_IRQ, | 363 | .flags = IORESOURCE_IRQ, |
349 | }, | 364 | }, |
350 | { | 365 | { |
@@ -386,8 +401,13 @@ static struct resource bfin_uart3_resources[] = { | |||
386 | .flags = IORESOURCE_MEM, | 401 | .flags = IORESOURCE_MEM, |
387 | }, | 402 | }, |
388 | { | 403 | { |
404 | .start = IRQ_UART3_TX, | ||
405 | .end = IRQ_UART3_TX, | ||
406 | .flags = IORESOURCE_IRQ, | ||
407 | }, | ||
408 | { | ||
389 | .start = IRQ_UART3_RX, | 409 | .start = IRQ_UART3_RX, |
390 | .end = IRQ_UART3_RX+1, | 410 | .end = IRQ_UART3_RX, |
391 | .flags = IORESOURCE_IRQ, | 411 | .flags = IORESOURCE_IRQ, |
392 | }, | 412 | }, |
393 | { | 413 | { |
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c index 972e1347c6bc..b1b7339b6ba7 100644 --- a/arch/blackfin/mach-bf561/boards/acvilon.c +++ b/arch/blackfin/mach-bf561/boards/acvilon.c | |||
@@ -203,8 +203,13 @@ static struct resource bfin_uart0_resources[] = { | |||
203 | .flags = IORESOURCE_MEM, | 203 | .flags = IORESOURCE_MEM, |
204 | }, | 204 | }, |
205 | { | 205 | { |
206 | .start = IRQ_UART_TX, | ||
207 | .end = IRQ_UART_TX, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | { | ||
206 | .start = IRQ_UART_RX, | 211 | .start = IRQ_UART_RX, |
207 | .end = IRQ_UART_RX + 1, | 212 | .end = IRQ_UART_RX, |
208 | .flags = IORESOURCE_IRQ, | 213 | .flags = IORESOURCE_IRQ, |
209 | }, | 214 | }, |
210 | { | 215 | { |
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index c1b72f2d6354..c017cf07ed4e 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -277,8 +277,13 @@ static struct resource bfin_uart0_resources[] = { | |||
277 | .flags = IORESOURCE_MEM, | 277 | .flags = IORESOURCE_MEM, |
278 | }, | 278 | }, |
279 | { | 279 | { |
280 | .start = IRQ_UART_TX, | ||
281 | .end = IRQ_UART_TX, | ||
282 | .flags = IORESOURCE_IRQ, | ||
283 | }, | ||
284 | { | ||
280 | .start = IRQ_UART_RX, | 285 | .start = IRQ_UART_RX, |
281 | .end = IRQ_UART_RX+1, | 286 | .end = IRQ_UART_RX, |
282 | .flags = IORESOURCE_IRQ, | 287 | .flags = IORESOURCE_IRQ, |
283 | }, | 288 | }, |
284 | { | 289 | { |
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 9490dc800ca5..27f22ed381d9 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -172,8 +172,13 @@ static struct resource bfin_uart0_resources[] = { | |||
172 | .flags = IORESOURCE_MEM, | 172 | .flags = IORESOURCE_MEM, |
173 | }, | 173 | }, |
174 | { | 174 | { |
175 | .start = IRQ_UART_TX, | ||
176 | .end = IRQ_UART_TX, | ||
177 | .flags = IORESOURCE_IRQ, | ||
178 | }, | ||
179 | { | ||
175 | .start = IRQ_UART_RX, | 180 | .start = IRQ_UART_RX, |
176 | .end = IRQ_UART_RX+1, | 181 | .end = IRQ_UART_RX, |
177 | .flags = IORESOURCE_IRQ, | 182 | .flags = IORESOURCE_IRQ, |
178 | }, | 183 | }, |
179 | { | 184 | { |
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c index bb056e60f6ed..1a57bc986aad 100644 --- a/arch/blackfin/mach-bf561/boards/tepla.c +++ b/arch/blackfin/mach-bf561/boards/tepla.c | |||
@@ -51,8 +51,13 @@ static struct resource bfin_uart0_resources[] = { | |||
51 | .flags = IORESOURCE_MEM, | 51 | .flags = IORESOURCE_MEM, |
52 | }, | 52 | }, |
53 | { | 53 | { |
54 | .start = IRQ_UART_TX, | ||
55 | .end = IRQ_UART_TX, | ||
56 | .flags = IORESOURCE_IRQ, | ||
57 | }, | ||
58 | { | ||
54 | .start = IRQ_UART_RX, | 59 | .start = IRQ_UART_RX, |
55 | .end = IRQ_UART_RX+1, | 60 | .end = IRQ_UART_RX, |
56 | .flags = IORESOURCE_IRQ, | 61 | .flags = IORESOURCE_IRQ, |
57 | }, | 62 | }, |
58 | { | 63 | { |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 6c28582fb98f..361d54019bb0 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -4,8 +4,8 @@ config M68K | |||
4 | select HAVE_IDE | 4 | select HAVE_IDE |
5 | select HAVE_AOUT if MMU | 5 | select HAVE_AOUT if MMU |
6 | select GENERIC_ATOMIC64 if MMU | 6 | select GENERIC_ATOMIC64 if MMU |
7 | select HAVE_GENERIC_HARDIRQS if !MMU | 7 | select HAVE_GENERIC_HARDIRQS |
8 | select GENERIC_IRQ_SHOW if !MMU | 8 | select GENERIC_IRQ_SHOW |
9 | select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS | 9 | select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS |
10 | 10 | ||
11 | config RWSEM_GENERIC_SPINLOCK | 11 | config RWSEM_GENERIC_SPINLOCK |
diff --git a/arch/m68k/Kconfig.bus b/arch/m68k/Kconfig.bus index 8294f0c1785e..3adb499584fb 100644 --- a/arch/m68k/Kconfig.bus +++ b/arch/m68k/Kconfig.bus | |||
@@ -2,6 +2,15 @@ if MMU | |||
2 | 2 | ||
3 | comment "Bus Support" | 3 | comment "Bus Support" |
4 | 4 | ||
5 | config DIO | ||
6 | bool "DIO bus support" | ||
7 | depends on HP300 | ||
8 | default y | ||
9 | help | ||
10 | Say Y here to enable support for the "DIO" expansion bus used in | ||
11 | HP300 machines. If you are using such a system you almost certainly | ||
12 | want this. | ||
13 | |||
5 | config NUBUS | 14 | config NUBUS |
6 | bool | 15 | bool |
7 | depends on MAC | 16 | depends on MAC |
diff --git a/arch/m68k/Kconfig.devices b/arch/m68k/Kconfig.devices index d214034be6a6..6033f5d4e67e 100644 --- a/arch/m68k/Kconfig.devices +++ b/arch/m68k/Kconfig.devices | |||
@@ -24,6 +24,37 @@ config PROC_HARDWARE | |||
24 | including the model, CPU, MMU, clock speed, BogoMIPS rating, | 24 | including the model, CPU, MMU, clock speed, BogoMIPS rating, |
25 | and memory size. | 25 | and memory size. |
26 | 26 | ||
27 | config NATFEAT | ||
28 | bool "ARAnyM emulator support" | ||
29 | depends on ATARI | ||
30 | help | ||
31 | This option enables support for ARAnyM native features, such as | ||
32 | access to a disk image as /dev/hda. | ||
33 | |||
34 | config NFBLOCK | ||
35 | tristate "NatFeat block device support" | ||
36 | depends on BLOCK && NATFEAT | ||
37 | help | ||
38 | Say Y to include support for the ARAnyM NatFeat block device | ||
39 | which allows direct access to the hard drives without using | ||
40 | the hardware emulation. | ||
41 | |||
42 | config NFCON | ||
43 | tristate "NatFeat console driver" | ||
44 | depends on NATFEAT | ||
45 | help | ||
46 | Say Y to include support for the ARAnyM NatFeat console driver | ||
47 | which allows the console output to be redirected to the stderr | ||
48 | output of ARAnyM. | ||
49 | |||
50 | config NFETH | ||
51 | tristate "NatFeat Ethernet support" | ||
52 | depends on ETHERNET && NATFEAT | ||
53 | help | ||
54 | Say Y to include support for the ARAnyM NatFeat network device | ||
55 | which will emulate a regular ethernet device while presenting an | ||
56 | ethertap device to the host system. | ||
57 | |||
27 | endmenu | 58 | endmenu |
28 | 59 | ||
29 | menu "Character devices" | 60 | menu "Character devices" |
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index c5b5212cc3f9..47b5f90002ab 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c | |||
@@ -1,43 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code | 2 | * Amiga Linux interrupt handling code |
3 | * | 3 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file COPYING in the main directory of this archive | 5 | * License. See the file COPYING in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | ||
8 | * 11/07/96: rewritten interrupt handling, irq lists are exists now only for | ||
9 | * this sources where it makes sense (VERTB/PORTS/EXTER) and you must | ||
10 | * be careful that dev_id for this sources is unique since this the | ||
11 | * only possibility to distinguish between different handlers for | ||
12 | * free_irq. irq lists also have different irq flags: | ||
13 | * - IRQ_FLG_FAST: handler is inserted at top of list (after other | ||
14 | * fast handlers) | ||
15 | * - IRQ_FLG_SLOW: handler is inserted at bottom of list and before | ||
16 | * they're executed irq level is set to the previous | ||
17 | * one, but handlers don't need to be reentrant, if | ||
18 | * reentrance occurred, slow handlers will be just | ||
19 | * called again. | ||
20 | * The whole interrupt handling for CIAs is moved to cia.c | ||
21 | * /Roman Zippel | ||
22 | * | ||
23 | * 07/08/99: rewamp of the interrupt handling - we now have two types of | ||
24 | * interrupts, normal and fast handlers, fast handlers being | ||
25 | * marked with IRQF_DISABLED and runs with all other interrupts | ||
26 | * disabled. Normal interrupts disable their own source but | ||
27 | * run with all other interrupt sources enabled. | ||
28 | * PORTS and EXTER interrupts are always shared even if the | ||
29 | * drivers do not explicitly mark this when calling | ||
30 | * request_irq which they really should do. | ||
31 | * This is similar to the way interrupts are handled on all | ||
32 | * other architectures and makes a ton of sense besides | ||
33 | * having the advantage of making it easier to share | ||
34 | * drivers. | ||
35 | * /Jes | ||
36 | */ | 7 | */ |
37 | 8 | ||
38 | #include <linux/init.h> | 9 | #include <linux/init.h> |
39 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
40 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/irq.h> | ||
41 | 13 | ||
42 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
43 | #include <asm/traps.h> | 15 | #include <asm/traps.h> |
@@ -45,56 +17,6 @@ | |||
45 | #include <asm/amigaints.h> | 17 | #include <asm/amigaints.h> |
46 | #include <asm/amipcmcia.h> | 18 | #include <asm/amipcmcia.h> |
47 | 19 | ||
48 | static void amiga_enable_irq(unsigned int irq); | ||
49 | static void amiga_disable_irq(unsigned int irq); | ||
50 | static irqreturn_t ami_int1(int irq, void *dev_id); | ||
51 | static irqreturn_t ami_int3(int irq, void *dev_id); | ||
52 | static irqreturn_t ami_int4(int irq, void *dev_id); | ||
53 | static irqreturn_t ami_int5(int irq, void *dev_id); | ||
54 | |||
55 | static struct irq_controller amiga_irq_controller = { | ||
56 | .name = "amiga", | ||
57 | .lock = __SPIN_LOCK_UNLOCKED(amiga_irq_controller.lock), | ||
58 | .enable = amiga_enable_irq, | ||
59 | .disable = amiga_disable_irq, | ||
60 | }; | ||
61 | |||
62 | /* | ||
63 | * void amiga_init_IRQ(void) | ||
64 | * | ||
65 | * Parameters: None | ||
66 | * | ||
67 | * Returns: Nothing | ||
68 | * | ||
69 | * This function should be called during kernel startup to initialize | ||
70 | * the amiga IRQ handling routines. | ||
71 | */ | ||
72 | |||
73 | void __init amiga_init_IRQ(void) | ||
74 | { | ||
75 | if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL)) | ||
76 | pr_err("Couldn't register int%d\n", 1); | ||
77 | if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL)) | ||
78 | pr_err("Couldn't register int%d\n", 3); | ||
79 | if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL)) | ||
80 | pr_err("Couldn't register int%d\n", 4); | ||
81 | if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL)) | ||
82 | pr_err("Couldn't register int%d\n", 5); | ||
83 | |||
84 | m68k_setup_irq_controller(&amiga_irq_controller, IRQ_USER, AMI_STD_IRQS); | ||
85 | |||
86 | /* turn off PCMCIA interrupts */ | ||
87 | if (AMIGAHW_PRESENT(PCMCIA)) | ||
88 | gayle.inten = GAYLE_IRQ_IDE; | ||
89 | |||
90 | /* turn off all interrupts and enable the master interrupt bit */ | ||
91 | amiga_custom.intena = 0x7fff; | ||
92 | amiga_custom.intreq = 0x7fff; | ||
93 | amiga_custom.intena = IF_SETCLR | IF_INTEN; | ||
94 | |||
95 | cia_init_IRQ(&ciaa_base); | ||
96 | cia_init_IRQ(&ciab_base); | ||
97 | } | ||
98 | 20 | ||
99 | /* | 21 | /* |
100 | * Enable/disable a particular machine specific interrupt source. | 22 | * Enable/disable a particular machine specific interrupt source. |
@@ -103,112 +25,150 @@ void __init amiga_init_IRQ(void) | |||
103 | * internal data, that may not be changed by the interrupt at the same time. | 25 | * internal data, that may not be changed by the interrupt at the same time. |
104 | */ | 26 | */ |
105 | 27 | ||
106 | static void amiga_enable_irq(unsigned int irq) | 28 | static void amiga_irq_enable(struct irq_data *data) |
107 | { | 29 | { |
108 | amiga_custom.intena = IF_SETCLR | (1 << (irq - IRQ_USER)); | 30 | amiga_custom.intena = IF_SETCLR | (1 << (data->irq - IRQ_USER)); |
109 | } | 31 | } |
110 | 32 | ||
111 | static void amiga_disable_irq(unsigned int irq) | 33 | static void amiga_irq_disable(struct irq_data *data) |
112 | { | 34 | { |
113 | amiga_custom.intena = 1 << (irq - IRQ_USER); | 35 | amiga_custom.intena = 1 << (data->irq - IRQ_USER); |
114 | } | 36 | } |
115 | 37 | ||
38 | static struct irq_chip amiga_irq_chip = { | ||
39 | .name = "amiga", | ||
40 | .irq_enable = amiga_irq_enable, | ||
41 | .irq_disable = amiga_irq_disable, | ||
42 | }; | ||
43 | |||
44 | |||
116 | /* | 45 | /* |
117 | * The builtin Amiga hardware interrupt handlers. | 46 | * The builtin Amiga hardware interrupt handlers. |
118 | */ | 47 | */ |
119 | 48 | ||
120 | static irqreturn_t ami_int1(int irq, void *dev_id) | 49 | static void ami_int1(unsigned int irq, struct irq_desc *desc) |
121 | { | 50 | { |
122 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 51 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
123 | 52 | ||
124 | /* if serial transmit buffer empty, interrupt */ | 53 | /* if serial transmit buffer empty, interrupt */ |
125 | if (ints & IF_TBE) { | 54 | if (ints & IF_TBE) { |
126 | amiga_custom.intreq = IF_TBE; | 55 | amiga_custom.intreq = IF_TBE; |
127 | m68k_handle_int(IRQ_AMIGA_TBE); | 56 | generic_handle_irq(IRQ_AMIGA_TBE); |
128 | } | 57 | } |
129 | 58 | ||
130 | /* if floppy disk transfer complete, interrupt */ | 59 | /* if floppy disk transfer complete, interrupt */ |
131 | if (ints & IF_DSKBLK) { | 60 | if (ints & IF_DSKBLK) { |
132 | amiga_custom.intreq = IF_DSKBLK; | 61 | amiga_custom.intreq = IF_DSKBLK; |
133 | m68k_handle_int(IRQ_AMIGA_DSKBLK); | 62 | generic_handle_irq(IRQ_AMIGA_DSKBLK); |
134 | } | 63 | } |
135 | 64 | ||
136 | /* if software interrupt set, interrupt */ | 65 | /* if software interrupt set, interrupt */ |
137 | if (ints & IF_SOFT) { | 66 | if (ints & IF_SOFT) { |
138 | amiga_custom.intreq = IF_SOFT; | 67 | amiga_custom.intreq = IF_SOFT; |
139 | m68k_handle_int(IRQ_AMIGA_SOFT); | 68 | generic_handle_irq(IRQ_AMIGA_SOFT); |
140 | } | 69 | } |
141 | return IRQ_HANDLED; | ||
142 | } | 70 | } |
143 | 71 | ||
144 | static irqreturn_t ami_int3(int irq, void *dev_id) | 72 | static void ami_int3(unsigned int irq, struct irq_desc *desc) |
145 | { | 73 | { |
146 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 74 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
147 | 75 | ||
148 | /* if a blitter interrupt */ | 76 | /* if a blitter interrupt */ |
149 | if (ints & IF_BLIT) { | 77 | if (ints & IF_BLIT) { |
150 | amiga_custom.intreq = IF_BLIT; | 78 | amiga_custom.intreq = IF_BLIT; |
151 | m68k_handle_int(IRQ_AMIGA_BLIT); | 79 | generic_handle_irq(IRQ_AMIGA_BLIT); |
152 | } | 80 | } |
153 | 81 | ||
154 | /* if a copper interrupt */ | 82 | /* if a copper interrupt */ |
155 | if (ints & IF_COPER) { | 83 | if (ints & IF_COPER) { |
156 | amiga_custom.intreq = IF_COPER; | 84 | amiga_custom.intreq = IF_COPER; |
157 | m68k_handle_int(IRQ_AMIGA_COPPER); | 85 | generic_handle_irq(IRQ_AMIGA_COPPER); |
158 | } | 86 | } |
159 | 87 | ||
160 | /* if a vertical blank interrupt */ | 88 | /* if a vertical blank interrupt */ |
161 | if (ints & IF_VERTB) { | 89 | if (ints & IF_VERTB) { |
162 | amiga_custom.intreq = IF_VERTB; | 90 | amiga_custom.intreq = IF_VERTB; |
163 | m68k_handle_int(IRQ_AMIGA_VERTB); | 91 | generic_handle_irq(IRQ_AMIGA_VERTB); |
164 | } | 92 | } |
165 | return IRQ_HANDLED; | ||
166 | } | 93 | } |
167 | 94 | ||
168 | static irqreturn_t ami_int4(int irq, void *dev_id) | 95 | static void ami_int4(unsigned int irq, struct irq_desc *desc) |
169 | { | 96 | { |
170 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 97 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
171 | 98 | ||
172 | /* if audio 0 interrupt */ | 99 | /* if audio 0 interrupt */ |
173 | if (ints & IF_AUD0) { | 100 | if (ints & IF_AUD0) { |
174 | amiga_custom.intreq = IF_AUD0; | 101 | amiga_custom.intreq = IF_AUD0; |
175 | m68k_handle_int(IRQ_AMIGA_AUD0); | 102 | generic_handle_irq(IRQ_AMIGA_AUD0); |
176 | } | 103 | } |
177 | 104 | ||
178 | /* if audio 1 interrupt */ | 105 | /* if audio 1 interrupt */ |
179 | if (ints & IF_AUD1) { | 106 | if (ints & IF_AUD1) { |
180 | amiga_custom.intreq = IF_AUD1; | 107 | amiga_custom.intreq = IF_AUD1; |
181 | m68k_handle_int(IRQ_AMIGA_AUD1); | 108 | generic_handle_irq(IRQ_AMIGA_AUD1); |
182 | } | 109 | } |
183 | 110 | ||
184 | /* if audio 2 interrupt */ | 111 | /* if audio 2 interrupt */ |
185 | if (ints & IF_AUD2) { | 112 | if (ints & IF_AUD2) { |
186 | amiga_custom.intreq = IF_AUD2; | 113 | amiga_custom.intreq = IF_AUD2; |
187 | m68k_handle_int(IRQ_AMIGA_AUD2); | 114 | generic_handle_irq(IRQ_AMIGA_AUD2); |
188 | } | 115 | } |
189 | 116 | ||
190 | /* if audio 3 interrupt */ | 117 | /* if audio 3 interrupt */ |
191 | if (ints & IF_AUD3) { | 118 | if (ints & IF_AUD3) { |
192 | amiga_custom.intreq = IF_AUD3; | 119 | amiga_custom.intreq = IF_AUD3; |
193 | m68k_handle_int(IRQ_AMIGA_AUD3); | 120 | generic_handle_irq(IRQ_AMIGA_AUD3); |
194 | } | 121 | } |
195 | return IRQ_HANDLED; | ||
196 | } | 122 | } |
197 | 123 | ||
198 | static irqreturn_t ami_int5(int irq, void *dev_id) | 124 | static void ami_int5(unsigned int irq, struct irq_desc *desc) |
199 | { | 125 | { |
200 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 126 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
201 | 127 | ||
202 | /* if serial receive buffer full interrupt */ | 128 | /* if serial receive buffer full interrupt */ |
203 | if (ints & IF_RBF) { | 129 | if (ints & IF_RBF) { |
204 | /* acknowledge of IF_RBF must be done by the serial interrupt */ | 130 | /* acknowledge of IF_RBF must be done by the serial interrupt */ |
205 | m68k_handle_int(IRQ_AMIGA_RBF); | 131 | generic_handle_irq(IRQ_AMIGA_RBF); |
206 | } | 132 | } |
207 | 133 | ||
208 | /* if a disk sync interrupt */ | 134 | /* if a disk sync interrupt */ |
209 | if (ints & IF_DSKSYN) { | 135 | if (ints & IF_DSKSYN) { |
210 | amiga_custom.intreq = IF_DSKSYN; | 136 | amiga_custom.intreq = IF_DSKSYN; |
211 | m68k_handle_int(IRQ_AMIGA_DSKSYN); | 137 | generic_handle_irq(IRQ_AMIGA_DSKSYN); |
212 | } | 138 | } |
213 | return IRQ_HANDLED; | 139 | } |
140 | |||
141 | |||
142 | /* | ||
143 | * void amiga_init_IRQ(void) | ||
144 | * | ||
145 | * Parameters: None | ||
146 | * | ||
147 | * Returns: Nothing | ||
148 | * | ||
149 | * This function should be called during kernel startup to initialize | ||
150 | * the amiga IRQ handling routines. | ||
151 | */ | ||
152 | |||
153 | void __init amiga_init_IRQ(void) | ||
154 | { | ||
155 | m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER, | ||
156 | AMI_STD_IRQS); | ||
157 | |||
158 | irq_set_chained_handler(IRQ_AUTO_1, ami_int1); | ||
159 | irq_set_chained_handler(IRQ_AUTO_3, ami_int3); | ||
160 | irq_set_chained_handler(IRQ_AUTO_4, ami_int4); | ||
161 | irq_set_chained_handler(IRQ_AUTO_5, ami_int5); | ||
162 | |||
163 | /* turn off PCMCIA interrupts */ | ||
164 | if (AMIGAHW_PRESENT(PCMCIA)) | ||
165 | gayle.inten = GAYLE_IRQ_IDE; | ||
166 | |||
167 | /* turn off all interrupts and enable the master interrupt bit */ | ||
168 | amiga_custom.intena = 0x7fff; | ||
169 | amiga_custom.intreq = 0x7fff; | ||
170 | amiga_custom.intena = IF_SETCLR | IF_INTEN; | ||
171 | |||
172 | cia_init_IRQ(&ciaa_base); | ||
173 | cia_init_IRQ(&ciab_base); | ||
214 | } | 174 | } |
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c index ecd0f7ca6f0e..18c0e29976e3 100644 --- a/arch/m68k/amiga/cia.c +++ b/arch/m68k/amiga/cia.c | |||
@@ -93,13 +93,14 @@ static irqreturn_t cia_handler(int irq, void *dev_id) | |||
93 | amiga_custom.intreq = base->int_mask; | 93 | amiga_custom.intreq = base->int_mask; |
94 | for (; ints; mach_irq++, ints >>= 1) { | 94 | for (; ints; mach_irq++, ints >>= 1) { |
95 | if (ints & 1) | 95 | if (ints & 1) |
96 | m68k_handle_int(mach_irq); | 96 | generic_handle_irq(mach_irq); |
97 | } | 97 | } |
98 | return IRQ_HANDLED; | 98 | return IRQ_HANDLED; |
99 | } | 99 | } |
100 | 100 | ||
101 | static void cia_enable_irq(unsigned int irq) | 101 | static void cia_irq_enable(struct irq_data *data) |
102 | { | 102 | { |
103 | unsigned int irq = data->irq; | ||
103 | unsigned char mask; | 104 | unsigned char mask; |
104 | 105 | ||
105 | if (irq >= IRQ_AMIGA_CIAB) { | 106 | if (irq >= IRQ_AMIGA_CIAB) { |
@@ -113,19 +114,20 @@ static void cia_enable_irq(unsigned int irq) | |||
113 | } | 114 | } |
114 | } | 115 | } |
115 | 116 | ||
116 | static void cia_disable_irq(unsigned int irq) | 117 | static void cia_irq_disable(struct irq_data *data) |
117 | { | 118 | { |
119 | unsigned int irq = data->irq; | ||
120 | |||
118 | if (irq >= IRQ_AMIGA_CIAB) | 121 | if (irq >= IRQ_AMIGA_CIAB) |
119 | cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB)); | 122 | cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB)); |
120 | else | 123 | else |
121 | cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA)); | 124 | cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA)); |
122 | } | 125 | } |
123 | 126 | ||
124 | static struct irq_controller cia_irq_controller = { | 127 | static struct irq_chip cia_irq_chip = { |
125 | .name = "cia", | 128 | .name = "cia", |
126 | .lock = __SPIN_LOCK_UNLOCKED(cia_irq_controller.lock), | 129 | .irq_enable = cia_irq_enable, |
127 | .enable = cia_enable_irq, | 130 | .irq_disable = cia_irq_disable, |
128 | .disable = cia_disable_irq, | ||
129 | }; | 131 | }; |
130 | 132 | ||
131 | /* | 133 | /* |
@@ -134,9 +136,9 @@ static struct irq_controller cia_irq_controller = { | |||
134 | * into this chain. | 136 | * into this chain. |
135 | */ | 137 | */ |
136 | 138 | ||
137 | static void auto_enable_irq(unsigned int irq) | 139 | static void auto_irq_enable(struct irq_data *data) |
138 | { | 140 | { |
139 | switch (irq) { | 141 | switch (data->irq) { |
140 | case IRQ_AUTO_2: | 142 | case IRQ_AUTO_2: |
141 | amiga_custom.intena = IF_SETCLR | IF_PORTS; | 143 | amiga_custom.intena = IF_SETCLR | IF_PORTS; |
142 | break; | 144 | break; |
@@ -146,9 +148,9 @@ static void auto_enable_irq(unsigned int irq) | |||
146 | } | 148 | } |
147 | } | 149 | } |
148 | 150 | ||
149 | static void auto_disable_irq(unsigned int irq) | 151 | static void auto_irq_disable(struct irq_data *data) |
150 | { | 152 | { |
151 | switch (irq) { | 153 | switch (data->irq) { |
152 | case IRQ_AUTO_2: | 154 | case IRQ_AUTO_2: |
153 | amiga_custom.intena = IF_PORTS; | 155 | amiga_custom.intena = IF_PORTS; |
154 | break; | 156 | break; |
@@ -158,24 +160,25 @@ static void auto_disable_irq(unsigned int irq) | |||
158 | } | 160 | } |
159 | } | 161 | } |
160 | 162 | ||
161 | static struct irq_controller auto_irq_controller = { | 163 | static struct irq_chip auto_irq_chip = { |
162 | .name = "auto", | 164 | .name = "auto", |
163 | .lock = __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock), | 165 | .irq_enable = auto_irq_enable, |
164 | .enable = auto_enable_irq, | 166 | .irq_disable = auto_irq_disable, |
165 | .disable = auto_disable_irq, | ||
166 | }; | 167 | }; |
167 | 168 | ||
168 | void __init cia_init_IRQ(struct ciabase *base) | 169 | void __init cia_init_IRQ(struct ciabase *base) |
169 | { | 170 | { |
170 | m68k_setup_irq_controller(&cia_irq_controller, base->cia_irq, CIA_IRQS); | 171 | m68k_setup_irq_controller(&cia_irq_chip, handle_simple_irq, |
172 | base->cia_irq, CIA_IRQS); | ||
171 | 173 | ||
172 | /* clear any pending interrupt and turn off all interrupts */ | 174 | /* clear any pending interrupt and turn off all interrupts */ |
173 | cia_set_irq(base, CIA_ICR_ALL); | 175 | cia_set_irq(base, CIA_ICR_ALL); |
174 | cia_able_irq(base, CIA_ICR_ALL); | 176 | cia_able_irq(base, CIA_ICR_ALL); |
175 | 177 | ||
176 | /* override auto int and install CIA handler */ | 178 | /* override auto int and install CIA handler */ |
177 | m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1); | 179 | m68k_setup_irq_controller(&auto_irq_chip, handle_simple_irq, |
178 | m68k_irq_startup(base->handler_irq); | 180 | base->handler_irq, 1); |
181 | m68k_irq_startup_irq(base->handler_irq); | ||
179 | if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED, | 182 | if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED, |
180 | base->name, base)) | 183 | base->name, base)) |
181 | pr_err("Couldn't register %s interrupt\n", base->name); | 184 | pr_err("Couldn't register %s interrupt\n", base->name); |
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c index 5d47f3aa3810..17be1e7e2df2 100644 --- a/arch/m68k/apollo/dn_ints.c +++ b/arch/m68k/apollo/dn_ints.c | |||
@@ -1,19 +1,13 @@ | |||
1 | #include <linux/interrupt.h> | 1 | #include <linux/interrupt.h> |
2 | #include <linux/irq.h> | ||
2 | 3 | ||
3 | #include <asm/irq.h> | ||
4 | #include <asm/traps.h> | 4 | #include <asm/traps.h> |
5 | #include <asm/apollohw.h> | 5 | #include <asm/apollohw.h> |
6 | 6 | ||
7 | void dn_process_int(unsigned int irq, struct pt_regs *fp) | 7 | unsigned int apollo_irq_startup(struct irq_data *data) |
8 | { | 8 | { |
9 | __m68k_handle_int(irq, fp); | 9 | unsigned int irq = data->irq; |
10 | 10 | ||
11 | *(volatile unsigned char *)(pica)=0x20; | ||
12 | *(volatile unsigned char *)(picb)=0x20; | ||
13 | } | ||
14 | |||
15 | int apollo_irq_startup(unsigned int irq) | ||
16 | { | ||
17 | if (irq < 8) | 11 | if (irq < 8) |
18 | *(volatile unsigned char *)(pica+1) &= ~(1 << irq); | 12 | *(volatile unsigned char *)(pica+1) &= ~(1 << irq); |
19 | else | 13 | else |
@@ -21,24 +15,33 @@ int apollo_irq_startup(unsigned int irq) | |||
21 | return 0; | 15 | return 0; |
22 | } | 16 | } |
23 | 17 | ||
24 | void apollo_irq_shutdown(unsigned int irq) | 18 | void apollo_irq_shutdown(struct irq_data *data) |
25 | { | 19 | { |
20 | unsigned int irq = data->irq; | ||
21 | |||
26 | if (irq < 8) | 22 | if (irq < 8) |
27 | *(volatile unsigned char *)(pica+1) |= (1 << irq); | 23 | *(volatile unsigned char *)(pica+1) |= (1 << irq); |
28 | else | 24 | else |
29 | *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); | 25 | *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); |
30 | } | 26 | } |
31 | 27 | ||
32 | static struct irq_controller apollo_irq_controller = { | 28 | void apollo_irq_eoi(struct irq_data *data) |
29 | { | ||
30 | *(volatile unsigned char *)(pica) = 0x20; | ||
31 | *(volatile unsigned char *)(picb) = 0x20; | ||
32 | } | ||
33 | |||
34 | static struct irq_chip apollo_irq_chip = { | ||
33 | .name = "apollo", | 35 | .name = "apollo", |
34 | .lock = __SPIN_LOCK_UNLOCKED(apollo_irq_controller.lock), | 36 | .irq_startup = apollo_irq_startup, |
35 | .startup = apollo_irq_startup, | 37 | .irq_shutdown = apollo_irq_shutdown, |
36 | .shutdown = apollo_irq_shutdown, | 38 | .irq_eoi = apollo_irq_eoi, |
37 | }; | 39 | }; |
38 | 40 | ||
39 | 41 | ||
40 | void __init dn_init_IRQ(void) | 42 | void __init dn_init_IRQ(void) |
41 | { | 43 | { |
42 | m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int); | 44 | m68k_setup_user_interrupt(VEC_USER + 96, 16); |
43 | m68k_setup_irq_controller(&apollo_irq_controller, IRQ_APOLLO, 16); | 45 | m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq, |
46 | IRQ_APOLLO, 16); | ||
44 | } | 47 | } |
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 26a804e67bce..6d196dadfdbc 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
@@ -60,243 +60,7 @@ | |||
60 | * <asm/atariints.h>): Autovector interrupts are 1..7, then follow ST-MFP, | 60 | * <asm/atariints.h>): Autovector interrupts are 1..7, then follow ST-MFP, |
61 | * TT-MFP, SCC, and finally VME interrupts. Vector numbers for the latter can | 61 | * TT-MFP, SCC, and finally VME interrupts. Vector numbers for the latter can |
62 | * be allocated by atari_register_vme_int(). | 62 | * be allocated by atari_register_vme_int(). |
63 | * | ||
64 | * Each interrupt can be of three types: | ||
65 | * | ||
66 | * - SLOW: The handler runs with all interrupts enabled, except the one it | ||
67 | * was called by (to avoid reentering). This should be the usual method. | ||
68 | * But it is currently possible only for MFP ints, since only the MFP | ||
69 | * offers an easy way to mask interrupts. | ||
70 | * | ||
71 | * - FAST: The handler runs with all interrupts disabled. This should be used | ||
72 | * only for really fast handlers, that just do actions immediately | ||
73 | * necessary, and let the rest do a bottom half or task queue. | ||
74 | * | ||
75 | * - PRIORITIZED: The handler can be interrupted by higher-level ints | ||
76 | * (greater IPL, no MFP priorities!). This is the method of choice for ints | ||
77 | * which should be slow, but are not from a MFP. | ||
78 | * | ||
79 | * The feature of more than one handler for one int source is still there, but | ||
80 | * only applicable if all handers are of the same type. To not slow down | ||
81 | * processing of ints with only one handler by the chaining feature, the list | ||
82 | * calling function atari_call_irq_list() is only plugged in at the time the | ||
83 | * second handler is registered. | ||
84 | * | ||
85 | * Implementation notes: For fast-as-possible int handling, there are separate | ||
86 | * entry points for each type (slow/fast/prio). The assembler handler calls | ||
87 | * the irq directly in the usual case, no C wrapper is involved. In case of | ||
88 | * multiple handlers, atari_call_irq_list() is registered as handler and calls | ||
89 | * in turn the real irq's. To ease access from assembler level to the irq | ||
90 | * function pointer and accompanying data, these two are stored in a separate | ||
91 | * array, irq_handler[]. The rest of data (type, name) are put into a second | ||
92 | * array, irq_param, that is accessed from C only. For each slow interrupt (32 | ||
93 | * in all) there are separate handler functions, which makes it possible to | ||
94 | * hard-code the MFP register address and value, are necessary to mask the | ||
95 | * int. If there'd be only one generic function, lots of calculations would be | ||
96 | * needed to determine MFP register and int mask from the vector number :-( | ||
97 | * | ||
98 | * Furthermore, slow ints may not lower the IPL below its previous value | ||
99 | * (before the int happened). This is needed so that an int of class PRIO, on | ||
100 | * that this int may be stacked, cannot be reentered. This feature is | ||
101 | * implemented as follows: If the stack frame format is 1 (throwaway), the int | ||
102 | * is not stacked, and the IPL is anded with 0xfbff, resulting in a new level | ||
103 | * 2, which still blocks the HSYNC, but no interrupts of interest. If the | ||
104 | * frame format is 0, the int is nested, and the old IPL value can be found in | ||
105 | * the sr copy in the frame. | ||
106 | */ | ||
107 | |||
108 | #if 0 | ||
109 | |||
110 | #define NUM_INT_SOURCES (8 + NUM_ATARI_SOURCES) | ||
111 | |||
112 | typedef void (*asm_irq_handler)(void); | ||
113 | |||
114 | struct irqhandler { | ||
115 | irqreturn_t (*handler)(int, void *, struct pt_regs *); | ||
116 | void *dev_id; | ||
117 | }; | ||
118 | |||
119 | struct irqparam { | ||
120 | unsigned long flags; | ||
121 | const char *devname; | ||
122 | }; | ||
123 | |||
124 | /* | ||
125 | * Array with irq's and their parameter data. This array is accessed from low | ||
126 | * level assembler code, so an element size of 8 allows usage of index scaling | ||
127 | * addressing mode. | ||
128 | */ | 63 | */ |
129 | static struct irqhandler irq_handler[NUM_INT_SOURCES]; | ||
130 | |||
131 | /* | ||
132 | * This array hold the rest of parameters of int handlers: type | ||
133 | * (slow,fast,prio) and the name of the handler. These values are only | ||
134 | * accessed from C | ||
135 | */ | ||
136 | static struct irqparam irq_param[NUM_INT_SOURCES]; | ||
137 | |||
138 | /* check for valid int number (complex, sigh...) */ | ||
139 | #define IS_VALID_INTNO(n) \ | ||
140 | ((n) > 0 && \ | ||
141 | /* autovec and ST-MFP ok anyway */ \ | ||
142 | (((n) < TTMFP_SOURCE_BASE) || \ | ||
143 | /* TT-MFP ok if present */ \ | ||
144 | ((n) >= TTMFP_SOURCE_BASE && (n) < SCC_SOURCE_BASE && \ | ||
145 | ATARIHW_PRESENT(TT_MFP)) || \ | ||
146 | /* SCC ok if present and number even */ \ | ||
147 | ((n) >= SCC_SOURCE_BASE && (n) < VME_SOURCE_BASE && \ | ||
148 | !((n) & 1) && ATARIHW_PRESENT(SCC)) || \ | ||
149 | /* greater numbers ok if they are registered VME vectors */ \ | ||
150 | ((n) >= VME_SOURCE_BASE && (n) < VME_SOURCE_BASE + VME_MAX_SOURCES && \ | ||
151 | free_vme_vec_bitmap & (1 << ((n) - VME_SOURCE_BASE))))) | ||
152 | |||
153 | |||
154 | /* | ||
155 | * Here start the assembler entry points for interrupts | ||
156 | */ | ||
157 | |||
158 | #define IRQ_NAME(nr) atari_slow_irq_##nr##_handler(void) | ||
159 | |||
160 | #define BUILD_SLOW_IRQ(n) \ | ||
161 | asmlinkage void IRQ_NAME(n); \ | ||
162 | /* Dummy function to allow asm with operands. */ \ | ||
163 | void atari_slow_irq_##n##_dummy (void) { \ | ||
164 | __asm__ (__ALIGN_STR "\n" \ | ||
165 | "atari_slow_irq_" #n "_handler:\t" \ | ||
166 | " addl %6,%5\n" /* preempt_count() += HARDIRQ_OFFSET */ \ | ||
167 | SAVE_ALL_INT "\n" \ | ||
168 | GET_CURRENT(%%d0) "\n" \ | ||
169 | " andb #~(1<<(%c3&7)),%a4:w\n" /* mask this interrupt */ \ | ||
170 | /* get old IPL from stack frame */ \ | ||
171 | " bfextu %%sp@(%c2){#5,#3},%%d0\n" \ | ||
172 | " movew %%sr,%%d1\n" \ | ||
173 | " bfins %%d0,%%d1{#21,#3}\n" \ | ||
174 | " movew %%d1,%%sr\n" /* set IPL = previous value */ \ | ||
175 | " addql #1,%a0\n" \ | ||
176 | " lea %a1,%%a0\n" \ | ||
177 | " pea %%sp@\n" /* push addr of frame */ \ | ||
178 | " movel %%a0@(4),%%sp@-\n" /* push handler data */ \ | ||
179 | " pea (%c3+8)\n" /* push int number */ \ | ||
180 | " movel %%a0@,%%a0\n" \ | ||
181 | " jbsr %%a0@\n" /* call the handler */ \ | ||
182 | " addql #8,%%sp\n" \ | ||
183 | " addql #4,%%sp\n" \ | ||
184 | " orw #0x0600,%%sr\n" \ | ||
185 | " andw #0xfeff,%%sr\n" /* set IPL = 6 again */ \ | ||
186 | " orb #(1<<(%c3&7)),%a4:w\n" /* now unmask the int again */ \ | ||
187 | " jbra ret_from_interrupt\n" \ | ||
188 | : : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \ | ||
189 | "n" (PT_OFF_SR), "n" (n), \ | ||
190 | "i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &st_mfp.int_mk_a) \ | ||
191 | : (n & 16 ? &tt_mfp.int_mk_b : &st_mfp.int_mk_b)), \ | ||
192 | "m" (preempt_count()), "di" (HARDIRQ_OFFSET) \ | ||
193 | ); \ | ||
194 | for (;;); /* fake noreturn */ \ | ||
195 | } | ||
196 | |||
197 | BUILD_SLOW_IRQ(0); | ||
198 | BUILD_SLOW_IRQ(1); | ||
199 | BUILD_SLOW_IRQ(2); | ||
200 | BUILD_SLOW_IRQ(3); | ||
201 | BUILD_SLOW_IRQ(4); | ||
202 | BUILD_SLOW_IRQ(5); | ||
203 | BUILD_SLOW_IRQ(6); | ||
204 | BUILD_SLOW_IRQ(7); | ||
205 | BUILD_SLOW_IRQ(8); | ||
206 | BUILD_SLOW_IRQ(9); | ||
207 | BUILD_SLOW_IRQ(10); | ||
208 | BUILD_SLOW_IRQ(11); | ||
209 | BUILD_SLOW_IRQ(12); | ||
210 | BUILD_SLOW_IRQ(13); | ||
211 | BUILD_SLOW_IRQ(14); | ||
212 | BUILD_SLOW_IRQ(15); | ||
213 | BUILD_SLOW_IRQ(16); | ||
214 | BUILD_SLOW_IRQ(17); | ||
215 | BUILD_SLOW_IRQ(18); | ||
216 | BUILD_SLOW_IRQ(19); | ||
217 | BUILD_SLOW_IRQ(20); | ||
218 | BUILD_SLOW_IRQ(21); | ||
219 | BUILD_SLOW_IRQ(22); | ||
220 | BUILD_SLOW_IRQ(23); | ||
221 | BUILD_SLOW_IRQ(24); | ||
222 | BUILD_SLOW_IRQ(25); | ||
223 | BUILD_SLOW_IRQ(26); | ||
224 | BUILD_SLOW_IRQ(27); | ||
225 | BUILD_SLOW_IRQ(28); | ||
226 | BUILD_SLOW_IRQ(29); | ||
227 | BUILD_SLOW_IRQ(30); | ||
228 | BUILD_SLOW_IRQ(31); | ||
229 | |||
230 | asm_irq_handler slow_handlers[32] = { | ||
231 | [0] = atari_slow_irq_0_handler, | ||
232 | [1] = atari_slow_irq_1_handler, | ||
233 | [2] = atari_slow_irq_2_handler, | ||
234 | [3] = atari_slow_irq_3_handler, | ||
235 | [4] = atari_slow_irq_4_handler, | ||
236 | [5] = atari_slow_irq_5_handler, | ||
237 | [6] = atari_slow_irq_6_handler, | ||
238 | [7] = atari_slow_irq_7_handler, | ||
239 | [8] = atari_slow_irq_8_handler, | ||
240 | [9] = atari_slow_irq_9_handler, | ||
241 | [10] = atari_slow_irq_10_handler, | ||
242 | [11] = atari_slow_irq_11_handler, | ||
243 | [12] = atari_slow_irq_12_handler, | ||
244 | [13] = atari_slow_irq_13_handler, | ||
245 | [14] = atari_slow_irq_14_handler, | ||
246 | [15] = atari_slow_irq_15_handler, | ||
247 | [16] = atari_slow_irq_16_handler, | ||
248 | [17] = atari_slow_irq_17_handler, | ||
249 | [18] = atari_slow_irq_18_handler, | ||
250 | [19] = atari_slow_irq_19_handler, | ||
251 | [20] = atari_slow_irq_20_handler, | ||
252 | [21] = atari_slow_irq_21_handler, | ||
253 | [22] = atari_slow_irq_22_handler, | ||
254 | [23] = atari_slow_irq_23_handler, | ||
255 | [24] = atari_slow_irq_24_handler, | ||
256 | [25] = atari_slow_irq_25_handler, | ||
257 | [26] = atari_slow_irq_26_handler, | ||
258 | [27] = atari_slow_irq_27_handler, | ||
259 | [28] = atari_slow_irq_28_handler, | ||
260 | [29] = atari_slow_irq_29_handler, | ||
261 | [30] = atari_slow_irq_30_handler, | ||
262 | [31] = atari_slow_irq_31_handler | ||
263 | }; | ||
264 | |||
265 | asmlinkage void atari_fast_irq_handler( void ); | ||
266 | asmlinkage void atari_prio_irq_handler( void ); | ||
267 | |||
268 | /* Dummy function to allow asm with operands. */ | ||
269 | void atari_fast_prio_irq_dummy (void) { | ||
270 | __asm__ (__ALIGN_STR "\n" | ||
271 | "atari_fast_irq_handler:\n\t" | ||
272 | "orw #0x700,%%sr\n" /* disable all interrupts */ | ||
273 | "atari_prio_irq_handler:\n\t" | ||
274 | "addl %3,%2\n\t" /* preempt_count() += HARDIRQ_OFFSET */ | ||
275 | SAVE_ALL_INT "\n\t" | ||
276 | GET_CURRENT(%%d0) "\n\t" | ||
277 | /* get vector number from stack frame and convert to source */ | ||
278 | "bfextu %%sp@(%c1){#4,#10},%%d0\n\t" | ||
279 | "subw #(0x40-8),%%d0\n\t" | ||
280 | "jpl 1f\n\t" | ||
281 | "addw #(0x40-8-0x18),%%d0\n" | ||
282 | "1:\tlea %a0,%%a0\n\t" | ||
283 | "addql #1,%%a0@(%%d0:l:4)\n\t" | ||
284 | "lea irq_handler,%%a0\n\t" | ||
285 | "lea %%a0@(%%d0:l:8),%%a0\n\t" | ||
286 | "pea %%sp@\n\t" /* push frame address */ | ||
287 | "movel %%a0@(4),%%sp@-\n\t" /* push handler data */ | ||
288 | "movel %%d0,%%sp@-\n\t" /* push int number */ | ||
289 | "movel %%a0@,%%a0\n\t" | ||
290 | "jsr %%a0@\n\t" /* and call the handler */ | ||
291 | "addql #8,%%sp\n\t" | ||
292 | "addql #4,%%sp\n\t" | ||
293 | "jbra ret_from_interrupt" | ||
294 | : : "i" (&kstat_cpu(0).irqs), "n" (PT_OFF_FORMATVEC), | ||
295 | "m" (preempt_count()), "di" (HARDIRQ_OFFSET) | ||
296 | ); | ||
297 | for (;;); | ||
298 | } | ||
299 | #endif | ||
300 | 64 | ||
301 | /* | 65 | /* |
302 | * Bitmap for free interrupt vector numbers | 66 | * Bitmap for free interrupt vector numbers |
@@ -320,31 +84,44 @@ extern void atari_microwire_cmd(int cmd); | |||
320 | 84 | ||
321 | extern int atari_SCC_reset_done; | 85 | extern int atari_SCC_reset_done; |
322 | 86 | ||
323 | static int atari_startup_irq(unsigned int irq) | 87 | static unsigned int atari_irq_startup(struct irq_data *data) |
324 | { | 88 | { |
325 | m68k_irq_startup(irq); | 89 | unsigned int irq = data->irq; |
90 | |||
91 | m68k_irq_startup(data); | ||
326 | atari_turnon_irq(irq); | 92 | atari_turnon_irq(irq); |
327 | atari_enable_irq(irq); | 93 | atari_enable_irq(irq); |
328 | return 0; | 94 | return 0; |
329 | } | 95 | } |
330 | 96 | ||
331 | static void atari_shutdown_irq(unsigned int irq) | 97 | static void atari_irq_shutdown(struct irq_data *data) |
332 | { | 98 | { |
99 | unsigned int irq = data->irq; | ||
100 | |||
333 | atari_disable_irq(irq); | 101 | atari_disable_irq(irq); |
334 | atari_turnoff_irq(irq); | 102 | atari_turnoff_irq(irq); |
335 | m68k_irq_shutdown(irq); | 103 | m68k_irq_shutdown(data); |
336 | 104 | ||
337 | if (irq == IRQ_AUTO_4) | 105 | if (irq == IRQ_AUTO_4) |
338 | vectors[VEC_INT4] = falcon_hblhandler; | 106 | vectors[VEC_INT4] = falcon_hblhandler; |
339 | } | 107 | } |
340 | 108 | ||
341 | static struct irq_controller atari_irq_controller = { | 109 | static void atari_irq_enable(struct irq_data *data) |
110 | { | ||
111 | atari_enable_irq(data->irq); | ||
112 | } | ||
113 | |||
114 | static void atari_irq_disable(struct irq_data *data) | ||
115 | { | ||
116 | atari_disable_irq(data->irq); | ||
117 | } | ||
118 | |||
119 | static struct irq_chip atari_irq_chip = { | ||
342 | .name = "atari", | 120 | .name = "atari", |
343 | .lock = __SPIN_LOCK_UNLOCKED(atari_irq_controller.lock), | 121 | .irq_startup = atari_irq_startup, |
344 | .startup = atari_startup_irq, | 122 | .irq_shutdown = atari_irq_shutdown, |
345 | .shutdown = atari_shutdown_irq, | 123 | .irq_enable = atari_irq_enable, |
346 | .enable = atari_enable_irq, | 124 | .irq_disable = atari_irq_disable, |
347 | .disable = atari_disable_irq, | ||
348 | }; | 125 | }; |
349 | 126 | ||
350 | /* | 127 | /* |
@@ -360,8 +137,9 @@ static struct irq_controller atari_irq_controller = { | |||
360 | 137 | ||
361 | void __init atari_init_IRQ(void) | 138 | void __init atari_init_IRQ(void) |
362 | { | 139 | { |
363 | m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL); | 140 | m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER); |
364 | m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1); | 141 | m68k_setup_irq_controller(&atari_irq_chip, handle_simple_irq, 1, |
142 | NUM_ATARI_SOURCES - 1); | ||
365 | 143 | ||
366 | /* Initialize the MFP(s) */ | 144 | /* Initialize the MFP(s) */ |
367 | 145 | ||
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c index 1edd95095cb4..81286476f740 100644 --- a/arch/m68k/bvme6000/config.c +++ b/arch/m68k/bvme6000/config.c | |||
@@ -86,7 +86,7 @@ static void bvme6000_get_model(char *model) | |||
86 | */ | 86 | */ |
87 | static void __init bvme6000_init_IRQ(void) | 87 | static void __init bvme6000_init_IRQ(void) |
88 | { | 88 | { |
89 | m68k_setup_user_interrupt(VEC_USER, 192, NULL); | 89 | m68k_setup_user_interrupt(VEC_USER, 192); |
90 | } | 90 | } |
91 | 91 | ||
92 | void __init config_bvme6000(void) | 92 | void __init config_bvme6000(void) |
diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c index f6312c7d8727..c87fe69b0728 100644 --- a/arch/m68k/hp300/time.c +++ b/arch/m68k/hp300/time.c | |||
@@ -70,7 +70,7 @@ void __init hp300_sched_init(irq_handler_t vector) | |||
70 | 70 | ||
71 | asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE)); | 71 | asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE)); |
72 | 72 | ||
73 | if (request_irq(IRQ_AUTO_6, hp300_tick, IRQ_FLG_STD, "timer tick", vector)) | 73 | if (request_irq(IRQ_AUTO_6, hp300_tick, 0, "timer tick", vector)) |
74 | pr_err("Couldn't register timer interrupt\n"); | 74 | pr_err("Couldn't register timer interrupt\n"); |
75 | 75 | ||
76 | out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */ | 76 | out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */ |
diff --git a/arch/m68k/include/asm/hardirq.h b/arch/m68k/include/asm/hardirq.h index 870e5347155b..db30ed276878 100644 --- a/arch/m68k/include/asm/hardirq.h +++ b/arch/m68k/include/asm/hardirq.h | |||
@@ -18,6 +18,11 @@ | |||
18 | 18 | ||
19 | #ifdef CONFIG_MMU | 19 | #ifdef CONFIG_MMU |
20 | 20 | ||
21 | static inline void ack_bad_irq(unsigned int irq) | ||
22 | { | ||
23 | pr_crit("unexpected IRQ trap at vector %02x\n", irq); | ||
24 | } | ||
25 | |||
21 | /* entry.S is sensitive to the offsets of these fields */ | 26 | /* entry.S is sensitive to the offsets of these fields */ |
22 | typedef struct { | 27 | typedef struct { |
23 | unsigned int __softirq_pending; | 28 | unsigned int __softirq_pending; |
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h index 69ed0d74d532..6198df5ff245 100644 --- a/arch/m68k/include/asm/irq.h +++ b/arch/m68k/include/asm/irq.h | |||
@@ -27,11 +27,6 @@ | |||
27 | 27 | ||
28 | #ifdef CONFIG_MMU | 28 | #ifdef CONFIG_MMU |
29 | 29 | ||
30 | #include <linux/linkage.h> | ||
31 | #include <linux/hardirq.h> | ||
32 | #include <linux/irqreturn.h> | ||
33 | #include <linux/spinlock_types.h> | ||
34 | |||
35 | /* | 30 | /* |
36 | * Interrupt source definitions | 31 | * Interrupt source definitions |
37 | * General interrupt sources are the level 1-7. | 32 | * General interrupt sources are the level 1-7. |
@@ -54,10 +49,6 @@ | |||
54 | 49 | ||
55 | #define IRQ_USER 8 | 50 | #define IRQ_USER 8 |
56 | 51 | ||
57 | extern unsigned int irq_canonicalize(unsigned int irq); | ||
58 | |||
59 | struct pt_regs; | ||
60 | |||
61 | /* | 52 | /* |
62 | * various flags for request_irq() - the Amiga now uses the standard | 53 | * various flags for request_irq() - the Amiga now uses the standard |
63 | * mechanism like all other architectures - IRQF_DISABLED and | 54 | * mechanism like all other architectures - IRQF_DISABLED and |
@@ -71,57 +62,27 @@ struct pt_regs; | |||
71 | #define IRQ_FLG_STD (0x8000) /* internally used */ | 62 | #define IRQ_FLG_STD (0x8000) /* internally used */ |
72 | #endif | 63 | #endif |
73 | 64 | ||
74 | /* | 65 | struct irq_data; |
75 | * This structure is used to chain together the ISRs for a particular | 66 | struct irq_chip; |
76 | * interrupt source (if it supports chaining). | 67 | struct irq_desc; |
77 | */ | 68 | extern unsigned int m68k_irq_startup(struct irq_data *data); |
78 | typedef struct irq_node { | 69 | extern unsigned int m68k_irq_startup_irq(unsigned int irq); |
79 | irqreturn_t (*handler)(int, void *); | 70 | extern void m68k_irq_shutdown(struct irq_data *data); |
80 | void *dev_id; | 71 | extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, |
81 | struct irq_node *next; | 72 | struct pt_regs *)); |
82 | unsigned long flags; | 73 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt); |
83 | const char *devname; | 74 | extern void m68k_setup_irq_controller(struct irq_chip *, |
84 | } irq_node_t; | 75 | void (*handle)(unsigned int irq, |
85 | 76 | struct irq_desc *desc), | |
86 | /* | 77 | unsigned int irq, unsigned int cnt); |
87 | * This structure has only 4 elements for speed reasons | ||
88 | */ | ||
89 | struct irq_handler { | ||
90 | int (*handler)(int, void *); | ||
91 | unsigned long flags; | ||
92 | void *dev_id; | ||
93 | const char *devname; | ||
94 | }; | ||
95 | |||
96 | struct irq_controller { | ||
97 | const char *name; | ||
98 | spinlock_t lock; | ||
99 | int (*startup)(unsigned int irq); | ||
100 | void (*shutdown)(unsigned int irq); | ||
101 | void (*enable)(unsigned int irq); | ||
102 | void (*disable)(unsigned int irq); | ||
103 | }; | ||
104 | |||
105 | extern int m68k_irq_startup(unsigned int); | ||
106 | extern void m68k_irq_shutdown(unsigned int); | ||
107 | |||
108 | /* | ||
109 | * This function returns a new irq_node_t | ||
110 | */ | ||
111 | extern irq_node_t *new_irq_node(void); | ||
112 | 78 | ||
113 | extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); | 79 | extern unsigned int irq_canonicalize(unsigned int irq); |
114 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | ||
115 | void (*handler)(unsigned int, struct pt_regs *)); | ||
116 | extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int); | ||
117 | |||
118 | asmlinkage void m68k_handle_int(unsigned int); | ||
119 | asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *); | ||
120 | 80 | ||
121 | #else | 81 | #else |
122 | #define irq_canonicalize(irq) (irq) | 82 | #define irq_canonicalize(irq) (irq) |
123 | #endif /* CONFIG_MMU */ | 83 | #endif /* CONFIG_MMU */ |
124 | 84 | ||
125 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs); | 85 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs); |
86 | extern atomic_t irq_err_count; | ||
126 | 87 | ||
127 | #endif /* _M68K_IRQ_H_ */ | 88 | #endif /* _M68K_IRQ_H_ */ |
diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index c2a1c5eac1a6..12ebe43b008b 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h | |||
@@ -12,6 +12,8 @@ extern void mac_reset(void); | |||
12 | extern void mac_poweroff(void); | 12 | extern void mac_poweroff(void); |
13 | extern void mac_init_IRQ(void); | 13 | extern void mac_init_IRQ(void); |
14 | extern int mac_irq_pending(unsigned int); | 14 | extern int mac_irq_pending(unsigned int); |
15 | extern void mac_irq_enable(struct irq_data *data); | ||
16 | extern void mac_irq_disable(struct irq_data *data); | ||
15 | 17 | ||
16 | /* | 18 | /* |
17 | * Floppy driver magic hook - probably shouldn't be here | 19 | * Floppy driver magic hook - probably shouldn't be here |
diff --git a/arch/m68k/include/asm/q40ints.h b/arch/m68k/include/asm/q40ints.h index 3d970afb708f..22f12c9eb910 100644 --- a/arch/m68k/include/asm/q40ints.h +++ b/arch/m68k/include/asm/q40ints.h | |||
@@ -24,6 +24,3 @@ | |||
24 | #define Q40_IRQ10_MASK (1<<5) | 24 | #define Q40_IRQ10_MASK (1<<5) |
25 | #define Q40_IRQ14_MASK (1<<6) | 25 | #define Q40_IRQ14_MASK (1<<6) |
26 | #define Q40_IRQ15_MASK (1<<7) | 26 | #define Q40_IRQ15_MASK (1<<7) |
27 | |||
28 | extern unsigned long q40_probe_irq_on (void); | ||
29 | extern int q40_probe_irq_off (unsigned long irqs); | ||
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index e7f0f2e5ad44..c5696193281a 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile | |||
@@ -6,16 +6,15 @@ extra-$(CONFIG_MMU) := head.o | |||
6 | extra-$(CONFIG_SUN3) := sun3-head.o | 6 | extra-$(CONFIG_SUN3) := sun3-head.o |
7 | extra-y += vmlinux.lds | 7 | extra-y += vmlinux.lds |
8 | 8 | ||
9 | obj-y := entry.o m68k_ksyms.o module.o process.o ptrace.o setup.o signal.o \ | 9 | obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o setup.o \ |
10 | sys_m68k.o syscalltable.o time.o traps.o | 10 | signal.o sys_m68k.o syscalltable.o time.o traps.o |
11 | 11 | ||
12 | obj-$(CONFIG_MMU) += ints.o devres.o vectors.o | 12 | obj-$(CONFIG_MMU) += ints.o vectors.o |
13 | devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o | ||
14 | 13 | ||
15 | ifndef CONFIG_MMU_SUN3 | 14 | ifndef CONFIG_MMU_SUN3 |
16 | obj-y += dma.o | 15 | obj-y += dma.o |
17 | endif | 16 | endif |
18 | ifndef CONFIG_MMU | 17 | ifndef CONFIG_MMU |
19 | obj-y += init_task.o irq.o | 18 | obj-y += init_task.o |
20 | endif | 19 | endif |
21 | 20 | ||
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S index bd0ec05263b2..c713f514843d 100644 --- a/arch/m68k/kernel/entry_mm.S +++ b/arch/m68k/kernel/entry_mm.S | |||
@@ -48,7 +48,7 @@ | |||
48 | .globl sys_fork, sys_clone, sys_vfork | 48 | .globl sys_fork, sys_clone, sys_vfork |
49 | .globl ret_from_interrupt, bad_interrupt | 49 | .globl ret_from_interrupt, bad_interrupt |
50 | .globl auto_irqhandler_fixup | 50 | .globl auto_irqhandler_fixup |
51 | .globl user_irqvec_fixup, user_irqhandler_fixup | 51 | .globl user_irqvec_fixup |
52 | 52 | ||
53 | .text | 53 | .text |
54 | ENTRY(buserr) | 54 | ENTRY(buserr) |
@@ -207,7 +207,7 @@ ENTRY(auto_inthandler) | |||
207 | movel %sp,%sp@- | 207 | movel %sp,%sp@- |
208 | movel %d0,%sp@- | put vector # on stack | 208 | movel %d0,%sp@- | put vector # on stack |
209 | auto_irqhandler_fixup = . + 2 | 209 | auto_irqhandler_fixup = . + 2 |
210 | jsr __m68k_handle_int | process the IRQ | 210 | jsr do_IRQ | process the IRQ |
211 | addql #8,%sp | pop parameters off stack | 211 | addql #8,%sp | pop parameters off stack |
212 | 212 | ||
213 | ret_from_interrupt: | 213 | ret_from_interrupt: |
@@ -240,8 +240,7 @@ user_irqvec_fixup = . + 2 | |||
240 | 240 | ||
241 | movel %sp,%sp@- | 241 | movel %sp,%sp@- |
242 | movel %d0,%sp@- | put vector # on stack | 242 | movel %d0,%sp@- | put vector # on stack |
243 | user_irqhandler_fixup = . + 2 | 243 | jsr do_IRQ | process the IRQ |
244 | jsr __m68k_handle_int | process the IRQ | ||
245 | addql #8,%sp | pop parameters off stack | 244 | addql #8,%sp | pop parameters off stack |
246 | 245 | ||
247 | subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) | 246 | subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) |
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index 761ee0440c99..74fefac00899 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -4,25 +4,6 @@ | |||
4 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file COPYING in the main directory of this archive | 5 | * License. See the file COPYING in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | ||
8 | * 07/03/96: Timer initialization, and thus mach_sched_init(), | ||
9 | * removed from request_irq() and moved to init_time(). | ||
10 | * We should therefore consider renaming our add_isr() and | ||
11 | * remove_isr() to request_irq() and free_irq() | ||
12 | * respectively, so they are compliant with the other | ||
13 | * architectures. /Jes | ||
14 | * 11/07/96: Changed all add_/remove_isr() to request_/free_irq() calls. | ||
15 | * Removed irq list support, if any machine needs an irq server | ||
16 | * it must implement this itself (as it's already done), instead | ||
17 | * only default handler are used with mach_default_handler. | ||
18 | * request_irq got some flags different from other architectures: | ||
19 | * - IRQ_FLG_REPLACE : Replace an existing handler (the default one | ||
20 | * can be replaced without this flag) | ||
21 | * - IRQ_FLG_LOCK : handler can't be replaced | ||
22 | * There are other machine depending flags, see there | ||
23 | * If you want to replace a default handler you should know what | ||
24 | * you're doing, since it might handle different other irq sources | ||
25 | * which must be served /Roman Zippel | ||
26 | */ | 7 | */ |
27 | 8 | ||
28 | #include <linux/module.h> | 9 | #include <linux/module.h> |
@@ -47,33 +28,22 @@ | |||
47 | #endif | 28 | #endif |
48 | 29 | ||
49 | extern u32 auto_irqhandler_fixup[]; | 30 | extern u32 auto_irqhandler_fixup[]; |
50 | extern u32 user_irqhandler_fixup[]; | ||
51 | extern u16 user_irqvec_fixup[]; | 31 | extern u16 user_irqvec_fixup[]; |
52 | 32 | ||
53 | /* table for system interrupt handlers */ | ||
54 | static struct irq_node *irq_list[NR_IRQS]; | ||
55 | static struct irq_controller *irq_controller[NR_IRQS]; | ||
56 | static int irq_depth[NR_IRQS]; | ||
57 | |||
58 | static int m68k_first_user_vec; | 33 | static int m68k_first_user_vec; |
59 | 34 | ||
60 | static struct irq_controller auto_irq_controller = { | 35 | static struct irq_chip auto_irq_chip = { |
61 | .name = "auto", | 36 | .name = "auto", |
62 | .lock = __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock), | 37 | .irq_startup = m68k_irq_startup, |
63 | .startup = m68k_irq_startup, | 38 | .irq_shutdown = m68k_irq_shutdown, |
64 | .shutdown = m68k_irq_shutdown, | ||
65 | }; | 39 | }; |
66 | 40 | ||
67 | static struct irq_controller user_irq_controller = { | 41 | static struct irq_chip user_irq_chip = { |
68 | .name = "user", | 42 | .name = "user", |
69 | .lock = __SPIN_LOCK_UNLOCKED(user_irq_controller.lock), | 43 | .irq_startup = m68k_irq_startup, |
70 | .startup = m68k_irq_startup, | 44 | .irq_shutdown = m68k_irq_shutdown, |
71 | .shutdown = m68k_irq_shutdown, | ||
72 | }; | 45 | }; |
73 | 46 | ||
74 | #define NUM_IRQ_NODES 100 | ||
75 | static irq_node_t nodes[NUM_IRQ_NODES]; | ||
76 | |||
77 | /* | 47 | /* |
78 | * void init_IRQ(void) | 48 | * void init_IRQ(void) |
79 | * | 49 | * |
@@ -96,7 +66,7 @@ void __init init_IRQ(void) | |||
96 | } | 66 | } |
97 | 67 | ||
98 | for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++) | 68 | for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++) |
99 | irq_controller[i] = &auto_irq_controller; | 69 | irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq); |
100 | 70 | ||
101 | mach_init_IRQ(); | 71 | mach_init_IRQ(); |
102 | } | 72 | } |
@@ -106,7 +76,7 @@ void __init init_IRQ(void) | |||
106 | * @handler: called from auto vector interrupts | 76 | * @handler: called from auto vector interrupts |
107 | * | 77 | * |
108 | * setup the handler to be called from auto vector interrupts instead of the | 78 | * setup the handler to be called from auto vector interrupts instead of the |
109 | * standard __m68k_handle_int(), it will be called with irq numbers in the range | 79 | * standard do_IRQ(), it will be called with irq numbers in the range |
110 | * from IRQ_AUTO_1 - IRQ_AUTO_7. | 80 | * from IRQ_AUTO_1 - IRQ_AUTO_7. |
111 | */ | 81 | */ |
112 | void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)) | 82 | void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)) |
@@ -120,217 +90,49 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re | |||
120 | * m68k_setup_user_interrupt | 90 | * m68k_setup_user_interrupt |
121 | * @vec: first user vector interrupt to handle | 91 | * @vec: first user vector interrupt to handle |
122 | * @cnt: number of active user vector interrupts | 92 | * @cnt: number of active user vector interrupts |
123 | * @handler: called from user vector interrupts | ||
124 | * | 93 | * |
125 | * setup user vector interrupts, this includes activating the specified range | 94 | * setup user vector interrupts, this includes activating the specified range |
126 | * of interrupts, only then these interrupts can be requested (note: this is | 95 | * of interrupts, only then these interrupts can be requested (note: this is |
127 | * different from auto vector interrupts). An optional handler can be installed | 96 | * different from auto vector interrupts). |
128 | * to be called instead of the default __m68k_handle_int(), it will be called | ||
129 | * with irq numbers starting from IRQ_USER. | ||
130 | */ | 97 | */ |
131 | void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | 98 | void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt) |
132 | void (*handler)(unsigned int, struct pt_regs *)) | ||
133 | { | 99 | { |
134 | int i; | 100 | int i; |
135 | 101 | ||
136 | BUG_ON(IRQ_USER + cnt > NR_IRQS); | 102 | BUG_ON(IRQ_USER + cnt > NR_IRQS); |
137 | m68k_first_user_vec = vec; | 103 | m68k_first_user_vec = vec; |
138 | for (i = 0; i < cnt; i++) | 104 | for (i = 0; i < cnt; i++) |
139 | irq_controller[IRQ_USER + i] = &user_irq_controller; | 105 | irq_set_chip(IRQ_USER + i, &user_irq_chip); |
140 | *user_irqvec_fixup = vec - IRQ_USER; | 106 | *user_irqvec_fixup = vec - IRQ_USER; |
141 | if (handler) | ||
142 | *user_irqhandler_fixup = (u32)handler; | ||
143 | flush_icache(); | 107 | flush_icache(); |
144 | } | 108 | } |
145 | 109 | ||
146 | /** | 110 | /** |
147 | * m68k_setup_irq_controller | 111 | * m68k_setup_irq_controller |
148 | * @contr: irq controller which controls specified irq | 112 | * @chip: irq chip which controls specified irq |
113 | * @handle: flow handler which handles specified irq | ||
149 | * @irq: first irq to be managed by the controller | 114 | * @irq: first irq to be managed by the controller |
115 | * @cnt: number of irqs to be managed by the controller | ||
150 | * | 116 | * |
151 | * Change the controller for the specified range of irq, which will be used to | 117 | * Change the controller for the specified range of irq, which will be used to |
152 | * manage these irq. auto/user irq already have a default controller, which can | 118 | * manage these irq. auto/user irq already have a default controller, which can |
153 | * be changed as well, but the controller probably should use m68k_irq_startup/ | 119 | * be changed as well, but the controller probably should use m68k_irq_startup/ |
154 | * m68k_irq_shutdown. | 120 | * m68k_irq_shutdown. |
155 | */ | 121 | */ |
156 | void m68k_setup_irq_controller(struct irq_controller *contr, unsigned int irq, | 122 | void m68k_setup_irq_controller(struct irq_chip *chip, |
123 | irq_flow_handler_t handle, unsigned int irq, | ||
157 | unsigned int cnt) | 124 | unsigned int cnt) |
158 | { | 125 | { |
159 | int i; | 126 | int i; |
160 | 127 | ||
161 | for (i = 0; i < cnt; i++) | 128 | for (i = 0; i < cnt; i++) { |
162 | irq_controller[irq + i] = contr; | 129 | irq_set_chip(irq + i, chip); |
163 | } | 130 | if (handle) |
164 | 131 | irq_set_handler(irq + i, handle); | |
165 | irq_node_t *new_irq_node(void) | ||
166 | { | ||
167 | irq_node_t *node; | ||
168 | short i; | ||
169 | |||
170 | for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) { | ||
171 | if (!node->handler) { | ||
172 | memset(node, 0, sizeof(*node)); | ||
173 | return node; | ||
174 | } | ||
175 | } | 132 | } |
176 | |||
177 | printk ("new_irq_node: out of nodes\n"); | ||
178 | return NULL; | ||
179 | } | 133 | } |
180 | 134 | ||
181 | int setup_irq(unsigned int irq, struct irq_node *node) | 135 | unsigned int m68k_irq_startup_irq(unsigned int irq) |
182 | { | ||
183 | struct irq_controller *contr; | ||
184 | struct irq_node **prev; | ||
185 | unsigned long flags; | ||
186 | |||
187 | if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { | ||
188 | printk("%s: Incorrect IRQ %d from %s\n", | ||
189 | __func__, irq, node->devname); | ||
190 | return -ENXIO; | ||
191 | } | ||
192 | |||
193 | spin_lock_irqsave(&contr->lock, flags); | ||
194 | |||
195 | prev = irq_list + irq; | ||
196 | if (*prev) { | ||
197 | /* Can't share interrupts unless both agree to */ | ||
198 | if (!((*prev)->flags & node->flags & IRQF_SHARED)) { | ||
199 | spin_unlock_irqrestore(&contr->lock, flags); | ||
200 | return -EBUSY; | ||
201 | } | ||
202 | while (*prev) | ||
203 | prev = &(*prev)->next; | ||
204 | } | ||
205 | |||
206 | if (!irq_list[irq]) { | ||
207 | if (contr->startup) | ||
208 | contr->startup(irq); | ||
209 | else | ||
210 | contr->enable(irq); | ||
211 | } | ||
212 | node->next = NULL; | ||
213 | *prev = node; | ||
214 | |||
215 | spin_unlock_irqrestore(&contr->lock, flags); | ||
216 | |||
217 | return 0; | ||
218 | } | ||
219 | |||
220 | int request_irq(unsigned int irq, | ||
221 | irq_handler_t handler, | ||
222 | unsigned long flags, const char *devname, void *dev_id) | ||
223 | { | ||
224 | struct irq_node *node; | ||
225 | int res; | ||
226 | |||
227 | node = new_irq_node(); | ||
228 | if (!node) | ||
229 | return -ENOMEM; | ||
230 | |||
231 | node->handler = handler; | ||
232 | node->flags = flags; | ||
233 | node->dev_id = dev_id; | ||
234 | node->devname = devname; | ||
235 | |||
236 | res = setup_irq(irq, node); | ||
237 | if (res) | ||
238 | node->handler = NULL; | ||
239 | |||
240 | return res; | ||
241 | } | ||
242 | |||
243 | EXPORT_SYMBOL(request_irq); | ||
244 | |||
245 | void free_irq(unsigned int irq, void *dev_id) | ||
246 | { | ||
247 | struct irq_controller *contr; | ||
248 | struct irq_node **p, *node; | ||
249 | unsigned long flags; | ||
250 | |||
251 | if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { | ||
252 | printk("%s: Incorrect IRQ %d\n", __func__, irq); | ||
253 | return; | ||
254 | } | ||
255 | |||
256 | spin_lock_irqsave(&contr->lock, flags); | ||
257 | |||
258 | p = irq_list + irq; | ||
259 | while ((node = *p)) { | ||
260 | if (node->dev_id == dev_id) | ||
261 | break; | ||
262 | p = &node->next; | ||
263 | } | ||
264 | |||
265 | if (node) { | ||
266 | *p = node->next; | ||
267 | node->handler = NULL; | ||
268 | } else | ||
269 | printk("%s: Removing probably wrong IRQ %d\n", | ||
270 | __func__, irq); | ||
271 | |||
272 | if (!irq_list[irq]) { | ||
273 | if (contr->shutdown) | ||
274 | contr->shutdown(irq); | ||
275 | else | ||
276 | contr->disable(irq); | ||
277 | } | ||
278 | |||
279 | spin_unlock_irqrestore(&contr->lock, flags); | ||
280 | } | ||
281 | |||
282 | EXPORT_SYMBOL(free_irq); | ||
283 | |||
284 | void enable_irq(unsigned int irq) | ||
285 | { | ||
286 | struct irq_controller *contr; | ||
287 | unsigned long flags; | ||
288 | |||
289 | if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { | ||
290 | printk("%s: Incorrect IRQ %d\n", | ||
291 | __func__, irq); | ||
292 | return; | ||
293 | } | ||
294 | |||
295 | spin_lock_irqsave(&contr->lock, flags); | ||
296 | if (irq_depth[irq]) { | ||
297 | if (!--irq_depth[irq]) { | ||
298 | if (contr->enable) | ||
299 | contr->enable(irq); | ||
300 | } | ||
301 | } else | ||
302 | WARN_ON(1); | ||
303 | spin_unlock_irqrestore(&contr->lock, flags); | ||
304 | } | ||
305 | |||
306 | EXPORT_SYMBOL(enable_irq); | ||
307 | |||
308 | void disable_irq(unsigned int irq) | ||
309 | { | ||
310 | struct irq_controller *contr; | ||
311 | unsigned long flags; | ||
312 | |||
313 | if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { | ||
314 | printk("%s: Incorrect IRQ %d\n", | ||
315 | __func__, irq); | ||
316 | return; | ||
317 | } | ||
318 | |||
319 | spin_lock_irqsave(&contr->lock, flags); | ||
320 | if (!irq_depth[irq]++) { | ||
321 | if (contr->disable) | ||
322 | contr->disable(irq); | ||
323 | } | ||
324 | spin_unlock_irqrestore(&contr->lock, flags); | ||
325 | } | ||
326 | |||
327 | EXPORT_SYMBOL(disable_irq); | ||
328 | |||
329 | void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq"))); | ||
330 | |||
331 | EXPORT_SYMBOL(disable_irq_nosync); | ||
332 | |||
333 | int m68k_irq_startup(unsigned int irq) | ||
334 | { | 136 | { |
335 | if (irq <= IRQ_AUTO_7) | 137 | if (irq <= IRQ_AUTO_7) |
336 | vectors[VEC_SPUR + irq] = auto_inthandler; | 138 | vectors[VEC_SPUR + irq] = auto_inthandler; |
@@ -339,41 +141,21 @@ int m68k_irq_startup(unsigned int irq) | |||
339 | return 0; | 141 | return 0; |
340 | } | 142 | } |
341 | 143 | ||
342 | void m68k_irq_shutdown(unsigned int irq) | 144 | unsigned int m68k_irq_startup(struct irq_data *data) |
343 | { | 145 | { |
344 | if (irq <= IRQ_AUTO_7) | 146 | return m68k_irq_startup_irq(data->irq); |
345 | vectors[VEC_SPUR + irq] = bad_inthandler; | ||
346 | else | ||
347 | vectors[m68k_first_user_vec + irq - IRQ_USER] = bad_inthandler; | ||
348 | } | 147 | } |
349 | 148 | ||
350 | 149 | void m68k_irq_shutdown(struct irq_data *data) | |
351 | /* | ||
352 | * Do we need these probe functions on the m68k? | ||
353 | * | ||
354 | * ... may be useful with ISA devices | ||
355 | */ | ||
356 | unsigned long probe_irq_on (void) | ||
357 | { | 150 | { |
358 | #ifdef CONFIG_Q40 | 151 | unsigned int irq = data->irq; |
359 | if (MACH_IS_Q40) | ||
360 | return q40_probe_irq_on(); | ||
361 | #endif | ||
362 | return 0; | ||
363 | } | ||
364 | 152 | ||
365 | EXPORT_SYMBOL(probe_irq_on); | 153 | if (irq <= IRQ_AUTO_7) |
366 | 154 | vectors[VEC_SPUR + irq] = bad_inthandler; | |
367 | int probe_irq_off (unsigned long irqs) | 155 | else |
368 | { | 156 | vectors[m68k_first_user_vec + irq - IRQ_USER] = bad_inthandler; |
369 | #ifdef CONFIG_Q40 | ||
370 | if (MACH_IS_Q40) | ||
371 | return q40_probe_irq_off(irqs); | ||
372 | #endif | ||
373 | return 0; | ||
374 | } | 157 | } |
375 | 158 | ||
376 | EXPORT_SYMBOL(probe_irq_off); | ||
377 | 159 | ||
378 | unsigned int irq_canonicalize(unsigned int irq) | 160 | unsigned int irq_canonicalize(unsigned int irq) |
379 | { | 161 | { |
@@ -386,52 +168,9 @@ unsigned int irq_canonicalize(unsigned int irq) | |||
386 | 168 | ||
387 | EXPORT_SYMBOL(irq_canonicalize); | 169 | EXPORT_SYMBOL(irq_canonicalize); |
388 | 170 | ||
389 | asmlinkage void m68k_handle_int(unsigned int irq) | ||
390 | { | ||
391 | struct irq_node *node; | ||
392 | kstat_cpu(0).irqs[irq]++; | ||
393 | node = irq_list[irq]; | ||
394 | do { | ||
395 | node->handler(irq, node->dev_id); | ||
396 | node = node->next; | ||
397 | } while (node); | ||
398 | } | ||
399 | |||
400 | asmlinkage void __m68k_handle_int(unsigned int irq, struct pt_regs *regs) | ||
401 | { | ||
402 | struct pt_regs *old_regs; | ||
403 | old_regs = set_irq_regs(regs); | ||
404 | m68k_handle_int(irq); | ||
405 | set_irq_regs(old_regs); | ||
406 | } | ||
407 | 171 | ||
408 | asmlinkage void handle_badint(struct pt_regs *regs) | 172 | asmlinkage void handle_badint(struct pt_regs *regs) |
409 | { | 173 | { |
410 | kstat_cpu(0).irqs[0]++; | 174 | atomic_inc(&irq_err_count); |
411 | printk("unexpected interrupt from %u\n", regs->vector); | 175 | pr_warn("unexpected interrupt from %u\n", regs->vector); |
412 | } | ||
413 | |||
414 | int show_interrupts(struct seq_file *p, void *v) | ||
415 | { | ||
416 | struct irq_controller *contr; | ||
417 | struct irq_node *node; | ||
418 | int i = *(loff_t *) v; | ||
419 | |||
420 | /* autovector interrupts */ | ||
421 | if (irq_list[i]) { | ||
422 | contr = irq_controller[i]; | ||
423 | node = irq_list[i]; | ||
424 | seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname); | ||
425 | while ((node = node->next)) | ||
426 | seq_printf(p, ", %s", node->devname); | ||
427 | seq_puts(p, "\n"); | ||
428 | } | ||
429 | return 0; | ||
430 | } | ||
431 | |||
432 | #ifdef CONFIG_PROC_FS | ||
433 | void init_irq_proc(void) | ||
434 | { | ||
435 | /* Insert /proc/irq driver here */ | ||
436 | } | 176 | } |
437 | #endif | ||
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 2a96bebd8969..b403924a1cad 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/irq.h> | ||
14 | 15 | ||
15 | #include <asm/traps.h> | 16 | #include <asm/traps.h> |
16 | #include <asm/bootinfo.h> | 17 | #include <asm/bootinfo.h> |
@@ -20,9 +21,6 @@ | |||
20 | 21 | ||
21 | /* #define DEBUG_IRQS */ | 22 | /* #define DEBUG_IRQS */ |
22 | 23 | ||
23 | extern void mac_enable_irq(unsigned int); | ||
24 | extern void mac_disable_irq(unsigned int); | ||
25 | |||
26 | int baboon_present; | 24 | int baboon_present; |
27 | static volatile struct baboon *baboon; | 25 | static volatile struct baboon *baboon; |
28 | static unsigned char baboon_disabled; | 26 | static unsigned char baboon_disabled; |
@@ -53,7 +51,7 @@ void __init baboon_init(void) | |||
53 | * Baboon interrupt handler. This works a lot like a VIA. | 51 | * Baboon interrupt handler. This works a lot like a VIA. |
54 | */ | 52 | */ |
55 | 53 | ||
56 | static irqreturn_t baboon_irq(int irq, void *dev_id) | 54 | static void baboon_irq(unsigned int irq, struct irq_desc *desc) |
57 | { | 55 | { |
58 | int irq_bit, irq_num; | 56 | int irq_bit, irq_num; |
59 | unsigned char events; | 57 | unsigned char events; |
@@ -64,15 +62,16 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) | |||
64 | (uint) baboon->mb_status); | 62 | (uint) baboon->mb_status); |
65 | #endif | 63 | #endif |
66 | 64 | ||
67 | if (!(events = baboon->mb_ifr & 0x07)) | 65 | events = baboon->mb_ifr & 0x07; |
68 | return IRQ_NONE; | 66 | if (!events) |
67 | return; | ||
69 | 68 | ||
70 | irq_num = IRQ_BABOON_0; | 69 | irq_num = IRQ_BABOON_0; |
71 | irq_bit = 1; | 70 | irq_bit = 1; |
72 | do { | 71 | do { |
73 | if (events & irq_bit) { | 72 | if (events & irq_bit) { |
74 | baboon->mb_ifr &= ~irq_bit; | 73 | baboon->mb_ifr &= ~irq_bit; |
75 | m68k_handle_int(irq_num); | 74 | generic_handle_irq(irq_num); |
76 | } | 75 | } |
77 | irq_bit <<= 1; | 76 | irq_bit <<= 1; |
78 | irq_num++; | 77 | irq_num++; |
@@ -82,7 +81,6 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) | |||
82 | /* for now we need to smash all interrupts */ | 81 | /* for now we need to smash all interrupts */ |
83 | baboon->mb_ifr &= ~events; | 82 | baboon->mb_ifr &= ~events; |
84 | #endif | 83 | #endif |
85 | return IRQ_HANDLED; | ||
86 | } | 84 | } |
87 | 85 | ||
88 | /* | 86 | /* |
@@ -92,8 +90,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) | |||
92 | void __init baboon_register_interrupts(void) | 90 | void __init baboon_register_interrupts(void) |
93 | { | 91 | { |
94 | baboon_disabled = 0; | 92 | baboon_disabled = 0; |
95 | if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon)) | 93 | irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); |
96 | pr_err("Couldn't register baboon interrupt\n"); | ||
97 | } | 94 | } |
98 | 95 | ||
99 | /* | 96 | /* |
@@ -111,7 +108,7 @@ void baboon_irq_enable(int irq) | |||
111 | 108 | ||
112 | baboon_disabled &= ~(1 << irq_idx); | 109 | baboon_disabled &= ~(1 << irq_idx); |
113 | if (!baboon_disabled) | 110 | if (!baboon_disabled) |
114 | mac_enable_irq(IRQ_NUBUS_C); | 111 | mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C)); |
115 | } | 112 | } |
116 | 113 | ||
117 | void baboon_irq_disable(int irq) | 114 | void baboon_irq_disable(int irq) |
@@ -124,7 +121,7 @@ void baboon_irq_disable(int irq) | |||
124 | 121 | ||
125 | baboon_disabled |= 1 << irq_idx; | 122 | baboon_disabled |= 1 << irq_idx; |
126 | if (baboon_disabled) | 123 | if (baboon_disabled) |
127 | mac_disable_irq(IRQ_NUBUS_C); | 124 | mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C)); |
128 | } | 125 | } |
129 | 126 | ||
130 | void baboon_irq_clear(int irq) | 127 | void baboon_irq_clear(int irq) |
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 1ad4e9d80eba..a5462cc0bfd6 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c | |||
@@ -305,15 +305,13 @@ void __init iop_register_interrupts(void) | |||
305 | { | 305 | { |
306 | if (iop_ism_present) { | 306 | if (iop_ism_present) { |
307 | if (oss_present) { | 307 | if (oss_present) { |
308 | if (request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, | 308 | if (request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, 0, |
309 | IRQ_FLG_LOCK, "ISM IOP", | 309 | "ISM IOP", (void *)IOP_NUM_ISM)) |
310 | (void *) IOP_NUM_ISM)) | ||
311 | pr_err("Couldn't register ISM IOP interrupt\n"); | 310 | pr_err("Couldn't register ISM IOP interrupt\n"); |
312 | oss_irq_enable(IRQ_MAC_ADB); | 311 | oss_irq_enable(IRQ_MAC_ADB); |
313 | } else { | 312 | } else { |
314 | if (request_irq(IRQ_VIA2_0, iop_ism_irq, | 313 | if (request_irq(IRQ_VIA2_0, iop_ism_irq, 0, "ISM IOP", |
315 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "ISM IOP", | 314 | (void *)IOP_NUM_ISM)) |
316 | (void *) IOP_NUM_ISM)) | ||
317 | pr_err("Couldn't register ISM IOP interrupt\n"); | 315 | pr_err("Couldn't register ISM IOP interrupt\n"); |
318 | } | 316 | } |
319 | if (!iop_alive(iop_base[IOP_NUM_ISM])) { | 317 | if (!iop_alive(iop_base[IOP_NUM_ISM])) { |
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index f92190c159b4..ba220b70ab8c 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c | |||
@@ -190,14 +190,10 @@ irqreturn_t mac_debug_handler(int, void *); | |||
190 | 190 | ||
191 | /* #define DEBUG_MACINTS */ | 191 | /* #define DEBUG_MACINTS */ |
192 | 192 | ||
193 | void mac_enable_irq(unsigned int irq); | 193 | static struct irq_chip mac_irq_chip = { |
194 | void mac_disable_irq(unsigned int irq); | ||
195 | |||
196 | static struct irq_controller mac_irq_controller = { | ||
197 | .name = "mac", | 194 | .name = "mac", |
198 | .lock = __SPIN_LOCK_UNLOCKED(mac_irq_controller.lock), | 195 | .irq_enable = mac_irq_enable, |
199 | .enable = mac_enable_irq, | 196 | .irq_disable = mac_irq_disable, |
200 | .disable = mac_disable_irq, | ||
201 | }; | 197 | }; |
202 | 198 | ||
203 | void __init mac_init_IRQ(void) | 199 | void __init mac_init_IRQ(void) |
@@ -205,7 +201,7 @@ void __init mac_init_IRQ(void) | |||
205 | #ifdef DEBUG_MACINTS | 201 | #ifdef DEBUG_MACINTS |
206 | printk("mac_init_IRQ(): Setting things up...\n"); | 202 | printk("mac_init_IRQ(): Setting things up...\n"); |
207 | #endif | 203 | #endif |
208 | m68k_setup_irq_controller(&mac_irq_controller, IRQ_USER, | 204 | m68k_setup_irq_controller(&mac_irq_chip, handle_simple_irq, IRQ_USER, |
209 | NUM_MAC_SOURCES - IRQ_USER); | 205 | NUM_MAC_SOURCES - IRQ_USER); |
210 | /* Make sure the SONIC interrupt is cleared or things get ugly */ | 206 | /* Make sure the SONIC interrupt is cleared or things get ugly */ |
211 | #ifdef SHUTUP_SONIC | 207 | #ifdef SHUTUP_SONIC |
@@ -241,16 +237,17 @@ void __init mac_init_IRQ(void) | |||
241 | } | 237 | } |
242 | 238 | ||
243 | /* | 239 | /* |
244 | * mac_enable_irq - enable an interrupt source | 240 | * mac_irq_enable - enable an interrupt source |
245 | * mac_disable_irq - disable an interrupt source | 241 | * mac_irq_disable - disable an interrupt source |
246 | * mac_clear_irq - clears a pending interrupt | 242 | * mac_clear_irq - clears a pending interrupt |
247 | * mac_pending_irq - Returns the pending status of an IRQ (nonzero = pending) | 243 | * mac_irq_pending - returns the pending status of an IRQ (nonzero = pending) |
248 | * | 244 | * |
249 | * These routines are just dispatchers to the VIA/OSS/PSC routines. | 245 | * These routines are just dispatchers to the VIA/OSS/PSC routines. |
250 | */ | 246 | */ |
251 | 247 | ||
252 | void mac_enable_irq(unsigned int irq) | 248 | void mac_irq_enable(struct irq_data *data) |
253 | { | 249 | { |
250 | int irq = data->irq; | ||
254 | int irq_src = IRQ_SRC(irq); | 251 | int irq_src = IRQ_SRC(irq); |
255 | 252 | ||
256 | switch(irq_src) { | 253 | switch(irq_src) { |
@@ -283,8 +280,9 @@ void mac_enable_irq(unsigned int irq) | |||
283 | } | 280 | } |
284 | } | 281 | } |
285 | 282 | ||
286 | void mac_disable_irq(unsigned int irq) | 283 | void mac_irq_disable(struct irq_data *data) |
287 | { | 284 | { |
285 | int irq = data->irq; | ||
288 | int irq_src = IRQ_SRC(irq); | 286 | int irq_src = IRQ_SRC(irq); |
289 | 287 | ||
290 | switch(irq_src) { | 288 | switch(irq_src) { |
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index a9c0f5ab4cc0..a4c82dab9ff1 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/irq.h> | ||
22 | 23 | ||
23 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
24 | #include <asm/macintosh.h> | 25 | #include <asm/macintosh.h> |
@@ -29,10 +30,7 @@ | |||
29 | int oss_present; | 30 | int oss_present; |
30 | volatile struct mac_oss *oss; | 31 | volatile struct mac_oss *oss; |
31 | 32 | ||
32 | static irqreturn_t oss_irq(int, void *); | 33 | extern void via1_irq(unsigned int irq, struct irq_desc *desc); |
33 | static irqreturn_t oss_nubus_irq(int, void *); | ||
34 | |||
35 | extern irqreturn_t via1_irq(int, void *); | ||
36 | 34 | ||
37 | /* | 35 | /* |
38 | * Initialize the OSS | 36 | * Initialize the OSS |
@@ -60,26 +58,6 @@ void __init oss_init(void) | |||
60 | } | 58 | } |
61 | 59 | ||
62 | /* | 60 | /* |
63 | * Register the OSS and NuBus interrupt dispatchers. | ||
64 | */ | ||
65 | |||
66 | void __init oss_register_interrupts(void) | ||
67 | { | ||
68 | if (request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK, | ||
69 | "scsi", (void *) oss)) | ||
70 | pr_err("Couldn't register %s interrupt\n", "scsi"); | ||
71 | if (request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK, | ||
72 | "nubus", (void *) oss)) | ||
73 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
74 | if (request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK, | ||
75 | "sound", (void *) oss)) | ||
76 | pr_err("Couldn't register %s interrupt\n", "sound"); | ||
77 | if (request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK, | ||
78 | "via1", (void *) via1)) | ||
79 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
80 | } | ||
81 | |||
82 | /* | ||
83 | * Initialize OSS for Nubus access | 61 | * Initialize OSS for Nubus access |
84 | */ | 62 | */ |
85 | 63 | ||
@@ -92,17 +70,17 @@ void __init oss_nubus_init(void) | |||
92 | * and SCSI; everything else is routed to its own autovector IRQ. | 70 | * and SCSI; everything else is routed to its own autovector IRQ. |
93 | */ | 71 | */ |
94 | 72 | ||
95 | static irqreturn_t oss_irq(int irq, void *dev_id) | 73 | static void oss_irq(unsigned int irq, struct irq_desc *desc) |
96 | { | 74 | { |
97 | int events; | 75 | int events; |
98 | 76 | ||
99 | events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI); | 77 | events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI); |
100 | if (!events) | 78 | if (!events) |
101 | return IRQ_NONE; | 79 | return; |
102 | 80 | ||
103 | #ifdef DEBUG_IRQS | 81 | #ifdef DEBUG_IRQS |
104 | if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) { | 82 | if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) { |
105 | printk("oss_irq: irq %d events = 0x%04X\n", irq, | 83 | printk("oss_irq: irq %u events = 0x%04X\n", irq, |
106 | (int) oss->irq_pending); | 84 | (int) oss->irq_pending); |
107 | } | 85 | } |
108 | #endif | 86 | #endif |
@@ -113,11 +91,10 @@ static irqreturn_t oss_irq(int irq, void *dev_id) | |||
113 | /* FIXME: call sound handler */ | 91 | /* FIXME: call sound handler */ |
114 | } else if (events & OSS_IP_SCSI) { | 92 | } else if (events & OSS_IP_SCSI) { |
115 | oss->irq_pending &= ~OSS_IP_SCSI; | 93 | oss->irq_pending &= ~OSS_IP_SCSI; |
116 | m68k_handle_int(IRQ_MAC_SCSI); | 94 | generic_handle_irq(IRQ_MAC_SCSI); |
117 | } else { | 95 | } else { |
118 | /* FIXME: error check here? */ | 96 | /* FIXME: error check here? */ |
119 | } | 97 | } |
120 | return IRQ_HANDLED; | ||
121 | } | 98 | } |
122 | 99 | ||
123 | /* | 100 | /* |
@@ -126,13 +103,13 @@ static irqreturn_t oss_irq(int irq, void *dev_id) | |||
126 | * Unlike the VIA/RBV this is on its own autovector interrupt level. | 103 | * Unlike the VIA/RBV this is on its own autovector interrupt level. |
127 | */ | 104 | */ |
128 | 105 | ||
129 | static irqreturn_t oss_nubus_irq(int irq, void *dev_id) | 106 | static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) |
130 | { | 107 | { |
131 | int events, irq_bit, i; | 108 | int events, irq_bit, i; |
132 | 109 | ||
133 | events = oss->irq_pending & OSS_IP_NUBUS; | 110 | events = oss->irq_pending & OSS_IP_NUBUS; |
134 | if (!events) | 111 | if (!events) |
135 | return IRQ_NONE; | 112 | return; |
136 | 113 | ||
137 | #ifdef DEBUG_NUBUS_INT | 114 | #ifdef DEBUG_NUBUS_INT |
138 | if (console_loglevel > 7) { | 115 | if (console_loglevel > 7) { |
@@ -148,10 +125,21 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id) | |||
148 | irq_bit >>= 1; | 125 | irq_bit >>= 1; |
149 | if (events & irq_bit) { | 126 | if (events & irq_bit) { |
150 | oss->irq_pending &= ~irq_bit; | 127 | oss->irq_pending &= ~irq_bit; |
151 | m68k_handle_int(NUBUS_SOURCE_BASE + i); | 128 | generic_handle_irq(NUBUS_SOURCE_BASE + i); |
152 | } | 129 | } |
153 | } while(events & (irq_bit - 1)); | 130 | } while(events & (irq_bit - 1)); |
154 | return IRQ_HANDLED; | 131 | } |
132 | |||
133 | /* | ||
134 | * Register the OSS and NuBus interrupt dispatchers. | ||
135 | */ | ||
136 | |||
137 | void __init oss_register_interrupts(void) | ||
138 | { | ||
139 | irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq); | ||
140 | irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq); | ||
141 | irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq); | ||
142 | irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq); | ||
155 | } | 143 | } |
156 | 144 | ||
157 | /* | 145 | /* |
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index a4c3eb60706e..e6c2d20f328d 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/irq.h> | ||
21 | 22 | ||
22 | #include <asm/traps.h> | 23 | #include <asm/traps.h> |
23 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
@@ -30,8 +31,6 @@ | |||
30 | int psc_present; | 31 | int psc_present; |
31 | volatile __u8 *psc; | 32 | volatile __u8 *psc; |
32 | 33 | ||
33 | irqreturn_t psc_irq(int, void *); | ||
34 | |||
35 | /* | 34 | /* |
36 | * Debugging dump, used in various places to see what's going on. | 35 | * Debugging dump, used in various places to see what's going on. |
37 | */ | 36 | */ |
@@ -112,52 +111,52 @@ void __init psc_init(void) | |||
112 | } | 111 | } |
113 | 112 | ||
114 | /* | 113 | /* |
115 | * Register the PSC interrupt dispatchers for autovector interrupts 3-6. | ||
116 | */ | ||
117 | |||
118 | void __init psc_register_interrupts(void) | ||
119 | { | ||
120 | if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30)) | ||
121 | pr_err("Couldn't register psc%d interrupt\n", 3); | ||
122 | if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40)) | ||
123 | pr_err("Couldn't register psc%d interrupt\n", 4); | ||
124 | if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50)) | ||
125 | pr_err("Couldn't register psc%d interrupt\n", 5); | ||
126 | if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60)) | ||
127 | pr_err("Couldn't register psc%d interrupt\n", 6); | ||
128 | } | ||
129 | |||
130 | /* | ||
131 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. | 114 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. |
132 | */ | 115 | */ |
133 | 116 | ||
134 | irqreturn_t psc_irq(int irq, void *dev_id) | 117 | static void psc_irq(unsigned int irq, struct irq_desc *desc) |
135 | { | 118 | { |
136 | int pIFR = pIFRbase + ((int) dev_id); | 119 | unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); |
137 | int pIER = pIERbase + ((int) dev_id); | 120 | int pIFR = pIFRbase + offset; |
121 | int pIER = pIERbase + offset; | ||
138 | int irq_num; | 122 | int irq_num; |
139 | unsigned char irq_bit, events; | 123 | unsigned char irq_bit, events; |
140 | 124 | ||
141 | #ifdef DEBUG_IRQS | 125 | #ifdef DEBUG_IRQS |
142 | printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n", | 126 | printk("psc_irq: irq %u pIFR = 0x%02X pIER = 0x%02X\n", |
143 | irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER)); | 127 | irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER)); |
144 | #endif | 128 | #endif |
145 | 129 | ||
146 | events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF; | 130 | events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF; |
147 | if (!events) | 131 | if (!events) |
148 | return IRQ_NONE; | 132 | return; |
149 | 133 | ||
150 | irq_num = irq << 3; | 134 | irq_num = irq << 3; |
151 | irq_bit = 1; | 135 | irq_bit = 1; |
152 | do { | 136 | do { |
153 | if (events & irq_bit) { | 137 | if (events & irq_bit) { |
154 | psc_write_byte(pIFR, irq_bit); | 138 | psc_write_byte(pIFR, irq_bit); |
155 | m68k_handle_int(irq_num); | 139 | generic_handle_irq(irq_num); |
156 | } | 140 | } |
157 | irq_num++; | 141 | irq_num++; |
158 | irq_bit <<= 1; | 142 | irq_bit <<= 1; |
159 | } while (events >= irq_bit); | 143 | } while (events >= irq_bit); |
160 | return IRQ_HANDLED; | 144 | } |
145 | |||
146 | /* | ||
147 | * Register the PSC interrupt dispatchers for autovector interrupts 3-6. | ||
148 | */ | ||
149 | |||
150 | void __init psc_register_interrupts(void) | ||
151 | { | ||
152 | irq_set_chained_handler(IRQ_AUTO_3, psc_irq); | ||
153 | irq_set_handler_data(IRQ_AUTO_3, (void *)0x30); | ||
154 | irq_set_chained_handler(IRQ_AUTO_4, psc_irq); | ||
155 | irq_set_handler_data(IRQ_AUTO_4, (void *)0x40); | ||
156 | irq_set_chained_handler(IRQ_AUTO_5, psc_irq); | ||
157 | irq_set_handler_data(IRQ_AUTO_5, (void *)0x50); | ||
158 | irq_set_chained_handler(IRQ_AUTO_6, psc_irq); | ||
159 | irq_set_handler_data(IRQ_AUTO_6, (void *)0x60); | ||
161 | } | 160 | } |
162 | 161 | ||
163 | void psc_irq_enable(int irq) { | 162 | void psc_irq_enable(int irq) { |
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index e71166daec6a..f1600ad26621 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/irq.h> | ||
31 | 32 | ||
32 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
33 | #include <asm/macintosh.h> | 34 | #include <asm/macintosh.h> |
@@ -77,9 +78,6 @@ static int gIER,gIFR,gBufA,gBufB; | |||
77 | static u8 nubus_disabled; | 78 | static u8 nubus_disabled; |
78 | 79 | ||
79 | void via_debug_dump(void); | 80 | void via_debug_dump(void); |
80 | irqreturn_t via1_irq(int, void *); | ||
81 | irqreturn_t via2_irq(int, void *); | ||
82 | irqreturn_t via_nubus_irq(int, void *); | ||
83 | void via_irq_enable(int irq); | 81 | void via_irq_enable(int irq); |
84 | void via_irq_disable(int irq); | 82 | void via_irq_disable(int irq); |
85 | void via_irq_clear(int irq); | 83 | void via_irq_clear(int irq); |
@@ -281,40 +279,11 @@ void __init via_init_clock(irq_handler_t func) | |||
281 | via1[vT1CL] = MAC_CLOCK_LOW; | 279 | via1[vT1CL] = MAC_CLOCK_LOW; |
282 | via1[vT1CH] = MAC_CLOCK_HIGH; | 280 | via1[vT1CH] = MAC_CLOCK_HIGH; |
283 | 281 | ||
284 | if (request_irq(IRQ_MAC_TIMER_1, func, IRQ_FLG_LOCK, "timer", func)) | 282 | if (request_irq(IRQ_MAC_TIMER_1, func, 0, "timer", func)) |
285 | pr_err("Couldn't register %s interrupt\n", "timer"); | 283 | pr_err("Couldn't register %s interrupt\n", "timer"); |
286 | } | 284 | } |
287 | 285 | ||
288 | /* | 286 | /* |
289 | * Register the interrupt dispatchers for VIA or RBV machines only. | ||
290 | */ | ||
291 | |||
292 | void __init via_register_interrupts(void) | ||
293 | { | ||
294 | if (via_alt_mapping) { | ||
295 | if (request_irq(IRQ_AUTO_1, via1_irq, | ||
296 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "software", | ||
297 | (void *) via1)) | ||
298 | pr_err("Couldn't register %s interrupt\n", "software"); | ||
299 | if (request_irq(IRQ_AUTO_6, via1_irq, | ||
300 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", | ||
301 | (void *) via1)) | ||
302 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
303 | } else { | ||
304 | if (request_irq(IRQ_AUTO_1, via1_irq, | ||
305 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", | ||
306 | (void *) via1)) | ||
307 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
308 | } | ||
309 | if (request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, | ||
310 | "via2", (void *) via2)) | ||
311 | pr_err("Couldn't register %s interrupt\n", "via2"); | ||
312 | if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, | ||
313 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "nubus", (void *) via2)) | ||
314 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
315 | } | ||
316 | |||
317 | /* | ||
318 | * Debugging dump, used in various places to see what's going on. | 287 | * Debugging dump, used in various places to see what's going on. |
319 | */ | 288 | */ |
320 | 289 | ||
@@ -446,48 +415,46 @@ void __init via_nubus_init(void) | |||
446 | * via6522.c :-), disable/pending masks added. | 415 | * via6522.c :-), disable/pending masks added. |
447 | */ | 416 | */ |
448 | 417 | ||
449 | irqreturn_t via1_irq(int irq, void *dev_id) | 418 | void via1_irq(unsigned int irq, struct irq_desc *desc) |
450 | { | 419 | { |
451 | int irq_num; | 420 | int irq_num; |
452 | unsigned char irq_bit, events; | 421 | unsigned char irq_bit, events; |
453 | 422 | ||
454 | events = via1[vIFR] & via1[vIER] & 0x7F; | 423 | events = via1[vIFR] & via1[vIER] & 0x7F; |
455 | if (!events) | 424 | if (!events) |
456 | return IRQ_NONE; | 425 | return; |
457 | 426 | ||
458 | irq_num = VIA1_SOURCE_BASE; | 427 | irq_num = VIA1_SOURCE_BASE; |
459 | irq_bit = 1; | 428 | irq_bit = 1; |
460 | do { | 429 | do { |
461 | if (events & irq_bit) { | 430 | if (events & irq_bit) { |
462 | via1[vIFR] = irq_bit; | 431 | via1[vIFR] = irq_bit; |
463 | m68k_handle_int(irq_num); | 432 | generic_handle_irq(irq_num); |
464 | } | 433 | } |
465 | ++irq_num; | 434 | ++irq_num; |
466 | irq_bit <<= 1; | 435 | irq_bit <<= 1; |
467 | } while (events >= irq_bit); | 436 | } while (events >= irq_bit); |
468 | return IRQ_HANDLED; | ||
469 | } | 437 | } |
470 | 438 | ||
471 | irqreturn_t via2_irq(int irq, void *dev_id) | 439 | static void via2_irq(unsigned int irq, struct irq_desc *desc) |
472 | { | 440 | { |
473 | int irq_num; | 441 | int irq_num; |
474 | unsigned char irq_bit, events; | 442 | unsigned char irq_bit, events; |
475 | 443 | ||
476 | events = via2[gIFR] & via2[gIER] & 0x7F; | 444 | events = via2[gIFR] & via2[gIER] & 0x7F; |
477 | if (!events) | 445 | if (!events) |
478 | return IRQ_NONE; | 446 | return; |
479 | 447 | ||
480 | irq_num = VIA2_SOURCE_BASE; | 448 | irq_num = VIA2_SOURCE_BASE; |
481 | irq_bit = 1; | 449 | irq_bit = 1; |
482 | do { | 450 | do { |
483 | if (events & irq_bit) { | 451 | if (events & irq_bit) { |
484 | via2[gIFR] = irq_bit | rbv_clear; | 452 | via2[gIFR] = irq_bit | rbv_clear; |
485 | m68k_handle_int(irq_num); | 453 | generic_handle_irq(irq_num); |
486 | } | 454 | } |
487 | ++irq_num; | 455 | ++irq_num; |
488 | irq_bit <<= 1; | 456 | irq_bit <<= 1; |
489 | } while (events >= irq_bit); | 457 | } while (events >= irq_bit); |
490 | return IRQ_HANDLED; | ||
491 | } | 458 | } |
492 | 459 | ||
493 | /* | 460 | /* |
@@ -495,7 +462,7 @@ irqreturn_t via2_irq(int irq, void *dev_id) | |||
495 | * VIA2 dispatcher as a fast interrupt handler. | 462 | * VIA2 dispatcher as a fast interrupt handler. |
496 | */ | 463 | */ |
497 | 464 | ||
498 | irqreturn_t via_nubus_irq(int irq, void *dev_id) | 465 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) |
499 | { | 466 | { |
500 | int slot_irq; | 467 | int slot_irq; |
501 | unsigned char slot_bit, events; | 468 | unsigned char slot_bit, events; |
@@ -506,7 +473,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) | |||
506 | else | 473 | else |
507 | events &= ~via2[vDirA]; | 474 | events &= ~via2[vDirA]; |
508 | if (!events) | 475 | if (!events) |
509 | return IRQ_NONE; | 476 | return; |
510 | 477 | ||
511 | do { | 478 | do { |
512 | slot_irq = IRQ_NUBUS_F; | 479 | slot_irq = IRQ_NUBUS_F; |
@@ -514,7 +481,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) | |||
514 | do { | 481 | do { |
515 | if (events & slot_bit) { | 482 | if (events & slot_bit) { |
516 | events &= ~slot_bit; | 483 | events &= ~slot_bit; |
517 | m68k_handle_int(slot_irq); | 484 | generic_handle_irq(slot_irq); |
518 | } | 485 | } |
519 | --slot_irq; | 486 | --slot_irq; |
520 | slot_bit >>= 1; | 487 | slot_bit >>= 1; |
@@ -528,7 +495,24 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) | |||
528 | else | 495 | else |
529 | events &= ~via2[vDirA]; | 496 | events &= ~via2[vDirA]; |
530 | } while (events); | 497 | } while (events); |
531 | return IRQ_HANDLED; | 498 | } |
499 | |||
500 | /* | ||
501 | * Register the interrupt dispatchers for VIA or RBV machines only. | ||
502 | */ | ||
503 | |||
504 | void __init via_register_interrupts(void) | ||
505 | { | ||
506 | if (via_alt_mapping) { | ||
507 | /* software interrupt */ | ||
508 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); | ||
509 | /* via1 interrupt */ | ||
510 | irq_set_chained_handler(IRQ_AUTO_6, via1_irq); | ||
511 | } else { | ||
512 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); | ||
513 | } | ||
514 | irq_set_chained_handler(IRQ_AUTO_2, via2_irq); | ||
515 | irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq); | ||
532 | } | 516 | } |
533 | 517 | ||
534 | void via_irq_enable(int irq) { | 518 | void via_irq_enable(int irq) { |
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c index 6cb9c3a9b6c9..5de924ef42ed 100644 --- a/arch/m68k/mvme147/config.c +++ b/arch/m68k/mvme147/config.c | |||
@@ -81,7 +81,7 @@ static void mvme147_get_model(char *model) | |||
81 | 81 | ||
82 | void __init mvme147_init_IRQ(void) | 82 | void __init mvme147_init_IRQ(void) |
83 | { | 83 | { |
84 | m68k_setup_user_interrupt(VEC_USER, 192, NULL); | 84 | m68k_setup_user_interrupt(VEC_USER, 192); |
85 | } | 85 | } |
86 | 86 | ||
87 | void __init config_mvme147(void) | 87 | void __init config_mvme147(void) |
@@ -114,8 +114,7 @@ static irqreturn_t mvme147_timer_int (int irq, void *dev_id) | |||
114 | void mvme147_sched_init (irq_handler_t timer_routine) | 114 | void mvme147_sched_init (irq_handler_t timer_routine) |
115 | { | 115 | { |
116 | tick_handler = timer_routine; | 116 | tick_handler = timer_routine; |
117 | if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQ_FLG_REPLACE, | 117 | if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, 0, "timer 1", NULL)) |
118 | "timer 1", NULL)) | ||
119 | pr_err("Couldn't register timer interrupt\n"); | 118 | pr_err("Couldn't register timer interrupt\n"); |
120 | 119 | ||
121 | /* Init the clock with a value */ | 120 | /* Init the clock with a value */ |
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index 0b28e2621653..31a66d99cbca 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c | |||
@@ -117,7 +117,7 @@ static void mvme16x_get_hardware_list(struct seq_file *m) | |||
117 | 117 | ||
118 | static void __init mvme16x_init_IRQ (void) | 118 | static void __init mvme16x_init_IRQ (void) |
119 | { | 119 | { |
120 | m68k_setup_user_interrupt(VEC_USER, 192, NULL); | 120 | m68k_setup_user_interrupt(VEC_USER, 192); |
121 | } | 121 | } |
122 | 122 | ||
123 | #define pcc2chip ((volatile u_char *)0xfff42000) | 123 | #define pcc2chip ((volatile u_char *)0xfff42000) |
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index 9f0e3d59bf92..2b888491f29a 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c | |||
@@ -15,10 +15,10 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | ||
18 | 19 | ||
19 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
20 | #include <asm/system.h> | 21 | #include <asm/system.h> |
21 | #include <asm/irq.h> | ||
22 | #include <asm/traps.h> | 22 | #include <asm/traps.h> |
23 | 23 | ||
24 | #include <asm/q40_master.h> | 24 | #include <asm/q40_master.h> |
@@ -35,35 +35,36 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | static void q40_irq_handler(unsigned int, struct pt_regs *fp); | 37 | static void q40_irq_handler(unsigned int, struct pt_regs *fp); |
38 | static void q40_enable_irq(unsigned int); | 38 | static void q40_irq_enable(struct irq_data *data); |
39 | static void q40_disable_irq(unsigned int); | 39 | static void q40_irq_disable(struct irq_data *data); |
40 | 40 | ||
41 | unsigned short q40_ablecount[35]; | 41 | unsigned short q40_ablecount[35]; |
42 | unsigned short q40_state[35]; | 42 | unsigned short q40_state[35]; |
43 | 43 | ||
44 | static int q40_irq_startup(unsigned int irq) | 44 | static unsigned int q40_irq_startup(struct irq_data *data) |
45 | { | 45 | { |
46 | unsigned int irq = data->irq; | ||
47 | |||
46 | /* test for ISA ints not implemented by HW */ | 48 | /* test for ISA ints not implemented by HW */ |
47 | switch (irq) { | 49 | switch (irq) { |
48 | case 1: case 2: case 8: case 9: | 50 | case 1: case 2: case 8: case 9: |
49 | case 11: case 12: case 13: | 51 | case 11: case 12: case 13: |
50 | printk("%s: ISA IRQ %d not implemented by HW\n", __func__, irq); | 52 | printk("%s: ISA IRQ %d not implemented by HW\n", __func__, irq); |
51 | return -ENXIO; | 53 | /* FIXME return -ENXIO; */ |
52 | } | 54 | } |
53 | return 0; | 55 | return 0; |
54 | } | 56 | } |
55 | 57 | ||
56 | static void q40_irq_shutdown(unsigned int irq) | 58 | static void q40_irq_shutdown(struct irq_data *data) |
57 | { | 59 | { |
58 | } | 60 | } |
59 | 61 | ||
60 | static struct irq_controller q40_irq_controller = { | 62 | static struct irq_chip q40_irq_chip = { |
61 | .name = "q40", | 63 | .name = "q40", |
62 | .lock = __SPIN_LOCK_UNLOCKED(q40_irq_controller.lock), | 64 | .irq_startup = q40_irq_startup, |
63 | .startup = q40_irq_startup, | 65 | .irq_shutdown = q40_irq_shutdown, |
64 | .shutdown = q40_irq_shutdown, | 66 | .irq_enable = q40_irq_enable, |
65 | .enable = q40_enable_irq, | 67 | .irq_disable = q40_irq_disable, |
66 | .disable = q40_disable_irq, | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | /* | 70 | /* |
@@ -81,13 +82,14 @@ static int disabled; | |||
81 | 82 | ||
82 | void __init q40_init_IRQ(void) | 83 | void __init q40_init_IRQ(void) |
83 | { | 84 | { |
84 | m68k_setup_irq_controller(&q40_irq_controller, 1, Q40_IRQ_MAX); | 85 | m68k_setup_irq_controller(&q40_irq_chip, handle_simple_irq, 1, |
86 | Q40_IRQ_MAX); | ||
85 | 87 | ||
86 | /* setup handler for ISA ints */ | 88 | /* setup handler for ISA ints */ |
87 | m68k_setup_auto_interrupt(q40_irq_handler); | 89 | m68k_setup_auto_interrupt(q40_irq_handler); |
88 | 90 | ||
89 | m68k_irq_startup(IRQ_AUTO_2); | 91 | m68k_irq_startup_irq(IRQ_AUTO_2); |
90 | m68k_irq_startup(IRQ_AUTO_4); | 92 | m68k_irq_startup_irq(IRQ_AUTO_4); |
91 | 93 | ||
92 | /* now enable some ints.. */ | 94 | /* now enable some ints.. */ |
93 | master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */ | 95 | master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */ |
@@ -218,11 +220,11 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) | |||
218 | switch (irq) { | 220 | switch (irq) { |
219 | case 4: | 221 | case 4: |
220 | case 6: | 222 | case 6: |
221 | __m68k_handle_int(Q40_IRQ_SAMPLE, fp); | 223 | do_IRQ(Q40_IRQ_SAMPLE, fp); |
222 | return; | 224 | return; |
223 | } | 225 | } |
224 | if (mir & Q40_IRQ_FRAME_MASK) { | 226 | if (mir & Q40_IRQ_FRAME_MASK) { |
225 | __m68k_handle_int(Q40_IRQ_FRAME, fp); | 227 | do_IRQ(Q40_IRQ_FRAME, fp); |
226 | master_outb(-1, FRAME_CLEAR_REG); | 228 | master_outb(-1, FRAME_CLEAR_REG); |
227 | } | 229 | } |
228 | if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) { | 230 | if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) { |
@@ -257,7 +259,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) | |||
257 | goto iirq; | 259 | goto iirq; |
258 | } | 260 | } |
259 | q40_state[irq] |= IRQ_INPROGRESS; | 261 | q40_state[irq] |= IRQ_INPROGRESS; |
260 | __m68k_handle_int(irq, fp); | 262 | do_IRQ(irq, fp); |
261 | q40_state[irq] &= ~IRQ_INPROGRESS; | 263 | q40_state[irq] &= ~IRQ_INPROGRESS; |
262 | 264 | ||
263 | /* naively enable everything, if that fails than */ | 265 | /* naively enable everything, if that fails than */ |
@@ -288,25 +290,29 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) | |||
288 | mir = master_inb(IIRQ_REG); | 290 | mir = master_inb(IIRQ_REG); |
289 | /* should test whether keyboard irq is really enabled, doing it in defhand */ | 291 | /* should test whether keyboard irq is really enabled, doing it in defhand */ |
290 | if (mir & Q40_IRQ_KEYB_MASK) | 292 | if (mir & Q40_IRQ_KEYB_MASK) |
291 | __m68k_handle_int(Q40_IRQ_KEYBOARD, fp); | 293 | do_IRQ(Q40_IRQ_KEYBOARD, fp); |
292 | 294 | ||
293 | return; | 295 | return; |
294 | } | 296 | } |
295 | 297 | ||
296 | void q40_enable_irq(unsigned int irq) | 298 | void q40_irq_enable(struct irq_data *data) |
297 | { | 299 | { |
300 | unsigned int irq = data->irq; | ||
301 | |||
298 | if (irq >= 5 && irq <= 15) { | 302 | if (irq >= 5 && irq <= 15) { |
299 | mext_disabled--; | 303 | mext_disabled--; |
300 | if (mext_disabled > 0) | 304 | if (mext_disabled > 0) |
301 | printk("q40_enable_irq : nested disable/enable\n"); | 305 | printk("q40_irq_enable : nested disable/enable\n"); |
302 | if (mext_disabled == 0) | 306 | if (mext_disabled == 0) |
303 | master_outb(1, EXT_ENABLE_REG); | 307 | master_outb(1, EXT_ENABLE_REG); |
304 | } | 308 | } |
305 | } | 309 | } |
306 | 310 | ||
307 | 311 | ||
308 | void q40_disable_irq(unsigned int irq) | 312 | void q40_irq_disable(struct irq_data *data) |
309 | { | 313 | { |
314 | unsigned int irq = data->irq; | ||
315 | |||
310 | /* disable ISA iqs : only do something if the driver has been | 316 | /* disable ISA iqs : only do something if the driver has been |
311 | * verified to be Q40 "compatible" - right now IDE, NE2K | 317 | * verified to be Q40 "compatible" - right now IDE, NE2K |
312 | * Any driver should not attempt to sleep across disable_irq !! | 318 | * Any driver should not attempt to sleep across disable_irq !! |
@@ -319,13 +325,3 @@ void q40_disable_irq(unsigned int irq) | |||
319 | printk("disable_irq nesting count %d\n",mext_disabled); | 325 | printk("disable_irq nesting count %d\n",mext_disabled); |
320 | } | 326 | } |
321 | } | 327 | } |
322 | |||
323 | unsigned long q40_probe_irq_on(void) | ||
324 | { | ||
325 | printk("irq probing not working - reconfigure the driver to avoid this\n"); | ||
326 | return -1; | ||
327 | } | ||
328 | int q40_probe_irq_off(unsigned long irqs) | ||
329 | { | ||
330 | return -1; | ||
331 | } | ||
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index 6464ad3ae3e6..78b60f53e90a 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c | |||
@@ -51,25 +51,29 @@ void sun3_disable_irq(unsigned int irq) | |||
51 | 51 | ||
52 | static irqreturn_t sun3_int7(int irq, void *dev_id) | 52 | static irqreturn_t sun3_int7(int irq, void *dev_id) |
53 | { | 53 | { |
54 | *sun3_intreg |= (1 << irq); | 54 | unsigned int cnt; |
55 | if (!(kstat_cpu(0).irqs[irq] % 2000)) | 55 | |
56 | sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 16000) / 2000]); | 56 | cnt = kstat_irqs_cpu(irq, 0); |
57 | if (!(cnt % 2000)) | ||
58 | sun3_leds(led_pattern[cnt % 16000 / 2000]); | ||
57 | return IRQ_HANDLED; | 59 | return IRQ_HANDLED; |
58 | } | 60 | } |
59 | 61 | ||
60 | static irqreturn_t sun3_int5(int irq, void *dev_id) | 62 | static irqreturn_t sun3_int5(int irq, void *dev_id) |
61 | { | 63 | { |
64 | unsigned int cnt; | ||
65 | |||
62 | #ifdef CONFIG_SUN3 | 66 | #ifdef CONFIG_SUN3 |
63 | intersil_clear(); | 67 | intersil_clear(); |
64 | #endif | 68 | #endif |
65 | *sun3_intreg |= (1 << irq); | ||
66 | #ifdef CONFIG_SUN3 | 69 | #ifdef CONFIG_SUN3 |
67 | intersil_clear(); | 70 | intersil_clear(); |
68 | #endif | 71 | #endif |
69 | xtime_update(1); | 72 | xtime_update(1); |
70 | update_process_times(user_mode(get_irq_regs())); | 73 | update_process_times(user_mode(get_irq_regs())); |
71 | if (!(kstat_cpu(0).irqs[irq] % 20)) | 74 | cnt = kstat_irqs_cpu(irq, 0); |
72 | sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 160) / 20]); | 75 | if (!(cnt % 20)) |
76 | sun3_leds(led_pattern[cnt % 160 / 20]); | ||
73 | return IRQ_HANDLED; | 77 | return IRQ_HANDLED; |
74 | } | 78 | } |
75 | 79 | ||
@@ -79,29 +83,33 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id) | |||
79 | return IRQ_HANDLED; | 83 | return IRQ_HANDLED; |
80 | } | 84 | } |
81 | 85 | ||
82 | static void sun3_inthandle(unsigned int irq, struct pt_regs *fp) | 86 | static void sun3_irq_enable(struct irq_data *data) |
83 | { | 87 | { |
84 | *sun3_intreg &= ~(1 << irq); | 88 | sun3_enable_irq(data->irq); |
89 | }; | ||
85 | 90 | ||
86 | __m68k_handle_int(irq, fp); | 91 | static void sun3_irq_disable(struct irq_data *data) |
87 | } | 92 | { |
93 | sun3_disable_irq(data->irq); | ||
94 | }; | ||
88 | 95 | ||
89 | static struct irq_controller sun3_irq_controller = { | 96 | static struct irq_chip sun3_irq_chip = { |
90 | .name = "sun3", | 97 | .name = "sun3", |
91 | .lock = __SPIN_LOCK_UNLOCKED(sun3_irq_controller.lock), | 98 | .irq_startup = m68k_irq_startup, |
92 | .startup = m68k_irq_startup, | 99 | .irq_shutdown = m68k_irq_shutdown, |
93 | .shutdown = m68k_irq_shutdown, | 100 | .irq_enable = sun3_irq_enable, |
94 | .enable = sun3_enable_irq, | 101 | .irq_disable = sun3_irq_disable, |
95 | .disable = sun3_disable_irq, | 102 | .irq_mask = sun3_irq_disable, |
103 | .irq_unmask = sun3_irq_enable, | ||
96 | }; | 104 | }; |
97 | 105 | ||
98 | void __init sun3_init_IRQ(void) | 106 | void __init sun3_init_IRQ(void) |
99 | { | 107 | { |
100 | *sun3_intreg = 1; | 108 | *sun3_intreg = 1; |
101 | 109 | ||
102 | m68k_setup_auto_interrupt(sun3_inthandle); | 110 | m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1, |
103 | m68k_setup_irq_controller(&sun3_irq_controller, IRQ_AUTO_1, 7); | 111 | 7); |
104 | m68k_setup_user_interrupt(VEC_USER, 128, NULL); | 112 | m68k_setup_user_interrupt(VEC_USER, 128); |
105 | 113 | ||
106 | if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL)) | 114 | if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL)) |
107 | pr_err("Couldn't register %s interrupt\n", "int5"); | 115 | pr_err("Couldn't register %s interrupt\n", "int5"); |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 9b4cb00407d7..0be318609fc6 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -286,11 +286,11 @@ CLEAN_FILES += vmlinux.32 vmlinux.64 | |||
286 | archprepare: | 286 | archprepare: |
287 | ifdef CONFIG_MIPS32_N32 | 287 | ifdef CONFIG_MIPS32_N32 |
288 | @echo ' Checking missing-syscalls for N32' | 288 | @echo ' Checking missing-syscalls for N32' |
289 | $(Q)$(MAKE) $(build)=. missing-syscalls ccflags-y="-mabi=n32" | 289 | $(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=n32" |
290 | endif | 290 | endif |
291 | ifdef CONFIG_MIPS32_O32 | 291 | ifdef CONFIG_MIPS32_O32 |
292 | @echo ' Checking missing-syscalls for O32' | 292 | @echo ' Checking missing-syscalls for O32' |
293 | $(Q)$(MAKE) $(build)=. missing-syscalls ccflags-y="-mabi=32" | 293 | $(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=32" |
294 | endif | 294 | endif |
295 | 295 | ||
296 | install: | 296 | install: |
diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts new file mode 100644 index 000000000000..0e00e508eaa6 --- /dev/null +++ b/arch/powerpc/boot/dts/charon.dts | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * charon board Device Tree Source | ||
3 | * | ||
4 | * Copyright (C) 2007 Semihalf | ||
5 | * Marian Balakowicz <m8@semihalf.com> | ||
6 | * | ||
7 | * Copyright (C) 2010 DENX Software Engineering GmbH | ||
8 | * Heiko Schocher <hs@denx.de> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | /dts-v1/; | ||
17 | |||
18 | / { | ||
19 | model = "anon,charon"; | ||
20 | compatible = "anon,charon"; | ||
21 | #address-cells = <1>; | ||
22 | #size-cells = <1>; | ||
23 | interrupt-parent = <&mpc5200_pic>; | ||
24 | |||
25 | cpus { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | PowerPC,5200@0 { | ||
30 | device_type = "cpu"; | ||
31 | reg = <0>; | ||
32 | d-cache-line-size = <32>; | ||
33 | i-cache-line-size = <32>; | ||
34 | d-cache-size = <0x4000>; // L1, 16K | ||
35 | i-cache-size = <0x4000>; // L1, 16K | ||
36 | timebase-frequency = <0>; // from bootloader | ||
37 | bus-frequency = <0>; // from bootloader | ||
38 | clock-frequency = <0>; // from bootloader | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | memory { | ||
43 | device_type = "memory"; | ||
44 | reg = <0x00000000 0x08000000>; // 128MB | ||
45 | }; | ||
46 | |||
47 | soc5200@f0000000 { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | compatible = "fsl,mpc5200-immr"; | ||
51 | ranges = <0 0xf0000000 0x0000c000>; | ||
52 | reg = <0xf0000000 0x00000100>; | ||
53 | bus-frequency = <0>; // from bootloader | ||
54 | system-frequency = <0>; // from bootloader | ||
55 | |||
56 | cdm@200 { | ||
57 | compatible = "fsl,mpc5200-cdm"; | ||
58 | reg = <0x200 0x38>; | ||
59 | }; | ||
60 | |||
61 | mpc5200_pic: interrupt-controller@500 { | ||
62 | // 5200 interrupts are encoded into two levels; | ||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <3>; | ||
65 | compatible = "fsl,mpc5200-pic"; | ||
66 | reg = <0x500 0x80>; | ||
67 | }; | ||
68 | |||
69 | timer@600 { // General Purpose Timer | ||
70 | compatible = "fsl,mpc5200-gpt"; | ||
71 | reg = <0x600 0x10>; | ||
72 | interrupts = <1 9 0>; | ||
73 | fsl,has-wdt; | ||
74 | }; | ||
75 | |||
76 | can@900 { | ||
77 | compatible = "fsl,mpc5200-mscan"; | ||
78 | interrupts = <2 17 0>; | ||
79 | reg = <0x900 0x80>; | ||
80 | }; | ||
81 | |||
82 | can@980 { | ||
83 | compatible = "fsl,mpc5200-mscan"; | ||
84 | interrupts = <2 18 0>; | ||
85 | reg = <0x980 0x80>; | ||
86 | }; | ||
87 | |||
88 | gpio_simple: gpio@b00 { | ||
89 | compatible = "fsl,mpc5200-gpio"; | ||
90 | reg = <0xb00 0x40>; | ||
91 | interrupts = <1 7 0>; | ||
92 | gpio-controller; | ||
93 | #gpio-cells = <2>; | ||
94 | }; | ||
95 | |||
96 | usb@1000 { | ||
97 | compatible = "fsl,mpc5200-ohci","ohci-be"; | ||
98 | reg = <0x1000 0xff>; | ||
99 | interrupts = <2 6 0>; | ||
100 | }; | ||
101 | |||
102 | dma-controller@1200 { | ||
103 | device_type = "dma-controller"; | ||
104 | compatible = "fsl,mpc5200-bestcomm"; | ||
105 | reg = <0x1200 0x80>; | ||
106 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | ||
107 | 3 4 0 3 5 0 3 6 0 3 7 0 | ||
108 | 3 8 0 3 9 0 3 10 0 3 11 0 | ||
109 | 3 12 0 3 13 0 3 14 0 3 15 0>; | ||
110 | }; | ||
111 | |||
112 | xlb@1f00 { | ||
113 | compatible = "fsl,mpc5200-xlb"; | ||
114 | reg = <0x1f00 0x100>; | ||
115 | }; | ||
116 | |||
117 | serial@2000 { // PSC1 | ||
118 | compatible = "fsl,mpc5200-psc-uart"; | ||
119 | reg = <0x2000 0x100>; | ||
120 | interrupts = <2 1 0>; | ||
121 | }; | ||
122 | |||
123 | serial@2400 { // PSC3 | ||
124 | compatible = "fsl,mpc5200-psc-uart"; | ||
125 | reg = <0x2400 0x100>; | ||
126 | interrupts = <2 3 0>; | ||
127 | }; | ||
128 | |||
129 | ethernet@3000 { | ||
130 | compatible = "fsl,mpc5200-fec"; | ||
131 | reg = <0x3000 0x400>; | ||
132 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
133 | interrupts = <2 5 0>; | ||
134 | fixed-link = <1 1 100 0 0>; | ||
135 | }; | ||
136 | |||
137 | mdio@3000 { | ||
138 | #address-cells = <1>; | ||
139 | #size-cells = <0>; | ||
140 | compatible = "fsl,mpc5200-mdio"; | ||
141 | reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts | ||
142 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. | ||
143 | }; | ||
144 | |||
145 | ata@3a00 { | ||
146 | compatible = "fsl,mpc5200-ata"; | ||
147 | reg = <0x3a00 0x100>; | ||
148 | interrupts = <2 7 0>; | ||
149 | }; | ||
150 | |||
151 | i2c@3d00 { | ||
152 | #address-cells = <1>; | ||
153 | #size-cells = <0>; | ||
154 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; | ||
155 | reg = <0x3d00 0x40>; | ||
156 | interrupts = <2 15 0>; | ||
157 | }; | ||
158 | |||
159 | |||
160 | i2c@3d40 { | ||
161 | #address-cells = <1>; | ||
162 | #size-cells = <0>; | ||
163 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; | ||
164 | reg = <0x3d40 0x40>; | ||
165 | interrupts = <2 16 0>; | ||
166 | |||
167 | dtt@28 { | ||
168 | compatible = "national,lm80"; | ||
169 | reg = <0x28>; | ||
170 | }; | ||
171 | |||
172 | rtc@68 { | ||
173 | compatible = "dallas,ds1374"; | ||
174 | reg = <0x68>; | ||
175 | }; | ||
176 | }; | ||
177 | |||
178 | sram@8000 { | ||
179 | compatible = "fsl,mpc5200-sram"; | ||
180 | reg = <0x8000 0x4000>; | ||
181 | }; | ||
182 | }; | ||
183 | |||
184 | localbus { | ||
185 | compatible = "fsl,mpc5200-lpb","simple-bus"; | ||
186 | #address-cells = <2>; | ||
187 | #size-cells = <1>; | ||
188 | ranges = < 0 0 0xfc000000 0x02000000 | ||
189 | 1 0 0xe0000000 0x04000000 // CS1 range, SM501 | ||
190 | 3 0 0xe8000000 0x00080000>; | ||
191 | |||
192 | flash@0,0 { | ||
193 | compatible = "cfi-flash"; | ||
194 | reg = <0 0 0x02000000>; | ||
195 | bank-width = <4>; | ||
196 | device-width = <2>; | ||
197 | #size-cells = <1>; | ||
198 | #address-cells = <1>; | ||
199 | }; | ||
200 | |||
201 | display@1,0 { | ||
202 | compatible = "smi,sm501"; | ||
203 | reg = <1 0x00000000 0x00800000 | ||
204 | 1 0x03e00000 0x00200000>; | ||
205 | mode = "640x480-32@60"; | ||
206 | interrupts = <1 1 3>; | ||
207 | little-endian; | ||
208 | }; | ||
209 | |||
210 | mram0@3,0 { | ||
211 | compatible = "mtd-ram"; | ||
212 | reg = <3 0x00000 0x80000>; | ||
213 | bank-width = <1>; | ||
214 | }; | ||
215 | }; | ||
216 | |||
217 | pci@f0000d00 { | ||
218 | #interrupt-cells = <1>; | ||
219 | #size-cells = <2>; | ||
220 | #address-cells = <3>; | ||
221 | device_type = "pci"; | ||
222 | compatible = "fsl,mpc5200-pci"; | ||
223 | reg = <0xf0000d00 0x100>; | ||
224 | interrupt-map-mask = <0xf800 0 0 7>; | ||
225 | interrupt-map = <0xc000 0 0 1 &mpc5200_pic 0 0 3 | ||
226 | 0xc000 0 0 2 &mpc5200_pic 0 0 3 | ||
227 | 0xc000 0 0 3 &mpc5200_pic 0 0 3 | ||
228 | 0xc000 0 0 4 &mpc5200_pic 0 0 3>; | ||
229 | clock-frequency = <0>; // From boot loader | ||
230 | interrupts = <2 8 0 2 9 0 2 10 0>; | ||
231 | bus-range = <0 0>; | ||
232 | ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000 | ||
233 | 0x02000000 0 0x90000000 0x90000000 0 0x10000000 | ||
234 | 0x01000000 0 0x00000000 0xa0000000 0 0x01000000>; | ||
235 | }; | ||
236 | }; | ||
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig index 959cd2cfc275..716a37be16e3 100644 --- a/arch/powerpc/configs/52xx/tqm5200_defconfig +++ b/arch/powerpc/configs/52xx/tqm5200_defconfig | |||
@@ -1,9 +1,10 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_SPARSE_IRQ=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EXPERT=y | 7 | CONFIG_EMBEDDED=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
@@ -17,7 +18,6 @@ CONFIG_PPC_MPC5200_SIMPLE=y | |||
17 | CONFIG_PPC_MPC5200_BUGFIX=y | 18 | CONFIG_PPC_MPC5200_BUGFIX=y |
18 | # CONFIG_PPC_PMAC is not set | 19 | # CONFIG_PPC_PMAC is not set |
19 | CONFIG_PPC_BESTCOMM=y | 20 | CONFIG_PPC_BESTCOMM=y |
20 | CONFIG_SPARSE_IRQ=y | ||
21 | CONFIG_PM=y | 21 | CONFIG_PM=y |
22 | # CONFIG_PCI is not set | 22 | # CONFIG_PCI is not set |
23 | CONFIG_NET=y | 23 | CONFIG_NET=y |
@@ -38,17 +38,18 @@ CONFIG_MTD=y | |||
38 | CONFIG_MTD_CONCAT=y | 38 | CONFIG_MTD_CONCAT=y |
39 | CONFIG_MTD_PARTITIONS=y | 39 | CONFIG_MTD_PARTITIONS=y |
40 | CONFIG_MTD_CMDLINE_PARTS=y | 40 | CONFIG_MTD_CMDLINE_PARTS=y |
41 | CONFIG_MTD_OF_PARTS=y | ||
41 | CONFIG_MTD_CHAR=y | 42 | CONFIG_MTD_CHAR=y |
42 | CONFIG_MTD_BLOCK=y | 43 | CONFIG_MTD_BLOCK=y |
43 | CONFIG_MTD_CFI=y | 44 | CONFIG_MTD_CFI=y |
44 | CONFIG_MTD_CFI_AMDSTD=y | 45 | CONFIG_MTD_CFI_AMDSTD=y |
45 | CONFIG_MTD_ROM=y | 46 | CONFIG_MTD_ROM=y |
46 | CONFIG_MTD_PHYSMAP_OF=y | 47 | CONFIG_MTD_PHYSMAP_OF=y |
48 | CONFIG_MTD_PLATRAM=y | ||
47 | CONFIG_PROC_DEVICETREE=y | 49 | CONFIG_PROC_DEVICETREE=y |
48 | CONFIG_BLK_DEV_LOOP=y | 50 | CONFIG_BLK_DEV_LOOP=y |
49 | CONFIG_BLK_DEV_RAM=y | 51 | CONFIG_BLK_DEV_RAM=y |
50 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 52 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
51 | # CONFIG_MISC_DEVICES is not set | ||
52 | CONFIG_BLK_DEV_SD=y | 53 | CONFIG_BLK_DEV_SD=y |
53 | CONFIG_CHR_DEV_SG=y | 54 | CONFIG_CHR_DEV_SG=y |
54 | CONFIG_ATA=y | 55 | CONFIG_ATA=y |
@@ -56,13 +57,11 @@ CONFIG_PATA_MPC52xx=y | |||
56 | CONFIG_PATA_PLATFORM=y | 57 | CONFIG_PATA_PLATFORM=y |
57 | CONFIG_NETDEVICES=y | 58 | CONFIG_NETDEVICES=y |
58 | CONFIG_LXT_PHY=y | 59 | CONFIG_LXT_PHY=y |
60 | CONFIG_FIXED_PHY=y | ||
59 | CONFIG_NET_ETHERNET=y | 61 | CONFIG_NET_ETHERNET=y |
60 | CONFIG_FEC_MPC52xx=y | 62 | CONFIG_FEC_MPC52xx=y |
61 | # CONFIG_NETDEV_1000 is not set | 63 | # CONFIG_NETDEV_1000 is not set |
62 | # CONFIG_NETDEV_10000 is not set | 64 | # CONFIG_NETDEV_10000 is not set |
63 | # CONFIG_INPUT is not set | ||
64 | # CONFIG_SERIO is not set | ||
65 | # CONFIG_VT is not set | ||
66 | CONFIG_SERIAL_MPC52xx=y | 65 | CONFIG_SERIAL_MPC52xx=y |
67 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | 66 | CONFIG_SERIAL_MPC52xx_CONSOLE=y |
68 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | 67 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 |
@@ -70,7 +69,13 @@ CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | |||
70 | CONFIG_I2C=y | 69 | CONFIG_I2C=y |
71 | CONFIG_I2C_CHARDEV=y | 70 | CONFIG_I2C_CHARDEV=y |
72 | CONFIG_I2C_MPC=y | 71 | CONFIG_I2C_MPC=y |
72 | CONFIG_SENSORS_LM80=y | ||
73 | CONFIG_WATCHDOG=y | 73 | CONFIG_WATCHDOG=y |
74 | CONFIG_MFD_SM501=y | ||
75 | CONFIG_FB=y | ||
76 | CONFIG_FB_FOREIGN_ENDIAN=y | ||
77 | CONFIG_FB_SM501=y | ||
78 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
74 | CONFIG_USB=y | 79 | CONFIG_USB=y |
75 | CONFIG_USB_DEVICEFS=y | 80 | CONFIG_USB_DEVICEFS=y |
76 | # CONFIG_USB_DEVICE_CLASS is not set | 81 | # CONFIG_USB_DEVICE_CLASS is not set |
@@ -80,10 +85,10 @@ CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | |||
80 | CONFIG_USB_STORAGE=y | 85 | CONFIG_USB_STORAGE=y |
81 | CONFIG_RTC_CLASS=y | 86 | CONFIG_RTC_CLASS=y |
82 | CONFIG_RTC_DRV_DS1307=y | 87 | CONFIG_RTC_DRV_DS1307=y |
88 | CONFIG_RTC_DRV_DS1374=y | ||
83 | CONFIG_EXT2_FS=y | 89 | CONFIG_EXT2_FS=y |
84 | CONFIG_EXT3_FS=y | 90 | CONFIG_EXT3_FS=y |
85 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 91 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
86 | CONFIG_INOTIFY=y | ||
87 | CONFIG_MSDOS_FS=y | 92 | CONFIG_MSDOS_FS=y |
88 | CONFIG_VFAT_FS=y | 93 | CONFIG_VFAT_FS=y |
89 | CONFIG_PROC_KCORE=y | 94 | CONFIG_PROC_KCORE=y |
@@ -102,7 +107,6 @@ CONFIG_DEBUG_KERNEL=y | |||
102 | CONFIG_DETECT_HUNG_TASK=y | 107 | CONFIG_DETECT_HUNG_TASK=y |
103 | # CONFIG_DEBUG_BUGVERBOSE is not set | 108 | # CONFIG_DEBUG_BUGVERBOSE is not set |
104 | CONFIG_DEBUG_INFO=y | 109 | CONFIG_DEBUG_INFO=y |
105 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
106 | CONFIG_CRYPTO_ECB=y | 110 | CONFIG_CRYPTO_ECB=y |
107 | CONFIG_CRYPTO_PCBC=y | 111 | CONFIG_CRYPTO_PCBC=y |
108 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 112 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 84a685a505fe..535711fcb13c 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
@@ -485,3 +485,7 @@ CONFIG_CRYPTO_TWOFISH=m | |||
485 | CONFIG_CRYPTO_LZO=m | 485 | CONFIG_CRYPTO_LZO=m |
486 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 486 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
487 | # CONFIG_CRYPTO_HW is not set | 487 | # CONFIG_CRYPTO_HW is not set |
488 | CONFIG_VIRTUALIZATION=y | ||
489 | CONFIG_KVM_BOOK3S_64=m | ||
490 | CONFIG_KVM_BOOK3S_64_HV=y | ||
491 | CONFIG_VHOST_NET=m | ||
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 96a58b709705..a72f2415a647 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -362,3 +362,7 @@ CONFIG_CRYPTO_TWOFISH=m | |||
362 | CONFIG_CRYPTO_LZO=m | 362 | CONFIG_CRYPTO_LZO=m |
363 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 363 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
364 | # CONFIG_CRYPTO_HW is not set | 364 | # CONFIG_CRYPTO_HW is not set |
365 | CONFIG_VIRTUALIZATION=y | ||
366 | CONFIG_KVM_BOOK3S_64=m | ||
367 | CONFIG_KVM_BOOK3S_64_HV=y | ||
368 | CONFIG_VHOST_NET=m | ||
diff --git a/arch/powerpc/include/asm/floppy.h b/arch/powerpc/include/asm/floppy.h index 24bd34c57e9d..936a904ae78c 100644 --- a/arch/powerpc/include/asm/floppy.h +++ b/arch/powerpc/include/asm/floppy.h | |||
@@ -108,10 +108,10 @@ static int fd_request_irq(void) | |||
108 | { | 108 | { |
109 | if (can_use_virtual_dma) | 109 | if (can_use_virtual_dma) |
110 | return request_irq(FLOPPY_IRQ, floppy_hardint, | 110 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
111 | IRQF_DISABLED, "floppy", NULL); | 111 | 0, "floppy", NULL); |
112 | else | 112 | else |
113 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 113 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
114 | IRQF_DISABLED, "floppy", NULL); | 114 | 0, "floppy", NULL); |
115 | } | 115 | } |
116 | 116 | ||
117 | static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) | 117 | static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) |
diff --git a/arch/powerpc/include/asm/lv1call.h b/arch/powerpc/include/asm/lv1call.h index 9cd5fc828a37..f77c708c67a0 100644 --- a/arch/powerpc/include/asm/lv1call.h +++ b/arch/powerpc/include/asm/lv1call.h | |||
@@ -316,7 +316,7 @@ LV1_CALL(gpu_context_free, 1, 0, 218 ) | |||
316 | LV1_CALL(gpu_context_iomap, 5, 0, 221 ) | 316 | LV1_CALL(gpu_context_iomap, 5, 0, 221 ) |
317 | LV1_CALL(gpu_context_attribute, 6, 0, 225 ) | 317 | LV1_CALL(gpu_context_attribute, 6, 0, 225 ) |
318 | LV1_CALL(gpu_context_intr, 1, 1, 227 ) | 318 | LV1_CALL(gpu_context_intr, 1, 1, 227 ) |
319 | LV1_CALL(gpu_attribute, 5, 0, 228 ) | 319 | LV1_CALL(gpu_attribute, 3, 0, 228 ) |
320 | LV1_CALL(get_rtc, 0, 2, 232 ) | 320 | LV1_CALL(get_rtc, 0, 2, 232 ) |
321 | LV1_CALL(set_ppe_periodic_tracer_frequency, 1, 0, 240 ) | 321 | LV1_CALL(set_ppe_periodic_tracer_frequency, 1, 0, 240 ) |
322 | LV1_CALL(start_ppe_periodic_tracer, 5, 0, 241 ) | 322 | LV1_CALL(start_ppe_periodic_tracer, 5, 0, 241 ) |
diff --git a/arch/powerpc/include/asm/xics.h b/arch/powerpc/include/asm/xics.h index bd6c401c0ee5..c48de98ba94e 100644 --- a/arch/powerpc/include/asm/xics.h +++ b/arch/powerpc/include/asm/xics.h | |||
@@ -15,8 +15,8 @@ | |||
15 | #define DEFAULT_PRIORITY 5 | 15 | #define DEFAULT_PRIORITY 5 |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Mark IPIs as higher priority so we can take them inside interrupts that | 18 | * Mark IPIs as higher priority so we can take them inside interrupts |
19 | * arent marked IRQF_DISABLED | 19 | * FIXME: still true now? |
20 | */ | 20 | */ |
21 | #define IPI_PRIORITY 4 | 21 | #define IPI_PRIORITY 4 |
22 | 22 | ||
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index a54d92fec612..cf9c69b9189c 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -267,7 +267,7 @@ vsx_unavailable_pSeries_1: | |||
267 | 267 | ||
268 | #ifdef CONFIG_CBE_RAS | 268 | #ifdef CONFIG_CBE_RAS |
269 | STD_EXCEPTION_HV(0x1200, 0x1202, cbe_system_error) | 269 | STD_EXCEPTION_HV(0x1200, 0x1202, cbe_system_error) |
270 | KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_HV, 0x1202) | 270 | KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202) |
271 | #endif /* CONFIG_CBE_RAS */ | 271 | #endif /* CONFIG_CBE_RAS */ |
272 | 272 | ||
273 | STD_EXCEPTION_PSERIES(0x1300, 0x1300, instruction_breakpoint) | 273 | STD_EXCEPTION_PSERIES(0x1300, 0x1300, instruction_breakpoint) |
@@ -275,7 +275,7 @@ vsx_unavailable_pSeries_1: | |||
275 | 275 | ||
276 | #ifdef CONFIG_CBE_RAS | 276 | #ifdef CONFIG_CBE_RAS |
277 | STD_EXCEPTION_HV(0x1600, 0x1602, cbe_maintenance) | 277 | STD_EXCEPTION_HV(0x1600, 0x1602, cbe_maintenance) |
278 | KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_HV, 0x1602) | 278 | KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602) |
279 | #endif /* CONFIG_CBE_RAS */ | 279 | #endif /* CONFIG_CBE_RAS */ |
280 | 280 | ||
281 | STD_EXCEPTION_PSERIES(0x1700, 0x1700, altivec_assist) | 281 | STD_EXCEPTION_PSERIES(0x1700, 0x1700, altivec_assist) |
@@ -283,7 +283,7 @@ vsx_unavailable_pSeries_1: | |||
283 | 283 | ||
284 | #ifdef CONFIG_CBE_RAS | 284 | #ifdef CONFIG_CBE_RAS |
285 | STD_EXCEPTION_HV(0x1800, 0x1802, cbe_thermal) | 285 | STD_EXCEPTION_HV(0x1800, 0x1802, cbe_thermal) |
286 | KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_HV, 0x1802) | 286 | KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1802) |
287 | #endif /* CONFIG_CBE_RAS */ | 287 | #endif /* CONFIG_CBE_RAS */ |
288 | 288 | ||
289 | . = 0x3000 | 289 | . = 0x3000 |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 25ddbfc7dd36..6df70907d60a 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -187,7 +187,7 @@ int smp_request_message_ipi(int virq, int msg) | |||
187 | return 1; | 187 | return 1; |
188 | } | 188 | } |
189 | #endif | 189 | #endif |
190 | err = request_irq(virq, smp_ipi_action[msg], IRQF_DISABLED|IRQF_PERCPU, | 190 | err = request_irq(virq, smp_ipi_action[msg], IRQF_PERCPU, |
191 | smp_ipi_name[msg], 0); | 191 | smp_ipi_name[msg], 0); |
192 | WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n", | 192 | WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n", |
193 | virq, smp_ipi_name[msg], err); | 193 | virq, smp_ipi_name[msg], err); |
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index f422231d9235..44d8829334ab 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -1263,7 +1263,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_206) | |||
1263 | addi r6,r5,VCORE_NAPPING_THREADS | 1263 | addi r6,r5,VCORE_NAPPING_THREADS |
1264 | 31: lwarx r4,0,r6 | 1264 | 31: lwarx r4,0,r6 |
1265 | or r4,r4,r0 | 1265 | or r4,r4,r0 |
1266 | popcntw r7,r4 | 1266 | PPC_POPCNTW(r7,r4) |
1267 | cmpw r7,r8 | 1267 | cmpw r7,r8 |
1268 | bge 2f | 1268 | bge 2f |
1269 | stwcx. r4,0,r6 | 1269 | stwcx. r4,0,r6 |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 16da595ff402..2dd6bdd31fe1 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/suspend.h> | 34 | #include <linux/suspend.h> |
35 | #include <linux/memblock.h> | 35 | #include <linux/memblock.h> |
36 | #include <linux/hugetlb.h> | 36 | #include <linux/hugetlb.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <asm/pgalloc.h> | 39 | #include <asm/pgalloc.h> |
39 | #include <asm/prom.h> | 40 | #include <asm/prom.h> |
@@ -555,3 +556,32 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
555 | book3e_hugetlb_preload(vma->vm_mm, address, *ptep); | 556 | book3e_hugetlb_preload(vma->vm_mm, address, *ptep); |
556 | #endif | 557 | #endif |
557 | } | 558 | } |
559 | |||
560 | /* | ||
561 | * System memory should not be in /proc/iomem but various tools expect it | ||
562 | * (eg kdump). | ||
563 | */ | ||
564 | static int add_system_ram_resources(void) | ||
565 | { | ||
566 | struct memblock_region *reg; | ||
567 | |||
568 | for_each_memblock(memory, reg) { | ||
569 | struct resource *res; | ||
570 | unsigned long base = reg->base; | ||
571 | unsigned long size = reg->size; | ||
572 | |||
573 | res = kzalloc(sizeof(struct resource), GFP_KERNEL); | ||
574 | WARN_ON(!res); | ||
575 | |||
576 | if (res) { | ||
577 | res->name = "System RAM"; | ||
578 | res->start = base; | ||
579 | res->end = base + size - 1; | ||
580 | res->flags = IORESOURCE_MEM; | ||
581 | WARN_ON(request_resource(&iomem_resource, res) < 0); | ||
582 | } | ||
583 | } | ||
584 | |||
585 | return 0; | ||
586 | } | ||
587 | subsys_initcall(add_system_ram_resources); | ||
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index c7dd4dec4df8..b22a83a91cb8 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -315,7 +315,10 @@ static int __init find_min_common_depth(void) | |||
315 | struct device_node *root; | 315 | struct device_node *root; |
316 | const char *vec5; | 316 | const char *vec5; |
317 | 317 | ||
318 | root = of_find_node_by_path("/rtas"); | 318 | if (firmware_has_feature(FW_FEATURE_OPAL)) |
319 | root = of_find_node_by_path("/ibm,opal"); | ||
320 | else | ||
321 | root = of_find_node_by_path("/rtas"); | ||
319 | if (!root) | 322 | if (!root) |
320 | root = of_find_node_by_path("/"); | 323 | root = of_find_node_by_path("/"); |
321 | 324 | ||
@@ -344,12 +347,19 @@ static int __init find_min_common_depth(void) | |||
344 | 347 | ||
345 | #define VEC5_AFFINITY_BYTE 5 | 348 | #define VEC5_AFFINITY_BYTE 5 |
346 | #define VEC5_AFFINITY 0x80 | 349 | #define VEC5_AFFINITY 0x80 |
347 | chosen = of_find_node_by_path("/chosen"); | 350 | |
348 | if (chosen) { | 351 | if (firmware_has_feature(FW_FEATURE_OPAL)) |
349 | vec5 = of_get_property(chosen, "ibm,architecture-vec-5", NULL); | 352 | form1_affinity = 1; |
350 | if (vec5 && (vec5[VEC5_AFFINITY_BYTE] & VEC5_AFFINITY)) { | 353 | else { |
351 | dbg("Using form 1 affinity\n"); | 354 | chosen = of_find_node_by_path("/chosen"); |
352 | form1_affinity = 1; | 355 | if (chosen) { |
356 | vec5 = of_get_property(chosen, | ||
357 | "ibm,architecture-vec-5", NULL); | ||
358 | if (vec5 && (vec5[VEC5_AFFINITY_BYTE] & | ||
359 | VEC5_AFFINITY)) { | ||
360 | dbg("Using form 1 affinity\n"); | ||
361 | form1_affinity = 1; | ||
362 | } | ||
353 | } | 363 | } |
354 | } | 364 | } |
355 | 365 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c index e36d6e232ae6..846b789fb195 100644 --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -50,6 +50,7 @@ static void __init mpc5200_simple_setup_arch(void) | |||
50 | 50 | ||
51 | /* list of the supported boards */ | 51 | /* list of the supported boards */ |
52 | static const char *board[] __initdata = { | 52 | static const char *board[] __initdata = { |
53 | "anon,charon", | ||
53 | "intercontrol,digsy-mtc", | 54 | "intercontrol,digsy-mtc", |
54 | "manroland,mucmc52", | 55 | "manroland,mucmc52", |
55 | "manroland,uc101", | 56 | "manroland,uc101", |
diff --git a/arch/powerpc/platforms/cell/beat.c b/arch/powerpc/platforms/cell/beat.c index 232fc384e855..852592b2b712 100644 --- a/arch/powerpc/platforms/cell/beat.c +++ b/arch/powerpc/platforms/cell/beat.c | |||
@@ -230,7 +230,7 @@ static int __init beat_register_event(void) | |||
230 | } | 230 | } |
231 | ev->virq = virq; | 231 | ev->virq = virq; |
232 | 232 | ||
233 | rc = request_irq(virq, ev->handler, IRQF_DISABLED, | 233 | rc = request_irq(virq, ev->handler, 0, |
234 | ev->typecode, NULL); | 234 | ev->typecode, NULL); |
235 | if (rc != 0) { | 235 | if (rc != 0) { |
236 | printk(KERN_ERR "Beat: failed to request virtual IRQ" | 236 | printk(KERN_ERR "Beat: failed to request virtual IRQ" |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index ae790ac4a589..14be2bd358b8 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -514,7 +514,7 @@ static __init int celleb_setup_pciex(struct device_node *node, | |||
514 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 514 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, |
515 | oirq.size); | 515 | oirq.size); |
516 | if (request_irq(virq, pciex_handle_internal_irq, | 516 | if (request_irq(virq, pciex_handle_internal_irq, |
517 | IRQF_DISABLED, "pciex", (void *)phb)) { | 517 | 0, "pciex", (void *)phb)) { |
518 | pr_err("PCIEXC:Failed to request irq\n"); | 518 | pr_err("PCIEXC:Failed to request irq\n"); |
519 | goto error; | 519 | goto error; |
520 | } | 520 | } |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index fc46fcac3921..592c3d51b817 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -412,8 +412,7 @@ static void cell_iommu_enable_hardware(struct cbe_iommu *iommu) | |||
412 | IIC_IRQ_IOEX_ATI | (iommu->nid << IIC_IRQ_NODE_SHIFT)); | 412 | IIC_IRQ_IOEX_ATI | (iommu->nid << IIC_IRQ_NODE_SHIFT)); |
413 | BUG_ON(virq == NO_IRQ); | 413 | BUG_ON(virq == NO_IRQ); |
414 | 414 | ||
415 | ret = request_irq(virq, ioc_interrupt, IRQF_DISABLED, | 415 | ret = request_irq(virq, ioc_interrupt, 0, iommu->name, iommu); |
416 | iommu->name, iommu); | ||
417 | BUG_ON(ret); | 416 | BUG_ON(ret); |
418 | 417 | ||
419 | /* set the IOC segment table origin register (and turn on the iommu) */ | 418 | /* set the IOC segment table origin register (and turn on the iommu) */ |
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c index 1acf36010423..59c1a1694104 100644 --- a/arch/powerpc/platforms/cell/pmu.c +++ b/arch/powerpc/platforms/cell/pmu.c | |||
@@ -392,7 +392,7 @@ static int __init cbe_init_pm_irq(void) | |||
392 | } | 392 | } |
393 | 393 | ||
394 | rc = request_irq(irq, cbe_pm_irq, | 394 | rc = request_irq(irq, cbe_pm_irq, |
395 | IRQF_DISABLED, "cbe-pmu-0", NULL); | 395 | 0, "cbe-pmu-0", NULL); |
396 | if (rc) { | 396 | if (rc) { |
397 | printk("ERROR: Request for irq on node %d failed\n", | 397 | printk("ERROR: Request for irq on node %d failed\n", |
398 | node); | 398 | node); |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 3675da73623f..e94d3ecdd8bb 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -442,8 +442,7 @@ static int spu_request_irqs(struct spu *spu) | |||
442 | snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", | 442 | snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", |
443 | spu->number); | 443 | spu->number); |
444 | ret = request_irq(spu->irqs[0], spu_irq_class_0, | 444 | ret = request_irq(spu->irqs[0], spu_irq_class_0, |
445 | IRQF_DISABLED, | 445 | 0, spu->irq_c0, spu); |
446 | spu->irq_c0, spu); | ||
447 | if (ret) | 446 | if (ret) |
448 | goto bail0; | 447 | goto bail0; |
449 | } | 448 | } |
@@ -451,8 +450,7 @@ static int spu_request_irqs(struct spu *spu) | |||
451 | snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", | 450 | snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", |
452 | spu->number); | 451 | spu->number); |
453 | ret = request_irq(spu->irqs[1], spu_irq_class_1, | 452 | ret = request_irq(spu->irqs[1], spu_irq_class_1, |
454 | IRQF_DISABLED, | 453 | 0, spu->irq_c1, spu); |
455 | spu->irq_c1, spu); | ||
456 | if (ret) | 454 | if (ret) |
457 | goto bail1; | 455 | goto bail1; |
458 | } | 456 | } |
@@ -460,8 +458,7 @@ static int spu_request_irqs(struct spu *spu) | |||
460 | snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", | 458 | snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", |
461 | spu->number); | 459 | spu->number); |
462 | ret = request_irq(spu->irqs[2], spu_irq_class_2, | 460 | ret = request_irq(spu->irqs[2], spu_irq_class_2, |
463 | IRQF_DISABLED, | 461 | 0, spu->irq_c2, spu); |
464 | spu->irq_c2, spu); | ||
465 | if (ret) | 462 | if (ret) |
466 | goto bail2; | 463 | goto bail2; |
467 | } | 464 | } |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index cb40e921a565..901bfbddc3dd 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -272,7 +272,6 @@ static struct irqaction xmon_action = { | |||
272 | 272 | ||
273 | static struct irqaction gatwick_cascade_action = { | 273 | static struct irqaction gatwick_cascade_action = { |
274 | .handler = gatwick_action, | 274 | .handler = gatwick_action, |
275 | .flags = IRQF_DISABLED, | ||
276 | .name = "cascade", | 275 | .name = "cascade", |
277 | }; | 276 | }; |
278 | 277 | ||
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 9a521dc8e485..9b6a820bdd7d 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -200,7 +200,7 @@ static int psurge_secondary_ipi_init(void) | |||
200 | 200 | ||
201 | if (psurge_secondary_virq) | 201 | if (psurge_secondary_virq) |
202 | rc = request_irq(psurge_secondary_virq, psurge_ipi_intr, | 202 | rc = request_irq(psurge_secondary_virq, psurge_ipi_intr, |
203 | IRQF_DISABLED|IRQF_PERCPU, "IPI", NULL); | 203 | IRQF_PERCPU, "IPI", NULL); |
204 | 204 | ||
205 | if (rc) | 205 | if (rc) |
206 | pr_err("Failed to setup secondary cpu IPI\n"); | 206 | pr_err("Failed to setup secondary cpu IPI\n"); |
@@ -408,7 +408,7 @@ static int __init smp_psurge_kick_cpu(int nr) | |||
408 | 408 | ||
409 | static struct irqaction psurge_irqaction = { | 409 | static struct irqaction psurge_irqaction = { |
410 | .handler = psurge_ipi_intr, | 410 | .handler = psurge_ipi_intr, |
411 | .flags = IRQF_DISABLED|IRQF_PERCPU, | 411 | .flags = IRQF_PERCPU, |
412 | .name = "primary IPI", | 412 | .name = "primary IPI", |
413 | }; | 413 | }; |
414 | 414 | ||
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index 6c4b5837fc8a..3f175e8aedb4 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -825,7 +825,7 @@ static int ps3_probe_thread(void *data) | |||
825 | 825 | ||
826 | spin_lock_init(&dev.lock); | 826 | spin_lock_init(&dev.lock); |
827 | 827 | ||
828 | res = request_irq(irq, ps3_notification_interrupt, IRQF_DISABLED, | 828 | res = request_irq(irq, ps3_notification_interrupt, 0, |
829 | "ps3_notification", &dev); | 829 | "ps3_notification", &dev); |
830 | if (res) { | 830 | if (res) { |
831 | pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__, | 831 | pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__, |
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c index 5e304c292f68..ca40f6afd35d 100644 --- a/arch/powerpc/platforms/ps3/repository.c +++ b/arch/powerpc/platforms/ps3/repository.c | |||
@@ -184,7 +184,7 @@ int ps3_repository_read_bus_type(unsigned int bus_index, | |||
184 | enum ps3_bus_type *bus_type) | 184 | enum ps3_bus_type *bus_type) |
185 | { | 185 | { |
186 | int result; | 186 | int result; |
187 | u64 v1; | 187 | u64 v1 = 0; |
188 | 188 | ||
189 | result = read_node(PS3_LPAR_ID_PME, | 189 | result = read_node(PS3_LPAR_ID_PME, |
190 | make_first_field("bus", bus_index), | 190 | make_first_field("bus", bus_index), |
@@ -199,7 +199,7 @@ int ps3_repository_read_bus_num_dev(unsigned int bus_index, | |||
199 | unsigned int *num_dev) | 199 | unsigned int *num_dev) |
200 | { | 200 | { |
201 | int result; | 201 | int result; |
202 | u64 v1; | 202 | u64 v1 = 0; |
203 | 203 | ||
204 | result = read_node(PS3_LPAR_ID_PME, | 204 | result = read_node(PS3_LPAR_ID_PME, |
205 | make_first_field("bus", bus_index), | 205 | make_first_field("bus", bus_index), |
@@ -239,7 +239,7 @@ int ps3_repository_read_dev_type(unsigned int bus_index, | |||
239 | unsigned int dev_index, enum ps3_dev_type *dev_type) | 239 | unsigned int dev_index, enum ps3_dev_type *dev_type) |
240 | { | 240 | { |
241 | int result; | 241 | int result; |
242 | u64 v1; | 242 | u64 v1 = 0; |
243 | 243 | ||
244 | result = read_node(PS3_LPAR_ID_PME, | 244 | result = read_node(PS3_LPAR_ID_PME, |
245 | make_first_field("bus", bus_index), | 245 | make_first_field("bus", bus_index), |
@@ -256,8 +256,8 @@ int ps3_repository_read_dev_intr(unsigned int bus_index, | |||
256 | enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id) | 256 | enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id) |
257 | { | 257 | { |
258 | int result; | 258 | int result; |
259 | u64 v1; | 259 | u64 v1 = 0; |
260 | u64 v2; | 260 | u64 v2 = 0; |
261 | 261 | ||
262 | result = read_node(PS3_LPAR_ID_PME, | 262 | result = read_node(PS3_LPAR_ID_PME, |
263 | make_first_field("bus", bus_index), | 263 | make_first_field("bus", bus_index), |
@@ -275,7 +275,7 @@ int ps3_repository_read_dev_reg_type(unsigned int bus_index, | |||
275 | enum ps3_reg_type *reg_type) | 275 | enum ps3_reg_type *reg_type) |
276 | { | 276 | { |
277 | int result; | 277 | int result; |
278 | u64 v1; | 278 | u64 v1 = 0; |
279 | 279 | ||
280 | result = read_node(PS3_LPAR_ID_PME, | 280 | result = read_node(PS3_LPAR_ID_PME, |
281 | make_first_field("bus", bus_index), | 281 | make_first_field("bus", bus_index), |
@@ -615,7 +615,7 @@ int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index, | |||
615 | unsigned int dev_index, unsigned int *num_regions) | 615 | unsigned int dev_index, unsigned int *num_regions) |
616 | { | 616 | { |
617 | int result; | 617 | int result; |
618 | u64 v1; | 618 | u64 v1 = 0; |
619 | 619 | ||
620 | result = read_node(PS3_LPAR_ID_PME, | 620 | result = read_node(PS3_LPAR_ID_PME, |
621 | make_first_field("bus", bus_index), | 621 | make_first_field("bus", bus_index), |
@@ -631,7 +631,7 @@ int ps3_repository_read_stor_dev_region_id(unsigned int bus_index, | |||
631 | unsigned int *region_id) | 631 | unsigned int *region_id) |
632 | { | 632 | { |
633 | int result; | 633 | int result; |
634 | u64 v1; | 634 | u64 v1 = 0; |
635 | 635 | ||
636 | result = read_node(PS3_LPAR_ID_PME, | 636 | result = read_node(PS3_LPAR_ID_PME, |
637 | make_first_field("bus", bus_index), | 637 | make_first_field("bus", bus_index), |
@@ -786,7 +786,7 @@ int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size, u64 *region_total) | |||
786 | int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved) | 786 | int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved) |
787 | { | 787 | { |
788 | int result; | 788 | int result; |
789 | u64 v1; | 789 | u64 v1 = 0; |
790 | 790 | ||
791 | result = read_node(PS3_LPAR_ID_CURRENT, | 791 | result = read_node(PS3_LPAR_ID_CURRENT, |
792 | make_first_field("bi", 0), | 792 | make_first_field("bi", 0), |
@@ -805,7 +805,7 @@ int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved) | |||
805 | int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id) | 805 | int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id) |
806 | { | 806 | { |
807 | int result; | 807 | int result; |
808 | u64 v1; | 808 | u64 v1 = 0; |
809 | 809 | ||
810 | result = read_node(PS3_LPAR_ID_CURRENT, | 810 | result = read_node(PS3_LPAR_ID_CURRENT, |
811 | make_first_field("bi", 0), | 811 | make_first_field("bi", 0), |
@@ -827,8 +827,8 @@ int ps3_repository_read_spu_resource_id(unsigned int res_index, | |||
827 | enum ps3_spu_resource_type *resource_type, unsigned int *resource_id) | 827 | enum ps3_spu_resource_type *resource_type, unsigned int *resource_id) |
828 | { | 828 | { |
829 | int result; | 829 | int result; |
830 | u64 v1; | 830 | u64 v1 = 0; |
831 | u64 v2; | 831 | u64 v2 = 0; |
832 | 832 | ||
833 | result = read_node(PS3_LPAR_ID_CURRENT, | 833 | result = read_node(PS3_LPAR_ID_CURRENT, |
834 | make_first_field("bi", 0), | 834 | make_first_field("bi", 0), |
@@ -854,7 +854,7 @@ static int ps3_repository_read_boot_dat_address(u64 *address) | |||
854 | int ps3_repository_read_boot_dat_size(unsigned int *size) | 854 | int ps3_repository_read_boot_dat_size(unsigned int *size) |
855 | { | 855 | { |
856 | int result; | 856 | int result; |
857 | u64 v1; | 857 | u64 v1 = 0; |
858 | 858 | ||
859 | result = read_node(PS3_LPAR_ID_CURRENT, | 859 | result = read_node(PS3_LPAR_ID_CURRENT, |
860 | make_first_field("bi", 0), | 860 | make_first_field("bi", 0), |
@@ -869,7 +869,7 @@ int ps3_repository_read_boot_dat_size(unsigned int *size) | |||
869 | int ps3_repository_read_vuart_av_port(unsigned int *port) | 869 | int ps3_repository_read_vuart_av_port(unsigned int *port) |
870 | { | 870 | { |
871 | int result; | 871 | int result; |
872 | u64 v1; | 872 | u64 v1 = 0; |
873 | 873 | ||
874 | result = read_node(PS3_LPAR_ID_CURRENT, | 874 | result = read_node(PS3_LPAR_ID_CURRENT, |
875 | make_first_field("bi", 0), | 875 | make_first_field("bi", 0), |
@@ -884,7 +884,7 @@ int ps3_repository_read_vuart_av_port(unsigned int *port) | |||
884 | int ps3_repository_read_vuart_sysmgr_port(unsigned int *port) | 884 | int ps3_repository_read_vuart_sysmgr_port(unsigned int *port) |
885 | { | 885 | { |
886 | int result; | 886 | int result; |
887 | u64 v1; | 887 | u64 v1 = 0; |
888 | 888 | ||
889 | result = read_node(PS3_LPAR_ID_CURRENT, | 889 | result = read_node(PS3_LPAR_ID_CURRENT, |
890 | make_first_field("bi", 0), | 890 | make_first_field("bi", 0), |
@@ -919,7 +919,7 @@ int ps3_repository_read_boot_dat_info(u64 *lpar_addr, unsigned int *size) | |||
919 | int ps3_repository_read_num_be(unsigned int *num_be) | 919 | int ps3_repository_read_num_be(unsigned int *num_be) |
920 | { | 920 | { |
921 | int result; | 921 | int result; |
922 | u64 v1; | 922 | u64 v1 = 0; |
923 | 923 | ||
924 | result = read_node(PS3_LPAR_ID_PME, | 924 | result = read_node(PS3_LPAR_ID_PME, |
925 | make_first_field("ben", 0), | 925 | make_first_field("ben", 0), |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index de170fd5ba4e..22ffccd8bef5 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/export.h> | 26 | #include <linux/module.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 0842c6f8a3e6..8c7e8528e7c4 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -800,8 +800,6 @@ static void mpic_end_ipi(struct irq_data *d) | |||
800 | * IPIs are marked IRQ_PER_CPU. This has the side effect of | 800 | * IPIs are marked IRQ_PER_CPU. This has the side effect of |
801 | * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from | 801 | * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from |
802 | * applying to them. We EOI them late to avoid re-entering. | 802 | * applying to them. We EOI them late to avoid re-entering. |
803 | * We mark IPI's with IRQF_DISABLED as they must run with | ||
804 | * irqs disabled. | ||
805 | */ | 803 | */ |
806 | mpic_eoi(mpic); | 804 | mpic_eoi(mpic); |
807 | } | 805 | } |
diff --git a/arch/powerpc/sysdev/ppc4xx_soc.c b/arch/powerpc/sysdev/ppc4xx_soc.c index d3d6ce3c33b4..0debcc31ad70 100644 --- a/arch/powerpc/sysdev/ppc4xx_soc.c +++ b/arch/powerpc/sysdev/ppc4xx_soc.c | |||
@@ -115,7 +115,7 @@ static int __init ppc4xx_l2c_probe(void) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /* Install error handler */ | 117 | /* Install error handler */ |
118 | if (request_irq(irq, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0) { | 118 | if (request_irq(irq, l2c_error_handler, 0, "L2C", 0) < 0) { |
119 | printk(KERN_ERR "Cannot install L2C error handler" | 119 | printk(KERN_ERR "Cannot install L2C error handler" |
120 | ", cache is not enabled\n"); | 120 | ", cache is not enabled\n"); |
121 | of_node_put(np); | 121 | of_node_put(np); |
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 3d93a8ded0f8..63762c672a03 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c | |||
@@ -134,11 +134,10 @@ static void xics_request_ipi(void) | |||
134 | BUG_ON(ipi == NO_IRQ); | 134 | BUG_ON(ipi == NO_IRQ); |
135 | 135 | ||
136 | /* | 136 | /* |
137 | * IPIs are marked IRQF_DISABLED as they must run with irqs | 137 | * IPIs are marked IRQF_PERCPU. The handler was set in map. |
138 | * disabled, and PERCPU. The handler was set in map. | ||
139 | */ | 138 | */ |
140 | BUG_ON(request_irq(ipi, icp_ops->ipi_action, | 139 | BUG_ON(request_irq(ipi, icp_ops->ipi_action, |
141 | IRQF_DISABLED|IRQF_PERCPU, "IPI", NULL)); | 140 | IRQF_PERCPU, "IPI", NULL)); |
142 | } | 141 | } |
143 | 142 | ||
144 | int __init xics_smp_probe(void) | 143 | int __init xics_smp_probe(void) |
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index 0dca9a5c6be6..15d970328f71 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h | |||
@@ -151,8 +151,13 @@ typedef struct page *pgtable_t; | |||
151 | #endif /* !__ASSEMBLY__ */ | 151 | #endif /* !__ASSEMBLY__ */ |
152 | 152 | ||
153 | #ifdef CONFIG_UNCACHED_MAPPING | 153 | #ifdef CONFIG_UNCACHED_MAPPING |
154 | #if defined(CONFIG_29BIT) | ||
155 | #define UNCAC_ADDR(addr) P2SEGADDR(addr) | ||
156 | #define CAC_ADDR(addr) P1SEGADDR(addr) | ||
157 | #else | ||
154 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) | 158 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) |
155 | #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) | 159 | #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) |
160 | #endif | ||
156 | #else | 161 | #else |
157 | #define UNCAC_ADDR(addr) ((addr)) | 162 | #define UNCAC_ADDR(addr) ((addr)) |
158 | #define CAC_ADDR(addr) ((addr)) | 163 | #define CAC_ADDR(addr) ((addr)) |
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h index 3432008d2888..152b8627a184 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/asm/unistd_32.h | |||
@@ -375,8 +375,10 @@ | |||
375 | #define __NR_syncfs 362 | 375 | #define __NR_syncfs 362 |
376 | #define __NR_sendmmsg 363 | 376 | #define __NR_sendmmsg 363 |
377 | #define __NR_setns 364 | 377 | #define __NR_setns 364 |
378 | #define __NR_process_vm_readv 365 | ||
379 | #define __NR_process_vm_writev 366 | ||
378 | 380 | ||
379 | #define NR_syscalls 365 | 381 | #define NR_syscalls 367 |
380 | 382 | ||
381 | #ifdef __KERNEL__ | 383 | #ifdef __KERNEL__ |
382 | 384 | ||
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h index ec9898665f23..c330c23db5a0 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/asm/unistd_64.h | |||
@@ -396,10 +396,12 @@ | |||
396 | #define __NR_syncfs 373 | 396 | #define __NR_syncfs 373 |
397 | #define __NR_sendmmsg 374 | 397 | #define __NR_sendmmsg 374 |
398 | #define __NR_setns 375 | 398 | #define __NR_setns 375 |
399 | #define __NR_process_vm_readv 376 | ||
400 | #define __NR_process_vm_writev 377 | ||
399 | 401 | ||
400 | #ifdef __KERNEL__ | 402 | #ifdef __KERNEL__ |
401 | 403 | ||
402 | #define NR_syscalls 376 | 404 | #define NR_syscalls 378 |
403 | 405 | ||
404 | #define __ARCH_WANT_IPC_PARSE_VERSION | 406 | #define __ARCH_WANT_IPC_PARSE_VERSION |
405 | #define __ARCH_WANT_OLD_READDIR | 407 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index a43124e608c3..0bd744f9a3b7 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c | |||
@@ -176,10 +176,12 @@ static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, | |||
176 | static struct plat_sci_port scif0_platform_data = { | 176 | static struct plat_sci_port scif0_platform_data = { |
177 | .mapbase = 0xfffe8000, | 177 | .mapbase = 0xfffe8000, |
178 | .flags = UPF_BOOT_AUTOCONF, | 178 | .flags = UPF_BOOT_AUTOCONF, |
179 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 179 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
180 | SCSCR_REIE, | ||
180 | .scbrr_algo_id = SCBRR_ALGO_2, | 181 | .scbrr_algo_id = SCBRR_ALGO_2, |
181 | .type = PORT_SCIF, | 182 | .type = PORT_SCIF, |
182 | .irqs = { 192, 192, 192, 192 }, | 183 | .irqs = { 192, 192, 192, 192 }, |
184 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
183 | }; | 185 | }; |
184 | 186 | ||
185 | static struct platform_device scif0_device = { | 187 | static struct platform_device scif0_device = { |
@@ -193,10 +195,12 @@ static struct platform_device scif0_device = { | |||
193 | static struct plat_sci_port scif1_platform_data = { | 195 | static struct plat_sci_port scif1_platform_data = { |
194 | .mapbase = 0xfffe8800, | 196 | .mapbase = 0xfffe8800, |
195 | .flags = UPF_BOOT_AUTOCONF, | 197 | .flags = UPF_BOOT_AUTOCONF, |
196 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 198 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
199 | SCSCR_REIE, | ||
197 | .scbrr_algo_id = SCBRR_ALGO_2, | 200 | .scbrr_algo_id = SCBRR_ALGO_2, |
198 | .type = PORT_SCIF, | 201 | .type = PORT_SCIF, |
199 | .irqs = { 196, 196, 196, 196 }, | 202 | .irqs = { 196, 196, 196, 196 }, |
203 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
200 | }; | 204 | }; |
201 | 205 | ||
202 | static struct platform_device scif1_device = { | 206 | static struct platform_device scif1_device = { |
@@ -210,10 +214,12 @@ static struct platform_device scif1_device = { | |||
210 | static struct plat_sci_port scif2_platform_data = { | 214 | static struct plat_sci_port scif2_platform_data = { |
211 | .mapbase = 0xfffe9000, | 215 | .mapbase = 0xfffe9000, |
212 | .flags = UPF_BOOT_AUTOCONF, | 216 | .flags = UPF_BOOT_AUTOCONF, |
213 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 217 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
218 | SCSCR_REIE, | ||
214 | .scbrr_algo_id = SCBRR_ALGO_2, | 219 | .scbrr_algo_id = SCBRR_ALGO_2, |
215 | .type = PORT_SCIF, | 220 | .type = PORT_SCIF, |
216 | .irqs = { 200, 200, 200, 200 }, | 221 | .irqs = { 200, 200, 200, 200 }, |
222 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
217 | }; | 223 | }; |
218 | 224 | ||
219 | static struct platform_device scif2_device = { | 225 | static struct platform_device scif2_device = { |
@@ -227,10 +233,12 @@ static struct platform_device scif2_device = { | |||
227 | static struct plat_sci_port scif3_platform_data = { | 233 | static struct plat_sci_port scif3_platform_data = { |
228 | .mapbase = 0xfffe9800, | 234 | .mapbase = 0xfffe9800, |
229 | .flags = UPF_BOOT_AUTOCONF, | 235 | .flags = UPF_BOOT_AUTOCONF, |
230 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 236 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
237 | SCSCR_REIE, | ||
231 | .scbrr_algo_id = SCBRR_ALGO_2, | 238 | .scbrr_algo_id = SCBRR_ALGO_2, |
232 | .type = PORT_SCIF, | 239 | .type = PORT_SCIF, |
233 | .irqs = { 204, 204, 204, 204 }, | 240 | .irqs = { 204, 204, 204, 204 }, |
241 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
234 | }; | 242 | }; |
235 | 243 | ||
236 | static struct platform_device scif3_device = { | 244 | static struct platform_device scif3_device = { |
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index 293e39c59c00..ee56a9b1a981 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S | |||
@@ -382,3 +382,5 @@ ENTRY(sys_call_table) | |||
382 | .long sys_syncfs | 382 | .long sys_syncfs |
383 | .long sys_sendmmsg | 383 | .long sys_sendmmsg |
384 | .long sys_setns | 384 | .long sys_setns |
385 | .long sys_process_vm_readv /* 365 */ | ||
386 | .long sys_process_vm_writev | ||
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index ceb34b94afa9..9af7de26fb71 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S | |||
@@ -402,3 +402,5 @@ sys_call_table: | |||
402 | .long sys_syncfs | 402 | .long sys_syncfs |
403 | .long sys_sendmmsg | 403 | .long sys_sendmmsg |
404 | .long sys_setns /* 375 */ | 404 | .long sys_setns /* 375 */ |
405 | .long sys_process_vm_readv | ||
406 | .long sys_process_vm_writev | ||
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h index 6260d5deeabc..c7cb0af0eb59 100644 --- a/arch/sparc/include/asm/unistd.h +++ b/arch/sparc/include/asm/unistd.h | |||
@@ -406,8 +406,10 @@ | |||
406 | #define __NR_syncfs 335 | 406 | #define __NR_syncfs 335 |
407 | #define __NR_sendmmsg 336 | 407 | #define __NR_sendmmsg 336 |
408 | #define __NR_setns 337 | 408 | #define __NR_setns 337 |
409 | #define __NR_process_vm_readv 338 | ||
410 | #define __NR_process_vm_writev 339 | ||
409 | 411 | ||
410 | #define NR_syscalls 338 | 412 | #define NR_syscalls 340 |
411 | 413 | ||
412 | #ifdef __32bit_syscall_numbers__ | 414 | #ifdef __32bit_syscall_numbers__ |
413 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 415 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 09d8ec454450..63402f9e9f51 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -84,4 +84,4 @@ sys_call_table: | |||
84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
87 | /*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns | 87 | /*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index edbec45d4688..db86b1a0e9a9 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -85,7 +85,7 @@ sys_call_table32: | |||
85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv | 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv |
86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init |
87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime | 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime |
88 | .word sys_syncfs, compat_sys_sendmmsg, sys_setns | 88 | .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev |
89 | 89 | ||
90 | #endif /* CONFIG_COMPAT */ | 90 | #endif /* CONFIG_COMPAT */ |
91 | 91 | ||
@@ -162,4 +162,4 @@ sys_call_table: | |||
162 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 162 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
163 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 163 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
164 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 164 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
165 | .word sys_syncfs, sys_sendmmsg, sys_setns | 165 | .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev |
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c index 28071bb31db7..4c61b52191eb 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c | |||
@@ -109,7 +109,7 @@ static __init void sdv_serial_fixup(void) | |||
109 | } | 109 | } |
110 | 110 | ||
111 | #else | 111 | #else |
112 | static inline void sdv_serial_fixup(void); | 112 | static inline void sdv_serial_fixup(void) {}; |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | static void __init sdv_arch_setup(void) | 115 | static void __init sdv_arch_setup(void) |
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 6ed7afdaf4af..541020df0da6 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
@@ -608,6 +608,7 @@ static void *msic_ocd_platform_data(void *info) | |||
608 | } | 608 | } |
609 | 609 | ||
610 | static const struct devs_id __initconst device_ids[] = { | 610 | static const struct devs_id __initconst device_ids[] = { |
611 | {"bma023", SFI_DEV_TYPE_I2C, 1, &no_platform_data}, | ||
611 | {"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data}, | 612 | {"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data}, |
612 | {"spi_max3111", SFI_DEV_TYPE_SPI, 0, &max3111_platform_data}, | 613 | {"spi_max3111", SFI_DEV_TYPE_SPI, 0, &max3111_platform_data}, |
613 | {"i2c_max7315", SFI_DEV_TYPE_I2C, 1, &max7315_platform_data}, | 614 | {"i2c_max7315", SFI_DEV_TYPE_I2C, 1, &max7315_platform_data}, |
diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c index a8ac6f1eb66d..225bd0f0f675 100644 --- a/arch/x86/platform/mrst/vrtc.c +++ b/arch/x86/platform/mrst/vrtc.c | |||
@@ -76,8 +76,8 @@ unsigned long vrtc_get_time(void) | |||
76 | 76 | ||
77 | spin_unlock_irqrestore(&rtc_lock, flags); | 77 | spin_unlock_irqrestore(&rtc_lock, flags); |
78 | 78 | ||
79 | /* vRTC YEAR reg contains the offset to 1960 */ | 79 | /* vRTC YEAR reg contains the offset to 1972 */ |
80 | year += 1960; | 80 | year += 1972; |
81 | 81 | ||
82 | printk(KERN_INFO "vRTC: sec: %d min: %d hour: %d day: %d " | 82 | printk(KERN_INFO "vRTC: sec: %d min: %d hour: %d day: %d " |
83 | "mon: %d year: %d\n", sec, min, hour, mday, mon, year); | 83 | "mon: %d year: %d\n", sec, min, hour, mday, mon, year); |