From 7c38cf021b42a4297bc8f860ab627734bdd6c8d1 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 8 Sep 2005 23:07:38 +0100 Subject: [ARM] 2890/1: OMAP 1/4: Update omap1 specific files, take 2 Patch from Tony Lindgren This patch syncs the mainline kernel with linux-omap tree. The highlights of the patch are: - Convert more drivers to register resources in board-*.c to take advantage of the driver model by David Brownell and Ladislav Michl - Use set_irq_type() for GPIO interrupts instead of omap_set_gpio_edge_ctrl() by David Brownell - Add minimal support for handling optional add-on boards, such as OSK Mistral board with LCD and keypad, by David Brownell - Minimal support for loading functions to SRAM by Tony Lindgren - Wake up from serial port by muxing RX lines temporarily into GPIO interrupts by Tony Lindgren - 32KHz sched_clock by Tony Lindgren and Juha Yrjola Signed-off-by: Tony Lindgren Signed-off-by: Russell King --- arch/arm/mach-omap1/board-generic.c | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-omap1/board-generic.c') diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index 122796ebe8f5..c209c7172a9a 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c @@ -48,19 +48,43 @@ static struct omap_usb_config generic1510_usb_config __initdata = { #if defined(CONFIG_ARCH_OMAP16XX) static struct omap_usb_config generic1610_usb_config __initdata = { +#ifdef CONFIG_USB_OTG + .otg = 1, +#endif .register_host = 1, .register_dev = 1, .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_board_config_kernel generic_config[] = { { OMAP_TAG_USB, NULL }, + { OMAP_TAG_MMC, &generic_mmc_config }, }; static void __init omap_generic_init(void) { + const struct omap_uart_config *uart_conf; + /* * Make sure the serial ports are muxed on at this point. * You have to mux them off in device drivers later on @@ -76,6 +100,18 @@ static void __init omap_generic_init(void) generic_config[0].data = &generic1610_usb_config; } #endif + + uart_conf = omap_get_config(OMAP_TAG_UART, struct omap_uart_config); + if (uart_conf != NULL) { + unsigned int enabled_ports, i; + + enabled_ports = uart_conf->enabled_uarts; + for (i = 0; i < 3; i++) { + if (!(enabled_ports & (1 << i))) + generic_serial_ports[i] = 0; + } + } + omap_board_config = generic_config; omap_board_config_size = ARRAY_SIZE(generic_config); omap_serial_init(generic_serial_ports); @@ -83,7 +119,7 @@ static void __init omap_generic_init(void) static void __init omap_generic_map_io(void) { - omap_map_common_io() + omap_map_common_io(); } MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") -- cgit v1.2.3-59-g8ed1b