omap3: introduce omap3_map_io
Most OMAP3-based boards use exactly the same code for .map_io method in the machine_desc structure. This patch introduces omap3_map_io and updates board-* files to use it as .map_io method. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Родитель
c573bcf96a
Коммит
869fef4154
|
@ -803,18 +803,12 @@ static void __init omap_3430sdp_init(void)
|
|||
usb_ehci_init(&ehci_pdata);
|
||||
}
|
||||
|
||||
static void __init omap_3430sdp_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
|
||||
/* Maintainer: Syed Khasim - Texas Instruments Inc */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_3430sdp_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_3430sdp_init_irq,
|
||||
.init_machine = omap_3430sdp_init,
|
||||
|
|
|
@ -66,12 +66,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
|||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static void __init omap_sdp_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
static struct omap_board_config_kernel sdp_config[] __initdata = {
|
||||
};
|
||||
|
||||
|
@ -107,7 +101,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
|
|||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_sdp_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_sdp_init_irq,
|
||||
.init_machine = omap_sdp_init,
|
||||
|
|
|
@ -461,17 +461,11 @@ static void __init am3517_evm_init(void)
|
|||
am3517_evm_ethernet_init(&am3517_evm_emac_pdata);
|
||||
}
|
||||
|
||||
static void __init am3517_evm_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = am3517_evm_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = am3517_evm_init_irq,
|
||||
.init_machine = am3517_evm_init,
|
||||
|
|
|
@ -708,12 +708,6 @@ static void __init cm_t35_init_irq(void)
|
|||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static void __init cm_t35_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
static struct omap_board_mux board_mux[] __initdata = {
|
||||
/* nCS and IRQ for CM-T35 ethernet */
|
||||
OMAP3_MUX(GPMC_NCS5, OMAP_MUX_MODE0),
|
||||
|
@ -836,7 +830,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
|
|||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = cm_t35_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = cm_t35_init_irq,
|
||||
.init_machine = cm_t35_init,
|
||||
|
|
|
@ -814,17 +814,11 @@ static void __init devkit8000_init(void)
|
|||
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
|
||||
}
|
||||
|
||||
static void __init devkit8000_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = devkit8000_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = devkit8000_init_irq,
|
||||
.init_machine = devkit8000_init,
|
||||
|
|
|
@ -532,17 +532,11 @@ static void __init igep2_init(void)
|
|||
pr_warning("IGEP v2: Could not obtain gpio GPIO_WIFI_NRESET\n");
|
||||
}
|
||||
|
||||
static void __init igep2_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(IGEP0020, "IGEP v2 board")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = igep2_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = igep2_init_irq,
|
||||
.init_machine = igep2_init,
|
||||
|
|
|
@ -406,17 +406,11 @@ static void __init omap_ldp_init(void)
|
|||
ldp_vmmc1_supply.dev = mmc[0].dev;
|
||||
}
|
||||
|
||||
static void __init omap_ldp_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_LDP, "OMAP LDP board")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_ldp_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_ldp_init_irq,
|
||||
.init_machine = omap_ldp_init,
|
||||
|
|
|
@ -507,18 +507,12 @@ static void __init omap3_beagle_init(void)
|
|||
beagle_display_init();
|
||||
}
|
||||
|
||||
static void __init omap3_beagle_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_beagle_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap3_beagle_init_irq,
|
||||
.init_machine = omap3_beagle_init,
|
||||
|
|
|
@ -715,18 +715,12 @@ static void __init omap3_evm_init(void)
|
|||
omap3_evm_display_init();
|
||||
}
|
||||
|
||||
static void __init omap3_evm_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP3EVM, "OMAP3 EVM")
|
||||
/* Maintainer: Syed Mohammed Khasim - Texas Instruments */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_evm_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap3_evm_init_irq,
|
||||
.init_machine = omap3_evm_init,
|
||||
|
|
|
@ -590,17 +590,11 @@ static void __init omap3pandora_init(void)
|
|||
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
|
||||
}
|
||||
|
||||
static void __init omap3pandora_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3pandora_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap3pandora_init_irq,
|
||||
.init_machine = omap3pandora_init,
|
||||
|
|
|
@ -652,18 +652,12 @@ static void __init omap3_stalker_init(void)
|
|||
omap_mux_init_signal("sdr_cke1", OMAP_PIN_OUTPUT);
|
||||
}
|
||||
|
||||
static void __init omap3_stalker_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(SBC3530, "OMAP3 STALKER")
|
||||
/* Maintainer: Jason Lam -lzg@ema-tech.com */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_stalker_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.init_irq = omap3_stalker_init_irq,
|
||||
.init_machine = omap3_stalker_init,
|
||||
.timer = &omap_timer,
|
||||
|
|
|
@ -559,18 +559,12 @@ static void __init omap3_touchbook_init(void)
|
|||
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
|
||||
}
|
||||
|
||||
static void __init omap3_touchbook_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
|
||||
/* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_touchbook_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap3_touchbook_init_irq,
|
||||
.init_machine = omap3_touchbook_init,
|
||||
|
|
|
@ -484,17 +484,11 @@ static void __init overo_init(void)
|
|||
"OVERO_GPIO_USBH_CPEN\n");
|
||||
}
|
||||
|
||||
static void __init overo_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OVERO, "Gumstix Overo")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = overo_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = overo_init_irq,
|
||||
.init_machine = overo_init,
|
||||
|
|
|
@ -84,17 +84,11 @@ static void __init omap_zoom2_init(void)
|
|||
zoom_debugboard_init();
|
||||
}
|
||||
|
||||
static void __init omap_zoom2_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
|
||||
.phys_io = ZOOM_UART_BASE,
|
||||
.io_pg_offst = (ZOOM_UART_VIRT >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_zoom2_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_zoom2_init_irq,
|
||||
.init_machine = omap_zoom2_init,
|
||||
|
|
|
@ -25,12 +25,6 @@
|
|||
#include "mux.h"
|
||||
#include "sdram-hynix-h8mbx00u0mer-0em.h"
|
||||
|
||||
static void __init omap_zoom_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
|
||||
static struct omap_board_config_kernel zoom_config[] __initdata = {
|
||||
};
|
||||
|
||||
|
@ -76,7 +70,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
|
|||
.phys_io = ZOOM_UART_BASE,
|
||||
.io_pg_offst = (ZOOM_UART_VIRT >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_zoom_map_io,
|
||||
.map_io = omap3_map_io,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_zoom_init_irq,
|
||||
.init_machine = omap_zoom_init,
|
||||
|
|
|
@ -324,6 +324,12 @@ void __init omap2_set_globals_3xxx(void)
|
|||
{
|
||||
__omap2_set_globals(&omap3_globals);
|
||||
}
|
||||
|
||||
void __init omap3_map_io(void)
|
||||
{
|
||||
omap2_set_globals_3xxx();
|
||||
omap34xx_map_common_io();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP4)
|
||||
|
|
|
@ -68,6 +68,8 @@ void omap2_set_globals_control(struct omap_globals *);
|
|||
void omap2_set_globals_prcm(struct omap_globals *);
|
||||
void omap2_set_globals_uart(struct omap_globals *);
|
||||
|
||||
void omap3_map_io(void);
|
||||
|
||||
/**
|
||||
* omap_test_timeout - busy-loop, testing a condition
|
||||
* @cond: condition to test until it evaluates to true
|
||||
|
|
Загрузка…
Ссылка в новой задаче