Commit 3dac2196 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Sascha Hauer

ARM: imx: use .init_early to initialize cpu type and reset address

This used to be done in .map_io which is supposed to only setup the
memory mapping.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 5836372e
...@@ -306,7 +306,8 @@ static struct sys_timer eukrea_cpuimx27_timer = { ...@@ -306,7 +306,8 @@ static struct sys_timer eukrea_cpuimx27_timer = {
MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") MACHINE_START(CPUIMX27, "EUKREA CPUIMX27")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = eukrea_cpuimx27_init,
.timer = &eukrea_cpuimx27_timer, .timer = &eukrea_cpuimx27_timer,
.init_machine = eukrea_cpuimx27_init,
MACHINE_END MACHINE_END
...@@ -155,7 +155,8 @@ MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") ...@@ -155,7 +155,8 @@ MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25")
/* Maintainer: Eukrea Electromatique */ /* Maintainer: Eukrea Electromatique */
.boot_params = MX25_PHYS_OFFSET + 0x100, .boot_params = MX25_PHYS_OFFSET + 0x100,
.map_io = mx25_map_io, .map_io = mx25_map_io,
.init_early = imx25_init_early,
.init_irq = mx25_init_irq, .init_irq = mx25_init_irq,
.init_machine = eukrea_cpuimx25_init,
.timer = &eukrea_cpuimx25_timer, .timer = &eukrea_cpuimx25_timer,
.init_machine = eukrea_cpuimx25_init,
MACHINE_END MACHINE_END
...@@ -253,7 +253,8 @@ static struct sys_timer visstrim_m10_timer = { ...@@ -253,7 +253,8 @@ static struct sys_timer visstrim_m10_timer = {
MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = visstrim_m10_board_init,
.timer = &visstrim_m10_timer, .timer = &visstrim_m10_timer,
.init_machine = visstrim_m10_board_init,
MACHINE_END MACHINE_END
...@@ -71,7 +71,8 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") ...@@ -71,7 +71,8 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = mx27ipcam_init,
.timer = &mx27ipcam_timer, .timer = &mx27ipcam_timer,
.init_machine = mx27ipcam_init,
MACHINE_END MACHINE_END
...@@ -77,7 +77,8 @@ static struct sys_timer mx27lite_timer = { ...@@ -77,7 +77,8 @@ static struct sys_timer mx27lite_timer = {
MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = mx27lite_init,
.timer = &mx27lite_timer, .timer = &mx27lite_timer,
.init_machine = mx27lite_init,
MACHINE_END MACHINE_END
...@@ -146,6 +146,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") ...@@ -146,6 +146,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
/* Maintainer: Sascha Hauer, Pengutronix */ /* Maintainer: Sascha Hauer, Pengutronix */
.boot_params = MX1_PHYS_OFFSET + 0x100, .boot_params = MX1_PHYS_OFFSET + 0x100,
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_early = imx1_init_early,
.init_irq = mx1_init_irq, .init_irq = mx1_init_irq,
.timer = &mx1ads_timer, .timer = &mx1ads_timer,
.init_machine = mx1ads_init, .init_machine = mx1ads_init,
...@@ -154,6 +155,7 @@ MACHINE_END ...@@ -154,6 +155,7 @@ MACHINE_END
MACHINE_START(MXLADS, "Freescale MXLADS") MACHINE_START(MXLADS, "Freescale MXLADS")
.boot_params = MX1_PHYS_OFFSET + 0x100, .boot_params = MX1_PHYS_OFFSET + 0x100,
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_early = imx1_init_early,
.init_irq = mx1_init_irq, .init_irq = mx1_init_irq,
.timer = &mx1ads_timer, .timer = &mx1ads_timer,
.init_machine = mx1ads_init, .init_machine = mx1ads_init,
......
...@@ -306,7 +306,8 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS") ...@@ -306,7 +306,8 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX21_PHYS_OFFSET + 0x100, .boot_params = MX21_PHYS_OFFSET + 0x100,
.map_io = mx21ads_map_io, .map_io = mx21ads_map_io,
.init_early = imx21_init_early,
.init_irq = mx21_init_irq, .init_irq = mx21_init_irq,
.init_machine = mx21ads_board_init,
.timer = &mx21ads_timer, .timer = &mx21ads_timer,
.init_machine = mx21ads_board_init,
MACHINE_END MACHINE_END
...@@ -228,8 +228,8 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") ...@@ -228,8 +228,8 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX25_PHYS_OFFSET + 0x100, .boot_params = MX25_PHYS_OFFSET + 0x100,
.map_io = mx25_map_io, .map_io = mx25_map_io,
.init_early = imx25_init_early,
.init_irq = mx25_init_irq, .init_irq = mx25_init_irq,
.init_machine = mx25pdk_init,
.timer = &mx25pdk_timer, .timer = &mx25pdk_timer,
.init_machine = mx25pdk_init,
MACHINE_END MACHINE_END
...@@ -297,7 +297,8 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK") ...@@ -297,7 +297,8 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = mx27pdk_init,
.timer = &mx27pdk_timer, .timer = &mx27pdk_timer,
.init_machine = mx27pdk_init,
MACHINE_END MACHINE_END
...@@ -346,7 +346,8 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") ...@@ -346,7 +346,8 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27ads_map_io, .map_io = mx27ads_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = mx27ads_board_init,
.timer = &mx27ads_timer, .timer = &mx27ads_timer,
.init_machine = mx27ads_board_init,
MACHINE_END MACHINE_END
...@@ -268,8 +268,8 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") ...@@ -268,8 +268,8 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
/* maintainer: Maxtrack Industrial */ /* maintainer: Maxtrack Industrial */
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = mxt_td60_board_init,
.timer = &mxt_td60_timer, .timer = &mxt_td60_timer,
.init_machine = mxt_td60_board_init,
MACHINE_END MACHINE_END
...@@ -435,8 +435,8 @@ static struct sys_timer pca100_timer = { ...@@ -435,8 +435,8 @@ static struct sys_timer pca100_timer = {
MACHINE_START(PCA100, "phyCARD-i.MX27") MACHINE_START(PCA100, "phyCARD-i.MX27")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = pca100_init, .init_machine = pca100_init,
.timer = &pca100_timer, .timer = &pca100_timer,
MACHINE_END MACHINE_END
...@@ -342,7 +342,8 @@ static struct sys_timer pcm038_timer = { ...@@ -342,7 +342,8 @@ static struct sys_timer pcm038_timer = {
MACHINE_START(PCM038, "phyCORE-i.MX27") MACHINE_START(PCM038, "phyCORE-i.MX27")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.init_machine = pcm038_init,
.timer = &pcm038_timer, .timer = &pcm038_timer,
.init_machine = pcm038_init,
MACHINE_END MACHINE_END
...@@ -148,6 +148,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328") ...@@ -148,6 +148,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
/* Sascha Hauer */ /* Sascha Hauer */
.boot_params = 0x08000100, .boot_params = 0x08000100,
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_early = imx1_init_early,
.init_irq = mx1_init_irq, .init_irq = mx1_init_irq,
.timer = &scb9328_timer, .timer = &scb9328_timer,
.init_machine = scb9328_init, .init_machine = scb9328_init,
......
...@@ -29,11 +29,14 @@ static struct map_desc imx_io_desc[] __initdata = { ...@@ -29,11 +29,14 @@ static struct map_desc imx_io_desc[] __initdata = {
}; };
void __init mx1_map_io(void) void __init mx1_map_io(void)
{
iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc));
}
void __init imx1_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX1); mxc_set_cpu_type(MXC_CPU_MX1);
mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR));
iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc));
} }
int imx1_register_gpios(void); int imx1_register_gpios(void);
......
...@@ -55,11 +55,14 @@ static struct map_desc imx21_io_desc[] __initdata = { ...@@ -55,11 +55,14 @@ static struct map_desc imx21_io_desc[] __initdata = {
* memory map for the IO modules. * memory map for the IO modules.
*/ */
void __init mx21_map_io(void) void __init mx21_map_io(void)
{
iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc));
}
void __init imx21_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX21); mxc_set_cpu_type(MXC_CPU_MX21);
mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR));
iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc));
} }
int imx21_register_gpios(void); int imx21_register_gpios(void);
......
...@@ -44,12 +44,15 @@ static struct map_desc mx25_io_desc[] __initdata = { ...@@ -44,12 +44,15 @@ static struct map_desc mx25_io_desc[] __initdata = {
* for the IO modules. * for the IO modules.
*/ */
void __init mx25_map_io(void) void __init mx25_map_io(void)
{
iotable_init(mx25_io_desc, ARRAY_SIZE(mx25_io_desc));
}
void __init imx25_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX25); mxc_set_cpu_type(MXC_CPU_MX25);
mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR)); mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR));
iotable_init(mx25_io_desc, ARRAY_SIZE(mx25_io_desc));
} }
int imx25_register_gpios(void); int imx25_register_gpios(void);
......
...@@ -55,11 +55,14 @@ static struct map_desc imx27_io_desc[] __initdata = { ...@@ -55,11 +55,14 @@ static struct map_desc imx27_io_desc[] __initdata = {
* memory map for the IO modules. * memory map for the IO modules.
*/ */
void __init mx27_map_io(void) void __init mx27_map_io(void)
{
iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
}
void __init imx27_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX27); mxc_set_cpu_type(MXC_CPU_MX27);
mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR));
iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
} }
int imx27_register_gpios(void); int imx27_register_gpios(void);
......
...@@ -24,6 +24,10 @@ extern void mx50_map_io(void); ...@@ -24,6 +24,10 @@ extern void mx50_map_io(void);
extern void mx51_map_io(void); extern void mx51_map_io(void);
extern void mx53_map_io(void); extern void mx53_map_io(void);
extern void mxc91231_map_io(void); extern void mxc91231_map_io(void);
extern void imx1_init_early(void);
extern void imx21_init_early(void);
extern void imx25_init_early(void);
extern void imx27_init_early(void);
extern void mxc_init_irq(void __iomem *); extern void mxc_init_irq(void __iomem *);
extern void tzic_init_irq(void __iomem *); extern void tzic_init_irq(void __iomem *);
extern void mx1_init_irq(void); extern void mx1_init_irq(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment