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

Commit e27a93a9 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP1: Misc clean-up



This patch cleans up omap1 files to sync up with linux-omap tree:

- Remove omap-generic MMC config as it should be defined in board-*.c files
  instead of using board-generic.c
- New style I2C board_info from David Brownell <dbrownell@users.sourceforge.net>
- Init section fixes from Dirk Behme <dirk.behme@googlemail.com>

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 80dbfde5
Loading
Loading
Loading
Loading
+2 −21
Original line number Diff line number Diff line
@@ -55,33 +55,14 @@ static struct omap_usb_config generic1610_usb_config __initdata = {
	.hmc_mode	= 16,
	.pins[0]	= 6,
};

static struct omap_mmc_config generic_mmc_config __initdata = {
	.mmc [0] = {
		.enabled 	= 0,
		.wire4		= 0,
		.wp_pin		= -1,
		.power_pin	= -1,
		.switch_pin	= -1,
	},
	.mmc [1] = {
		.enabled 	= 0,
		.wire4		= 0,
		.wp_pin		= -1,
		.power_pin	= -1,
		.switch_pin	= -1,
	},
};

#endif

static struct omap_uart_config generic_uart_config __initdata = {
	.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};

static struct omap_board_config_kernel generic_config[] = {
static struct omap_board_config_kernel generic_config[] __initdata = {
	{ OMAP_TAG_USB,		NULL },
	{ OMAP_TAG_MMC,           &generic_mmc_config },
	{ OMAP_TAG_UART,	&generic_uart_config },
};

+9 −39
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include <asm/mach/flash.h>
#include <asm/mach/map.h>

#include <asm/arch/gpio-switch.h>
#include <asm/arch/mux.h>
#include <asm/arch/tc.h>
#include <asm/arch/nand.h>
@@ -47,8 +48,6 @@
#include <asm/arch/mcbsp.h>
#include <asm/arch/omap-alsa.h>

extern int omap_gpio_init(void);

static int h2_keymap[] = {
	KEY(0, 0, KEY_LEFT),
	KEY(0, 1, KEY_RIGHT),
@@ -341,22 +340,6 @@ static struct platform_device *h2_devices[] __initdata = {
	&h2_mcbsp1_device,
};

#ifdef CONFIG_I2C_BOARDINFO
static struct i2c_board_info __initdata h2_i2c_board_info[] = {
	{
		I2C_BOARD_INFO("tps65010", 0x48),
		.type		= "tps65010",
		.irq		= OMAP_GPIO_IRQ(58),
	},
	/* TODO when driver support is ready:
	 *  - isp1301 OTG transceiver
	 *  - optional ov9640 camera sensor at 0x30
	 *  - pcf9754 for aGPS control
	 *  - ... etc
	 */
};
#endif

static void __init h2_init_smc91x(void)
{
	if ((omap_request_gpio(0)) < 0) {
@@ -365,6 +348,14 @@ static void __init h2_init_smc91x(void)
	}
}

static struct i2c_board_info __initdata h2_i2c_board_info[] = {
	{
		I2C_BOARD_INFO("isp1301_omap", 0x2d),
		.type		= "isp1301_omap",
		.irq		= OMAP_GPIO_IRQ(2),
	},
};

static void __init h2_init_irq(void)
{
	omap1_init_common_hw();
@@ -461,11 +452,6 @@ static void __init h2_init(void)
	omap_register_i2c_bus(1, 100, h2_i2c_board_info,
			      ARRAY_SIZE(h2_i2c_board_info));
	h2_mmc_init();

	/* irq for tps65010 chip */
	omap_cfg_reg(W4_GPIO58);
	if (gpio_request(58, "tps65010") == 0)
		gpio_direction_input(58);
}

static void __init h2_map_io(void)
@@ -473,22 +459,6 @@ static void __init h2_map_io(void)
	omap1_map_common_io();
}

#ifdef CONFIG_TPS65010
static int __init h2_tps_init(void)
{
	if (!machine_is_omap_h2())
		return 0;

	/* gpio3 for SD, gpio4 for VDD_DSP */
	/* FIXME send power to DSP iff it's configured */

	/* Enable LOW_PWR */
	tps65010_set_low_pwr(ON);
	return 0;
}
fs_initcall(h2_tps_init);
#endif

MACHINE_START(OMAP_H2, "TI-H2")
	/* Maintainer: Imre Deak <imre.deak@nokia.com> */
	.phys_io	= 0xfff00000,
+3 −33
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@
#include <asm/arch/mcbsp.h>
#include <asm/arch/omap-alsa.h>

extern int omap_gpio_init(void);

static int h3_keymap[] = {
	KEY(0, 0, KEY_LEFT),
	KEY(0, 1, KEY_RIGHT),
@@ -452,26 +450,13 @@ static struct omap_lcd_config h3_lcd_config __initdata = {
	.ctrl_name	= "internal",
};

static struct omap_board_config_kernel h3_config[] = {
static struct omap_board_config_kernel h3_config[] __initdata = {
	{ OMAP_TAG_USB,		&h3_usb_config },
	{ OMAP_TAG_MMC,		&h3_mmc_config },
	{ OMAP_TAG_UART,	&h3_uart_config },
	{ OMAP_TAG_LCD,		&h3_lcd_config },
};

static struct i2c_board_info __initdata h3_i2c_board_info[] = {
	{
		I2C_BOARD_INFO("tps65010", 0x48),
		.type		= "tps65013",
		/* .irq		= OMAP_GPIO_IRQ(??), */
	},
	/* TODO when driver support is ready:
	 *  - isp1301 OTG transceiver
	 *  - optional ov9640 camera sensor at 0x30
	 *  - ...
	 */
};

static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
	{
		.name			= "mmc_slot",
@@ -514,6 +499,8 @@ static void __init h3_init(void)
	omap_cfg_reg(V2_1710_GPIO10);

	platform_add_devices(devices, ARRAY_SIZE(devices));
	spi_register_board_info(h3_spi_board_info,
				ARRAY_SIZE(h3_spi_board_info));
	omap_board_config = h3_config;
	omap_board_config_size = ARRAY_SIZE(h3_config);
	omap_serial_init();
@@ -544,23 +531,6 @@ static void __init h3_map_io(void)
	omap1_map_common_io();
}

#ifdef CONFIG_TPS65010
static int __init h3_tps_init(void)
{
	if (!machine_is_omap_h3())
		return 0;

	/* gpio4 for SD, gpio3 for VDD_DSP */
	/* FIXME send power to DSP iff it's configured */

	/* Enable LOW_PWR */
	tps65013_set_low_pwr(ON);

	return 0;
}
fs_initcall(h3_tps_init);
#endif

MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
	/* Maintainer: Texas Instruments, Inc. */
	.phys_io	= 0xfff00000,
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ static struct omap_mmc_config nokia770_mmc_config __initdata = {
	},
};

static struct omap_board_config_kernel nokia770_config[] = {
static struct omap_board_config_kernel nokia770_config[] __initdata = {
	{ OMAP_TAG_USB,		NULL },
	{ OMAP_TAG_MMC,		&nokia770_mmc_config },
};
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ static struct omap_lcd_config osk_lcd_config __initdata = {
};
#endif

static struct omap_board_config_kernel osk_config[] = {
static struct omap_board_config_kernel osk_config[] __initdata = {
	{ OMAP_TAG_USB,           &osk_usb_config },
	{ OMAP_TAG_UART,		&osk_uart_config },
#ifdef	CONFIG_OMAP_OSK_MISTRAL
Loading