Commit 7c38cf02 authored by Tony Lindgren's avatar Tony Lindgren Committed by Russell King
Browse files

[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: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d7b6b358
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -47,6 +47,14 @@ config MACH_OMAP_OSK
	  TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
          if you have such a board.

config OMAP_OSK_MISTRAL
	bool "Mistral QVGA board Support"
	depends on MACH_OMAP_OSK
    	help
	  The OSK supports an optional add-on board with a Quarter-VGA
	  touchscreen, PDA-ish buttons, a resume button, bicolor LED,
	  and camera connector.  Say Y here if you have this board.

config MACH_OMAP_PERSEUS2
	bool "TI Perseus2"
	depends on ARCH_OMAP1 && ARCH_OMAP730
+2 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
#

# Common support
obj-y := io.o id.o irq.o time.o serial.o
obj-y := io.o id.o irq.o time.o serial.o devices.o
led-y := leds.o

# Specific board support
@@ -23,6 +23,7 @@ endif

# LEDs support
led-$(CONFIG_MACH_OMAP_H2)		+= leds-h2p2-debug.o
led-$(CONFIG_MACH_OMAP_H3)		+= leds-h2p2-debug.o
led-$(CONFIG_MACH_OMAP_INNOVATOR)	+= leds-innovator.o
led-$(CONFIG_MACH_OMAP_PERSEUS2)	+= leds-h2p2-debug.o
led-$(CONFIG_MACH_OMAP_OSK)		+= leds-osk.o
+37 −1
Original line number Diff line number Diff line
@@ -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")
+20 −7
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <asm/mach/map.h>

#include <asm/arch/gpio.h>
#include <asm/arch/mux.h>
#include <asm/arch/tc.h>
#include <asm/arch/usb.h>
#include <asm/arch/common.h>
@@ -80,8 +81,7 @@ static struct flash_platform_data h2_flash_data = {
};

static struct resource h2_flash_resource = {
	.start		= OMAP_CS2B_PHYS,
	.end		= OMAP_CS2B_PHYS + OMAP_CS2B_SIZE - 1,
	/* This is on CS3, wherever it's mapped */
	.flags		= IORESOURCE_MEM,
};

@@ -126,10 +126,9 @@ static void __init h2_init_smc91x(void)
		printk("Error requesting gpio 0 for smc91x irq\n");
		return;
	}
	omap_set_gpio_edge_ctrl(0, OMAP_GPIO_FALLING_EDGE);
}

void h2_init_irq(void)
static void __init h2_init_irq(void)
{
	omap_init_irq();
	omap_gpio_init();
@@ -152,9 +151,13 @@ static struct omap_usb_config h2_usb_config __initdata = {
};

static struct omap_mmc_config h2_mmc_config __initdata = {
	.mmc_blocks		= 1,
	.mmc1_power_pin		= -1,	/* tps65010 gpio3 */
	.mmc1_switch_pin	= OMAP_MPUIO(1),
	.mmc [0] = {
		.enabled 	= 1,
		.wire4		= 1,
		.wp_pin		= OMAP_MPUIO(3),
		.power_pin	= -1,	/* tps65010 gpio3 */
		.switch_pin	= OMAP_MPUIO(1),
	},
};

static struct omap_board_config_kernel h2_config[] = {
@@ -164,6 +167,16 @@ static struct omap_board_config_kernel h2_config[] = {

static void __init h2_init(void)
{
	/* NOTE: revC boards support NAND-boot, which can put NOR on CS2B
	 * and NAND (either 16bit or 8bit) on CS3.
	 */
	h2_flash_resource.end = h2_flash_resource.start = omap_cs3_phys();
	h2_flash_resource.end += SZ_32M - 1;

	/* MMC:  card detect and WP */
	// omap_cfg_reg(U19_ARMIO1);		/* CD */
	omap_cfg_reg(BALLOUT_V8_ARMIO3);	/* WP */

	platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
	omap_board_config = h2_config;
	omap_board_config_size = ARRAY_SIZE(h2_config);
+14 −3
Original line number Diff line number Diff line
@@ -82,8 +82,7 @@ static struct flash_platform_data h3_flash_data = {
};

static struct resource h3_flash_resource = {
	.start		= OMAP_CS2B_PHYS,
	.end		= OMAP_CS2B_PHYS + OMAP_CS2B_SIZE - 1,
	/* This is on CS3, wherever it's mapped */
	.flags		= IORESOURCE_MEM,
};

@@ -161,13 +160,26 @@ static struct omap_usb_config h3_usb_config __initdata = {
	.pins[1]	= 3,
};

static struct omap_mmc_config h3_mmc_config __initdata = {
	.mmc[0] = {
		.enabled 	= 1,
		.power_pin	= -1,   /* tps65010 GPIO4 */
		.switch_pin	= OMAP_MPUIO(1),
	},
};

static struct omap_board_config_kernel h3_config[] = {
	{ OMAP_TAG_USB,	 &h3_usb_config },
	{ OMAP_TAG_MMC,  &h3_mmc_config },
};

static void __init h3_init(void)
{
	h3_flash_resource.end = h3_flash_resource.start = omap_cs3_phys();
	h3_flash_resource.end += OMAP_CS3_SIZE - 1;
	(void) platform_add_devices(devices, ARRAY_SIZE(devices));
	omap_board_config = h3_config;
	omap_board_config_size = ARRAY_SIZE(h3_config);
}

static void __init h3_init_smc91x(void)
@@ -177,7 +189,6 @@ static void __init h3_init_smc91x(void)
		printk("Error requesting gpio 40 for smc91x irq\n");
		return;
	}
	omap_set_gpio_edge_ctrl(40, OMAP_GPIO_FALLING_EDGE);
}

void h3_init_irq(void)
Loading