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

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

ARM: OMAP: Sync core code with linux-omap



This patch syncs omap specific core code with linux-omap.
Most of the changes are needed to fix bitrot caused by
driver updates in linux-omap tree.

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent f4e4c324
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ comment "OMAP Board Type"
config MACH_OMAP_INNOVATOR
	bool "TI Innovator"
	depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
	select OMAP_MCBSP
	help
          TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
          have such a board.
@@ -29,6 +30,7 @@ config MACH_OMAP_INNOVATOR
config MACH_OMAP_H2
	bool "TI H2 Support"
	depends on ARCH_OMAP1 && ARCH_OMAP16XX
	select OMAP_MCBSP
    	help
	  TI OMAP 1610/1611B H2 board support. Say Y here if you have such
	  a board.
@@ -36,6 +38,7 @@ config MACH_OMAP_H2
config MACH_OMAP_H3
	bool "TI H3 Support"
	depends on ARCH_OMAP1 && ARCH_OMAP16XX
	select GPIOEXPANDER_OMAP
    	help
	  TI OMAP 1710 H3 board support. Say Y here if you have such
	  a board.
+0 −1
Original line number Diff line number Diff line
@@ -37,4 +37,3 @@ 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
obj-$(CONFIG_LEDS)			+= $(led-y)
+41 −30
Original line number Diff line number Diff line
@@ -24,35 +24,6 @@
#include <asm/arch/mux.h>
#include <asm/arch/gpio.h>

#if	defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE)

static u64 irda_dmamask = 0xffffffff;

static struct platform_device omap1610ir_device = {
	.name = "omap1610-ir",
	.id = -1,
	.dev = {
		.dma_mask	= &irda_dmamask,
	},
};

static void omap_init_irda(void)
{
	/* FIXME define and use a boot tag, members something like:
	 *  u8		uart;		// uart1, or uart3
	 * ... but driver only handles uart3 for now
	 *  s16		fir_sel;	// gpio for SIR vs FIR
	 * ... may prefer a callback for SIR/MIR/FIR mode select;
	 * while h2 uses a GPIO, H3 uses a gpio expander
	 */
	if (machine_is_omap_h2()
			|| machine_is_omap_h3())
		(void) platform_device_register(&omap1610ir_device);
}
#else
static inline void omap_init_irda(void) {}
#endif

/*-------------------------------------------------------------------------*/

#if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE)
@@ -90,6 +61,45 @@ static void omap_init_rtc(void)
static inline void omap_init_rtc(void) {}
#endif

#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)

#if defined(CONFIG_ARCH_OMAP15XX)
#  define OMAP1_MBOX_SIZE	0x23
#  define INT_DSP_MAILBOX1	INT_1510_DSP_MAILBOX1
#elif defined(CONFIG_ARCH_OMAP16XX)
#  define OMAP1_MBOX_SIZE	0x2f
#  define INT_DSP_MAILBOX1	INT_1610_DSP_MAILBOX1
#endif

#define OMAP1_MBOX_BASE		IO_ADDRESS(OMAP16XX_MAILBOX_BASE)

static struct resource mbox_resources[] = {
	{
		.start		= OMAP1_MBOX_BASE,
		.end		= OMAP1_MBOX_BASE + OMAP1_MBOX_SIZE,
		.flags		= IORESOURCE_MEM,
	},
	{
		.start		= INT_DSP_MAILBOX1,
		.flags		= IORESOURCE_IRQ,
	},
};

static struct platform_device mbox_device = {
	.name		= "mailbox",
	.id		= -1,
	.num_resources	= ARRAY_SIZE(mbox_resources),
	.resource	= mbox_resources,
};

static inline void omap_init_mbox(void)
{
	platform_device_register(&mbox_device);
}
#else
static inline void omap_init_mbox(void) { }
#endif

#if defined(CONFIG_OMAP_STI)

#define OMAP1_STI_BASE		IO_ADDRESS(0xfffea000)
@@ -154,7 +164,8 @@ static int __init omap1_init_devices(void)
	/* please keep these calls, and their implementations above,
	 * in alphabetical order so they're easier to sort through.
	 */
	omap_init_irda();

	omap_init_mbox();
	omap_init_rtc();
	omap_init_sti();

+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ config ARCH_OMAP2420
	bool "OMAP2420 support"
	depends on ARCH_OMAP24XX
	select OMAP_DM_TIMER
	select ARCH_OMAP_OTG

comment "OMAP Board Type"
	depends on ARCH_OMAP2
+55 −5
Original line number Diff line number Diff line
@@ -66,6 +66,40 @@ static void omap_init_i2c(void) {}

#endif

#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
#define OMAP2_MBOX_BASE		IO_ADDRESS(OMAP24XX_MAILBOX_BASE)

static struct resource mbox_resources[] = {
	{
		.start		= OMAP2_MBOX_BASE,
		.end		= OMAP2_MBOX_BASE + 0x11f,
		.flags		= IORESOURCE_MEM,
	},
	{
		.start		= INT_24XX_MAIL_U0_MPU,
		.flags		= IORESOURCE_IRQ,
	},
	{
		.start		= INT_24XX_MAIL_U3_MPU,
		.flags		= IORESOURCE_IRQ,
	},
};

static struct platform_device mbox_device = {
	.name		= "mailbox",
	.id		= -1,
	.num_resources	= ARRAY_SIZE(mbox_resources),
	.resource	= mbox_resources,
};

static inline void omap_init_mbox(void)
{
	platform_device_register(&mbox_device);
}
#else
static inline void omap_init_mbox(void) { }
#endif

#if defined(CONFIG_OMAP_STI)

#define OMAP2_STI_BASE		IO_ADDRESS(0x48068000)
@@ -111,29 +145,45 @@ static inline void omap_init_sti(void) {}
#define OMAP2_MCSPI1_BASE		0x48098000
#define OMAP2_MCSPI2_BASE		0x4809a000

/* FIXME: use resources instead */

static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
	.base		= io_p2v(OMAP2_MCSPI1_BASE),
	.num_cs		= 4,
};

static struct resource omap2_mcspi1_resources[] = {
	{
		.start		= OMAP2_MCSPI1_BASE,
		.end		= OMAP2_MCSPI1_BASE + 0xff,
		.flags		= IORESOURCE_MEM,
	},
};

struct platform_device omap2_mcspi1 = {
	.name		= "omap2_mcspi",
	.id		= 1,
	.num_resources	= ARRAY_SIZE(omap2_mcspi1_resources),
	.resource	= omap2_mcspi1_resources,
	.dev		= {
		.platform_data = &omap2_mcspi1_config,
	},
};

static struct omap2_mcspi_platform_config omap2_mcspi2_config = {
	.base		= io_p2v(OMAP2_MCSPI2_BASE),
	.num_cs		= 2,
};

static struct resource omap2_mcspi2_resources[] = {
	{
		.start		= OMAP2_MCSPI2_BASE,
		.end		= OMAP2_MCSPI2_BASE + 0xff,
		.flags		= IORESOURCE_MEM,
	},
};

struct platform_device omap2_mcspi2 = {
	.name		= "omap2_mcspi",
	.id		= 2,
	.num_resources	= ARRAY_SIZE(omap2_mcspi2_resources),
	.resource	= omap2_mcspi2_resources,
	.dev		= {
		.platform_data = &omap2_mcspi2_config,
	},
@@ -157,10 +207,10 @@ static int __init omap2_init_devices(void)
	 * in alphabetical order so they're easier to sort through.
	 */
	omap_init_i2c();
	omap_init_mbox();
	omap_init_mcspi();
	omap_init_sti();

	return 0;
}
arch_initcall(omap2_init_devices);
Loading