From patchwork Thu May 19 16:47:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 798082 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4JGoaIA030731 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2011 16:50:57 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QN6Ox-0002do-5R; Thu, 19 May 2011 16:48:43 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QN6Ov-0006cZ-Dd; Thu, 19 May 2011 16:48:41 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QN6Nq-0006XW-8A for linux-arm-kernel@lists.infradead.org; Thu, 19 May 2011 16:47:38 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1QN6Nm-0002Bn-Rw; Thu, 19 May 2011 18:47:30 +0200 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.75) (envelope-from ) id 1QN6Nm-0000w7-Os; Thu, 19 May 2011 18:47:30 +0200 From: Sascha Hauer To: alkml Subject: [PATCH 5/8] ARM i.MX Allow to compile together i.MX1/21/25/27 Date: Thu, 19 May 2011 18:47:25 +0200 Message-Id: <1305823648-2428-6-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1305823648-2428-1-git-send-email-s.hauer@pengutronix.de> References: <1305823648-2428-1-git-send-email-s.hauer@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110519_124734_939908_D1E18E1E X-CRM114-Status: GOOD ( 22.17 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Sascha Hauer , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 19 May 2011 16:50:57 +0000 (UTC) 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. This breaks execute in place support. It would be possible to keep XIP support, but the needed Kconfig magix is just too ugly. Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/Kconfig | 51 +++++++++----------------- arch/arm/mach-imx/Makefile | 10 +++--- arch/arm/mach-imx/Makefile.boot | 16 -------- arch/arm/plat-mxc/Kconfig | 18 +++------- arch/arm/plat-mxc/devices/platform-imx-dma.c | 2 +- 5 files changed, 29 insertions(+), 68 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 59c97a3..90550bc 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -11,8 +11,21 @@ config ARCH_MX31 config ARCH_MX35 bool +config ARCH_MX1 + bool + +config ARCH_MX2 + bool + +config ARCH_MX25 + bool + +config MACH_MX27 + bool + config SOC_IMX1 bool + select ARCH_MX1 select CPU_ARM920T select IMX_HAVE_DMA_V1 select IMX_HAVE_IOMUX_V1 @@ -20,6 +33,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 +42,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 +50,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 +76,7 @@ config SOC_IMX35 select MXC_AVIC -if ARCH_MX1 +if ARCH_IMX_V4_V5 comment "MX1 platforms:" config MACH_MXLADS @@ -87,30 +104,6 @@ config MACH_APF9328 help Say Yes here if you are using the Armadeus APF9328 development board -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 - comment "MX21 platforms:" config MACH_MX21ADS @@ -124,10 +117,6 @@ config MACH_MX21ADS Include support for MX21ADS platform. This includes specific configurations for the board and its peripherals. -endif - -if ARCH_MX25 - comment "MX25 platforms:" config MACH_MX25_3DS @@ -173,10 +162,6 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD endchoice -endif - -if MACH_MX27 - 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/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index ebee18b..cdfe20f 100644 --- a/arch/arm/mach-imx/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot @@ -1,19 +1,3 @@ -zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 -params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 -initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 - -zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 -params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 -initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 - -zreladdr-$(CONFIG_ARCH_MX25) := 0x80008000 -params_phys-$(CONFIG_ARCH_MX25) := 0x80000100 -initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 - -zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 -params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 -initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 - zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000 params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index a5353fc..0202ca0 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig @@ -14,20 +14,12 @@ choice prompt "Freescale CPU family:" default ARCH_MX3 -config ARCH_MX1 - bool "MX1-based" +config ARCH_IMX_V4_V5 + select ARM_PATCH_PHYS_VIRT + select AUTO_ZRELADDR + bool "i.MX1, i.MX21, i.MX25, i.MX27" help - This enables support for systems based on the Freescale i.MX1 family - -config ARCH_MX2 - bool "MX2-based" - help - This enables support for systems based on the Freescale i.MX2 family - -config ARCH_MX25 - bool "MX25-based" - help - This enables support for systems based on the Freescale i.MX25 family + This enables support for armv4 and armv5 based i.MX systems config ARCH_MX3 bool "MX3-based" 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,