* [PATCH 0/6] Support single zImage for imx3 and imx6
@ 2011-09-28 9:16 Shawn Guo
2011-09-28 9:16 ` [PATCH 1/6] arm/imx: merge mm-imx35.c into mm-imx31.c Shawn Guo
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Shawn Guo @ 2011-09-28 9:16 UTC (permalink / raw)
To: linux-arm-kernel
This series supports the single zImage build for imx3 and imx6. It's
based on linux-next with imx6 series applied, and tested on imx35 and
imx6q.
Sascha Hauer (1):
arm/imx: merge i.MX3 and i.MX6
Shawn Guo (5):
arm/imx: merge mm-imx35.c into mm-imx31.c
arm/imx: rename mm-imx31.c to mm-imx3.c
arm/imx: change mxc_init_l2x0() to an imx31/35 specific call
arm/imx: remove cpu_is_xxx() from arch_idle()
arm/imx: remove cpu_is_xxx() check from __imx_ioremap()
arch/arm/Makefile | 3 +-
arch/arm/mach-imx/Kconfig | 7 +-
arch/arm/mach-imx/Makefile | 5 +-
arch/arm/mach-imx/Makefile.boot | 10 +-
arch/arm/mach-imx/cache-l2x0.c | 56 -------
arch/arm/mach-imx/mm-imx3.c | 256 +++++++++++++++++++++++++++++++
arch/arm/mach-imx/mm-imx31.c | 91 -----------
arch/arm/mach-imx/mm-imx35.c | 109 -------------
arch/arm/mach-mx5/mm.c | 6 +
arch/arm/mach-mx5/pm-imx5.c | 3 +-
arch/arm/mm/Kconfig | 4 +-
arch/arm/plat-mxc/Kconfig | 18 +--
arch/arm/plat-mxc/include/mach/common.h | 2 +
arch/arm/plat-mxc/include/mach/io.h | 22 +--
arch/arm/plat-mxc/include/mach/system.h | 35 +----
arch/arm/plat-mxc/system.c | 3 +
16 files changed, 300 insertions(+), 330 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/6] arm/imx: merge mm-imx35.c into mm-imx31.c
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
@ 2011-09-28 9:16 ` Shawn Guo
2011-09-28 9:16 ` [PATCH 2/6] arm/imx: rename mm-imx31.c to mm-imx3.c Shawn Guo
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2011-09-28 9:16 UTC (permalink / raw)
To: linux-arm-kernel
As imx31 and imx35 have much in common at soc level, this patch merges
mm-imx35.c into mm-imx31.c, so that the common functions between imx31
and imx35 can be added in one file later.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-imx/Makefile | 2 +-
arch/arm/mach-imx/mm-imx31.c | 78 ++++++++++++++++++++++++++++++
arch/arm/mach-imx/mm-imx35.c | 109 ------------------------------------------
3 files changed, 79 insertions(+), 110 deletions(-)
delete mode 100644 arch/arm/mach-imx/mm-imx35.c
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index e6c36b4..940f130 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -9,7 +9,7 @@ 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
+obj-$(CONFIG_SOC_IMX35) += mm-imx31.o cpu-imx35.o clock-imx35.o ehci-imx35.o
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
# Support for CMOS sensor interface
diff --git a/arch/arm/mach-imx/mm-imx31.c b/arch/arm/mach-imx/mm-imx31.c
index b7c55e7..e06eed1 100644
--- a/arch/arm/mach-imx/mm-imx31.c
+++ b/arch/arm/mach-imx/mm-imx31.c
@@ -47,17 +47,42 @@ void __init mx31_map_io(void)
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
}
+static struct map_desc mx35_io_desc[] __initdata = {
+ imx_map_entry(MX35, X_MEMC, MT_DEVICE),
+ imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
+ imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
+ imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
+ imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),
+};
+
+void __init mx35_map_io(void)
+{
+ iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
+}
+
void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
}
+void __init imx35_init_early(void)
+{
+ mxc_set_cpu_type(MXC_CPU_MX35);
+ mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
+ mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
+}
+
void __init mx31_init_irq(void)
{
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
}
+void __init mx35_init_irq(void)
+{
+ mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
+}
+
static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = {
.per_2_per_addr = 1677,
};
@@ -89,3 +114,56 @@ void __init imx31_soc_init(void)
imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata);
}
+
+static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = {
+ .ap_2_ap_addr = 642,
+ .uart_2_mcu_addr = 817,
+ .mcu_2_app_addr = 747,
+ .uartsh_2_mcu_addr = 1183,
+ .per_2_shp_addr = 1033,
+ .mcu_2_shp_addr = 961,
+ .ata_2_mcu_addr = 1333,
+ .mcu_2_ata_addr = 1252,
+ .app_2_mcu_addr = 683,
+ .shp_2_per_addr = 1111,
+ .shp_2_mcu_addr = 892,
+};
+
+static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = {
+ .ap_2_ap_addr = 729,
+ .uart_2_mcu_addr = 904,
+ .per_2_app_addr = 1597,
+ .mcu_2_app_addr = 834,
+ .uartsh_2_mcu_addr = 1270,
+ .per_2_shp_addr = 1120,
+ .mcu_2_shp_addr = 1048,
+ .ata_2_mcu_addr = 1429,
+ .mcu_2_ata_addr = 1339,
+ .app_2_per_addr = 1531,
+ .app_2_mcu_addr = 770,
+ .shp_2_per_addr = 1198,
+ .shp_2_mcu_addr = 979,
+};
+
+static struct sdma_platform_data imx35_sdma_pdata __initdata = {
+ .fw_name = "sdma-imx35-to2.bin",
+ .script_addrs = &imx35_to2_sdma_script,
+};
+
+void __init imx35_soc_init(void)
+{
+ int to_version = mx35_revision() >> 4;
+
+ /* i.mx35 has the i.mx31 type gpio */
+ mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0);
+ mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
+ mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0);
+
+ if (to_version == 1) {
+ strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin",
+ strlen(imx35_sdma_pdata.fw_name));
+ imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script;
+ }
+
+ imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata);
+}
diff --git a/arch/arm/mach-imx/mm-imx35.c b/arch/arm/mach-imx/mm-imx35.c
deleted file mode 100644
index f49bac7..0000000
--- a/arch/arm/mach-imx/mm-imx35.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 1999,2000 Arm Limited
- * Copyright (C) 2000 Deep Blue Solutions Ltd
- * Copyright (C) 2002 Shane Nay (shane at minirl.com)
- * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- * - add MX31 specific definitions
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/err.h>
-
-#include <asm/pgtable.h>
-#include <asm/mach/map.h>
-#include <asm/hardware/cache-l2x0.h>
-
-#include <mach/common.h>
-#include <mach/devices-common.h>
-#include <mach/hardware.h>
-#include <mach/iomux-v3.h>
-#include <mach/irqs.h>
-
-static struct map_desc mx35_io_desc[] __initdata = {
- imx_map_entry(MX35, X_MEMC, MT_DEVICE),
- imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
- imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
- imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
- imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),
-};
-
-void __init mx35_map_io(void)
-{
- iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
-}
-
-void __init imx35_init_early(void)
-{
- mxc_set_cpu_type(MXC_CPU_MX35);
- mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
- mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
-}
-
-void __init mx35_init_irq(void)
-{
- mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
-}
-
-static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = {
- .ap_2_ap_addr = 642,
- .uart_2_mcu_addr = 817,
- .mcu_2_app_addr = 747,
- .uartsh_2_mcu_addr = 1183,
- .per_2_shp_addr = 1033,
- .mcu_2_shp_addr = 961,
- .ata_2_mcu_addr = 1333,
- .mcu_2_ata_addr = 1252,
- .app_2_mcu_addr = 683,
- .shp_2_per_addr = 1111,
- .shp_2_mcu_addr = 892,
-};
-
-static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = {
- .ap_2_ap_addr = 729,
- .uart_2_mcu_addr = 904,
- .per_2_app_addr = 1597,
- .mcu_2_app_addr = 834,
- .uartsh_2_mcu_addr = 1270,
- .per_2_shp_addr = 1120,
- .mcu_2_shp_addr = 1048,
- .ata_2_mcu_addr = 1429,
- .mcu_2_ata_addr = 1339,
- .app_2_per_addr = 1531,
- .app_2_mcu_addr = 770,
- .shp_2_per_addr = 1198,
- .shp_2_mcu_addr = 979,
-};
-
-static struct sdma_platform_data imx35_sdma_pdata __initdata = {
- .fw_name = "sdma-imx35-to2.bin",
- .script_addrs = &imx35_to2_sdma_script,
-};
-
-void __init imx35_soc_init(void)
-{
- int to_version = mx35_revision() >> 4;
-
- /* i.mx35 has the i.mx31 type gpio */
- mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0);
- mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
- mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0);
-
- if (to_version == 1) {
- strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin",
- strlen(imx35_sdma_pdata.fw_name));
- imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script;
- }
-
- imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata);
-}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/6] arm/imx: rename mm-imx31.c to mm-imx3.c
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
2011-09-28 9:16 ` [PATCH 1/6] arm/imx: merge mm-imx35.c into mm-imx31.c Shawn Guo
@ 2011-09-28 9:16 ` Shawn Guo
2011-09-28 9:16 ` [PATCH 3/6] arm/imx: change mxc_init_l2x0() to an imx31/35 specific call Shawn Guo
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2011-09-28 9:16 UTC (permalink / raw)
To: linux-arm-kernel
Since mm-imx31.c now is shared between imx31 and imx35, the patch
renames mm-imx31.c to mm-imx3.c.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-imx/Makefile | 4 ++--
arch/arm/mach-imx/{mm-imx31.c => mm-imx3.c} | 0
2 files changed, 2 insertions(+), 2 deletions(-)
rename arch/arm/mach-imx/{mm-imx31.c => mm-imx3.c} (100%)
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 940f130..fb5dfd5 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -8,8 +8,8 @@ obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.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-imx31.o cpu-imx35.o clock-imx35.o ehci-imx35.o
+obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
+obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
# Support for CMOS sensor interface
diff --git a/arch/arm/mach-imx/mm-imx31.c b/arch/arm/mach-imx/mm-imx3.c
similarity index 100%
rename from arch/arm/mach-imx/mm-imx31.c
rename to arch/arm/mach-imx/mm-imx3.c
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/6] arm/imx: change mxc_init_l2x0() to an imx31/35 specific call
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
2011-09-28 9:16 ` [PATCH 1/6] arm/imx: merge mm-imx35.c into mm-imx31.c Shawn Guo
2011-09-28 9:16 ` [PATCH 2/6] arm/imx: rename mm-imx31.c to mm-imx3.c Shawn Guo
@ 2011-09-28 9:16 ` Shawn Guo
2011-09-28 9:16 ` [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle() Shawn Guo
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2011-09-28 9:16 UTC (permalink / raw)
To: linux-arm-kernel
The mxc_init_l2x0() should really be an imx31/35 specific call.
The patch removes early_initcall from mxc_init_l2x0() and get imx31
and imx35 soc specific function calls mxc_init_l2x0(), so that it's
not necessarily to be called for all imx socs when we build single
image for multiple imx socs.
Thus the function can be renamed to imx3_init_l2x0() and put into
mm-imx3.c. It also changes the return type from integer to void.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle()
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
` (2 preceding siblings ...)
2011-09-28 9:16 ` [PATCH 3/6] arm/imx: change mxc_init_l2x0() to an imx31/35 specific call Shawn Guo
@ 2011-09-28 9:16 ` Shawn Guo
2011-09-29 8:59 ` Sascha Hauer
2011-09-28 9:16 ` [PATCH 5/6] arm/imx: remove cpu_is_xxx() check from __imx_ioremap() Shawn Guo
` (2 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Shawn Guo @ 2011-09-28 9:16 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds an idle hook imx_idle to be called in arch_idle().
Any soc that needs a customized idle implementation other than
cpu_do_idle() can set up this hook in soc specific call.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-imx/mm-imx3.c | 30 ++++++++++++++++++++++++++
arch/arm/mach-mx5/mm.c | 6 +++++
arch/arm/mach-mx5/pm-imx5.c | 3 +-
arch/arm/plat-mxc/include/mach/common.h | 2 +
arch/arm/plat-mxc/include/mach/system.h | 35 ++----------------------------
arch/arm/plat-mxc/system.c | 2 +
6 files changed, 45 insertions(+), 33 deletions(-)
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index ffa33b4..6fad0d6 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -30,6 +30,34 @@
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
+static void imx3_idle(void)
+{
+ unsigned long reg = 0;
+ __asm__ __volatile__(
+ /* disable I and D cache */
+ "mrc p15, 0, %0, c1, c0, 0\n"
+ "bic %0, %0, #0x00001000\n"
+ "bic %0, %0, #0x00000004\n"
+ "mcr p15, 0, %0, c1, c0, 0\n"
+ /* invalidate I cache */
+ "mov %0, #0\n"
+ "mcr p15, 0, %0, c7, c5, 0\n"
+ /* clear and invalidate D cache */
+ "mov %0, #0\n"
+ "mcr p15, 0, %0, c7, c14, 0\n"
+ /* WFI */
+ "mov %0, #0\n"
+ "mcr p15, 0, %0, c7, c0, 4\n"
+ "nop\n" "nop\n" "nop\n" "nop\n"
+ "nop\n" "nop\n" "nop\n"
+ /* enable I and D cache */
+ "mrc p15, 0, %0, c1, c0, 0\n"
+ "orr %0, %0, #0x00001000\n"
+ "orr %0, %0, #0x00000004\n"
+ "mcr p15, 0, %0, c1, c0, 0\n"
+ : "=r" (reg));
+}
+
void imx3_init_l2x0(void)
{
void __iomem *l2x0_base;
@@ -98,6 +126,7 @@ void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
+ imx_idle = imx3_idle;
}
void __init imx35_init_early(void)
@@ -105,6 +134,7 @@ void __init imx35_init_early(void)
mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
+ imx_idle = imx3_idle;
}
void __init mx31_init_irq(void)
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c
index fb65339..26eacc9 100644
--- a/arch/arm/mach-mx5/mm.c
+++ b/arch/arm/mach-mx5/mm.c
@@ -21,6 +21,11 @@
#include <mach/devices-common.h>
#include <mach/iomux-v3.h>
+static void imx5_idle(void)
+{
+ mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
+}
+
/*
* Define the MX50 memory map.
*/
@@ -84,6 +89,7 @@ void __init imx51_init_early(void)
mxc_set_cpu_type(MXC_CPU_MX51);
mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
+ imx_idle = imx5_idle;
}
void __init imx53_init_early(void)
diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c
index be19e9c..98052fc 100644
--- a/arch/arm/mach-mx5/pm-imx5.c
+++ b/arch/arm/mach-mx5/pm-imx5.c
@@ -14,7 +14,8 @@
#include <linux/err.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
-#include <mach/system.h>
+#include <mach/common.h>
+#include <mach/hardware.h>
#include "crm_regs.h"
static struct clk *gpc_dvfs_clk;
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 318b995..245fb98 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -73,7 +73,9 @@ extern void mxc_arch_reset_init(void __iomem *);
extern void mx51_efikamx_reset(void);
extern int mx53_revision(void);
extern int mx53_display_revision(void);
+extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
extern void imx_print_silicon_rev(const char *cpu, int srev);
+extern void (*imx_idle)(void);
void avic_handle_irq(struct pt_regs *);
void tzic_handle_irq(struct pt_regs *);
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
index 51f02a9..cf88b35 100644
--- a/arch/arm/plat-mxc/include/mach/system.h
+++ b/arch/arm/plat-mxc/include/mach/system.h
@@ -17,41 +17,12 @@
#ifndef __ASM_ARCH_MXC_SYSTEM_H__
#define __ASM_ARCH_MXC_SYSTEM_H__
-#include <mach/hardware.h>
-#include <mach/common.h>
-
-extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
+extern void (*imx_idle)(void);
static inline void arch_idle(void)
{
- /* fix i.MX31 errata TLSbo65953 and i.MX35 errata ENGcm09472 */
- if (cpu_is_mx31() || cpu_is_mx35()) {
- unsigned long reg = 0;
- __asm__ __volatile__(
- /* disable I and D cache */
- "mrc p15, 0, %0, c1, c0, 0\n"
- "bic %0, %0, #0x00001000\n"
- "bic %0, %0, #0x00000004\n"
- "mcr p15, 0, %0, c1, c0, 0\n"
- /* invalidate I cache */
- "mov %0, #0\n"
- "mcr p15, 0, %0, c7, c5, 0\n"
- /* clear and invalidate D cache */
- "mov %0, #0\n"
- "mcr p15, 0, %0, c7, c14, 0\n"
- /* WFI */
- "mov %0, #0\n"
- "mcr p15, 0, %0, c7, c0, 4\n"
- "nop\n" "nop\n" "nop\n" "nop\n"
- "nop\n" "nop\n" "nop\n"
- /* enable I and D cache */
- "mrc p15, 0, %0, c1, c0, 0\n"
- "orr %0, %0, #0x00001000\n"
- "orr %0, %0, #0x00000004\n"
- "mcr p15, 0, %0, c1, c0, 0\n"
- : "=r" (reg));
- } else if (cpu_is_mx51())
- mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
+ if (imx_idle != NULL)
+ (imx_idle)();
else
cpu_do_idle();
}
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 8024f2a..5fa03e7 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -28,6 +28,8 @@
#include <asm/system.h>
#include <asm/mach-types.h>
+void (*imx_idle)(void) = NULL;
+
static void __iomem *wdog_base;
/*
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/6] arm/imx: remove cpu_is_xxx() check from __imx_ioremap()
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
` (3 preceding siblings ...)
2011-09-28 9:16 ` [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle() Shawn Guo
@ 2011-09-28 9:16 ` Shawn Guo
2011-09-28 9:16 ` [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6 Shawn Guo
2011-09-28 12:20 ` [PATCH 0/6] Support single zImage for imx3 and imx6 Sascha Hauer
6 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2011-09-28 9:16 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds an ioremap hook imx_ioremap to be called in
__imx_ioremap(). Any soc that needs a customized ioremap other
than __arm_ioremap() can set up this hook in soc specific call.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-imx/mm-imx3.c | 19 +++++++++++++++++++
arch/arm/plat-mxc/include/mach/io.h | 22 ++++++----------------
arch/arm/plat-mxc/system.c | 1 +
3 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 6fad0d6..9f0e82e 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -58,6 +58,23 @@ static void imx3_idle(void)
: "=r" (reg));
}
+static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
+ unsigned int mtype)
+{
+ if (mtype == MT_DEVICE) {
+ /*
+ * Access all peripherals below 0x80000000 as nonshared device
+ * on mx3, but leave l2cc alone. Otherwise cache corruptions
+ * can occur.
+ */
+ if (phys_addr < 0x80000000 &&
+ !addr_in_module(phys_addr, MX3x_L2CC))
+ mtype = MT_DEVICE_NONSHARED;
+ }
+
+ return __arm_ioremap(phys_addr, size, mtype);
+}
+
void imx3_init_l2x0(void)
{
void __iomem *l2x0_base;
@@ -127,6 +144,7 @@ void __init imx31_init_early(void)
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
imx_idle = imx3_idle;
+ imx_ioremap = imx3_ioremap;
}
void __init imx35_init_early(void)
@@ -135,6 +153,7 @@ void __init imx35_init_early(void)
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
imx_idle = imx3_idle;
+ imx_ioremap = imx3_ioremap;
}
void __init mx31_init_irq(void)
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 4347a87..338300b 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,32 +14,22 @@
/* Allow IO space to be anywhere in the memory */
#define IO_SPACE_LIMIT 0xffffffff
-#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
-#include <mach/hardware.h>
-
#define __arch_ioremap __imx_ioremap
#define __arch_iounmap __iounmap
#define addr_in_module(addr, mod) \
((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
+extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
+
static inline void __iomem *
__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
{
- if (mtype == MT_DEVICE && (cpu_is_mx31() || cpu_is_mx35())) {
- /*
- * Access all peripherals below 0x80000000 as nonshared device
- * on mx3, but leave l2cc alone. Otherwise cache corruptions
- * can occur.
- */
- if (phys_addr < 0x80000000 &&
- !addr_in_module(phys_addr, MX3x_L2CC))
- mtype = MT_DEVICE_NONSHARED;
- }
-
- return __arm_ioremap(phys_addr, size, mtype);
+ if (imx_ioremap != NULL)
+ return imx_ioremap(phys_addr, size, mtype);
+ else
+ return __arm_ioremap(phys_addr, size, mtype);
}
-#endif
/* io address mapping macro */
#define __io(a) __typesafe_io(a)
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 5fa03e7..9dad8dc 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -29,6 +29,7 @@
#include <asm/mach-types.h>
void (*imx_idle)(void) = NULL;
+void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int) = NULL;
static void __iomem *wdog_base;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
` (4 preceding siblings ...)
2011-09-28 9:16 ` [PATCH 5/6] arm/imx: remove cpu_is_xxx() check from __imx_ioremap() Shawn Guo
@ 2011-09-28 9:16 ` Shawn Guo
2011-09-28 12:18 ` Sascha Hauer
2011-09-28 12:20 ` [PATCH 0/6] Support single zImage for imx3 and imx6 Sascha Hauer
6 siblings, 1 reply; 14+ messages in thread
From: Shawn Guo @ 2011-09-28 9:16 UTC (permalink / raw)
To: linux-arm-kernel
From: Sascha Hauer <s.hauer@pengutronix.de>
The patch merges the build of imx3 and imx6. The Kconfig symbol
ARCH_IMX_V6_V7 is introduced to replace ARCH_MX3 and ARCH_MX6.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/Makefile | 3 +--
arch/arm/mach-imx/Kconfig | 7 +++----
arch/arm/mach-imx/Makefile.boot | 10 +++++++---
arch/arm/mm/Kconfig | 4 ++--
arch/arm/plat-mxc/Kconfig | 18 +++++++-----------
5 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index fc36c1b..28e4619 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -158,9 +158,8 @@ machine-$(CONFIG_ARCH_MMP) := mmp
machine-$(CONFIG_ARCH_MSM) := msm
machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
machine-$(CONFIG_ARCH_IMX_V4_V5) := imx
-machine-$(CONFIG_ARCH_MX3) := imx
+machine-$(CONFIG_ARCH_IMX_V6_V7) := imx
machine-$(CONFIG_ARCH_MX5) := mx5
-machine-$(CONFIG_ARCH_MX6) := imx
machine-$(CONFIG_ARCH_MXS) := mxs
machine-$(CONFIG_ARCH_NETX) := netx
machine-$(CONFIG_ARCH_NOMADIK) := nomadik
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index d52fe3d..fe5cd06 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -74,6 +74,7 @@ config SOC_IMX31
select ARCH_MXC_AUDMUX_V2
select ARCH_MX31
select MXC_AVIC
+ select SMP_ON_UP if SMP
config SOC_IMX35
bool
@@ -83,6 +84,7 @@ config SOC_IMX35
select HAVE_EPIT
select ARCH_MX35
select MXC_AVIC
+ select SMP_ON_UP if SMP
if ARCH_IMX_V4_V5
@@ -351,7 +353,7 @@ config MACH_IMX27IPCAM
endif
-if ARCH_MX3
+if ARCH_IMX_V6_V7
comment "MX31 platforms:"
@@ -601,9 +603,6 @@ config MACH_VPR200
Include support for VPR200 platform. This includes specific
configurations for the board and its peripherals.
-endif
-
-if ARCH_MX6
comment "i.MX6 family:"
config SOC_IMX6Q
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
index 22d8588..c349a96 100644
--- a/arch/arm/mach-imx/Makefile.boot
+++ b/arch/arm/mach-imx/Makefile.boot
@@ -14,9 +14,13 @@ 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
+zreladdr-$(CONFIG_SOC_IMX31) += 0x80008000
+params_phys-$(CONFIG_SOC_IMX31) := 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX31) := 0x80800000
+
+zreladdr-$(CONFIG_SOC_IMX35) += 0x80008000
+params_phys-$(CONFIG_SOC_IMX35) := 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000
zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000
params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 6dc9967..bc68200 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -832,10 +832,10 @@ config CACHE_FEROCEON_L2_WRITETHROUGH
config CACHE_L2X0
bool "Enable the L2x0 outer cache controller"
depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \
- REALVIEW_EB_A9MP || SOC_IMX35 || SOC_IMX31 || MACH_REALVIEW_PBX || \
+ REALVIEW_EB_A9MP || ARCH_IMX_V6_V7 || MACH_REALVIEW_PBX || \
ARCH_NOMADIK || ARCH_OMAP4 || ARCH_EXYNOS4 || ARCH_TEGRA || \
ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE || \
- ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX || ARCH_MX6
+ ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX
default y
select OUTER_CACHE
select OUTER_CACHE_SYNC
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index e2e3e5a..8bbc9c6 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -6,7 +6,7 @@ menu "Freescale MXC Implementations"
choice
prompt "Freescale CPU family:"
- default ARCH_MX3
+ default ARCH_IMX_V6_V7
config ARCH_IMX_V4_V5
bool "i.MX1, i.MX21, i.MX25, i.MX27"
@@ -16,10 +16,13 @@ config ARCH_IMX_V4_V5
This enables support for systems based on the Freescale i.MX ARMv4
and ARMv5 SoCs
-config ARCH_MX3
- bool "MX3-based"
+config ARCH_IMX_V6_V7
+ bool "i.MX3, i.MX6"
+ select AUTO_ZRELADDR
+ select ARM_PATCH_PHYS_VIRT
help
- This enables support for systems based on the Freescale i.MX3 family
+ This enables support for systems based on the Freescale i.MX3 and i.MX6
+ family.
config ARCH_MX5
bool "i.MX50, i.MX51, i.MX53"
@@ -29,13 +32,6 @@ config ARCH_MX5
This enables support for machines using Freescale's i.MX50 and i.MX51
processors.
-config ARCH_MX6
- bool "i.MX6"
- select AUTO_ZRELADDR
- select ARM_PATCH_PHYS_VIRT
- help
- This enables support for systems based on the Freescale i.MX6 family
-
endchoice
source "arch/arm/mach-imx/Kconfig"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6
2011-09-28 9:16 ` [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6 Shawn Guo
@ 2011-09-28 12:18 ` Sascha Hauer
2011-09-29 5:17 ` Shawn Guo
0 siblings, 1 reply; 14+ messages in thread
From: Sascha Hauer @ 2011-09-28 12:18 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 28, 2011 at 05:16:08PM +0800, Shawn Guo wrote:
>
>
> -config ARCH_MX3
> - bool "MX3-based"
> +config ARCH_IMX_V6_V7
> + bool "i.MX3, i.MX6"
> + select AUTO_ZRELADDR
> + select ARM_PATCH_PHYS_VIRT
Russell pointed out that it's not a good idea to select this.
Sascha
> help
> - This enables support for systems based on the Freescale i.MX3 family
> + This enables support for systems based on the Freescale i.MX3 and i.MX6
> + family.
>
> config ARCH_MX5
> bool "i.MX50, i.MX51, i.MX53"
> @@ -29,13 +32,6 @@ config ARCH_MX5
> This enables support for machines using Freescale's i.MX50 and i.MX51
> processors.
>
> -config ARCH_MX6
> - bool "i.MX6"
> - select AUTO_ZRELADDR
> - select ARM_PATCH_PHYS_VIRT
> - help
> - This enables support for systems based on the Freescale i.MX6 family
> -
> endchoice
>
> source "arch/arm/mach-imx/Kconfig"
> --
> 1.7.4.1
>
>
--
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 |
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 0/6] Support single zImage for imx3 and imx6
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
` (5 preceding siblings ...)
2011-09-28 9:16 ` [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6 Shawn Guo
@ 2011-09-28 12:20 ` Sascha Hauer
2011-09-29 5:19 ` Shawn Guo
6 siblings, 1 reply; 14+ messages in thread
From: Sascha Hauer @ 2011-09-28 12:20 UTC (permalink / raw)
To: linux-arm-kernel
Hi Shawn,
On Wed, Sep 28, 2011 at 05:16:02PM +0800, Shawn Guo wrote:
> This series supports the single zImage build for imx3 and imx6. It's
> based on linux-next with imx6 series applied, and tested on imx35 and
> imx6q.
I'm fine with this series (and the i.MX6 series). I can merge this
series without the last patch now. For the i.MX6 series I think we have
to wait until the prerequisites are merged. Maybe we should merge this
in a second pull request during the merge window.
Sascha
>
> Sascha Hauer (1):
> arm/imx: merge i.MX3 and i.MX6
>
> Shawn Guo (5):
> arm/imx: merge mm-imx35.c into mm-imx31.c
> arm/imx: rename mm-imx31.c to mm-imx3.c
> arm/imx: change mxc_init_l2x0() to an imx31/35 specific call
> arm/imx: remove cpu_is_xxx() from arch_idle()
> arm/imx: remove cpu_is_xxx() check from __imx_ioremap()
>
> arch/arm/Makefile | 3 +-
> arch/arm/mach-imx/Kconfig | 7 +-
> arch/arm/mach-imx/Makefile | 5 +-
> arch/arm/mach-imx/Makefile.boot | 10 +-
> arch/arm/mach-imx/cache-l2x0.c | 56 -------
> arch/arm/mach-imx/mm-imx3.c | 256 +++++++++++++++++++++++++++++++
> arch/arm/mach-imx/mm-imx31.c | 91 -----------
> arch/arm/mach-imx/mm-imx35.c | 109 -------------
> arch/arm/mach-mx5/mm.c | 6 +
> arch/arm/mach-mx5/pm-imx5.c | 3 +-
> arch/arm/mm/Kconfig | 4 +-
> arch/arm/plat-mxc/Kconfig | 18 +--
> arch/arm/plat-mxc/include/mach/common.h | 2 +
> arch/arm/plat-mxc/include/mach/io.h | 22 +--
> arch/arm/plat-mxc/include/mach/system.h | 35 +----
> arch/arm/plat-mxc/system.c | 3 +
> 16 files changed, 300 insertions(+), 330 deletions(-)
>
--
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 |
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6
2011-09-28 12:18 ` Sascha Hauer
@ 2011-09-29 5:17 ` Shawn Guo
2011-09-29 8:35 ` Sascha Hauer
0 siblings, 1 reply; 14+ messages in thread
From: Shawn Guo @ 2011-09-29 5:17 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 28, 2011 at 02:18:08PM +0200, Sascha Hauer wrote:
> On Wed, Sep 28, 2011 at 05:16:08PM +0800, Shawn Guo wrote:
> >
> >
> > -config ARCH_MX3
> > - bool "MX3-based"
> > +config ARCH_IMX_V6_V7
> > + bool "i.MX3, i.MX6"
> > + select AUTO_ZRELADDR
> > + select ARM_PATCH_PHYS_VIRT
>
> Russell pointed out that it's not a good idea to select this.
>
Yeah, I saw that. So you would support ZBOOT_ROM over single zImage
between these two? I'm not sure how many imx users are actually using
ZBOOT_ROM. If there are only very few, we still want to keep the
default configuration compatible with ZBOOT_ROM? I think we can move
the default build to single zImage, and let those limited users sort
out their own configuration to get ZBOOT_ROM back. After all, the
support is still there, and it's just about build configuration
adjustment.
Anyway, it's only my opinion, and the decision is on you plate.
--
Regards,
Shawn
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 0/6] Support single zImage for imx3 and imx6
2011-09-28 12:20 ` [PATCH 0/6] Support single zImage for imx3 and imx6 Sascha Hauer
@ 2011-09-29 5:19 ` Shawn Guo
0 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2011-09-29 5:19 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 28, 2011 at 02:20:49PM +0200, Sascha Hauer wrote:
> Hi Shawn,
>
> On Wed, Sep 28, 2011 at 05:16:02PM +0800, Shawn Guo wrote:
> > This series supports the single zImage build for imx3 and imx6. It's
> > based on linux-next with imx6 series applied, and tested on imx35 and
> > imx6q.
>
> I'm fine with this series (and the i.MX6 series). I can merge this
> series without the last patch now.
Thanks.
> For the i.MX6 series I think we have
> to wait until the prerequisites are merged. Maybe we should merge this
> in a second pull request during the merge window.
>
Ok, will send you the pull request at a later time.
--
Regards,
Shawn
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6
2011-09-29 5:17 ` Shawn Guo
@ 2011-09-29 8:35 ` Sascha Hauer
0 siblings, 0 replies; 14+ messages in thread
From: Sascha Hauer @ 2011-09-29 8:35 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 29, 2011 at 01:17:28PM +0800, Shawn Guo wrote:
> On Wed, Sep 28, 2011 at 02:18:08PM +0200, Sascha Hauer wrote:
> > On Wed, Sep 28, 2011 at 05:16:08PM +0800, Shawn Guo wrote:
> > >
> > >
> > > -config ARCH_MX3
> > > - bool "MX3-based"
> > > +config ARCH_IMX_V6_V7
> > > + bool "i.MX3, i.MX6"
> > > + select AUTO_ZRELADDR
> > > + select ARM_PATCH_PHYS_VIRT
> >
> > Russell pointed out that it's not a good idea to select this.
> >
> Yeah, I saw that. So you would support ZBOOT_ROM over single zImage
> between these two? I'm not sure how many imx users are actually using
> ZBOOT_ROM. If there are only very few, we still want to keep the
> default configuration compatible with ZBOOT_ROM? I think we can move
> the default build to single zImage, and let those limited users sort
> out their own configuration to get ZBOOT_ROM back. After all, the
> support is still there, and it's just about build configuration
> adjustment.
I'm not sure there are i.MX ZBOOT_ROM users at all. Anyway,
select AUTO_ZRELADDR if !ZBOOT_ROM
seems to work.
Sascha
--
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 |
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle()
2011-09-28 9:16 ` [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle() Shawn Guo
@ 2011-09-29 8:59 ` Sascha Hauer
2011-09-29 14:22 ` Shawn Guo
0 siblings, 1 reply; 14+ messages in thread
From: Sascha Hauer @ 2011-09-29 8:59 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 28, 2011 at 05:16:06PM +0800, Shawn Guo wrote:
> This patch adds an idle hook imx_idle to be called in arch_idle().
> Any soc that needs a customized idle implementation other than
> cpu_do_idle() can set up this hook in soc specific call.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> arch/arm/mach-imx/mm-imx3.c | 30 ++++++++++++++++++++++++++
> arch/arm/mach-mx5/mm.c | 6 +++++
> arch/arm/mach-mx5/pm-imx5.c | 3 +-
> arch/arm/plat-mxc/include/mach/common.h | 2 +
> arch/arm/plat-mxc/include/mach/system.h | 35 ++----------------------------
> arch/arm/plat-mxc/system.c | 2 +
> 6 files changed, 45 insertions(+), 33 deletions(-)
>
I had to fold the following into this commit, otherwise we end
up with:
In file included from arch/arm/mach-mx5/pm-imx5.c:17:0:arch/arm/plat-mxc/include/mach/common.h:77:33: warning: 'enum mxc_cpu_pwr_mode' declared inside parameter list
arch/arm/plat-mxc/include/mach/common.h:77:33: warning: its scope is only this definition or declaration, which is probably not what you want
Sascha
diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c
index 76ae8dc..144ebeb 100644
--- a/arch/arm/mach-mx5/system.c
+++ b/arch/arm/mach-mx5/system.c
@@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <mach/hardware.h>
+#include <mach/common.h>
#include "crm_regs.h"
/* set cpu low power mode before WFI instruction. This function is called
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 2b298d8..afaa967 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -72,6 +72,15 @@ extern void mxc_arch_reset_init(void __iomem *);
extern void mx51_efikamx_reset(void);
extern int mx53_revision(void);
extern int mx53_display_revision(void);
+
+enum mxc_cpu_pwr_mode {
+ WAIT_CLOCKED, /* wfi only */
+ WAIT_UNCLOCKED, /* WAIT */
+ WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */
+ STOP_POWER_ON, /* just STOP */
+ STOP_POWER_OFF, /* STOP + SRPG */
+};
+
extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
extern void (*imx_idle)(void);
#endif
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 0987923..00a7819 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
@@ -183,13 +183,6 @@ struct cpu_op {
};
int tzic_enable_wake(int is_idle);
-enum mxc_cpu_pwr_mode {
- WAIT_CLOCKED, /* wfi only */
- WAIT_UNCLOCKED, /* WAIT */
- WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */
- STOP_POWER_ON, /* just STOP */
- STOP_POWER_OFF, /* STOP + SRPG */
-};
extern struct cpu_op *(*get_cpu_op)(int *op);
#endif
--
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 |
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle()
2011-09-29 8:59 ` Sascha Hauer
@ 2011-09-29 14:22 ` Shawn Guo
0 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2011-09-29 14:22 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 29, 2011 at 10:59:36AM +0200, Sascha Hauer wrote:
> On Wed, Sep 28, 2011 at 05:16:06PM +0800, Shawn Guo wrote:
> > This patch adds an idle hook imx_idle to be called in arch_idle().
> > Any soc that needs a customized idle implementation other than
> > cpu_do_idle() can set up this hook in soc specific call.
> >
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
> > arch/arm/mach-imx/mm-imx3.c | 30 ++++++++++++++++++++++++++
> > arch/arm/mach-mx5/mm.c | 6 +++++
> > arch/arm/mach-mx5/pm-imx5.c | 3 +-
> > arch/arm/plat-mxc/include/mach/common.h | 2 +
> > arch/arm/plat-mxc/include/mach/system.h | 35 ++----------------------------
> > arch/arm/plat-mxc/system.c | 2 +
> > 6 files changed, 45 insertions(+), 33 deletions(-)
> >
>
> I had to fold the following into this commit, otherwise we end
> up with:
>
> In file included from arch/arm/mach-mx5/pm-imx5.c:17:0:arch/arm/plat-mxc/include/mach/common.h:77:33: warning: 'enum mxc_cpu_pwr_mode' declared inside parameter list
> arch/arm/plat-mxc/include/mach/common.h:77:33: warning: its scope is only this definition or declaration, which is probably not what you want
>
Aha, I based this series off imx6q one. I have the following change
in patch 'arm/imx6q: add suspend/resume support'.
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 571e91d..318b995 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -13,6 +13,7 @@
struct platform_device;
struct clk;
+enum mxc_cpu_pwr_mode;
extern void mx1_map_io(void);
extern void mx21_map_io(void);
But I'm fine with your changes below.
> Sascha
>
> diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c
> index 76ae8dc..144ebeb 100644
> --- a/arch/arm/mach-mx5/system.c
> +++ b/arch/arm/mach-mx5/system.c
> @@ -13,6 +13,7 @@
> #include <linux/platform_device.h>
> #include <linux/io.h>
> #include <mach/hardware.h>
> +#include <mach/common.h>
> #include "crm_regs.h"
>
> /* set cpu low power mode before WFI instruction. This function is called
> diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
> index 2b298d8..afaa967 100644
> --- a/arch/arm/plat-mxc/include/mach/common.h
> +++ b/arch/arm/plat-mxc/include/mach/common.h
> @@ -72,6 +72,15 @@ extern void mxc_arch_reset_init(void __iomem *);
> extern void mx51_efikamx_reset(void);
> extern int mx53_revision(void);
> extern int mx53_display_revision(void);
> +
> +enum mxc_cpu_pwr_mode {
> + WAIT_CLOCKED, /* wfi only */
> + WAIT_UNCLOCKED, /* WAIT */
> + WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */
> + STOP_POWER_ON, /* just STOP */
> + STOP_POWER_OFF, /* STOP + SRPG */
> +};
> +
> extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
> extern void (*imx_idle)(void);
> #endif
> diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
> index 0987923..00a7819 100644
> --- a/arch/arm/plat-mxc/include/mach/mxc.h
> +++ b/arch/arm/plat-mxc/include/mach/mxc.h
> @@ -183,13 +183,6 @@ struct cpu_op {
> };
>
> int tzic_enable_wake(int is_idle);
> -enum mxc_cpu_pwr_mode {
> - WAIT_CLOCKED, /* wfi only */
> - WAIT_UNCLOCKED, /* WAIT */
> - WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */
> - STOP_POWER_ON, /* just STOP */
> - STOP_POWER_OFF, /* STOP + SRPG */
> -};
>
> extern struct cpu_op *(*get_cpu_op)(int *op);
> #endif
> --
> 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 |
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
Regards,
Shawn
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-09-29 14:22 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
2011-09-28 9:16 ` [PATCH 1/6] arm/imx: merge mm-imx35.c into mm-imx31.c Shawn Guo
2011-09-28 9:16 ` [PATCH 2/6] arm/imx: rename mm-imx31.c to mm-imx3.c Shawn Guo
2011-09-28 9:16 ` [PATCH 3/6] arm/imx: change mxc_init_l2x0() to an imx31/35 specific call Shawn Guo
2011-09-28 9:16 ` [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle() Shawn Guo
2011-09-29 8:59 ` Sascha Hauer
2011-09-29 14:22 ` Shawn Guo
2011-09-28 9:16 ` [PATCH 5/6] arm/imx: remove cpu_is_xxx() check from __imx_ioremap() Shawn Guo
2011-09-28 9:16 ` [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6 Shawn Guo
2011-09-28 12:18 ` Sascha Hauer
2011-09-29 5:17 ` Shawn Guo
2011-09-29 8:35 ` Sascha Hauer
2011-09-28 12:20 ` [PATCH 0/6] Support single zImage for imx3 and imx6 Sascha Hauer
2011-09-29 5:19 ` Shawn Guo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.