omap2/3/4: Fix omap2_map_common_io for multi-omap

Fix omap2_map_common_io for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Tony Lindgren 2010-02-12 12:26:47 -08:00
parent 882c0518e5
commit 6fbd55d077
22 changed files with 87 additions and 39 deletions

View File

@ -215,7 +215,7 @@ static void __init omap_2430sdp_init(void)
static void __init omap_2430sdp_map_io(void)
{
omap2_set_globals_243x();
omap2_map_common_io();
omap243x_map_common_io();
}
MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")

View File

@ -674,7 +674,7 @@ static void __init omap_3430sdp_init(void)
static void __init omap_3430sdp_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")

View File

@ -69,7 +69,7 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static void __init omap_sdp_map_io(void)
{
omap2_set_globals_36xx();
omap2_map_common_io();
omap34xx_map_common_io();
}
static struct omap_board_config_kernel sdp_config[] __initdata = {

View File

@ -87,7 +87,7 @@ static void __init omap_4430sdp_init(void)
static void __init omap_4430sdp_map_io(void)
{
omap2_set_globals_443x();
omap2_map_common_io();
omap44xx_map_common_io();
}
MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")

View File

@ -228,7 +228,7 @@ static void __init am3517_evm_init(void)
static void __init am3517_evm_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")

View File

@ -337,7 +337,7 @@ static void __init omap_apollon_init(void)
static void __init omap_apollon_map_io(void)
{
omap2_set_globals_242x();
omap2_map_common_io();
omap242x_map_common_io();
}
MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")

View File

@ -710,7 +710,7 @@ static void __init cm_t35_init_irq(void)
static void __init cm_t35_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
static struct omap_board_mux board_mux[] __initdata = {

View File

@ -50,7 +50,7 @@ static void __init omap_generic_init(void)
static void __init omap_generic_map_io(void)
{
omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */
omap2_map_common_io();
omap242x_map_common_io();
}
MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")

View File

@ -370,7 +370,7 @@ static void __init omap_h4_init(void)
static void __init omap_h4_map_io(void)
{
omap2_set_globals_242x();
omap2_map_common_io();
omap242x_map_common_io();
}
MACHINE_START(OMAP_H4, "OMAP2420 H4 board")

View File

@ -246,7 +246,7 @@ static void __init igep2_init(void)
static void __init igep2_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(IGEP0020, "IGEP v2 board")

View File

@ -404,7 +404,7 @@ static void __init omap_ldp_init(void)
static void __init omap_ldp_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OMAP_LDP, "OMAP LDP board")

View File

@ -99,7 +99,7 @@ static void __init n8x0_onenand_init(void) {}
static void __init n8x0_map_io(void)
{
omap2_set_globals_242x();
omap2_map_common_io();
omap242x_map_common_io();
}
static void __init n8x0_init_irq(void)

View File

@ -455,7 +455,7 @@ static void __init omap3_beagle_init(void)
static void __init omap3_beagle_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")

View File

@ -702,7 +702,7 @@ static void __init omap3_evm_init(void)
static void __init omap3_evm_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OMAP3EVM, "OMAP3 EVM")

View File

@ -423,7 +423,7 @@ static void __init omap3pandora_init(void)
static void __init omap3pandora_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")

View File

@ -557,7 +557,7 @@ static void __init omap3_touchbook_init(void)
static void __init omap3_touchbook_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")

View File

@ -469,7 +469,7 @@ static void __init overo_init(void)
static void __init overo_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OVERO, "Gumstix Overo")

View File

@ -93,7 +93,7 @@ static void __init rx51_init(void)
static void __init rx51_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")

View File

@ -87,7 +87,7 @@ static void __init omap_zoom2_init(void)
static void __init omap_zoom2_map_io(void)
{
omap2_set_globals_343x();
omap2_map_common_io();
omap34xx_map_common_io();
}
MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")

View File

@ -27,7 +27,7 @@
static void __init omap_zoom_map_io(void)
{
omap2_set_globals_36xx();
omap2_map_common_io();
omap34xx_map_common_io();
}
static struct omap_board_config_kernel zoom_config[] __initdata = {

View File

@ -236,25 +236,8 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
};
#endif
void __init omap2_map_common_io(void)
static void __init _omap2_map_common_io(void)
{
#if defined(CONFIG_ARCH_OMAP2420)
iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
#endif
#if defined(CONFIG_ARCH_OMAP2430)
iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
#endif
#if defined(CONFIG_ARCH_OMAP34XX)
iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
#endif
#if defined(CONFIG_ARCH_OMAP4)
iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
#endif
/* Normally devicemaps_init() would flush caches and tlb after
* mdesc->map_io(), but we must also do it here because of the CPU
* revision check below.
@ -268,6 +251,40 @@ void __init omap2_map_common_io(void)
omap_vram_reserve_sdram();
}
#ifdef CONFIG_ARCH_OMAP2420
void __init omap242x_map_common_io()
{
iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
_omap2_map_common_io();
}
#endif
#ifdef CONFIG_ARCH_OMAP2430
void __init omap243x_map_common_io()
{
iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
_omap2_map_common_io();
}
#endif
#ifdef CONFIG_ARCH_OMAP34XX
void __init omap34xx_map_common_io()
{
iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
_omap2_map_common_io();
}
#endif
#ifdef CONFIG_ARCH_OMAP4
void __init omap44xx_map_common_io()
{
iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
_omap2_map_common_io();
}
#endif
/*
* omap2_init_reprogram_sdrc - reprogram SDRC timing parameters
*

View File

@ -268,7 +268,38 @@ struct omap_sdrc_params;
extern void omap1_map_common_io(void);
extern void omap1_init_common_hw(void);
extern void omap2_map_common_io(void);
#ifdef CONFIG_ARCH_OMAP2420
extern void omap242x_map_common_io(void);
#else
static inline void omap242x_map_common_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP2430
extern void omap243x_map_common_io(void);
#else
static inline void omap243x_map_common_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP34XX
extern void omap34xx_map_common_io(void);
#else
static inline void omap34xx_map_common_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP4
extern void omap44xx_map_common_io(void);
#else
static inline void omap44xx_map_common_io(void)
{
}
#endif
extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1);