diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 00:08:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 00:08:03 -0400 |
commit | 994c0e992522c123298b4a91b72f5e67ba2d1123 (patch) | |
tree | 411952f844b8e1d5ef2854e44df793529078d3eb /arch/arm/plat-mxc | |
parent | 367069f16e32e188d4687fe2c3e30f2ca583836f (diff) | |
parent | abc3f126ac736280c68db6472eb0040ddf6e1b1f (diff) |
Merge branch 'next/soc' of git://git.linaro.org/people/arnd/arm-soc
* 'next/soc' of git://git.linaro.org/people/arnd/arm-soc: (21 commits)
MAINTAINERS: add ARM/FREESCALE IMX6 entry
arm/imx: merge i.MX3 and i.MX6
arm/imx6q: add suspend/resume support
arm/imx6q: add device tree machine support
arm/imx6q: add smp and cpu hotplug support
arm/imx6q: add core drivers clock, gpc, mmdc and src
arm/imx: add gic_handle_irq function
arm/imx6q: add core definitions and low-level debug uart
arm/imx6q: add device tree source
ARM: highbank: add suspend support
ARM: highbank: Add cpu hotplug support
ARM: highbank: add SMP support
MAINTAINERS: add Calxeda Highbank ARM platform
ARM: add Highbank core platform support
ARM: highbank: add devicetree source
ARM: l2x0: add empty l2x0_of_init
picoxcell: add a definition of VMALLOC_END
picoxcell: remove custom ioremap implementation
picoxcell: add the DTS for the PC7302 board
picoxcell: add the DTS for pc3x2 and pc3x3 devices
...
Fix up trivial conflicts in arch/arm/Kconfig, and some more header file
conflicts in arch/arm/mach-omap2/board-generic.c (as per an ealier merge
by Arnd).
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/Kconfig | 11 | ||||
-rw-r--r-- | arch/arm/plat-mxc/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/plat-mxc/gic.c | 48 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/common.h | 29 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/debug-macro.S | 2 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/entry-macro.S | 6 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/hardware.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/irqs.h | 10 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx6q.h | 33 |
9 files changed, 140 insertions, 7 deletions
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index 4bdc975581eb..a08a95107a63 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -6,7 +6,7 @@ menu "Freescale MXC Implementations" | |||
6 | 6 | ||
7 | choice | 7 | choice |
8 | prompt "Freescale CPU family:" | 8 | prompt "Freescale CPU family:" |
9 | default ARCH_MX3 | 9 | default ARCH_IMX_V6_V7 |
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" |
@@ -16,10 +16,13 @@ config ARCH_IMX_V4_V5 | |||
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 |
17 | and ARMv5 SoCs | 17 | and ARMv5 SoCs |
18 | 18 | ||
19 | config ARCH_MX3 | 19 | config ARCH_IMX_V6_V7 |
20 | bool "MX3-based" | 20 | bool "i.MX3, i.MX6" |
21 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
22 | select ARM_PATCH_PHYS_VIRT | ||
21 | help | 23 | help |
22 | This enables support for systems based on the Freescale i.MX3 family | 24 | This enables support for systems based on the Freescale i.MX3 and i.MX6 |
25 | family. | ||
23 | 26 | ||
24 | config ARCH_MX5 | 27 | config ARCH_MX5 |
25 | bool "i.MX50, i.MX51, i.MX53" | 28 | bool "i.MX50, i.MX51, i.MX53" |
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index d53c35fe2ea7..b9f0f5f499a4 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -5,7 +5,7 @@ | |||
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 | # MX51 uses the TZIC interrupt controller, older platforms use AVIC | 8 | obj-$(CONFIG_ARM_GIC) += gic.o |
9 | obj-$(CONFIG_MXC_TZIC) += tzic.o | 9 | obj-$(CONFIG_MXC_TZIC) += tzic.o |
10 | obj-$(CONFIG_MXC_AVIC) += avic.o | 10 | obj-$(CONFIG_MXC_AVIC) += avic.o |
11 | 11 | ||
diff --git a/arch/arm/plat-mxc/gic.c b/arch/arm/plat-mxc/gic.c new file mode 100644 index 000000000000..b3b8eed263b8 --- /dev/null +++ b/arch/arm/plat-mxc/gic.c | |||
@@ -0,0 +1,48 @@ | |||
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 c850af3650ea..83b745a5e1b7 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | struct platform_device; | 14 | struct platform_device; |
15 | struct clk; | 15 | struct clk; |
16 | enum mxc_cpu_pwr_mode; | ||
16 | 17 | ||
17 | extern void mx1_map_io(void); | 18 | extern void mx1_map_io(void); |
18 | extern void mx21_map_io(void); | 19 | extern void mx21_map_io(void); |
@@ -66,6 +67,7 @@ extern int mx53_clocks_init(unsigned long ckil, unsigned long osc, | |||
66 | unsigned long ckih1, unsigned long ckih2); | 67 | unsigned long ckih1, unsigned long ckih2); |
67 | extern int mx51_clocks_init_dt(void); | 68 | extern int mx51_clocks_init_dt(void); |
68 | extern int mx53_clocks_init_dt(void); | 69 | extern int mx53_clocks_init_dt(void); |
70 | extern int mx6q_clocks_init(void); | ||
69 | extern struct platform_device *mxc_register_gpio(char *name, int id, | 71 | extern struct platform_device *mxc_register_gpio(char *name, int id, |
70 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); | 72 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); |
71 | extern void mxc_set_cpu_type(unsigned int type); | 73 | extern void mxc_set_cpu_type(unsigned int type); |
@@ -88,6 +90,7 @@ extern void imx_print_silicon_rev(const char *cpu, int srev); | |||
88 | 90 | ||
89 | void avic_handle_irq(struct pt_regs *); | 91 | void avic_handle_irq(struct pt_regs *); |
90 | void tzic_handle_irq(struct pt_regs *); | 92 | void tzic_handle_irq(struct pt_regs *); |
93 | void gic_handle_irq(struct pt_regs *); | ||
91 | 94 | ||
92 | #define imx1_handle_irq avic_handle_irq | 95 | #define imx1_handle_irq avic_handle_irq |
93 | #define imx21_handle_irq avic_handle_irq | 96 | #define imx21_handle_irq avic_handle_irq |
@@ -98,10 +101,36 @@ void tzic_handle_irq(struct pt_regs *); | |||
98 | #define imx50_handle_irq tzic_handle_irq | 101 | #define imx50_handle_irq tzic_handle_irq |
99 | #define imx51_handle_irq tzic_handle_irq | 102 | #define imx51_handle_irq tzic_handle_irq |
100 | #define imx53_handle_irq tzic_handle_irq | 103 | #define imx53_handle_irq tzic_handle_irq |
104 | #define imx6q_handle_irq gic_handle_irq | ||
101 | 105 | ||
106 | extern void imx_enable_cpu(int cpu, bool enable); | ||
107 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); | ||
108 | #ifdef CONFIG_DEBUG_LL | ||
109 | extern void imx_lluart_map_io(void); | ||
110 | #else | ||
111 | static inline void imx_lluart_map_io(void) {} | ||
112 | #endif | ||
113 | extern void v7_cpu_resume(void); | ||
114 | extern u32 *pl310_get_save_ptr(void); | ||
115 | #ifdef CONFIG_SMP | ||
116 | extern void v7_secondary_startup(void); | ||
117 | extern void imx_scu_map_io(void); | ||
118 | extern void imx_smp_prepare(void); | ||
119 | #else | ||
120 | static inline void imx_scu_map_io(void) {} | ||
121 | static inline void imx_smp_prepare(void) {} | ||
122 | #endif | ||
123 | extern void imx_enable_cpu(int cpu, bool enable); | ||
124 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); | ||
125 | extern void imx_src_init(void); | ||
126 | extern void imx_gpc_init(void); | ||
127 | extern void imx_gpc_pre_suspend(void); | ||
128 | extern void imx_gpc_post_resume(void); | ||
102 | extern void imx51_babbage_common_init(void); | 129 | extern void imx51_babbage_common_init(void); |
103 | extern void imx53_ard_common_init(void); | 130 | extern void imx53_ard_common_init(void); |
104 | extern void imx53_evk_common_init(void); | 131 | extern void imx53_evk_common_init(void); |
105 | extern void imx53_qsb_common_init(void); | 132 | extern void imx53_qsb_common_init(void); |
106 | extern void imx53_smd_common_init(void); | 133 | extern void imx53_smd_common_init(void); |
134 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | ||
135 | extern void imx6q_pm_init(void); | ||
107 | #endif | 136 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 72986013c1fb..6e192c4a391a 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -24,6 +24,8 @@ | |||
24 | #define UART_PADDR MX51_UART1_BASE_ADDR | 24 | #define UART_PADDR MX51_UART1_BASE_ADDR |
25 | #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) | 25 | #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) |
26 | #define UART_PADDR MX53_UART1_BASE_ADDR | 26 | #define UART_PADDR MX53_UART1_BASE_ADDR |
27 | #elif defined (CONFIG_DEBUG_IMX6Q_UART) | ||
28 | #define UART_PADDR MX6Q_UART4_BASE_ADDR | ||
27 | #endif | 29 | #endif |
28 | 30 | ||
29 | #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) | 31 | #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index 842fbcb0d6cc..9fe0dfcf4e7e 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -22,3 +22,9 @@ | |||
22 | 22 | ||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
24 | .endm | 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/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index eba3118adfbb..a599f01f8b92 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h | |||
@@ -91,6 +91,11 @@ | |||
91 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | 91 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 |
92 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 | 92 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 |
93 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 | 93 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 |
94 | * mx6q: | ||
95 | * SCU 0x00a00000+0x001000 -> 0xf4000000+0x001000 | ||
96 | * CCM 0x020c4000+0x004000 -> 0xf42c4000+0x004000 | ||
97 | * ANATOP 0x020c8000+0x001000 -> 0xf42c8000+0x001000 | ||
98 | * UART4 0x021f0000+0x004000 -> 0xf42f0000+0x004000 | ||
94 | */ | 99 | */ |
95 | #define IMX_IO_P2V(x) ( \ | 100 | #define IMX_IO_P2V(x) ( \ |
96 | 0xf4000000 + \ | 101 | 0xf4000000 + \ |
@@ -102,6 +107,7 @@ | |||
102 | 107 | ||
103 | #include <mach/mxc.h> | 108 | #include <mach/mxc.h> |
104 | 109 | ||
110 | #include <mach/mx6q.h> | ||
105 | #include <mach/mx50.h> | 111 | #include <mach/mx50.h> |
106 | #include <mach/mx51.h> | 112 | #include <mach/mx51.h> |
107 | #include <mach/mx53.h> | 113 | #include <mach/mx53.h> |
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h index 00e812bbd81d..fd9efb044656 100644 --- a/arch/arm/plat-mxc/include/mach/irqs.h +++ b/arch/arm/plat-mxc/include/mach/irqs.h | |||
@@ -14,9 +14,15 @@ | |||
14 | #include <asm-generic/gpio.h> | 14 | #include <asm-generic/gpio.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * SoCs with TZIC interrupt controller have 128 IRQs, those with AVIC have 64 | 17 | * SoCs with GIC interrupt controller have 160 IRQs, those with TZIC |
18 | * have 128 IRQs, and those with AVIC have 64. | ||
19 | * | ||
20 | * To support single image, the biggest number should be defined on | ||
21 | * top of the list. | ||
18 | */ | 22 | */ |
19 | #ifdef CONFIG_MXC_TZIC | 23 | #if defined CONFIG_ARM_GIC |
24 | #define MXC_INTERNAL_IRQS 160 | ||
25 | #elif defined CONFIG_MXC_TZIC | ||
20 | #define MXC_INTERNAL_IRQS 128 | 26 | #define MXC_INTERNAL_IRQS 128 |
21 | #else | 27 | #else |
22 | #define MXC_INTERNAL_IRQS 64 | 28 | #define MXC_INTERNAL_IRQS 64 |
diff --git a/arch/arm/plat-mxc/include/mach/mx6q.h b/arch/arm/plat-mxc/include/mach/mx6q.h new file mode 100644 index 000000000000..254a561a2799 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx6q.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
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 | #ifndef __MACH_MX6Q_H__ | ||
14 | #define __MACH_MX6Q_H__ | ||
15 | |||
16 | #define MX6Q_IO_P2V(x) IMX_IO_P2V(x) | ||
17 | #define MX6Q_IO_ADDRESS(x) IOMEM(MX6Q_IO_P2V(x)) | ||
18 | |||
19 | /* | ||
20 | * The following are the blocks that need to be statically mapped. | ||
21 | * For other blocks, the base address really should be retrieved from | ||
22 | * device tree. | ||
23 | */ | ||
24 | #define MX6Q_SCU_BASE_ADDR 0x00a00000 | ||
25 | #define MX6Q_SCU_SIZE 0x1000 | ||
26 | #define MX6Q_CCM_BASE_ADDR 0x020c4000 | ||
27 | #define MX6Q_CCM_SIZE 0x4000 | ||
28 | #define MX6Q_ANATOP_BASE_ADDR 0x020c8000 | ||
29 | #define MX6Q_ANATOP_SIZE 0x1000 | ||
30 | #define MX6Q_UART4_BASE_ADDR 0x021f0000 | ||
31 | #define MX6Q_UART4_SIZE 0x4000 | ||
32 | |||
33 | #endif /* __MACH_MX6Q_H__ */ | ||