Commit 97976e22 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Sascha Hauer

ARM: mx3: use .init_early to initialize cpu type, reset address and iomuxer

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 3dac2196
...@@ -571,6 +571,7 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500") ...@@ -571,6 +571,7 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500")
/* Maintainer: Alberto Panizzo */ /* Maintainer: Alberto Panizzo */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.timer = &armadillo5x0_timer, .timer = &armadillo5x0_timer,
.init_machine = armadillo5x0_init, .init_machine = armadillo5x0_init,
......
...@@ -186,7 +186,8 @@ MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") ...@@ -186,7 +186,8 @@ MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35")
/* Maintainer: Eukrea Electromatique */ /* Maintainer: Eukrea Electromatique */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_ext3_fs = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.init_machine = mxc_board_init,
.timer = &eukrea_cpuimx35_timer, .timer = &eukrea_cpuimx35_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -276,7 +276,8 @@ static struct sys_timer kzm_timer = { ...@@ -276,7 +276,8 @@ static struct sys_timer kzm_timer = {
MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = kzm_map_io, .map_io = kzm_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_machine = kzm_board_init,
.timer = &kzm_timer, .timer = &kzm_timer,
.init_machine = kzm_board_init,
MACHINE_END MACHINE_END
...@@ -375,7 +375,8 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") ...@@ -375,7 +375,8 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_machine = mxc_board_init,
.timer = &mx31_3ds_timer, .timer = &mx31_3ds_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -552,7 +552,8 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS") ...@@ -552,7 +552,8 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31ads_map_io, .map_io = mx31ads_map_io,
.init_early = imx31_init_early,
.init_irq = mx31ads_init_irq, .init_irq = mx31ads_init_irq,
.init_machine = mxc_board_init,
.timer = &mx31ads_timer, .timer = &mx31ads_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -349,8 +349,8 @@ static struct sys_timer mx31lilly_timer = { ...@@ -349,8 +349,8 @@ static struct sys_timer mx31lilly_timer = {
MACHINE_START(LILLY1131, "INCO startec LILLY-1131") MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_machine = mx31lilly_board_init,
.timer = &mx31lilly_timer, .timer = &mx31lilly_timer,
.init_machine = mx31lilly_board_init,
MACHINE_END MACHINE_END
...@@ -283,7 +283,8 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") ...@@ -283,7 +283,8 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31lite_map_io, .map_io = mx31lite_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_machine = mxc_board_init,
.timer = &mx31lite_timer, .timer = &mx31lite_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -566,8 +566,8 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") ...@@ -566,8 +566,8 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
/* Maintainer: Valentin Longchamp, EPFL Mobots group */ /* Maintainer: Valentin Longchamp, EPFL Mobots group */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_machine = mxc_board_init,
.timer = &mx31moboard_timer, .timer = &mx31moboard_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -195,7 +195,8 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") ...@@ -195,7 +195,8 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
/* Maintainer: Freescale Semiconductor, Inc */ /* Maintainer: Freescale Semiconductor, Inc */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_early = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.init_machine = mxc_board_init,
.timer = &mx35pdk_timer, .timer = &mx35pdk_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -677,7 +677,8 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") ...@@ -677,7 +677,8 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
/* Maintainer: Pengutronix */ /* Maintainer: Pengutronix */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_machine = mxc_board_init,
.timer = &pcm037_timer, .timer = &pcm037_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -405,8 +405,8 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043") ...@@ -405,8 +405,8 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
/* Maintainer: Pengutronix */ /* Maintainer: Pengutronix */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_early = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.init_machine = mxc_board_init,
.timer = &pcm043_timer, .timer = &pcm043_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -272,7 +272,8 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") ...@@ -272,7 +272,8 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
/* Maintainer: DENX Software Engineering GmbH */ /* Maintainer: DENX Software Engineering GmbH */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_machine = mxc_board_init,
.timer = &qong_timer, .timer = &qong_timer,
.init_machine = mxc_board_init,
MACHINE_END MACHINE_END
...@@ -321,7 +321,8 @@ struct sys_timer vpr200_timer = { ...@@ -321,7 +321,8 @@ struct sys_timer vpr200_timer = {
MACHINE_START(VPR200, "VPR200") MACHINE_START(VPR200, "VPR200")
/* Maintainer: Creative Product Design */ /* Maintainer: Creative Product Design */
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_early = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.init_machine = vpr200_board_init,
.timer = &vpr200_timer, .timer = &vpr200_timer,
.init_machine = vpr200_board_init,
MACHINE_END MACHINE_END
...@@ -51,11 +51,14 @@ static struct map_desc mx31_io_desc[] __initdata = { ...@@ -51,11 +51,14 @@ static struct map_desc mx31_io_desc[] __initdata = {
* for the IO modules. * for the IO modules.
*/ */
void __init mx31_map_io(void) void __init mx31_map_io(void)
{
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
}
void __init imx31_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX31); mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
} }
int imx31_register_gpios(void); int imx31_register_gpios(void);
...@@ -76,12 +79,15 @@ static struct map_desc mx35_io_desc[] __initdata = { ...@@ -76,12 +79,15 @@ static struct map_desc mx35_io_desc[] __initdata = {
}; };
void __init mx35_map_io(void) 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_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
} }
int imx35_register_gpios(void); int imx35_register_gpios(void);
......
...@@ -28,6 +28,9 @@ extern void imx1_init_early(void); ...@@ -28,6 +28,9 @@ extern void imx1_init_early(void);
extern void imx21_init_early(void); extern void imx21_init_early(void);
extern void imx25_init_early(void); extern void imx25_init_early(void);
extern void imx27_init_early(void); extern void imx27_init_early(void);
extern void imx31_init_early(void);
extern void imx35_init_early(void);
extern void imx50_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