diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-12-15 18:57:08 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2015-12-15 18:57:08 -0500 |
commit | 3081dc9eff32519bc3298c6dba0b877675d4c1cd (patch) | |
tree | d4c1d2af14e09e96dd015fa9163df88106b11ddf | |
parent | 22ba14f41ca6b7f96fe3d4a8eb116358060595fd (diff) | |
parent | c5d431e8c511788556651b91debd7d77d4508f4b (diff) |
Merge tag 'mvebu-soc-4.5-1' of git://git.infradead.org/linux-mvebu into next/multiplatform
Merge "mvebu soc for 4.5 (part 1)" from Gregory CLEMENT:
- orion5x/mv78xx0 multiplatform conversion
- legacy dove PMU support conversion
* tag 'mvebu-soc-4.5-1' of git://git.infradead.org/linux-mvebu:
ARM: dove: convert legacy dove to PMU support
soc: dove: add legacy support to PMU driver
ARM: orion5x: multiplatform support
ARM: orion5x: clean up mach/*.h headers
ARM: mv78xx0: multiplatform support
ARM: mv78xx0: clean up mach/*.h headers
ARM: orion: use SPARSE_IRQ everywhere
ARM: orion: always use MULTI_IRQ_HANDLER
ARM: orion: move watchdog setup to mach-orion5x
Conflicts:
arch/arm/Kconfig
arch/arm/mach-dove/include/mach/entry-macro.S
arch/arm/mach-orion5x/include/mach/entry-macro.S
67 files changed, 269 insertions, 461 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 70eb100b56e7..72c1df041ae8 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -493,40 +493,16 @@ config ARCH_DOVE | |||
493 | select CPU_PJ4 | 493 | select CPU_PJ4 |
494 | select GENERIC_CLOCKEVENTS | 494 | select GENERIC_CLOCKEVENTS |
495 | select MIGHT_HAVE_PCI | 495 | select MIGHT_HAVE_PCI |
496 | select MULTI_IRQ_HANDLER | ||
496 | select MVEBU_MBUS | 497 | select MVEBU_MBUS |
497 | select PINCTRL | 498 | select PINCTRL |
498 | select PINCTRL_DOVE | 499 | select PINCTRL_DOVE |
499 | select PLAT_ORION_LEGACY | 500 | select PLAT_ORION_LEGACY |
501 | select SPARSE_IRQ | ||
502 | select PM_GENERIC_DOMAINS if PM | ||
500 | help | 503 | help |
501 | Support for the Marvell Dove SoC 88AP510 | 504 | Support for the Marvell Dove SoC 88AP510 |
502 | 505 | ||
503 | config ARCH_MV78XX0 | ||
504 | bool "Marvell MV78xx0" | ||
505 | select ARCH_REQUIRE_GPIOLIB | ||
506 | select CPU_FEROCEON | ||
507 | select GENERIC_CLOCKEVENTS | ||
508 | select MVEBU_MBUS | ||
509 | select PCI | ||
510 | select PLAT_ORION_LEGACY | ||
511 | help | ||
512 | Support for the following Marvell MV78xx0 series SoCs: | ||
513 | MV781x0, MV782x0. | ||
514 | |||
515 | config ARCH_ORION5X | ||
516 | bool "Marvell Orion" | ||
517 | depends on MMU | ||
518 | select ARCH_REQUIRE_GPIOLIB | ||
519 | select CPU_FEROCEON | ||
520 | select GENERIC_CLOCKEVENTS | ||
521 | select MVEBU_MBUS | ||
522 | select PCI | ||
523 | select PLAT_ORION_LEGACY | ||
524 | select MULTI_IRQ_HANDLER | ||
525 | help | ||
526 | Support for the following Marvell Orion 5x series SoCs: | ||
527 | Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), | ||
528 | Orion-2 (5281), Orion-1-90 (6183). | ||
529 | |||
530 | config ARCH_KS8695 | 506 | config ARCH_KS8695 |
531 | bool "Micrel/Kendin KS8695" | 507 | bool "Micrel/Kendin KS8695" |
532 | select ARCH_REQUIRE_GPIOLIB | 508 | select ARCH_REQUIRE_GPIOLIB |
diff --git a/arch/arm/configs/mv78xx0_defconfig b/arch/arm/configs/mv78xx0_defconfig index 85d10d2e3d66..fcdffa7d9d78 100644 --- a/arch/arm/configs/mv78xx0_defconfig +++ b/arch/arm/configs/mv78xx0_defconfig | |||
@@ -11,6 +11,9 @@ CONFIG_KPROBES=y | |||
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
12 | CONFIG_MODULE_UNLOAD=y | 12 | CONFIG_MODULE_UNLOAD=y |
13 | # CONFIG_BLK_DEV_BSG is not set | 13 | # CONFIG_BLK_DEV_BSG is not set |
14 | CONFIG_ARCH_MULTI_V5=y | ||
15 | # CONFIG_ARCH_MULTI_V6 is not set | ||
16 | # CONFIG_ARCH_MULTI_V7 is not set | ||
14 | CONFIG_ARCH_MV78XX0=y | 17 | CONFIG_ARCH_MV78XX0=y |
15 | CONFIG_MACH_DB78X00_BP=y | 18 | CONFIG_MACH_DB78X00_BP=y |
16 | CONFIG_MACH_RD78X00_MASA=y | 19 | CONFIG_MACH_RD78X00_MASA=y |
diff --git a/arch/arm/configs/orion5x_defconfig b/arch/arm/configs/orion5x_defconfig index 8099417a9466..6ddca8875cb5 100644 --- a/arch/arm/configs/orion5x_defconfig +++ b/arch/arm/configs/orion5x_defconfig | |||
@@ -13,6 +13,9 @@ CONFIG_MODULE_UNLOAD=y | |||
13 | # CONFIG_BLK_DEV_BSG is not set | 13 | # CONFIG_BLK_DEV_BSG is not set |
14 | CONFIG_PARTITION_ADVANCED=y | 14 | CONFIG_PARTITION_ADVANCED=y |
15 | CONFIG_BSD_DISKLABEL=y | 15 | CONFIG_BSD_DISKLABEL=y |
16 | CONFIG_ARCH_MULTI_V5=y | ||
17 | # CONFIG_ARCH_MULTI_V6 is not set | ||
18 | # CONFIG_ARCH_MULTI_V7 is not set | ||
16 | CONFIG_ARCH_ORION5X=y | 19 | CONFIG_ARCH_ORION5X=y |
17 | CONFIG_ARCH_ORION5X_DT=y | 20 | CONFIG_ARCH_ORION5X_DT=y |
18 | CONFIG_MACH_DB88F5281=y | 21 | CONFIG_MACH_DB88F5281=y |
diff --git a/arch/arm/mach-dove/cm-a510.c b/arch/arm/mach-dove/cm-a510.c index 0dc39cf30fdd..b9a7c33db29a 100644 --- a/arch/arm/mach-dove/cm-a510.c +++ b/arch/arm/mach-dove/cm-a510.c | |||
@@ -88,6 +88,7 @@ static void __init cm_a510_init(void) | |||
88 | 88 | ||
89 | MACHINE_START(CM_A510, "Compulab CM-A510 Board") | 89 | MACHINE_START(CM_A510, "Compulab CM-A510 Board") |
90 | .atag_offset = 0x100, | 90 | .atag_offset = 0x100, |
91 | .nr_irqs = DOVE_NR_IRQS, | ||
91 | .init_machine = cm_a510_init, | 92 | .init_machine = cm_a510_init, |
92 | .map_io = dove_map_io, | 93 | .map_io = dove_map_io, |
93 | .init_early = dove_init_early, | 94 | .init_early = dove_init_early, |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 0d1a89298ece..0cdaa3851d2e 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_data/dma-mv_xor.h> | 16 | #include <linux/platform_data/dma-mv_xor.h> |
17 | #include <linux/platform_data/usb-ehci-orion.h> | 17 | #include <linux/platform_data/usb-ehci-orion.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/soc/dove/pmu.h> | ||
19 | #include <asm/hardware/cache-tauros2.h> | 20 | #include <asm/hardware/cache-tauros2.h> |
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
@@ -375,6 +376,47 @@ void __init dove_setup_cpu_wins(void) | |||
375 | DOVE_SCRATCHPAD_SIZE); | 376 | DOVE_SCRATCHPAD_SIZE); |
376 | } | 377 | } |
377 | 378 | ||
379 | static struct resource orion_wdt_resource[] = { | ||
380 | DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x04), | ||
381 | DEFINE_RES_MEM(RSTOUTn_MASK_PHYS, 0x04), | ||
382 | }; | ||
383 | |||
384 | static struct platform_device orion_wdt_device = { | ||
385 | .name = "orion_wdt", | ||
386 | .id = -1, | ||
387 | .num_resources = ARRAY_SIZE(orion_wdt_resource), | ||
388 | .resource = orion_wdt_resource, | ||
389 | }; | ||
390 | |||
391 | static void __init __maybe_unused orion_wdt_init(void) | ||
392 | { | ||
393 | platform_device_register(&orion_wdt_device); | ||
394 | } | ||
395 | |||
396 | static const struct dove_pmu_domain_initdata pmu_domains[] __initconst = { | ||
397 | { | ||
398 | .pwr_mask = PMU_PWR_VPU_PWR_DWN_MASK, | ||
399 | .rst_mask = PMU_SW_RST_VIDEO_MASK, | ||
400 | .iso_mask = PMU_ISO_VIDEO_MASK, | ||
401 | .name = "vpu-domain", | ||
402 | }, { | ||
403 | .pwr_mask = PMU_PWR_GPU_PWR_DWN_MASK, | ||
404 | .rst_mask = PMU_SW_RST_GPU_MASK, | ||
405 | .iso_mask = PMU_ISO_GPU_MASK, | ||
406 | .name = "gpu-domain", | ||
407 | }, { | ||
408 | /* sentinel */ | ||
409 | }, | ||
410 | }; | ||
411 | |||
412 | static const struct dove_pmu_initdata pmu_data __initconst = { | ||
413 | .pmc_base = DOVE_PMU_VIRT_BASE, | ||
414 | .pmu_base = DOVE_PMU_VIRT_BASE + 0x8000, | ||
415 | .irq = IRQ_DOVE_PMU, | ||
416 | .irq_domain_start = IRQ_DOVE_PMU_START, | ||
417 | .domains = pmu_domains, | ||
418 | }; | ||
419 | |||
378 | void __init dove_init(void) | 420 | void __init dove_init(void) |
379 | { | 421 | { |
380 | pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n", | 422 | pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n", |
@@ -389,6 +431,7 @@ void __init dove_init(void) | |||
389 | dove_clk_init(); | 431 | dove_clk_init(); |
390 | 432 | ||
391 | /* internal devices that every board has */ | 433 | /* internal devices that every board has */ |
434 | dove_init_pmu_legacy(&pmu_data); | ||
392 | dove_rtc_init(); | 435 | dove_rtc_init(); |
393 | dove_xor0_init(); | 436 | dove_xor0_init(); |
394 | dove_xor1_init(); | 437 | dove_xor1_init(); |
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c index 76e26f949c27..bcb678fd2415 100644 --- a/arch/arm/mach-dove/dove-db-setup.c +++ b/arch/arm/mach-dove/dove-db-setup.c | |||
@@ -94,6 +94,7 @@ static void __init dove_db_init(void) | |||
94 | 94 | ||
95 | MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board") | 95 | MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board") |
96 | .atag_offset = 0x100, | 96 | .atag_offset = 0x100, |
97 | .nr_irqs = DOVE_NR_IRQS, | ||
97 | .init_machine = dove_db_init, | 98 | .init_machine = dove_db_init, |
98 | .map_io = dove_map_io, | 99 | .map_io = dove_map_io, |
99 | .init_early = dove_init_early, | 100 | .init_early = dove_init_early, |
diff --git a/arch/arm/mach-dove/include/mach/dove.h b/arch/arm/mach-dove/include/mach/dove.h index 0c4b35f4ee5b..00f45458b3ec 100644 --- a/arch/arm/mach-dove/include/mach/dove.h +++ b/arch/arm/mach-dove/include/mach/dove.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_ARCH_DOVE_H | 11 | #ifndef __ASM_ARCH_DOVE_H |
12 | #define __ASM_ARCH_DOVE_H | 12 | #define __ASM_ARCH_DOVE_H |
13 | 13 | ||
14 | #include <mach/irqs.h> | ||
15 | |||
14 | /* | 16 | /* |
15 | * Marvell Dove address maps. | 17 | * Marvell Dove address maps. |
16 | * | 18 | * |
diff --git a/arch/arm/mach-dove/include/mach/entry-macro.S b/arch/arm/mach-dove/include/mach/entry-macro.S deleted file mode 100644 index df1d44bdc375..000000000000 --- a/arch/arm/mach-dove/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-dove/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Marvell Dove platforms | ||
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 <mach/bridge-regs.h> | ||
12 | |||
13 | .macro get_irqnr_preamble, base, tmp | ||
14 | ldr \base, =IRQ_VIRT_BASE | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
18 | @ check low interrupts | ||
19 | ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF] | ||
20 | ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] | ||
21 | mov \irqnr, #32 | ||
22 | ands \irqstat, \irqstat, \tmp | ||
23 | |||
24 | @ if no low interrupts set, check high interrupts | ||
25 | ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] | ||
26 | ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF] | ||
27 | moveq \irqnr, #64 | ||
28 | andeqs \irqstat, \irqstat, \tmp | ||
29 | |||
30 | @ find first active interrupt source | ||
31 | clzne \irqstat, \irqstat | ||
32 | subne \irqnr, \irqnr, \irqstat | ||
33 | .endm | ||
diff --git a/arch/arm/mach-dove/include/mach/irqs.h b/arch/arm/mach-dove/include/mach/irqs.h index 3f29e6bca058..8ff0fa8b4fcd 100644 --- a/arch/arm/mach-dove/include/mach/irqs.h +++ b/arch/arm/mach-dove/include/mach/irqs.h | |||
@@ -90,7 +90,7 @@ | |||
90 | #define NR_PMU_IRQS 7 | 90 | #define NR_PMU_IRQS 7 |
91 | #define IRQ_DOVE_RTC (IRQ_DOVE_PMU_START + 5) | 91 | #define IRQ_DOVE_RTC (IRQ_DOVE_PMU_START + 5) |
92 | 92 | ||
93 | #define NR_IRQS (IRQ_DOVE_PMU_START + NR_PMU_IRQS) | 93 | #define DOVE_NR_IRQS (IRQ_DOVE_PMU_START + NR_PMU_IRQS) |
94 | 94 | ||
95 | 95 | ||
96 | #endif | 96 | #endif |
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h index b47f75038686..d22b9b174007 100644 --- a/arch/arm/mach-dove/include/mach/pm.h +++ b/arch/arm/mach-dove/include/mach/pm.h | |||
@@ -51,22 +51,14 @@ | |||
51 | #define CLOCK_GATING_GIGA_PHY_MASK (1 << CLOCK_GATING_BIT_GIGA_PHY) | 51 | #define CLOCK_GATING_GIGA_PHY_MASK (1 << CLOCK_GATING_BIT_GIGA_PHY) |
52 | 52 | ||
53 | #define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) | 53 | #define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) |
54 | #define PMU_INTERRUPT_MASK (DOVE_PMU_VIRT_BASE + 0x54) | ||
55 | 54 | ||
56 | static inline int pmu_to_irq(int pin) | 55 | #define PMU_SW_RST_VIDEO_MASK BIT(16) |
57 | { | 56 | #define PMU_SW_RST_GPU_MASK BIT(18) |
58 | if (pin < NR_PMU_IRQS) | ||
59 | return pin + IRQ_DOVE_PMU_START; | ||
60 | 57 | ||
61 | return -EINVAL; | 58 | #define PMU_PWR_GPU_PWR_DWN_MASK BIT(2) |
62 | } | 59 | #define PMU_PWR_VPU_PWR_DWN_MASK BIT(3) |
63 | 60 | ||
64 | static inline int irq_to_pmu(int irq) | 61 | #define PMU_ISO_VIDEO_MASK BIT(0) |
65 | { | 62 | #define PMU_ISO_GPU_MASK BIT(1) |
66 | if (IRQ_DOVE_PMU_START <= irq && irq < NR_IRQS) | ||
67 | return irq - IRQ_DOVE_PMU_START; | ||
68 | |||
69 | return -EINVAL; | ||
70 | } | ||
71 | 63 | ||
72 | #endif | 64 | #endif |
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c index bfb3703357c5..d6627c1f7f30 100644 --- a/arch/arm/mach-dove/irq.c +++ b/arch/arm/mach-dove/irq.c | |||
@@ -7,87 +7,15 @@ | |||
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 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | 10 | #include <linux/init.h> |
13 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
14 | #include <linux/gpio.h> | ||
15 | #include <linux/io.h> | 12 | #include <linux/io.h> |
16 | #include <asm/mach/arch.h> | 13 | #include <asm/exception.h> |
17 | #include <plat/irq.h> | 14 | #include <plat/irq.h> |
18 | #include <asm/mach/irq.h> | ||
19 | #include <mach/pm.h> | ||
20 | #include <mach/bridge-regs.h> | 15 | #include <mach/bridge-regs.h> |
21 | #include <plat/orion-gpio.h> | 16 | #include <plat/orion-gpio.h> |
22 | #include "common.h" | 17 | #include "common.h" |
23 | 18 | ||
24 | static void pmu_irq_mask(struct irq_data *d) | ||
25 | { | ||
26 | int pin = irq_to_pmu(d->irq); | ||
27 | u32 u; | ||
28 | |||
29 | u = readl(PMU_INTERRUPT_MASK); | ||
30 | u &= ~(1 << (pin & 31)); | ||
31 | writel(u, PMU_INTERRUPT_MASK); | ||
32 | } | ||
33 | |||
34 | static void pmu_irq_unmask(struct irq_data *d) | ||
35 | { | ||
36 | int pin = irq_to_pmu(d->irq); | ||
37 | u32 u; | ||
38 | |||
39 | u = readl(PMU_INTERRUPT_MASK); | ||
40 | u |= 1 << (pin & 31); | ||
41 | writel(u, PMU_INTERRUPT_MASK); | ||
42 | } | ||
43 | |||
44 | static void pmu_irq_ack(struct irq_data *d) | ||
45 | { | ||
46 | int pin = irq_to_pmu(d->irq); | ||
47 | u32 u; | ||
48 | |||
49 | /* | ||
50 | * The PMU mask register is not RW0C: it is RW. This means that | ||
51 | * the bits take whatever value is written to them; if you write | ||
52 | * a '1', you will set the interrupt. | ||
53 | * | ||
54 | * Unfortunately this means there is NO race free way to clear | ||
55 | * these interrupts. | ||
56 | * | ||
57 | * So, let's structure the code so that the window is as small as | ||
58 | * possible. | ||
59 | */ | ||
60 | u = ~(1 << (pin & 31)); | ||
61 | u &= readl_relaxed(PMU_INTERRUPT_CAUSE); | ||
62 | writel_relaxed(u, PMU_INTERRUPT_CAUSE); | ||
63 | } | ||
64 | |||
65 | static struct irq_chip pmu_irq_chip = { | ||
66 | .name = "pmu_irq", | ||
67 | .irq_mask = pmu_irq_mask, | ||
68 | .irq_unmask = pmu_irq_unmask, | ||
69 | .irq_ack = pmu_irq_ack, | ||
70 | }; | ||
71 | |||
72 | static void pmu_irq_handler(struct irq_desc *desc) | ||
73 | { | ||
74 | unsigned long cause = readl(PMU_INTERRUPT_CAUSE); | ||
75 | unsigned int irq; | ||
76 | |||
77 | cause &= readl(PMU_INTERRUPT_MASK); | ||
78 | if (cause == 0) { | ||
79 | do_bad_IRQ(desc); | ||
80 | return; | ||
81 | } | ||
82 | |||
83 | for (irq = 0; irq < NR_PMU_IRQS; irq++) { | ||
84 | if (!(cause & (1 << irq))) | ||
85 | continue; | ||
86 | irq = pmu_to_irq(irq); | ||
87 | generic_handle_irq(irq); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | static int __initdata gpio0_irqs[4] = { | 19 | static int __initdata gpio0_irqs[4] = { |
92 | IRQ_DOVE_GPIO_0_7, | 20 | IRQ_DOVE_GPIO_0_7, |
93 | IRQ_DOVE_GPIO_8_15, | 21 | IRQ_DOVE_GPIO_8_15, |
@@ -109,14 +37,6 @@ static int __initdata gpio2_irqs[4] = { | |||
109 | 0, | 37 | 0, |
110 | }; | 38 | }; |
111 | 39 | ||
112 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
113 | /* | ||
114 | * Compiling with both non-DT and DT support enabled, will | ||
115 | * break asm irq handler used by non-DT boards. Therefore, | ||
116 | * we provide a C-style irq handler even for non-DT boards, | ||
117 | * if MULTI_IRQ_HANDLER is set. | ||
118 | */ | ||
119 | |||
120 | static void __iomem *dove_irq_base = IRQ_VIRT_BASE; | 40 | static void __iomem *dove_irq_base = IRQ_VIRT_BASE; |
121 | 41 | ||
122 | static asmlinkage void | 42 | static asmlinkage void |
@@ -139,18 +59,13 @@ __exception_irq_entry dove_legacy_handle_irq(struct pt_regs *regs) | |||
139 | return; | 59 | return; |
140 | } | 60 | } |
141 | } | 61 | } |
142 | #endif | ||
143 | 62 | ||
144 | void __init dove_init_irq(void) | 63 | void __init dove_init_irq(void) |
145 | { | 64 | { |
146 | int i; | ||
147 | |||
148 | orion_irq_init(1, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); | 65 | orion_irq_init(1, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); |
149 | orion_irq_init(33, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); | 66 | orion_irq_init(33, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); |
150 | 67 | ||
151 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
152 | set_handle_irq(dove_legacy_handle_irq); | 68 | set_handle_irq(dove_legacy_handle_irq); |
153 | #endif | ||
154 | 69 | ||
155 | /* | 70 | /* |
156 | * Initialize gpiolib for GPIOs 0-71. | 71 | * Initialize gpiolib for GPIOs 0-71. |
@@ -163,17 +78,4 @@ void __init dove_init_irq(void) | |||
163 | 78 | ||
164 | orion_gpio_init(NULL, 64, 8, DOVE_GPIO2_VIRT_BASE, 0, | 79 | orion_gpio_init(NULL, 64, 8, DOVE_GPIO2_VIRT_BASE, 0, |
165 | IRQ_DOVE_GPIO_START + 64, gpio2_irqs); | 80 | IRQ_DOVE_GPIO_START + 64, gpio2_irqs); |
166 | |||
167 | /* | ||
168 | * Mask and clear PMU interrupts | ||
169 | */ | ||
170 | writel(0, PMU_INTERRUPT_MASK); | ||
171 | writel(0, PMU_INTERRUPT_CAUSE); | ||
172 | |||
173 | for (i = IRQ_DOVE_PMU_START; i < NR_IRQS; i++) { | ||
174 | irq_set_chip_and_handler(i, &pmu_irq_chip, handle_level_irq); | ||
175 | irq_set_status_flags(i, IRQ_LEVEL); | ||
176 | irq_clear_status_flags(i, IRQ_NOREQUEST); | ||
177 | } | ||
178 | irq_set_chained_handler(IRQ_DOVE_PMU, pmu_irq_handler); | ||
179 | } | 81 | } |
diff --git a/arch/arm/mach-mv78xx0/Kconfig b/arch/arm/mach-mv78xx0/Kconfig index f2d309d0619e..a32575fa3fba 100644 --- a/arch/arm/mach-mv78xx0/Kconfig +++ b/arch/arm/mach-mv78xx0/Kconfig | |||
@@ -1,6 +1,15 @@ | |||
1 | if ARCH_MV78XX0 | 1 | menuconfig ARCH_MV78XX0 |
2 | bool "Marvell MV78xx0" if ARCH_MULTI_V5 | ||
3 | select ARCH_REQUIRE_GPIOLIB | ||
4 | select CPU_FEROCEON | ||
5 | select MVEBU_MBUS | ||
6 | select PCI | ||
7 | select PLAT_ORION_LEGACY | ||
8 | help | ||
9 | Support for the following Marvell MV78xx0 series SoCs: | ||
10 | MV781x0, MV782x0. | ||
2 | 11 | ||
3 | menu "Marvell MV78xx0 Implementations" | 12 | if ARCH_MV78XX0 |
4 | 13 | ||
5 | config MACH_DB78X00_BP | 14 | config MACH_DB78X00_BP |
6 | bool "Marvell DB-78x00-BP Development Board" | 15 | bool "Marvell DB-78x00-BP Development Board" |
@@ -20,6 +29,4 @@ config MACH_TERASTATION_WXL | |||
20 | Say 'Y' here if you want your kernel to support the | 29 | Say 'Y' here if you want your kernel to support the |
21 | Buffalo WXL Nas. | 30 | Buffalo WXL Nas. |
22 | 31 | ||
23 | endmenu | ||
24 | |||
25 | endif | 32 | endif |
diff --git a/arch/arm/mach-mv78xx0/Makefile b/arch/arm/mach-mv78xx0/Makefile index 7cd04634d302..ddb3aa98a3c7 100644 --- a/arch/arm/mach-mv78xx0/Makefile +++ b/arch/arm/mach-mv78xx0/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include | ||
2 | |||
1 | obj-y += common.o mpp.o irq.o pcie.o | 3 | obj-y += common.o mpp.o irq.o pcie.o |
2 | obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o | 4 | obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o |
3 | obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o | 5 | obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o |
diff --git a/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h b/arch/arm/mach-mv78xx0/bridge-regs.h index e20d6da234a6..2f54e1753d45 100644 --- a/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h +++ b/arch/arm/mach-mv78xx0/bridge-regs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-mv78xx0/include/mach/bridge-regs.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | 2 | * This file is licensed under the terms of the GNU General Public |
5 | * License version 2. This program is licensed "as is" without any | 3 | * License version 2. This program is licensed "as is" without any |
6 | * warranty of any kind, whether express or implied. | 4 | * warranty of any kind, whether express or implied. |
@@ -9,7 +7,7 @@ | |||
9 | #ifndef __ASM_ARCH_BRIDGE_REGS_H | 7 | #ifndef __ASM_ARCH_BRIDGE_REGS_H |
10 | #define __ASM_ARCH_BRIDGE_REGS_H | 8 | #define __ASM_ARCH_BRIDGE_REGS_H |
11 | 9 | ||
12 | #include <mach/mv78xx0.h> | 10 | #include "mv78xx0.h" |
13 | 11 | ||
14 | #define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) | 12 | #define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) |
15 | #define L2_WRITETHROUGH 0x00020000 | 13 | #define L2_WRITETHROUGH 0x00020000 |
diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c index 1f2ef98b37c6..e112f2e7cc9a 100644 --- a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +++ b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | |||
@@ -17,9 +17,9 @@ | |||
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/ethtool.h> | 18 | #include <linux/ethtool.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <mach/mv78xx0.h> | ||
21 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | #include "mv78xx0.h" | ||
23 | #include "common.h" | 23 | #include "common.h" |
24 | #include "mpp.h" | 24 | #include "mpp.h" |
25 | 25 | ||
@@ -146,6 +146,7 @@ subsys_initcall(wxl_pci_init); | |||
146 | MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL") | 146 | MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL") |
147 | /* Maintainer: Sebastien Requiem <sebastien@requiem.fr> */ | 147 | /* Maintainer: Sebastien Requiem <sebastien@requiem.fr> */ |
148 | .atag_offset = 0x100, | 148 | .atag_offset = 0x100, |
149 | .nr_irqs = MV78XX0_NR_IRQS, | ||
149 | .init_machine = wxl_init, | 150 | .init_machine = wxl_init, |
150 | .map_io = mv78xx0_map_io, | 151 | .map_io = mv78xx0_map_io, |
151 | .init_early = mv78xx0_init_early, | 152 | .init_early = mv78xx0_init_early, |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index e6ac679bece9..a1a04df9c05c 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -18,13 +18,13 @@ | |||
18 | #include <asm/hardware/cache-feroceon-l2.h> | 18 | #include <asm/hardware/cache-feroceon-l2.h> |
19 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
20 | #include <asm/mach/time.h> | 20 | #include <asm/mach/time.h> |
21 | #include <mach/mv78xx0.h> | ||
22 | #include <mach/bridge-regs.h> | ||
23 | #include <linux/platform_data/usb-ehci-orion.h> | 21 | #include <linux/platform_data/usb-ehci-orion.h> |
24 | #include <linux/platform_data/mtd-orion_nand.h> | 22 | #include <linux/platform_data/mtd-orion_nand.h> |
25 | #include <plat/time.h> | 23 | #include <plat/time.h> |
26 | #include <plat/common.h> | 24 | #include <plat/common.h> |
27 | #include <plat/addr-map.h> | 25 | #include <plat/addr-map.h> |
26 | #include "mv78xx0.h" | ||
27 | #include "bridge-regs.h" | ||
28 | #include "common.h" | 28 | #include "common.h" |
29 | 29 | ||
30 | static int get_tclk(void); | 30 | static int get_tclk(void); |
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c index 4e0f22b30bc8..cf16e08d4cf5 100644 --- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c | |||
@@ -15,9 +15,9 @@ | |||
15 | #include <linux/mv643xx_eth.h> | 15 | #include <linux/mv643xx_eth.h> |
16 | #include <linux/ethtool.h> | 16 | #include <linux/ethtool.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <mach/mv78xx0.h> | ||
19 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
20 | #include "mv78xx0.h" | ||
21 | #include "common.h" | 21 | #include "common.h" |
22 | 22 | ||
23 | static struct mv643xx_eth_platform_data db78x00_ge00_data = { | 23 | static struct mv643xx_eth_platform_data db78x00_ge00_data = { |
@@ -94,6 +94,7 @@ subsys_initcall(db78x00_pci_init); | |||
94 | MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board") | 94 | MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board") |
95 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | 95 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ |
96 | .atag_offset = 0x100, | 96 | .atag_offset = 0x100, |
97 | .nr_irqs = MV78XX0_NR_IRQS, | ||
97 | .init_machine = db78x00_init, | 98 | .init_machine = db78x00_init, |
98 | .map_io = mv78xx0_map_io, | 99 | .map_io = mv78xx0_map_io, |
99 | .init_early = mv78xx0_init_early, | 100 | .init_early = mv78xx0_init_early, |
diff --git a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S deleted file mode 100644 index 6b1f088e0597..000000000000 --- a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78xx0/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Marvell MV78xx0 platforms | ||
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 <mach/bridge-regs.h> | ||
12 | |||
13 | .macro get_irqnr_preamble, base, tmp | ||
14 | ldr \base, =IRQ_VIRT_BASE | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
18 | @ check low interrupts | ||
19 | ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF] | ||
20 | ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] | ||
21 | mov \irqnr, #31 | ||
22 | ands \irqstat, \irqstat, \tmp | ||
23 | bne 1001f | ||
24 | |||
25 | @ if no low interrupts set, check high interrupts | ||
26 | ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] | ||
27 | ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF] | ||
28 | mov \irqnr, #63 | ||
29 | ands \irqstat, \irqstat, \tmp | ||
30 | bne 1001f | ||
31 | |||
32 | @ if no high interrupts set, check error interrupts | ||
33 | ldr \irqstat, [\base, #IRQ_CAUSE_ERR_OFF] | ||
34 | ldr \tmp, [\base, #IRQ_MASK_ERR_OFF] | ||
35 | mov \irqnr, #95 | ||
36 | ands \irqstat, \irqstat, \tmp | ||
37 | |||
38 | @ find first active interrupt source | ||
39 | 1001: clzne \irqstat, \irqstat | ||
40 | subne \irqnr, \irqnr, \irqstat | ||
41 | .endm | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/hardware.h b/arch/arm/mach-mv78xx0/include/mach/hardware.h deleted file mode 100644 index 67cab0a08e07..000000000000 --- a/arch/arm/mach-mv78xx0/include/mach/hardware.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78xx0/include/mach/hardware.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H | ||
11 | |||
12 | #include "mv78xx0.h" | ||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/uncompress.h b/arch/arm/mach-mv78xx0/include/mach/uncompress.h deleted file mode 100644 index 6a761c44a296..000000000000 --- a/arch/arm/mach-mv78xx0/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78xx0/include/mach/uncompress.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <linux/serial_reg.h> | ||
10 | #include <mach/mv78xx0.h> | ||
11 | |||
12 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) | ||
13 | |||
14 | static void putc(const char c) | ||
15 | { | ||
16 | unsigned char *base = SERIAL_BASE; | ||
17 | int i; | ||
18 | |||
19 | for (i = 0; i < 0x1000; i++) { | ||
20 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
21 | break; | ||
22 | barrier(); | ||
23 | } | ||
24 | |||
25 | base[UART_TX << 2] = c; | ||
26 | } | ||
27 | |||
28 | static void flush(void) | ||
29 | { | ||
30 | unsigned char *base = SERIAL_BASE; | ||
31 | unsigned char mask; | ||
32 | int i; | ||
33 | |||
34 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
35 | |||
36 | for (i = 0; i < 0x1000; i++) { | ||
37 | if ((base[UART_LSR << 2] & mask) == mask) | ||
38 | break; | ||
39 | barrier(); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * nothing to do | ||
45 | */ | ||
46 | #define arch_decomp_setup() | ||
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c index 32073444024b..788569e960e1 100644 --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c | |||
@@ -11,9 +11,10 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <mach/bridge-regs.h> | 14 | #include <asm/exception.h> |
15 | #include <plat/orion-gpio.h> | 15 | #include <plat/orion-gpio.h> |
16 | #include <plat/irq.h> | 16 | #include <plat/irq.h> |
17 | #include "bridge-regs.h" | ||
17 | #include "common.h" | 18 | #include "common.h" |
18 | 19 | ||
19 | static int __initdata gpio0_irqs[4] = { | 20 | static int __initdata gpio0_irqs[4] = { |
@@ -23,12 +24,44 @@ static int __initdata gpio0_irqs[4] = { | |||
23 | IRQ_MV78XX0_GPIO_24_31, | 24 | IRQ_MV78XX0_GPIO_24_31, |
24 | }; | 25 | }; |
25 | 26 | ||
27 | static void __iomem *mv78xx0_irq_base = IRQ_VIRT_BASE; | ||
28 | |||
29 | static asmlinkage void | ||
30 | __exception_irq_entry mv78xx0_legacy_handle_irq(struct pt_regs *regs) | ||
31 | { | ||
32 | u32 stat; | ||
33 | |||
34 | stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_LOW_OFF); | ||
35 | stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_LOW_OFF); | ||
36 | if (stat) { | ||
37 | unsigned int hwirq = __fls(stat); | ||
38 | handle_IRQ(hwirq, regs); | ||
39 | return; | ||
40 | } | ||
41 | stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_HIGH_OFF); | ||
42 | stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_HIGH_OFF); | ||
43 | if (stat) { | ||
44 | unsigned int hwirq = 32 + __fls(stat); | ||
45 | handle_IRQ(hwirq, regs); | ||
46 | return; | ||
47 | } | ||
48 | stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_ERR_OFF); | ||
49 | stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_ERR_OFF); | ||
50 | if (stat) { | ||
51 | unsigned int hwirq = 64 + __fls(stat); | ||
52 | handle_IRQ(hwirq, regs); | ||
53 | return; | ||
54 | } | ||
55 | } | ||
56 | |||
26 | void __init mv78xx0_init_irq(void) | 57 | void __init mv78xx0_init_irq(void) |
27 | { | 58 | { |
28 | orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); | 59 | orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); |
29 | orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); | 60 | orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); |
30 | orion_irq_init(64, IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF); | 61 | orion_irq_init(64, IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF); |
31 | 62 | ||
63 | set_handle_irq(mv78xx0_legacy_handle_irq); | ||
64 | |||
32 | /* | 65 | /* |
33 | * Initialize gpiolib for GPIOs 0-31. (The GPIO interrupt mask | 66 | * Initialize gpiolib for GPIOs 0-31. (The GPIO interrupt mask |
34 | * registers for core #1 are at an offset of 0x18 from those of | 67 | * registers for core #1 are at an offset of 0x18 from those of |
diff --git a/arch/arm/mach-mv78xx0/include/mach/irqs.h b/arch/arm/mach-mv78xx0/irqs.h index fa1d422196c2..67e0fe730a13 100644 --- a/arch/arm/mach-mv78xx0/include/mach/irqs.h +++ b/arch/arm/mach-mv78xx0/irqs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-mv78xx0/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Marvell MV78xx0 SoCs | 2 | * IRQ definitions for Marvell MV78xx0 SoCs |
5 | * | 3 | * |
6 | * This file is licensed under the terms of the GNU General Public | 4 | * This file is licensed under the terms of the GNU General Public |
@@ -88,7 +86,7 @@ | |||
88 | #define IRQ_MV78XX0_GPIO_START 96 | 86 | #define IRQ_MV78XX0_GPIO_START 96 |
89 | #define NR_GPIO_IRQS 32 | 87 | #define NR_GPIO_IRQS 32 |
90 | 88 | ||
91 | #define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) | 89 | #define MV78XX0_NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) |
92 | 90 | ||
93 | 91 | ||
94 | #endif | 92 | #endif |
diff --git a/arch/arm/mach-mv78xx0/mpp.c b/arch/arm/mach-mv78xx0/mpp.c index df50342179e2..72843c02e95a 100644 --- a/arch/arm/mach-mv78xx0/mpp.c +++ b/arch/arm/mach-mv78xx0/mpp.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <plat/mpp.h> | 14 | #include <plat/mpp.h> |
15 | #include <mach/hardware.h> | 15 | #include "mv78xx0.h" |
16 | #include "common.h" | 16 | #include "common.h" |
17 | #include "mpp.h" | 17 | #include "mpp.h" |
18 | 18 | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h b/arch/arm/mach-mv78xx0/mv78xx0.h index 723748d8ba7d..2db1265ec121 100644 --- a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h +++ b/arch/arm/mach-mv78xx0/mv78xx0.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-mv78xx0/include/mach/mv78xx0.h | ||
3 | * | ||
4 | * Generic definitions for Marvell MV78xx0 SoC flavors: | 2 | * Generic definitions for Marvell MV78xx0 SoC flavors: |
5 | * MV781x0 and MV782x0. | 3 | * MV781x0 and MV782x0. |
6 | * | 4 | * |
@@ -12,6 +10,8 @@ | |||
12 | #ifndef __ASM_ARCH_MV78XX0_H | 10 | #ifndef __ASM_ARCH_MV78XX0_H |
13 | #define __ASM_ARCH_MV78XX0_H | 11 | #define __ASM_ARCH_MV78XX0_H |
14 | 12 | ||
13 | #include "irqs.h" | ||
14 | |||
15 | /* | 15 | /* |
16 | * Marvell MV78xx0 address maps. | 16 | * Marvell MV78xx0 address maps. |
17 | * | 17 | * |
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 097ea4cb1136..13a7d72ee0c4 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
16 | #include <asm/mach/pci.h> | 16 | #include <asm/mach/pci.h> |
17 | #include <plat/pcie.h> | 17 | #include <plat/pcie.h> |
18 | #include <mach/mv78xx0.h> | 18 | #include "mv78xx0.h" |
19 | #include "common.h" | 19 | #include "common.h" |
20 | 20 | ||
21 | #define MV78XX0_MBUS_PCIE_MEM_TARGET(port, lane) ((port) ? 8 : 4) | 21 | #define MV78XX0_MBUS_PCIE_MEM_TARGET(port, lane) ((port) ? 8 : 4) |
diff --git a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c index d2d06f3957f3..308ab71ec822 100644 --- a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c +++ b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | |||
@@ -14,9 +14,9 @@ | |||
14 | #include <linux/ata_platform.h> | 14 | #include <linux/ata_platform.h> |
15 | #include <linux/mv643xx_eth.h> | 15 | #include <linux/mv643xx_eth.h> |
16 | #include <linux/ethtool.h> | 16 | #include <linux/ethtool.h> |
17 | #include <mach/mv78xx0.h> | ||
18 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include "mv78xx0.h" | ||
20 | #include "common.h" | 20 | #include "common.h" |
21 | 21 | ||
22 | static struct mv643xx_eth_platform_data rd78x00_masa_ge00_data = { | 22 | static struct mv643xx_eth_platform_data rd78x00_masa_ge00_data = { |
@@ -79,6 +79,7 @@ subsys_initcall(rd78x00_pci_init); | |||
79 | MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board") | 79 | MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board") |
80 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | 80 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ |
81 | .atag_offset = 0x100, | 81 | .atag_offset = 0x100, |
82 | .nr_irqs = MV78XX0_NR_IRQS, | ||
82 | .init_machine = rd78x00_masa_init, | 83 | .init_machine = rd78x00_masa_init, |
83 | .map_io = mv78xx0_map_io, | 84 | .map_io = mv78xx0_map_io, |
84 | .init_early = mv78xx0_init_early, | 85 | .init_early = mv78xx0_init_early, |
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index 66f1c952c048..a9ad95f000a1 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig | |||
@@ -1,6 +1,18 @@ | |||
1 | if ARCH_ORION5X | 1 | menuconfig ARCH_ORION5X |
2 | bool "Marvell Orion" | ||
3 | depends on MMU && ARCH_MULTI_V5 | ||
4 | select ARCH_REQUIRE_GPIOLIB | ||
5 | select CPU_FEROCEON | ||
6 | select GENERIC_CLOCKEVENTS | ||
7 | select MVEBU_MBUS | ||
8 | select PCI | ||
9 | select PLAT_ORION_LEGACY | ||
10 | help | ||
11 | Support for the following Marvell Orion 5x series SoCs: | ||
12 | Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), | ||
13 | Orion-2 (5281), Orion-1-90 (6183). | ||
2 | 14 | ||
3 | menu "Orion Implementations" | 15 | if ARCH_ORION5X |
4 | 16 | ||
5 | config ARCH_ORION5X_DT | 17 | config ARCH_ORION5X_DT |
6 | bool "Marvell Orion5x Flattened Device Tree" | 18 | bool "Marvell Orion5x Flattened Device Tree" |
@@ -163,6 +175,4 @@ config MACH_RD88F6183AP_GE | |||
163 | Say 'Y' here if you want your kernel to support the | 175 | Say 'Y' here if you want your kernel to support the |
164 | Marvell Orion-1-90 (88F6183) AP GE RD. | 176 | Marvell Orion-1-90 (88F6183) AP GE RD. |
165 | 177 | ||
166 | endmenu | ||
167 | |||
168 | endif | 178 | endif |
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index a1e0fbe6a7a1..4b2502b4ca0d 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include | ||
2 | |||
1 | obj-y += common.o pci.o irq.o mpp.o | 3 | obj-y += common.o pci.o irq.o mpp.o |
2 | obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o | 4 | obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o |
3 | obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o | 5 | obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o |
diff --git a/arch/arm/mach-orion5x/board-d2net.c b/arch/arm/mach-orion5x/board-d2net.c index 8a7284124153..a89376a5cd92 100644 --- a/arch/arm/mach-orion5x/board-d2net.c +++ b/arch/arm/mach-orion5x/board-d2net.c | |||
@@ -20,9 +20,9 @@ | |||
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | #include <asm/mach/pci.h> | 22 | #include <asm/mach/pci.h> |
23 | #include <mach/orion5x.h> | ||
24 | #include <plat/orion-gpio.h> | 23 | #include <plat/orion-gpio.h> |
25 | #include "common.h" | 24 | #include "common.h" |
25 | #include "orion5x.h" | ||
26 | 26 | ||
27 | /***************************************************************************** | 27 | /***************************************************************************** |
28 | * LaCie d2 Network Info | 28 | * LaCie d2 Network Info |
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c index d0871786dd8a..6f4c2c4ae2a5 100644 --- a/arch/arm/mach-orion5x/board-dt.c +++ b/arch/arm/mach-orion5x/board-dt.c | |||
@@ -20,10 +20,10 @@ | |||
20 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include <mach/orion5x.h> | ||
24 | #include <mach/bridge-regs.h> | ||
25 | #include <plat/irq.h> | 23 | #include <plat/irq.h> |
26 | #include <plat/time.h> | 24 | #include <plat/time.h> |
25 | #include "orion5x.h" | ||
26 | #include "bridge-regs.h" | ||
27 | #include "common.h" | 27 | #include "common.h" |
28 | 28 | ||
29 | static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = { | 29 | static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = { |
diff --git a/arch/arm/mach-orion5x/board-mss2.c b/arch/arm/mach-orion5x/board-mss2.c index 66f9c3ba86cc..79202fd626df 100644 --- a/arch/arm/mach-orion5x/board-mss2.c +++ b/arch/arm/mach-orion5x/board-mss2.c | |||
@@ -17,8 +17,8 @@ | |||
17 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/pci.h> | 19 | #include <asm/mach/pci.h> |
20 | #include <mach/orion5x.h> | 20 | #include "orion5x.h" |
21 | #include <mach/bridge-regs.h> | 21 | #include "bridge-regs.h" |
22 | #include "common.h" | 22 | #include "common.h" |
23 | 23 | ||
24 | /***************************************************************************** | 24 | /***************************************************************************** |
diff --git a/arch/arm/mach-orion5x/board-rd88f5182.c b/arch/arm/mach-orion5x/board-rd88f5182.c index 270824b0e50f..b7b0f52f4c0a 100644 --- a/arch/arm/mach-orion5x/board-rd88f5182.c +++ b/arch/arm/mach-orion5x/board-rd88f5182.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
20 | #include <asm/mach/pci.h> | 20 | #include <asm/mach/pci.h> |
21 | #include <mach/orion5x.h> | ||
22 | #include "common.h" | 21 | #include "common.h" |
22 | #include "orion5x.h" | ||
23 | 23 | ||
24 | /***************************************************************************** | 24 | /***************************************************************************** |
25 | * RD-88F5182 Info | 25 | * RD-88F5182 Info |
diff --git a/arch/arm/mach-orion5x/include/mach/bridge-regs.h b/arch/arm/mach-orion5x/bridge-regs.h index 5766e3fbff69..305598eaaee1 100644 --- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h +++ b/arch/arm/mach-orion5x/bridge-regs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-orion5x/include/mach/bridge-regs.h | ||
3 | * | ||
4 | * Orion CPU Bridge Registers | 2 | * Orion CPU Bridge Registers |
5 | * | 3 | * |
6 | * This file is licensed under the terms of the GNU General Public | 4 | * This file is licensed under the terms of the GNU General Public |
@@ -11,7 +9,7 @@ | |||
11 | #ifndef __ASM_ARCH_BRIDGE_REGS_H | 9 | #ifndef __ASM_ARCH_BRIDGE_REGS_H |
12 | #define __ASM_ARCH_BRIDGE_REGS_H | 10 | #define __ASM_ARCH_BRIDGE_REGS_H |
13 | 11 | ||
14 | #include <mach/orion5x.h> | 12 | #include "orion5x.h" |
15 | 13 | ||
16 | #define CPU_CONF (ORION5X_BRIDGE_VIRT_BASE + 0x100) | 14 | #define CPU_CONF (ORION5X_BRIDGE_VIRT_BASE + 0x100) |
17 | 15 | ||
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 6bbb7b55c6d1..70c3366c8d03 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -27,14 +27,14 @@ | |||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <asm/mach/time.h> | 29 | #include <asm/mach/time.h> |
30 | #include <mach/bridge-regs.h> | ||
31 | #include <mach/hardware.h> | ||
32 | #include <mach/orion5x.h> | ||
33 | #include <linux/platform_data/mtd-orion_nand.h> | 30 | #include <linux/platform_data/mtd-orion_nand.h> |
34 | #include <linux/platform_data/usb-ehci-orion.h> | 31 | #include <linux/platform_data/usb-ehci-orion.h> |
35 | #include <plat/time.h> | 32 | #include <plat/time.h> |
36 | #include <plat/common.h> | 33 | #include <plat/common.h> |
34 | |||
35 | #include "bridge-regs.h" | ||
37 | #include "common.h" | 36 | #include "common.h" |
37 | #include "orion5x.h" | ||
38 | 38 | ||
39 | /***************************************************************************** | 39 | /***************************************************************************** |
40 | * I/O Address Mapping | 40 | * I/O Address Mapping |
@@ -184,9 +184,21 @@ static void __init orion5x_crypto_init(void) | |||
184 | /***************************************************************************** | 184 | /***************************************************************************** |
185 | * Watchdog | 185 | * Watchdog |
186 | ****************************************************************************/ | 186 | ****************************************************************************/ |
187 | static struct resource orion_wdt_resource[] = { | ||
188 | DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x04), | ||
189 | DEFINE_RES_MEM(RSTOUTn_MASK_PHYS, 0x04), | ||
190 | }; | ||
191 | |||
192 | static struct platform_device orion_wdt_device = { | ||
193 | .name = "orion_wdt", | ||
194 | .id = -1, | ||
195 | .num_resources = ARRAY_SIZE(orion_wdt_resource), | ||
196 | .resource = orion_wdt_resource, | ||
197 | }; | ||
198 | |||
187 | static void __init orion5x_wdt_init(void) | 199 | static void __init orion5x_wdt_init(void) |
188 | { | 200 | { |
189 | orion_wdt_init(); | 201 | platform_device_register(&orion_wdt_device); |
190 | } | 202 | } |
191 | 203 | ||
192 | 204 | ||
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index dc01c4ffc9a8..12f74b46e2ff 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -23,10 +23,10 @@ | |||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/pci.h> | 25 | #include <asm/mach/pci.h> |
26 | #include <mach/orion5x.h> | ||
27 | #include <linux/platform_data/mtd-orion_nand.h> | 26 | #include <linux/platform_data/mtd-orion_nand.h> |
28 | #include "common.h" | 27 | #include "common.h" |
29 | #include "mpp.h" | 28 | #include "mpp.h" |
29 | #include "orion5x.h" | ||
30 | 30 | ||
31 | /***************************************************************************** | 31 | /***************************************************************************** |
32 | * DB-88F5281 on board devices | 32 | * DB-88F5281 on board devices |
@@ -369,6 +369,7 @@ static void __init db88f5281_init(void) | |||
369 | MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") | 369 | MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") |
370 | /* Maintainer: Tzachi Perelstein <tzachi@marvell.com> */ | 370 | /* Maintainer: Tzachi Perelstein <tzachi@marvell.com> */ |
371 | .atag_offset = 0x100, | 371 | .atag_offset = 0x100, |
372 | .nr_irqs = ORION5X_NR_IRQS, | ||
372 | .init_machine = db88f5281_init, | 373 | .init_machine = db88f5281_init, |
373 | .map_io = orion5x_map_io, | 374 | .map_io = orion5x_map_io, |
374 | .init_early = orion5x_init_early, | 375 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index bc279a853075..cd483bfb5ca8 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -33,8 +33,8 @@ | |||
33 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/pci.h> | 34 | #include <asm/mach/pci.h> |
35 | #include <asm/system_info.h> | 35 | #include <asm/system_info.h> |
36 | #include <mach/orion5x.h> | ||
37 | #include <plat/orion-gpio.h> | 36 | #include <plat/orion-gpio.h> |
37 | #include "orion5x.h" | ||
38 | #include "common.h" | 38 | #include "common.h" |
39 | #include "mpp.h" | 39 | #include "mpp.h" |
40 | 40 | ||
@@ -666,6 +666,7 @@ static void __init dns323_init(void) | |||
666 | MACHINE_START(DNS323, "D-Link DNS-323") | 666 | MACHINE_START(DNS323, "D-Link DNS-323") |
667 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ | 667 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ |
668 | .atag_offset = 0x100, | 668 | .atag_offset = 0x100, |
669 | .nr_irqs = ORION5X_NR_IRQS, | ||
669 | .init_machine = dns323_init, | 670 | .init_machine = dns323_init, |
670 | .map_io = orion5x_map_io, | 671 | .map_io = orion5x_map_io, |
671 | .init_early = orion5x_init_early, | 672 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/include/mach/entry-macro.S b/arch/arm/mach-orion5x/include/mach/entry-macro.S deleted file mode 100644 index 73919a36b577..000000000000 --- a/arch/arm/mach-orion5x/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Orion platforms | ||
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 <mach/bridge-regs.h> | ||
12 | |||
13 | .macro get_irqnr_preamble, base, tmp | ||
14 | ldr \base, =MAIN_IRQ_CAUSE | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
18 | ldr \irqstat, [\base, #0] @ main cause | ||
19 | ldr \tmp, [\base, #(MAIN_IRQ_MASK - MAIN_IRQ_CAUSE)] @ main mask | ||
20 | mov \irqnr, #0 @ default irqnr | ||
21 | @ find cause bits that are unmasked | ||
22 | ands \irqstat, \irqstat, \tmp @ clear Z flag if any | ||
23 | clzne \irqnr, \irqstat @ calc irqnr | ||
24 | rsbne \irqnr, \irqnr, #32 | ||
25 | .endm | ||
diff --git a/arch/arm/mach-orion5x/include/mach/hardware.h b/arch/arm/mach-orion5x/include/mach/hardware.h deleted file mode 100644 index 395735482473..000000000000 --- a/arch/arm/mach-orion5x/include/mach/hardware.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/include/mach/hardware.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H | ||
11 | |||
12 | #include "orion5x.h" | ||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/mach-orion5x/include/mach/uncompress.h b/arch/arm/mach-orion5x/include/mach/uncompress.h deleted file mode 100644 index abd26b542c3c..000000000000 --- a/arch/arm/mach-orion5x/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/include/mach/uncompress.h | ||
3 | * | ||
4 | * Tzachi Perelstein <tzachi@marvell.com> | ||
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 <linux/serial_reg.h> | ||
12 | #include <mach/orion5x.h> | ||
13 | |||
14 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) | ||
15 | |||
16 | static void putc(const char c) | ||
17 | { | ||
18 | unsigned char *base = SERIAL_BASE; | ||
19 | int i; | ||
20 | |||
21 | for (i = 0; i < 0x1000; i++) { | ||
22 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
23 | break; | ||
24 | barrier(); | ||
25 | } | ||
26 | |||
27 | base[UART_TX << 2] = c; | ||
28 | } | ||
29 | |||
30 | static void flush(void) | ||
31 | { | ||
32 | unsigned char *base = SERIAL_BASE; | ||
33 | unsigned char mask; | ||
34 | int i; | ||
35 | |||
36 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
37 | |||
38 | for (i = 0; i < 0x1000; i++) { | ||
39 | if ((base[UART_LSR << 2] & mask) == mask) | ||
40 | break; | ||
41 | barrier(); | ||
42 | } | ||
43 | } | ||
44 | |||
45 | /* | ||
46 | * nothing to do | ||
47 | */ | ||
48 | #define arch_decomp_setup() | ||
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index 086ecb87d885..de980ef9cda1 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -13,10 +13,10 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <mach/bridge-regs.h> | ||
17 | #include <plat/orion-gpio.h> | 16 | #include <plat/orion-gpio.h> |
18 | #include <plat/irq.h> | 17 | #include <plat/irq.h> |
19 | #include <asm/exception.h> | 18 | #include <asm/exception.h> |
19 | #include "bridge-regs.h" | ||
20 | #include "common.h" | 20 | #include "common.h" |
21 | 21 | ||
22 | static int __initdata gpio0_irqs[4] = { | 22 | static int __initdata gpio0_irqs[4] = { |
@@ -26,14 +26,6 @@ static int __initdata gpio0_irqs[4] = { | |||
26 | IRQ_ORION5X_GPIO_24_31, | 26 | IRQ_ORION5X_GPIO_24_31, |
27 | }; | 27 | }; |
28 | 28 | ||
29 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
30 | /* | ||
31 | * Compiling with both non-DT and DT support enabled, will | ||
32 | * break asm irq handler used by non-DT boards. Therefore, | ||
33 | * we provide a C-style irq handler even for non-DT boards, | ||
34 | * if MULTI_IRQ_HANDLER is set. | ||
35 | */ | ||
36 | |||
37 | asmlinkage void | 29 | asmlinkage void |
38 | __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs) | 30 | __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs) |
39 | { | 31 | { |
@@ -47,15 +39,12 @@ __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs) | |||
47 | return; | 39 | return; |
48 | } | 40 | } |
49 | } | 41 | } |
50 | #endif | ||
51 | 42 | ||
52 | void __init orion5x_init_irq(void) | 43 | void __init orion5x_init_irq(void) |
53 | { | 44 | { |
54 | orion_irq_init(1, MAIN_IRQ_MASK); | 45 | orion_irq_init(1, MAIN_IRQ_MASK); |
55 | 46 | ||
56 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
57 | set_handle_irq(orion5x_legacy_handle_irq); | 47 | set_handle_irq(orion5x_legacy_handle_irq); |
58 | #endif | ||
59 | 48 | ||
60 | /* | 49 | /* |
61 | * Initialize gpiolib for GPIOs 0-31. | 50 | * Initialize gpiolib for GPIOs 0-31. |
diff --git a/arch/arm/mach-orion5x/include/mach/irqs.h b/arch/arm/mach-orion5x/irqs.h index 2431d9923427..506c8e0b30c4 100644 --- a/arch/arm/mach-orion5x/include/mach/irqs.h +++ b/arch/arm/mach-orion5x/irqs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-orion5x/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Orion SoC | 2 | * IRQ definitions for Orion SoC |
5 | * | 3 | * |
6 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | 4 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> |
@@ -54,7 +52,7 @@ | |||
54 | #define IRQ_ORION5X_GPIO_START 33 | 52 | #define IRQ_ORION5X_GPIO_START 33 |
55 | #define NR_GPIO_IRQS 32 | 53 | #define NR_GPIO_IRQS 32 |
56 | 54 | ||
57 | #define NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS) | 55 | #define ORION5X_NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS) |
58 | 56 | ||
59 | 57 | ||
60 | #endif | 58 | #endif |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index fe6a48a325e8..9dc3f59bed9c 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -23,10 +23,10 @@ | |||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/pci.h> | 25 | #include <asm/mach/pci.h> |
26 | #include <mach/orion5x.h> | ||
27 | #include <linux/platform_data/mtd-orion_nand.h> | 26 | #include <linux/platform_data/mtd-orion_nand.h> |
28 | #include "common.h" | 27 | #include "common.h" |
29 | #include "mpp.h" | 28 | #include "mpp.h" |
29 | #include "orion5x.h" | ||
30 | 30 | ||
31 | /***************************************************************************** | 31 | /***************************************************************************** |
32 | * KUROBOX-PRO Info | 32 | * KUROBOX-PRO Info |
@@ -383,6 +383,7 @@ static void __init kurobox_pro_init(void) | |||
383 | MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") | 383 | MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") |
384 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ | 384 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ |
385 | .atag_offset = 0x100, | 385 | .atag_offset = 0x100, |
386 | .nr_irqs = ORION5X_NR_IRQS, | ||
386 | .init_machine = kurobox_pro_init, | 387 | .init_machine = kurobox_pro_init, |
387 | .map_io = orion5x_map_io, | 388 | .map_io = orion5x_map_io, |
388 | .init_early = orion5x_init_early, | 389 | .init_early = orion5x_init_early, |
@@ -397,6 +398,7 @@ MACHINE_END | |||
397 | MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live") | 398 | MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live") |
398 | /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ | 399 | /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ |
399 | .atag_offset = 0x100, | 400 | .atag_offset = 0x100, |
401 | .nr_irqs = ORION5X_NR_IRQS, | ||
400 | .init_machine = kurobox_pro_init, | 402 | .init_machine = kurobox_pro_init, |
401 | .map_io = orion5x_map_io, | 403 | .map_io = orion5x_map_io, |
402 | .init_early = orion5x_init_early, | 404 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c index 028ea038d404..dfdaa8a498a4 100644 --- a/arch/arm/mach-orion5x/ls-chl-setup.c +++ b/arch/arm/mach-orion5x/ls-chl-setup.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <mach/orion5x.h> | ||
26 | #include "common.h" | 25 | #include "common.h" |
27 | #include "mpp.h" | 26 | #include "mpp.h" |
27 | #include "orion5x.h" | ||
28 | 28 | ||
29 | /***************************************************************************** | 29 | /***************************************************************************** |
30 | * Linkstation LS-CHL Info | 30 | * Linkstation LS-CHL Info |
@@ -320,6 +320,7 @@ static void __init lschl_init(void) | |||
320 | MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)") | 320 | MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)") |
321 | /* Maintainer: Ash Hughes <ashley.hughes@blueyonder.co.uk> */ | 321 | /* Maintainer: Ash Hughes <ashley.hughes@blueyonder.co.uk> */ |
322 | .atag_offset = 0x100, | 322 | .atag_offset = 0x100, |
323 | .nr_irqs = ORION5X_NR_IRQS, | ||
323 | .init_machine = lschl_init, | 324 | .init_machine = lschl_init, |
324 | .map_io = orion5x_map_io, | 325 | .map_io = orion5x_map_io, |
325 | .init_early = orion5x_init_early, | 326 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index 32b7129b767d..47ba6e0502f5 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c | |||
@@ -21,9 +21,9 @@ | |||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <mach/orion5x.h> | ||
25 | #include "common.h" | 24 | #include "common.h" |
26 | #include "mpp.h" | 25 | #include "mpp.h" |
26 | #include "orion5x.h" | ||
27 | 27 | ||
28 | /***************************************************************************** | 28 | /***************************************************************************** |
29 | * Linkstation LS-HGL Info | 29 | * Linkstation LS-HGL Info |
@@ -267,6 +267,7 @@ static void __init ls_hgl_init(void) | |||
267 | MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL") | 267 | MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL") |
268 | /* Maintainer: Zhu Qingsen <zhuqs@cn.fujistu.com> */ | 268 | /* Maintainer: Zhu Qingsen <zhuqs@cn.fujistu.com> */ |
269 | .atag_offset = 0x100, | 269 | .atag_offset = 0x100, |
270 | .nr_irqs = ORION5X_NR_IRQS, | ||
270 | .init_machine = ls_hgl_init, | 271 | .init_machine = ls_hgl_init, |
271 | .map_io = orion5x_map_io, | 272 | .map_io = orion5x_map_io, |
272 | .init_early = orion5x_init_early, | 273 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c index 5b70026f478c..19ef18594415 100644 --- a/arch/arm/mach-orion5x/mpp.c +++ b/arch/arm/mach-orion5x/mpp.c | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <mach/hardware.h> | ||
15 | #include <plat/mpp.h> | 14 | #include <plat/mpp.h> |
15 | #include "orion5x.h" | ||
16 | #include "mpp.h" | 16 | #include "mpp.h" |
17 | #include "common.h" | 17 | #include "common.h" |
18 | 18 | ||
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c index e032f01da49e..2bf8ec75e908 100644 --- a/arch/arm/mach-orion5x/mv2120-setup.c +++ b/arch/arm/mach-orion5x/mv2120-setup.c | |||
@@ -21,9 +21,9 @@ | |||
21 | #include <linux/ata_platform.h> | 21 | #include <linux/ata_platform.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <mach/orion5x.h> | ||
25 | #include "common.h" | 24 | #include "common.h" |
26 | #include "mpp.h" | 25 | #include "mpp.h" |
26 | #include "orion5x.h" | ||
27 | 27 | ||
28 | #define MV2120_NOR_BOOT_BASE 0xf4000000 | 28 | #define MV2120_NOR_BOOT_BASE 0xf4000000 |
29 | #define MV2120_NOR_BOOT_SIZE SZ_512K | 29 | #define MV2120_NOR_BOOT_SIZE SZ_512K |
@@ -232,6 +232,7 @@ static void __init mv2120_init(void) | |||
232 | MACHINE_START(MV2120, "HP Media Vault mv2120") | 232 | MACHINE_START(MV2120, "HP Media Vault mv2120") |
233 | /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */ | 233 | /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */ |
234 | .atag_offset = 0x100, | 234 | .atag_offset = 0x100, |
235 | .nr_irqs = ORION5X_NR_IRQS, | ||
235 | .init_machine = mv2120_init, | 236 | .init_machine = mv2120_init, |
236 | .map_io = orion5x_map_io, | 237 | .map_io = orion5x_map_io, |
237 | .init_early = orion5x_init_early, | 238 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index ba73dc7ffb9e..bf6be4cfd238 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c | |||
@@ -24,10 +24,10 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include <mach/orion5x.h> | ||
28 | #include <plat/orion-gpio.h> | 27 | #include <plat/orion-gpio.h> |
29 | #include "common.h" | 28 | #include "common.h" |
30 | #include "mpp.h" | 29 | #include "mpp.h" |
30 | #include "orion5x.h" | ||
31 | 31 | ||
32 | /***************************************************************************** | 32 | /***************************************************************************** |
33 | * LaCie 2Big Network Info | 33 | * LaCie 2Big Network Info |
@@ -423,6 +423,7 @@ static void __init net2big_init(void) | |||
423 | /* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */ | 423 | /* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */ |
424 | MACHINE_START(NET2BIG, "LaCie 2Big Network") | 424 | MACHINE_START(NET2BIG, "LaCie 2Big Network") |
425 | .atag_offset = 0x100, | 425 | .atag_offset = 0x100, |
426 | .nr_irqs = ORION5X_NR_IRQS, | ||
426 | .init_machine = net2big_init, | 427 | .init_machine = net2big_init, |
427 | .map_io = orion5x_map_io, | 428 | .map_io = orion5x_map_io, |
428 | .init_early = orion5x_init_early, | 429 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/include/mach/orion5x.h b/arch/arm/mach-orion5x/orion5x.h index b78ff3248868..3364df331f01 100644 --- a/arch/arm/mach-orion5x/include/mach/orion5x.h +++ b/arch/arm/mach-orion5x/orion5x.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-orion5x/include/mach/orion5x.h | ||
3 | * | ||
4 | * Generic definitions of Orion SoC flavors: | 2 | * Generic definitions of Orion SoC flavors: |
5 | * Orion-1, Orion-VoIP, Orion-NAS, Orion-2, and Orion-1-90. | 3 | * Orion-1, Orion-VoIP, Orion-NAS, Orion-2, and Orion-1-90. |
6 | * | 4 | * |
@@ -14,6 +12,8 @@ | |||
14 | #ifndef __ASM_ARCH_ORION5X_H | 12 | #ifndef __ASM_ARCH_ORION5X_H |
15 | #define __ASM_ARCH_ORION5X_H | 13 | #define __ASM_ARCH_ORION5X_H |
16 | 14 | ||
15 | #include "irqs.h" | ||
16 | |||
17 | /***************************************************************************** | 17 | /***************************************************************************** |
18 | * Orion Address Maps | 18 | * Orion Address Maps |
19 | * | 19 | * |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index b02f3947be51..ecb998e7f8dc 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -19,8 +19,8 @@ | |||
19 | #include <asm/mach/pci.h> | 19 | #include <asm/mach/pci.h> |
20 | #include <plat/pcie.h> | 20 | #include <plat/pcie.h> |
21 | #include <plat/addr-map.h> | 21 | #include <plat/addr-map.h> |
22 | #include <mach/orion5x.h> | ||
23 | #include "common.h" | 22 | #include "common.h" |
23 | #include "orion5x.h" | ||
24 | 24 | ||
25 | /***************************************************************************** | 25 | /***************************************************************************** |
26 | * Orion has one PCIe controller and one PCI controller. | 26 | * Orion has one PCIe controller and one PCI controller. |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 213b3e143c57..c742e7b40b0d 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -20,9 +20,9 @@ | |||
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | #include <asm/mach/pci.h> | 22 | #include <asm/mach/pci.h> |
23 | #include <mach/orion5x.h> | ||
24 | #include "common.h" | 23 | #include "common.h" |
25 | #include "mpp.h" | 24 | #include "mpp.h" |
25 | #include "orion5x.h" | ||
26 | 26 | ||
27 | /***************************************************************************** | 27 | /***************************************************************************** |
28 | * RD-88F5181L FXO Info | 28 | * RD-88F5181L FXO Info |
@@ -169,6 +169,7 @@ subsys_initcall(rd88f5181l_fxo_pci_init); | |||
169 | MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design") | 169 | MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design") |
170 | /* Maintainer: Nicolas Pitre <nico@marvell.com> */ | 170 | /* Maintainer: Nicolas Pitre <nico@marvell.com> */ |
171 | .atag_offset = 0x100, | 171 | .atag_offset = 0x100, |
172 | .nr_irqs = ORION5X_NR_IRQS, | ||
172 | .init_machine = rd88f5181l_fxo_init, | 173 | .init_machine = rd88f5181l_fxo_init, |
173 | .map_io = orion5x_map_io, | 174 | .map_io = orion5x_map_io, |
174 | .init_early = orion5x_init_early, | 175 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index 594800e1d691..7e977b794b0c 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -21,9 +21,9 @@ | |||
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
23 | #include <asm/mach/pci.h> | 23 | #include <asm/mach/pci.h> |
24 | #include <mach/orion5x.h> | ||
25 | #include "common.h" | 24 | #include "common.h" |
26 | #include "mpp.h" | 25 | #include "mpp.h" |
26 | #include "orion5x.h" | ||
27 | 27 | ||
28 | /***************************************************************************** | 28 | /***************************************************************************** |
29 | * RD-88F5181L GE Info | 29 | * RD-88F5181L GE Info |
@@ -181,6 +181,7 @@ subsys_initcall(rd88f5181l_ge_pci_init); | |||
181 | MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design") | 181 | MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design") |
182 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | 182 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ |
183 | .atag_offset = 0x100, | 183 | .atag_offset = 0x100, |
184 | .nr_irqs = ORION5X_NR_IRQS, | ||
184 | .init_machine = rd88f5181l_ge_init, | 185 | .init_machine = rd88f5181l_ge_init, |
185 | .map_io = orion5x_map_io, | 186 | .map_io = orion5x_map_io, |
186 | .init_early = orion5x_init_early, | 187 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index b576ef5f18a1..fe3e67c81fb8 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/pci.h> | 25 | #include <asm/mach/pci.h> |
26 | #include <mach/orion5x.h> | ||
27 | #include "common.h" | 26 | #include "common.h" |
28 | #include "mpp.h" | 27 | #include "mpp.h" |
28 | #include "orion5x.h" | ||
29 | 29 | ||
30 | /***************************************************************************** | 30 | /***************************************************************************** |
31 | * RD-88F5182 Info | 31 | * RD-88F5182 Info |
@@ -281,6 +281,7 @@ static void __init rd88f5182_init(void) | |||
281 | MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") | 281 | MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") |
282 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ | 282 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ |
283 | .atag_offset = 0x100, | 283 | .atag_offset = 0x100, |
284 | .nr_irqs = ORION5X_NR_IRQS, | ||
284 | .init_machine = rd88f5182_init, | 285 | .init_machine = rd88f5182_init, |
285 | .map_io = orion5x_map_io, | 286 | .map_io = orion5x_map_io, |
286 | .init_early = orion5x_init_early, | 287 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 78a1e6ab1b9d..4bf80dd5478c 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
25 | #include <mach/orion5x.h> | ||
26 | #include "common.h" | 25 | #include "common.h" |
26 | #include "orion5x.h" | ||
27 | 27 | ||
28 | static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = { | 28 | static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = { |
29 | .phy_addr = -1, | 29 | .phy_addr = -1, |
@@ -119,6 +119,7 @@ subsys_initcall(rd88f6183ap_ge_pci_init); | |||
119 | MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design") | 119 | MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design") |
120 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | 120 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ |
121 | .atag_offset = 0x100, | 121 | .atag_offset = 0x100, |
122 | .nr_irqs = ORION5X_NR_IRQS, | ||
122 | .init_machine = rd88f6183ap_ge_init, | 123 | .init_machine = rd88f6183ap_ge_init, |
123 | .map_io = orion5x_map_io, | 124 | .map_io = orion5x_map_io, |
124 | .init_early = orion5x_init_early, | 125 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 12086745c9fd..deb5e29ac669 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
25 | #include <mach/orion5x.h> | ||
26 | #include "common.h" | 25 | #include "common.h" |
27 | #include "mpp.h" | 26 | #include "mpp.h" |
27 | #include "orion5x.h" | ||
28 | 28 | ||
29 | /***************************************************************************** | 29 | /***************************************************************************** |
30 | * Terastation Pro 2/Live Info | 30 | * Terastation Pro 2/Live Info |
@@ -359,6 +359,7 @@ static void __init tsp2_init(void) | |||
359 | MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live") | 359 | MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live") |
360 | /* Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com> */ | 360 | /* Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com> */ |
361 | .atag_offset = 0x100, | 361 | .atag_offset = 0x100, |
362 | .nr_irqs = ORION5X_NR_IRQS, | ||
362 | .init_machine = tsp2_init, | 363 | .init_machine = tsp2_init, |
363 | .map_io = orion5x_map_io, | 364 | .map_io = orion5x_map_io, |
364 | .init_early = orion5x_init_early, | 365 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index c725b7cb9875..7bd671b2854c 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -25,9 +25,9 @@ | |||
25 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/pci.h> | 27 | #include <asm/mach/pci.h> |
28 | #include <mach/orion5x.h> | ||
29 | #include "common.h" | 28 | #include "common.h" |
30 | #include "mpp.h" | 29 | #include "mpp.h" |
30 | #include "orion5x.h" | ||
31 | #include "tsx09-common.h" | 31 | #include "tsx09-common.h" |
32 | 32 | ||
33 | #define QNAP_TS209_NOR_BOOT_BASE 0xf4000000 | 33 | #define QNAP_TS209_NOR_BOOT_BASE 0xf4000000 |
@@ -324,6 +324,7 @@ static void __init qnap_ts209_init(void) | |||
324 | MACHINE_START(TS209, "QNAP TS-109/TS-209") | 324 | MACHINE_START(TS209, "QNAP TS-109/TS-209") |
325 | /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ | 325 | /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ |
326 | .atag_offset = 0x100, | 326 | .atag_offset = 0x100, |
327 | .nr_irqs = ORION5X_NR_IRQS, | ||
327 | .init_machine = qnap_ts209_init, | 328 | .init_machine = qnap_ts209_init, |
328 | .map_io = orion5x_map_io, | 329 | .map_io = orion5x_map_io, |
329 | .init_early = orion5x_init_early, | 330 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index cf2ab531cabc..a77613b14db5 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -27,9 +27,9 @@ | |||
27 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/pci.h> | 29 | #include <asm/mach/pci.h> |
30 | #include <mach/orion5x.h> | ||
31 | #include "common.h" | 30 | #include "common.h" |
32 | #include "mpp.h" | 31 | #include "mpp.h" |
32 | #include "orion5x.h" | ||
33 | #include "tsx09-common.h" | 33 | #include "tsx09-common.h" |
34 | 34 | ||
35 | /***************************************************************************** | 35 | /***************************************************************************** |
@@ -313,6 +313,7 @@ static void __init qnap_ts409_init(void) | |||
313 | MACHINE_START(TS409, "QNAP TS-409") | 313 | MACHINE_START(TS409, "QNAP TS-409") |
314 | /* Maintainer: Sylver Bruneau <sylver.bruneau@gmail.com> */ | 314 | /* Maintainer: Sylver Bruneau <sylver.bruneau@gmail.com> */ |
315 | .atag_offset = 0x100, | 315 | .atag_offset = 0x100, |
316 | .nr_irqs = ORION5X_NR_IRQS, | ||
316 | .init_machine = qnap_ts409_init, | 317 | .init_machine = qnap_ts409_init, |
317 | .map_io = orion5x_map_io, | 318 | .map_io = orion5x_map_io, |
318 | .init_early = orion5x_init_early, | 319 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index 1b704d35cf5b..b67ace446576 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | #include <mach/orion5x.h> | ||
27 | #include "common.h" | 26 | #include "common.h" |
28 | #include "mpp.h" | 27 | #include "mpp.h" |
28 | #include "orion5x.h" | ||
29 | #include "ts78xx-fpga.h" | 29 | #include "ts78xx-fpga.h" |
30 | 30 | ||
31 | /***************************************************************************** | 31 | /***************************************************************************** |
@@ -615,6 +615,7 @@ static void __init ts78xx_init(void) | |||
615 | MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") | 615 | MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") |
616 | /* Maintainer: Alexander Clouter <alex@digriz.org.uk> */ | 616 | /* Maintainer: Alexander Clouter <alex@digriz.org.uk> */ |
617 | .atag_offset = 0x100, | 617 | .atag_offset = 0x100, |
618 | .nr_irqs = ORION5X_NR_IRQS, | ||
618 | .init_machine = ts78xx_init, | 619 | .init_machine = ts78xx_init, |
619 | .map_io = ts78xx_map_io, | 620 | .map_io = ts78xx_map_io, |
620 | .init_early = orion5x_init_early, | 621 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/tsx09-common.c b/arch/arm/mach-orion5x/tsx09-common.c index d42e006597c7..89774985d380 100644 --- a/arch/arm/mach-orion5x/tsx09-common.c +++ b/arch/arm/mach-orion5x/tsx09-common.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/mv643xx_eth.h> | 15 | #include <linux/mv643xx_eth.h> |
16 | #include <linux/timex.h> | 16 | #include <linux/timex.h> |
17 | #include <linux/serial_reg.h> | 17 | #include <linux/serial_reg.h> |
18 | #include <mach/orion5x.h> | 18 | #include "orion5x.h" |
19 | #include "tsx09-common.h" | 19 | #include "tsx09-common.h" |
20 | #include "common.h" | 20 | #include "common.h" |
21 | 21 | ||
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 80a56ee245b3..4e1e5c8f6111 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/pci.h> | 21 | #include <asm/mach/pci.h> |
22 | #include <mach/orion5x.h> | 22 | #include "orion5x.h" |
23 | #include "common.h" | 23 | #include "common.h" |
24 | #include "mpp.h" | 24 | #include "mpp.h" |
25 | 25 | ||
@@ -174,6 +174,7 @@ subsys_initcall(wnr854t_pci_init); | |||
174 | MACHINE_START(WNR854T, "Netgear WNR854T") | 174 | MACHINE_START(WNR854T, "Netgear WNR854T") |
175 | /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ | 175 | /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ |
176 | .atag_offset = 0x100, | 176 | .atag_offset = 0x100, |
177 | .nr_irqs = ORION5X_NR_IRQS, | ||
177 | .init_machine = wnr854t_init, | 178 | .init_machine = wnr854t_init, |
178 | .map_io = orion5x_map_io, | 179 | .map_io = orion5x_map_io, |
179 | .init_early = orion5x_init_early, | 180 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 670e30dc0d1b..61e9027ef224 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
25 | #include <mach/orion5x.h> | 25 | #include "orion5x.h" |
26 | #include "common.h" | 26 | #include "common.h" |
27 | #include "mpp.h" | 27 | #include "mpp.h" |
28 | 28 | ||
@@ -262,6 +262,7 @@ subsys_initcall(wrt350n_v2_pci_init); | |||
262 | MACHINE_START(WRT350N_V2, "Linksys WRT350N v2") | 262 | MACHINE_START(WRT350N_V2, "Linksys WRT350N v2") |
263 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | 263 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ |
264 | .atag_offset = 0x100, | 264 | .atag_offset = 0x100, |
265 | .nr_irqs = ORION5X_NR_IRQS, | ||
265 | .init_machine = wrt350n_v2_init, | 266 | .init_machine = wrt350n_v2_init, |
266 | .map_io = orion5x_map_io, | 267 | .map_io = orion5x_map_io, |
267 | .init_early = orion5x_init_early, | 268 | .init_early = orion5x_init_early, |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 8861c367d061..78c8bf4043c0 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <net/dsa.h> | 21 | #include <net/dsa.h> |
22 | #include <linux/platform_data/dma-mv_xor.h> | 22 | #include <linux/platform_data/dma-mv_xor.h> |
23 | #include <linux/platform_data/usb-ehci-orion.h> | 23 | #include <linux/platform_data/usb-ehci-orion.h> |
24 | #include <mach/bridge-regs.h> | ||
25 | #include <plat/common.h> | 24 | #include <plat/common.h> |
26 | 25 | ||
27 | /* Create a clkdev entry for a given device/clk */ | 26 | /* Create a clkdev entry for a given device/clk */ |
@@ -589,26 +588,6 @@ void __init orion_spi_1_init(unsigned long mapbase) | |||
589 | } | 588 | } |
590 | 589 | ||
591 | /***************************************************************************** | 590 | /***************************************************************************** |
592 | * Watchdog | ||
593 | ****************************************************************************/ | ||
594 | static struct resource orion_wdt_resource[] = { | ||
595 | DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x04), | ||
596 | DEFINE_RES_MEM(RSTOUTn_MASK_PHYS, 0x04), | ||
597 | }; | ||
598 | |||
599 | static struct platform_device orion_wdt_device = { | ||
600 | .name = "orion_wdt", | ||
601 | .id = -1, | ||
602 | .num_resources = ARRAY_SIZE(orion_wdt_resource), | ||
603 | .resource = orion_wdt_resource, | ||
604 | }; | ||
605 | |||
606 | void __init orion_wdt_init(void) | ||
607 | { | ||
608 | platform_device_register(&orion_wdt_device); | ||
609 | } | ||
610 | |||
611 | /***************************************************************************** | ||
612 | * XOR | 591 | * XOR |
613 | ****************************************************************************/ | 592 | ****************************************************************************/ |
614 | static u64 orion_xor_dmamask = DMA_BIT_MASK(32); | 593 | static u64 orion_xor_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index d9a24f605a2b..9e6d76ad48a9 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -75,8 +75,6 @@ void __init orion_spi_init(unsigned long mapbase); | |||
75 | 75 | ||
76 | void __init orion_spi_1_init(unsigned long mapbase); | 76 | void __init orion_spi_1_init(unsigned long mapbase); |
77 | 77 | ||
78 | void __init orion_wdt_init(void); | ||
79 | |||
80 | void __init orion_xor0_init(unsigned long mapbase_low, | 78 | void __init orion_xor0_init(unsigned long mapbase_low, |
81 | unsigned long mapbase_high, | 79 | unsigned long mapbase_high, |
82 | unsigned long irq_0, | 80 | unsigned long irq_0, |
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/plat-orion/irq.c index 8c1fc06007c0..5b63b28b00ac 100644 --- a/arch/arm/plat-orion/irq.c +++ b/arch/arm/plat-orion/irq.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/exception.h> | 18 | #include <asm/exception.h> |
19 | #include <plat/irq.h> | 19 | #include <plat/irq.h> |
20 | #include <plat/orion-gpio.h> | 20 | #include <plat/orion-gpio.h> |
21 | #include <mach/bridge-regs.h> | ||
22 | 21 | ||
23 | void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) | 22 | void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) |
24 | { | 23 | { |
diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c index 7310bcfb299f..5b4ff9373c89 100644 --- a/arch/arm/plat-orion/mpp.c +++ b/arch/arm/plat-orion/mpp.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/mbus.h> | 13 | #include <linux/mbus.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
16 | #include <mach/hardware.h> | ||
17 | #include <plat/orion-gpio.h> | 16 | #include <plat/orion-gpio.h> |
18 | #include <plat/mpp.h> | 17 | #include <plat/mpp.h> |
19 | 18 | ||
diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile index f2ba2e932ae1..d52872680f86 100644 --- a/drivers/soc/Makefile +++ b/drivers/soc/Makefile | |||
@@ -3,6 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/ | 5 | obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/ |
6 | obj-$(CONFIG_ARCH_DOVE) += dove/ | ||
6 | obj-$(CONFIG_MACH_DOVE) += dove/ | 7 | obj-$(CONFIG_MACH_DOVE) += dove/ |
7 | obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ | 8 | obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ |
8 | obj-$(CONFIG_ARCH_QCOM) += qcom/ | 9 | obj-$(CONFIG_ARCH_QCOM) += qcom/ |
diff --git a/drivers/soc/dove/pmu.c b/drivers/soc/dove/pmu.c index abd087917f80..039374e9fdc0 100644 --- a/drivers/soc/dove/pmu.c +++ b/drivers/soc/dove/pmu.c | |||
@@ -305,6 +305,49 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq) | |||
305 | return 0; | 305 | return 0; |
306 | } | 306 | } |
307 | 307 | ||
308 | int __init dove_init_pmu_legacy(const struct dove_pmu_initdata *initdata) | ||
309 | { | ||
310 | const struct dove_pmu_domain_initdata *domain_initdata; | ||
311 | struct pmu_data *pmu; | ||
312 | int ret; | ||
313 | |||
314 | pmu = kzalloc(sizeof(*pmu), GFP_KERNEL); | ||
315 | if (!pmu) | ||
316 | return -ENOMEM; | ||
317 | |||
318 | spin_lock_init(&pmu->lock); | ||
319 | pmu->pmc_base = initdata->pmc_base; | ||
320 | pmu->pmu_base = initdata->pmu_base; | ||
321 | |||
322 | pmu_reset_init(pmu); | ||
323 | for (domain_initdata = initdata->domains; domain_initdata->name; | ||
324 | domain_initdata++) { | ||
325 | struct pmu_domain *domain; | ||
326 | |||
327 | domain = kzalloc(sizeof(*domain), GFP_KERNEL); | ||
328 | if (domain) { | ||
329 | domain->pmu = pmu; | ||
330 | domain->pwr_mask = domain_initdata->pwr_mask; | ||
331 | domain->rst_mask = domain_initdata->rst_mask; | ||
332 | domain->iso_mask = domain_initdata->iso_mask; | ||
333 | domain->base.name = domain_initdata->name; | ||
334 | |||
335 | __pmu_domain_register(domain, NULL); | ||
336 | } | ||
337 | } | ||
338 | |||
339 | ret = dove_init_pmu_irq(pmu, initdata->irq); | ||
340 | if (ret) | ||
341 | pr_err("dove_init_pmu_irq() failed: %d\n", ret); | ||
342 | |||
343 | if (pmu->irq_domain) | ||
344 | irq_domain_associate_many(pmu->irq_domain, | ||
345 | initdata->irq_domain_start, | ||
346 | 0, NR_PMU_IRQS); | ||
347 | |||
348 | return 0; | ||
349 | } | ||
350 | |||
308 | /* | 351 | /* |
309 | * pmu: power-manager@d0000 { | 352 | * pmu: power-manager@d0000 { |
310 | * compatible = "marvell,dove-pmu"; | 353 | * compatible = "marvell,dove-pmu"; |
diff --git a/include/linux/soc/dove/pmu.h b/include/linux/soc/dove/pmu.h index 9c99f84bcc0e..765386972b55 100644 --- a/include/linux/soc/dove/pmu.h +++ b/include/linux/soc/dove/pmu.h | |||
@@ -1,6 +1,25 @@ | |||
1 | #ifndef LINUX_SOC_DOVE_PMU_H | 1 | #ifndef LINUX_SOC_DOVE_PMU_H |
2 | #define LINUX_SOC_DOVE_PMU_H | 2 | #define LINUX_SOC_DOVE_PMU_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct dove_pmu_domain_initdata { | ||
7 | u32 pwr_mask; | ||
8 | u32 rst_mask; | ||
9 | u32 iso_mask; | ||
10 | const char *name; | ||
11 | }; | ||
12 | |||
13 | struct dove_pmu_initdata { | ||
14 | void __iomem *pmc_base; | ||
15 | void __iomem *pmu_base; | ||
16 | int irq; | ||
17 | int irq_domain_start; | ||
18 | const struct dove_pmu_domain_initdata *domains; | ||
19 | }; | ||
20 | |||
21 | int dove_init_pmu_legacy(const struct dove_pmu_initdata *); | ||
22 | |||
4 | int dove_init_pmu(void); | 23 | int dove_init_pmu(void); |
5 | 24 | ||
6 | #endif | 25 | #endif |