Skip to content

Commit ae4fa7f

Browse files
committed
ARM i.MX: allow to compile together ARMv4 and ARMv5 based SoCs
For this we need CONFIG_AUTO_ZRELADDR and CONFIG_ARM_PATCH_PHYS_VIRT. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent fcb8ce5 commit ae4fa7f

4 files changed

Lines changed: 25 additions & 58 deletions

File tree

‎arch/arm/Makefile‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,7 @@ machine-$(CONFIG_ARCH_LPC32XX) := lpc32xx
154154
machine-$(CONFIG_ARCH_MMP) := mmp
155155
machine-$(CONFIG_ARCH_MSM) := msm
156156
machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
157-
machine-$(CONFIG_ARCH_MX1) := imx
158-
machine-$(CONFIG_ARCH_MX2) := imx
159-
machine-$(CONFIG_ARCH_MX25) := imx
157+
machine-$(CONFIG_ARCH_IMX_V4_V5) := imx
160158
machine-$(CONFIG_ARCH_MX3) := imx
161159
machine-$(CONFIG_ARCH_MX5) := mx5
162160
machine-$(CONFIG_ARCH_MXS) := mxs

‎arch/arm/mach-imx/Kconfig‎

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ config IMX_HAVE_DMA_V1
55
# Some usages assume that having one of them implies not having (e.g.) ARCH_MX2.
66
# To easily distinguish good and reviewed from unreviewed usages new (and IMHO
77
# more sensible) names are used: SOC_IMX31 and SOC_IMX35
8+
config ARCH_MX1
9+
bool
10+
11+
config MACH_MX21
12+
bool
13+
14+
config ARCH_MX25
15+
bool
16+
17+
config MACH_MX27
18+
bool
19+
820
config ARCH_MX31
921
bool
1022

@@ -13,13 +25,15 @@ config ARCH_MX35
1325

1426
config SOC_IMX1
1527
bool
28+
select ARCH_MX1
1629
select CPU_ARM920T
1730
select IMX_HAVE_DMA_V1
1831
select IMX_HAVE_IOMUX_V1
1932
select MXC_AVIC
2033

2134
config SOC_IMX21
2235
bool
36+
select MACH_MX21
2337
select CPU_ARM926T
2438
select ARCH_MXC_AUDMUX_V1
2539
select IMX_HAVE_DMA_V1
@@ -28,13 +42,15 @@ config SOC_IMX21
2842

2943
config SOC_IMX25
3044
bool
45+
select ARCH_MX25
3146
select CPU_ARM926T
3247
select ARCH_MXC_AUDMUX_V2
3348
select ARCH_MXC_IOMUX_V3
3449
select MXC_AVIC
3550

3651
config SOC_IMX27
3752
bool
53+
select MACH_MX27
3854
select CPU_ARM926T
3955
select ARCH_MXC_AUDMUX_V1
4056
select IMX_HAVE_DMA_V1
@@ -59,7 +75,7 @@ config SOC_IMX35
5975
select MXC_AVIC
6076

6177

62-
if ARCH_MX1
78+
if ARCH_IMX_V4_V5
6379

6480
comment "MX1 platforms:"
6581
config MACH_MXLADS
@@ -87,30 +103,6 @@ config MACH_APF9328
87103
help
88104
Say Yes here if you are using the Armadeus APF9328 development board
89105

90-
endif
91-
92-
if ARCH_MX2
93-
94-
choice
95-
prompt "CPUs:"
96-
default MACH_MX21
97-
98-
config MACH_MX21
99-
bool "i.MX21 support"
100-
help
101-
This enables support for Freescale's MX2 based i.MX21 processor.
102-
103-
config MACH_MX27
104-
bool "i.MX27 support"
105-
help
106-
This enables support for Freescale's MX2 based i.MX27 processor.
107-
108-
endchoice
109-
110-
endif
111-
112-
if MACH_MX21
113-
114106
comment "MX21 platforms:"
115107

116108
config MACH_MX21ADS
@@ -124,10 +116,6 @@ config MACH_MX21ADS
124116
Include support for MX21ADS platform. This includes specific
125117
configurations for the board and its peripherals.
126118

127-
endif
128-
129-
if ARCH_MX25
130-
131119
comment "MX25 platforms:"
132120

133121
config MACH_MX25_3DS
@@ -174,10 +162,6 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD
174162

175163
endchoice
176164

177-
endif
178-
179-
if MACH_MX27
180-
181165
comment "MX27 platforms:"
182166

183167
config MACH_MX27ADS

‎arch/arm/plat-mxc/Kconfig‎

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,13 @@ choice
1414
prompt "Freescale CPU family:"
1515
default ARCH_MX3
1616

17-
config ARCH_MX1
18-
bool "MX1-based"
17+
config ARCH_IMX_V4_V5
18+
bool "i.MX1, i.MX21, i.MX25, i.MX27"
19+
select AUTO_ZRELADDR
20+
select ARM_PATCH_PHYS_VIRT
1921
help
20-
This enables support for systems based on the Freescale i.MX1 family
21-
22-
config ARCH_MX2
23-
bool "MX2-based"
24-
help
25-
This enables support for systems based on the Freescale i.MX2 family
26-
27-
config ARCH_MX25
28-
bool "MX25-based"
29-
help
30-
This enables support for systems based on the Freescale i.MX25 family
22+
This enables support for systems based on the Freescale i.MX ARMv4
23+
and ARMv5 SoCs
3124

3225
config ARCH_MX3
3326
bool "MX3-based"

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@
2121
#define MX53_PHYS_OFFSET UL(0x70000000)
2222

2323
#if !defined(CONFIG_RUNTIME_PHYS_OFFSET)
24-
# if defined CONFIG_ARCH_MX1
25-
# define PLAT_PHYS_OFFSET MX1_PHYS_OFFSET
26-
# elif defined CONFIG_MACH_MX21
27-
# define PLAT_PHYS_OFFSET MX21_PHYS_OFFSET
28-
# elif defined CONFIG_ARCH_MX25
29-
# define PLAT_PHYS_OFFSET MX25_PHYS_OFFSET
30-
# elif defined CONFIG_MACH_MX27
31-
# define PLAT_PHYS_OFFSET MX27_PHYS_OFFSET
32-
# elif defined CONFIG_ARCH_MX3
24+
# if defined CONFIG_ARCH_MX3
3325
# define PLAT_PHYS_OFFSET MX3x_PHYS_OFFSET
3426
# elif defined CONFIG_ARCH_MX50
3527
# define PLAT_PHYS_OFFSET MX50_PHYS_OFFSET

0 commit comments

Comments
 (0)