Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b88e62f authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP1: Use generic map_io, init_early and init_irq



This allows removing omap hacks for map_io allowing generic
map_io.

Note that in the future we can't do cpu_is_omapxxxx detection
until in init_early. This means that board-innovator.c now
assumes 15xx only, and board-generic.c assumes 16xx only.
This is best fixed later on by passing the SoC type from
device tree.

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 3ae3e253
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -135,12 +135,6 @@ void ams_delta_latch2_write(u16 mask, u16 value)
	*(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg;
}

static void __init ams_delta_init_irq(void)
{
	omap1_init_common_hw();
	omap1_init_irq();
}

static struct map_desc ams_delta_io_desc[] __initdata = {
	/* AMS_DELTA_LATCH1 */
	{
@@ -379,17 +373,13 @@ static int __init ams_delta_modem_init(void)
}
arch_initcall(ams_delta_modem_init);

static void __init ams_delta_map_io(void)
{
	omap1_map_common_io();
}

MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
	/* Maintainer: Jonathan McDowell <noodles@earth.li> */
	.boot_params	= 0x10000100,
	.map_io		= ams_delta_map_io,
	.map_io		= omap15xx_map_io,
	.init_early	= omap1_init_early,
	.reserve	= omap_reserve,
	.init_irq	= ams_delta_init_irq,
	.init_irq	= omap1_init_irq,
	.init_machine	= ams_delta_init,
	.timer		= &omap1_timer,
MACHINE_END
+36 −40
Original line number Diff line number Diff line
@@ -297,6 +297,39 @@ static struct omap_board_config_kernel fsample_config[] __initdata = {

static void __init omap_fsample_init(void)
{
	/* Early, board-dependent init */

	/*
	 * Hold GSM Reset until needed
	 */
	omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);

	/*
	 * UARTs -> done automagically by 8250 driver
	 */

	/*
	 * CSx timings, GPIO Mux ... setup
	 */

	/* Flash: CS0 timings setup */
	omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
	omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);

	/*
	 * Ethernet support through the debug board
	 * CS1 timings setup
	 */
	omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
	omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);

	/*
	 * Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
	 * It is used as the Ethernet controller interrupt
	 */
	omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF,
			OMAP7XX_IO_CONF_9);

	fsample_init_smc91x();

	if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0)
@@ -326,12 +359,6 @@ static void __init omap_fsample_init(void)
	omap_register_i2c_bus(1, 100, NULL, 0);
}

static void __init omap_fsample_init_irq(void)
{
	omap1_init_common_hw();
	omap1_init_irq();
}

/* Only FPGA needs to be mapped here. All others are done with ioremap */
static struct map_desc omap_fsample_io_desc[] __initdata = {
	{
@@ -350,49 +377,18 @@ static struct map_desc omap_fsample_io_desc[] __initdata = {

static void __init omap_fsample_map_io(void)
{
	omap1_map_common_io();
	omap15xx_map_io();
	iotable_init(omap_fsample_io_desc,
		     ARRAY_SIZE(omap_fsample_io_desc));

	/* Early, board-dependent init */

	/*
	 * Hold GSM Reset until needed
	 */
	omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);

	/*
	 * UARTs -> done automagically by 8250 driver
	 */

	/*
	 * CSx timings, GPIO Mux ... setup
	 */

	/* Flash: CS0 timings setup */
	omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
	omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);

	/*
	 * Ethernet support through the debug board
	 * CS1 timings setup
	 */
	omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
	omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);

	/*
	 * Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
	 * It is used as the Ethernet controller interrupt
	 */
	omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, OMAP7XX_IO_CONF_9);
}

MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
/* Maintainer: Brian Swetland <swetland@google.com> */
	.boot_params	= 0x10000100,
	.map_io		= omap_fsample_map_io,
	.init_early	= omap1_init_early,
	.reserve	= omap_reserve,
	.init_irq	= omap_fsample_init_irq,
	.init_irq	= omap1_init_irq,
	.init_machine	= omap_fsample_init,
	.timer		= &omap1_timer,
MACHINE_END
+3 −13
Original line number Diff line number Diff line
@@ -28,12 +28,6 @@
#include <plat/board.h>
#include <plat/common.h>

static void __init omap_generic_init_irq(void)
{
	omap1_init_common_hw();
	omap1_init_irq();
}

/* assume no Mini-AB port */

#ifdef CONFIG_ARCH_OMAP15XX
@@ -87,17 +81,13 @@ static void __init omap_generic_init(void)
	omap_register_i2c_bus(1, 100, NULL, 0);
}

static void __init omap_generic_map_io(void)
{
	omap1_map_common_io();
}

MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
	/* Maintainer: Tony Lindgren <tony@atomide.com> */
	.boot_params	= 0x10000100,
	.map_io		= omap_generic_map_io,
	.map_io		= omap16xx_map_io,
	.init_early	= omap1_init_early,
	.reserve	= omap_reserve,
	.init_irq	= omap_generic_init_irq,
	.init_irq	= omap1_init_irq,
	.init_machine	= omap_generic_init,
	.timer		= &omap1_timer,
MACHINE_END
+3 −13
Original line number Diff line number Diff line
@@ -373,12 +373,6 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = {
	},
};

static void __init h2_init_irq(void)
{
	omap1_init_common_hw();
	omap1_init_irq();
}

static struct omap_usb_config h2_usb_config __initdata = {
	/* usb1 has a Mini-AB port and external isp1301 transceiver */
	.otg		= 2,
@@ -454,17 +448,13 @@ static void __init h2_init(void)
	h2_mmc_init();
}

static void __init h2_map_io(void)
{
	omap1_map_common_io();
}

MACHINE_START(OMAP_H2, "TI-H2")
	/* Maintainer: Imre Deak <imre.deak@nokia.com> */
	.boot_params	= 0x10000100,
	.map_io		= h2_map_io,
	.map_io		= omap16xx_map_io,
	.init_early     = omap1_init_early,
	.reserve	= omap_reserve,
	.init_irq	= h2_init_irq,
	.init_irq	= omap1_init_irq,
	.init_machine	= h2_init,
	.timer		= &omap1_timer,
MACHINE_END
+3 −13
Original line number Diff line number Diff line
@@ -436,23 +436,13 @@ static void __init h3_init(void)
	h3_mmc_init();
}

static void __init h3_init_irq(void)
{
	omap1_init_common_hw();
	omap1_init_irq();
}

static void __init h3_map_io(void)
{
	omap1_map_common_io();
}

MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
	/* Maintainer: Texas Instruments, Inc. */
	.boot_params	= 0x10000100,
	.map_io		= h3_map_io,
	.map_io		= omap16xx_map_io,
	.init_early     = omap1_init_early,
	.reserve	= omap_reserve,
	.init_irq	= h3_init_irq,
	.init_irq	= omap1_init_irq,
	.init_machine	= h3_init,
	.timer		= &omap1_timer,
MACHINE_END
Loading