Skip to content

Commit bac89d7

Browse files
Shawn Guoarndb
authored andcommitted
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>
1 parent 7d740f8 commit bac89d7

12 files changed

Lines changed: 118 additions & 3 deletions

File tree

‎arch/arm/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@ config SMP
14021402
depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
14031403
MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
14041404
ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
1405-
ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE
1405+
ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || SOC_IMX6Q
14061406
select USE_GENERIC_SMP_HELPERS
14071407
select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
14081408
help

‎arch/arm/Kconfig.debug‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ choice
184184
Say Y here if you want kernel low-level debugging support
185185
on i.MX50 or i.MX53.
186186

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+
187194
config DEBUG_S3C_UART0
188195
depends on PLAT_SAMSUNG
189196
bool "Use S3C UART 0 for low-level debug"

‎arch/arm/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
160160
machine-$(CONFIG_ARCH_IMX_V4_V5) := imx
161161
machine-$(CONFIG_ARCH_MX3) := imx
162162
machine-$(CONFIG_ARCH_MX5) := mx5
163+
machine-$(CONFIG_ARCH_MX6) := imx
163164
machine-$(CONFIG_ARCH_MXS) := mxs
164165
machine-$(CONFIG_ARCH_NETX) := netx
165166
machine-$(CONFIG_ARCH_NOMADIK) := nomadik

‎arch/arm/mach-imx/Kconfig‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,3 +592,18 @@ config MACH_VPR200
592592
configurations for the board and its peripherals.
593593

594594
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

‎arch/arm/mach-imx/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o
6060
obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o
6161
obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o
6262
obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
63+
64+
obj-$(CONFIG_DEBUG_LL) += lluart.o

‎arch/arm/mach-imx/Makefile.boot‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000
1717
zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000
1818
params_phys-$(CONFIG_ARCH_MX3) := 0x80000100
1919
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

‎arch/arm/mach-imx/lluart.c‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
}

‎arch/arm/plat-mxc/Kconfig‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ config ARCH_MX5
2929
This enables support for machines using Freescale's i.MX50 and i.MX51
3030
processors.
3131

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+
3239
endchoice
3340

3441
source "arch/arm/mach-imx/Kconfig"

‎arch/arm/plat-mxc/include/mach/debug-macro.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#define UART_PADDR MX51_UART1_BASE_ADDR
2525
#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
2626
#define UART_PADDR MX53_UART1_BASE_ADDR
27+
#elif defined (CONFIG_DEBUG_IMX6Q_UART)
28+
#define UART_PADDR MX6Q_UART4_BASE_ADDR
2729
#endif
2830

2931
#define UART_VADDR IMX_IO_ADDRESS(UART_PADDR)

‎arch/arm/plat-mxc/include/mach/hardware.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@
9191
* SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000
9292
* AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000
9393
* 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
9499
*/
95100
#define IMX_IO_P2V(x) ( \
96101
0xf4000000 + \
@@ -102,6 +107,7 @@
102107

103108
#include <mach/mxc.h>
104109

110+
#include <mach/mx6q.h>
105111
#include <mach/mx50.h>
106112
#include <mach/mx51.h>
107113
#include <mach/mx53.h>

0 commit comments

Comments
 (0)