diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-10-02 03:09:11 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-31 09:26:21 -0400 |
commit | bac89d754ba333453576fd38eb6073d7f89818fe (patch) | |
tree | b53d79778a231d9cb62cacd97910e03ac93da921 | |
parent | 7d740f87fd0741c00231a4b13074660d526d5630 (diff) |
arm/imx6q: add core definitions and low-level debug uart
It adds the core definitions and low-level debug uart support
for imx6q.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/Kconfig.debug | 7 | ||||
-rw-r--r-- | arch/arm/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 15 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile.boot | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/lluart.c | 32 | ||||
-rw-r--r-- | arch/arm/plat-mxc/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/debug-macro.S | 2 | ||||
-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 |
12 files changed, 118 insertions, 3 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a94a09ba356b..18400a7b6ca1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1402,7 +1402,7 @@ config SMP | |||
1402 | depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \ | 1402 | depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \ |
1403 | MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ | 1403 | MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ |
1404 | ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ | 1404 | ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ |
1405 | ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE | 1405 | ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || SOC_IMX6Q |
1406 | select USE_GENERIC_SMP_HELPERS | 1406 | select USE_GENERIC_SMP_HELPERS |
1407 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP | 1407 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP |
1408 | help | 1408 | help |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 13c0631e6e95..a1cb48497312 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -184,6 +184,13 @@ choice | |||
184 | Say Y here if you want kernel low-level debugging support | 184 | Say Y here if you want kernel low-level debugging support |
185 | on i.MX50 or i.MX53. | 185 | on i.MX50 or i.MX53. |
186 | 186 | ||
187 | config DEBUG_IMX6Q_UART | ||
188 | bool "i.MX6Q Debug UART" | ||
189 | depends on SOC_IMX6Q | ||
190 | help | ||
191 | Say Y here if you want kernel low-level debugging support | ||
192 | on i.MX6Q. | ||
193 | |||
187 | config DEBUG_S3C_UART0 | 194 | config DEBUG_S3C_UART0 |
188 | depends on PLAT_SAMSUNG | 195 | depends on PLAT_SAMSUNG |
189 | bool "Use S3C UART 0 for low-level debug" | 196 | bool "Use S3C UART 0 for low-level debug" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 8904caa736cb..193439eb326f 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -160,6 +160,7 @@ machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 | |||
160 | machine-$(CONFIG_ARCH_IMX_V4_V5) := imx | 160 | machine-$(CONFIG_ARCH_IMX_V4_V5) := imx |
161 | machine-$(CONFIG_ARCH_MX3) := imx | 161 | machine-$(CONFIG_ARCH_MX3) := imx |
162 | machine-$(CONFIG_ARCH_MX5) := mx5 | 162 | machine-$(CONFIG_ARCH_MX5) := mx5 |
163 | machine-$(CONFIG_ARCH_MX6) := imx | ||
163 | machine-$(CONFIG_ARCH_MXS) := mxs | 164 | machine-$(CONFIG_ARCH_MXS) := mxs |
164 | machine-$(CONFIG_ARCH_NETX) := netx | 165 | machine-$(CONFIG_ARCH_NETX) := netx |
165 | machine-$(CONFIG_ARCH_NOMADIK) := nomadik | 166 | machine-$(CONFIG_ARCH_NOMADIK) := nomadik |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index b4e1bf8757c7..cc4b6e46f425 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -592,3 +592,18 @@ config MACH_VPR200 | |||
592 | configurations for the board and its peripherals. | 592 | configurations for the board and its peripherals. |
593 | 593 | ||
594 | endif | 594 | endif |
595 | |||
596 | if ARCH_MX6 | ||
597 | comment "i.MX6 family:" | ||
598 | |||
599 | config SOC_IMX6Q | ||
600 | bool "i.MX6 Quad support" | ||
601 | select ARM_GIC | ||
602 | select CACHE_L2X0 | ||
603 | select CPU_V7 | ||
604 | select USE_OF | ||
605 | |||
606 | help | ||
607 | This enables support for Freescale i.MX6 Quad processor. | ||
608 | |||
609 | endif | ||
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 116d4b2d2817..b9ed19865a93 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -60,3 +60,5 @@ obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o | |||
60 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o | 60 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o |
61 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o | 61 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o |
62 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o | 62 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o |
63 | |||
64 | obj-$(CONFIG_DEBUG_LL) += lluart.o | ||
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index ebee18b3884c..136cfc6f2f85 100644 --- a/arch/arm/mach-imx/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot | |||
@@ -17,3 +17,7 @@ initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 | |||
17 | zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000 | 17 | zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000 |
18 | params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 | 18 | params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 |
19 | initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 | 19 | initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 |
20 | |||
21 | zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000 | ||
22 | params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100 | ||
23 | initrd_phys-$(CONFIG_SOC_IMX6Q) := 0x10800000 | ||
diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c new file mode 100644 index 000000000000..d4ab6f29a766 --- /dev/null +++ b/arch/arm/mach-imx/lluart.c | |||
@@ -0,0 +1,32 @@ | |||
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/init.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/sizes.h> | ||
16 | #include <asm/mach/map.h> | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | static struct map_desc imx_lluart_desc = { | ||
20 | #ifdef CONFIG_DEBUG_IMX6Q_UART | ||
21 | .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR), | ||
22 | .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR), | ||
23 | .length = MX6Q_UART4_SIZE, | ||
24 | .type = MT_DEVICE, | ||
25 | #endif | ||
26 | }; | ||
27 | |||
28 | void __init imx_lluart_map_io(void) | ||
29 | { | ||
30 | if (imx_lluart_desc.virtual) | ||
31 | iotable_init(&imx_lluart_desc, 1); | ||
32 | } | ||
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index 502e45f03178..058d1c5f0043 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -29,6 +29,13 @@ config ARCH_MX5 | |||
29 | This enables support for machines using Freescale's i.MX50 and i.MX51 | 29 | This enables support for machines using Freescale's i.MX50 and i.MX51 |
30 | processors. | 30 | processors. |
31 | 31 | ||
32 | config ARCH_MX6 | ||
33 | bool "i.MX6" | ||
34 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
35 | select ARM_PATCH_PHYS_VIRT | ||
36 | help | ||
37 | This enables support for systems based on the Freescale i.MX6 family | ||
38 | |||
32 | endchoice | 39 | endchoice |
33 | 40 | ||
34 | source "arch/arm/mach-imx/Kconfig" | 41 | source "arch/arm/mach-imx/Kconfig" |
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/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__ */ | ||