From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/8 v2] ARM i.MX Allow to compile together i.MX1/21/25/27
Date: Wed, 1 Jun 2011 15:22:06 +0200 [thread overview]
Message-ID: <20110601132206.GF23771@pengutronix.de> (raw)
In-Reply-To: <1305823648-2428-6-git-send-email-s.hauer@pengutronix.de>
This allows for all armv4 and armv5 based i.MX systems to be compiled
together in one kernel. To accomplish this we need ARM_PATCH_PHYS_VIRT
and AUTO_ZRELADDR which is selected in Kconfig.
As compiling with ARM_PATCH_PHYS_VIRT breaks XIP support and different
PHYS_OFFSETs break uImage support the old way to integrate only one
of these SoCs is kept in place.
Also, As the ARM_PATCH_PHYS_VIRT now has a user this removes the
dependency to EXPERIMENTAL.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-imx/Kconfig | 58 +++++++++++++++-----------
arch/arm/mach-imx/Makefile | 10 ++--
arch/arm/plat-mxc/Kconfig | 34 ++++++++++++---
arch/arm/plat-mxc/devices/platform-imx-dma.c | 2 +-
5 files changed, 66 insertions(+), 39 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 9adc278..89c3f16 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -193,7 +193,6 @@ config VECTORS_BASE
config ARM_PATCH_PHYS_VIRT
bool "Patch physical to virtual translations at runtime (EXPERIMENTAL)"
- depends on EXPERIMENTAL
depends on !XIP_KERNEL && MMU
depends on !ARCH_REALVIEW || !SPARSEMEM
help
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 59c97a3..501cf9b 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -11,8 +11,33 @@ config ARCH_MX31
config ARCH_MX35
bool
+config ARCH_MX1
+ bool
+
+config ARCH_MX2
+ bool
+
+config ARCH_MX25
+ bool
+
+config MACH_MX27
+ bool
+
+config HAVE_SOC_IMX1
+ bool
+
+config HAVE_SOC_IMX21
+ bool
+
+config HAVE_SOC_IMX25
+ bool
+
+config HAVE_SOC_IMX27
+ bool
+
config SOC_IMX1
bool
+ select ARCH_MX1
select CPU_ARM920T
select IMX_HAVE_DMA_V1
select IMX_HAVE_IOMUX_V1
@@ -20,6 +45,7 @@ config SOC_IMX1
config SOC_IMX21
bool
+ select ARCH_MX2
select CPU_ARM926T
select ARCH_MXC_AUDMUX_V1
select IMX_HAVE_DMA_V1
@@ -28,6 +54,7 @@ config SOC_IMX21
config SOC_IMX25
bool
+ select ARCH_MX25
select CPU_ARM926T
select ARCH_MXC_AUDMUX_V2
select ARCH_MXC_IOMUX_V3
@@ -35,6 +62,8 @@ config SOC_IMX25
config SOC_IMX27
bool
+ select MACH_MX27
+ select ARCH_MX2
select CPU_ARM926T
select ARCH_MXC_AUDMUX_V1
select IMX_HAVE_DMA_V1
@@ -59,7 +88,7 @@ config SOC_IMX35
select MXC_AVIC
-if ARCH_MX1
+if HAVE_SOC_IMX1
comment "MX1 platforms:"
config MACH_MXLADS
@@ -89,27 +118,7 @@ config MACH_APF9328
endif
-if ARCH_MX2
-
-choice
- prompt "CPUs:"
- default MACH_MX21
-
-config MACH_MX21
- bool "i.MX21 support"
- help
- This enables support for Freescale's MX2 based i.MX21 processor.
-
-config MACH_MX27
- bool "i.MX27 support"
- help
- This enables support for Freescale's MX2 based i.MX27 processor.
-
-endchoice
-
-endif
-
-if MACH_MX21
+if HAVE_SOC_IMX21
comment "MX21 platforms:"
@@ -126,7 +135,7 @@ config MACH_MX21ADS
endif
-if ARCH_MX25
+if HAVE_SOC_IMX25
comment "MX25 platforms:"
@@ -175,8 +184,7 @@ endchoice
endif
-if MACH_MX27
-
+if HAVE_SOC_IMX27
comment "MX27 platforms:"
config MACH_MX27ADS
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index e9eb36d..db6394a 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -1,12 +1,12 @@
obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
-obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o
-obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o
+obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o
+obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o
-obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
+obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
-obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o
-obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
+obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o
+obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
obj-$(CONFIG_SOC_IMX31) += mm-imx31.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX35) += mm-imx35.o cpu-imx35.o clock-imx35.o ehci-imx35.o
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index a5353fc..44ebde3 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -14,21 +14,41 @@ choice
prompt "Freescale CPU family:"
default ARCH_MX3
-config ARCH_MX1
- bool "MX1-based"
+config SOC_SELECT_IMX1
+ bool "i.MX1 based"
+ select HAVE_SOC_IMX1
help
This enables support for systems based on the Freescale i.MX1 family
-config ARCH_MX2
- bool "MX2-based"
+config SOC_SELECT_IMX21
+ bool "i.MX21 based"
+ select HAVE_SOC_IMX21
help
- This enables support for systems based on the Freescale i.MX2 family
+ This enables support for systems based on the Freescale i.MX21 family
-config ARCH_MX25
- bool "MX25-based"
+config SOC_SELECT_IMX25
+ bool "i.MX25 based"
+ select HAVE_SOC_IMX25
help
This enables support for systems based on the Freescale i.MX25 family
+config SOC_SELECT_IMX27
+ bool "i.MX27 based"
+ select HAVE_SOC_IMX27
+ help
+ This enables support for systems based on the Freescale i.MX27 family
+
+config ARCH_IMX_V4_V5
+ select ARM_PATCH_PHYS_VIRT
+ select AUTO_ZRELADDR
+ select HAVE_SOC_IMX1
+ select HAVE_SOC_IMX21
+ select HAVE_SOC_IMX25
+ select HAVE_SOC_IMX27
+ bool "i.MX1, i.MX21, i.MX25 and i.MX27 based"
+ help
+ This enables support for all armv4 and armv5 based i.MX systems
+
config ARCH_MX3
bool "MX3-based"
help
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c
index 3538b85..735b81d 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-dma.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-dma.c
@@ -76,7 +76,7 @@ static struct platform_device __init __maybe_unused *imx_add_imx_dma(void)
return imx_add_platform_device("imx-dma", -1, NULL, 0, NULL, 0);
}
-#ifdef CONFIG_ARCH_MX25
+#ifdef CONFIG_SOC_IMX25
static struct sdma_script_start_addrs addr_imx25_to1 = {
.ap_2_ap_addr = 729,
.uart_2_mcu_addr = 904,
--
1.7.5.3
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2011-06-01 13:22 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 16:47 i.MX consolidation patches Sascha Hauer
2011-05-19 16:47 ` [PATCH 1/8] ARM i.MX: fix last user of iomux.h and remove it Sascha Hauer
2011-05-19 16:47 ` [PATCH 2/8] ARM i.MX: define CLOCK_TICK_RATE to bogus value Sascha Hauer
2011-05-19 16:47 ` [PATCH 3/8] ARM i.MX: remove SoC defines around header includes Sascha Hauer
2011-05-19 16:47 ` [PATCH 4/8] ARM i.MX: dmav1: kill SoC ifdefs Sascha Hauer
2011-05-19 16:47 ` [PATCH 5/8] ARM i.MX Allow to compile together i.MX1/21/25/27 Sascha Hauer
2011-05-19 18:04 ` Uwe Kleine-König
2011-05-19 19:03 ` Sascha Hauer
2011-05-19 19:44 ` Nicolas Pitre
2011-05-19 19:50 ` Sascha Hauer
2011-06-01 13:22 ` Sascha Hauer [this message]
2011-06-01 13:25 ` [PATCH 5/8 v2] " Russell King - ARM Linux
2011-06-01 15:24 ` Arnd Bergmann
2011-06-01 16:47 ` Sascha Hauer
2011-06-01 17:59 ` Arnd Bergmann
2011-05-19 16:47 ` [PATCH 6/8] ARM i.MX mxc.h: use CONFIG_SOC_* instead of CONFIG_ARCH_* Sascha Hauer
2011-05-19 16:47 ` [PATCH 7/8] ARM i.MX debug macro: " Sascha Hauer
2011-05-19 16:54 ` Sergei Shtylyov
2011-05-19 19:07 ` Sascha Hauer
2011-05-19 16:47 ` [PATCH 8/8] ARM: mxc: update defconfigs Sascha Hauer
2011-05-30 7:57 ` i.MX consolidation patches Shawn Guo
2011-06-01 12:35 ` Sascha Hauer
2011-06-01 13:47 ` Russell King - ARM Linux
2011-06-01 14:18 ` Sascha Hauer
2011-06-01 14:24 ` Russell King - ARM Linux
2011-06-01 14:36 ` Sascha Hauer
2011-06-01 14:59 ` Uwe Kleine-König
2011-06-22 7:56 ` Sascha Hauer
2011-06-22 8:11 ` Russell King - ARM Linux
2011-06-22 8:32 ` Sascha Hauer
2011-06-22 9:03 ` Russell King - ARM Linux
2011-06-22 14:58 ` Sascha Hauer
2011-06-22 15:10 ` Arnd Bergmann
2011-06-22 15:14 ` Russell King - ARM Linux
2011-06-22 15:23 ` Arnd Bergmann
2011-06-22 15:22 ` Russell King - ARM Linux
2011-06-22 16:35 ` Sascha Hauer
2011-06-01 21:08 ` Wolfgang Denk
2011-06-01 23:04 ` Matt Sealey
2011-06-02 10:34 ` Sascha Hauer
2011-06-02 11:23 ` Russell King - ARM Linux
2011-06-02 15:46 ` Wolfgang Denk
2011-06-02 23:59 ` Matt Sealey
2011-06-03 12:02 ` Sascha Hauer
2011-06-03 12:17 ` Wolfgang Denk
2011-06-03 14:18 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110601132206.GF23771@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).