diff options
Diffstat (limited to 'arch/arm/plat-omap/include')
31 files changed, 388 insertions, 170 deletions
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h index 3cf4fa25ab3..97126dfd288 100644 --- a/arch/arm/plat-omap/include/plat/board.h +++ b/arch/arm/plat-omap/include/plat/board.h @@ -151,14 +151,14 @@ struct omap_board_config_kernel {  	const void *data;  }; -extern const void *__omap_get_config(u16 tag, size_t len, int nr); +extern const void *__init __omap_get_config(u16 tag, size_t len, int nr);  #define omap_get_config(tag, type) \  	((const type *) __omap_get_config((tag), sizeof(type), 0))  #define omap_get_nr_config(tag, type, nr) \  	((const type *) __omap_get_config((tag), sizeof(type), (nr))) -extern const void *omap_get_var_config(u16 tag, size_t *len); +extern const void *__init omap_get_var_config(u16 tag, size_t *len);  extern struct omap_board_config_kernel *omap_board_config;  extern int omap_board_config_size; diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h index 256ab3f1ec8..f1899a3e417 100644 --- a/arch/arm/plat-omap/include/plat/clkdev_omap.h +++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h @@ -38,6 +38,7 @@ struct omap_clk {  #define CK_3517		(1 << 9)  #define CK_36XX		(1 << 10)	/* 36xx/37xx-specific clocks */  #define CK_443X		(1 << 11) +#define CK_TI816X	(1 << 12)  #define CK_34XX		(CK_3430ES1 | CK_3430ES2PLUS) diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 8eb0adab19e..006e599c661 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h @@ -25,6 +25,8 @@ struct clockdomain;   * @disable: fn ptr that enables the current clock in hardware   * @find_idlest: function returning the IDLEST register for the clock's IP blk   * @find_companion: function returning the "companion" clk reg for the clock + * @allow_idle: fn ptr that enables autoidle for the current clock in hardware + * @deny_idle: fn ptr that disables autoidle for the current clock in hardware   *   * A "companion" clk is an accompanying clock to the one being queried   * that must be enabled for the IP module connected to the clock to @@ -42,6 +44,8 @@ struct clkops {  					       u8 *, u8 *);  	void			(*find_companion)(struct clk *, void __iomem **,  						  u8 *); +	void			(*allow_idle)(struct clk *); +	void			(*deny_idle)(struct clk *);  };  #ifdef CONFIG_ARCH_OMAP2PLUS @@ -53,6 +57,7 @@ struct clkops {  #define RATE_IN_3430ES2PLUS	(1 << 3)	/* 3430 ES >= 2 rates only */  #define RATE_IN_36XX		(1 << 4)  #define RATE_IN_4430		(1 << 5) +#define RATE_IN_TI816X		(1 << 6)  #define RATE_IN_24XX		(RATE_IN_242X | RATE_IN_243X)  #define RATE_IN_34XX		(RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS) @@ -104,7 +109,6 @@ struct clksel {   * @clk_ref: struct clk pointer to the clock's reference clock input   * @control_reg: register containing the DPLL mode bitfield   * @enable_mask: mask of the DPLL mode bitfield in @control_reg - * @rate_tolerance: maximum variance allowed from target rate (in Hz)   * @last_rounded_rate: cache of the last rate result of omap2_dpll_round_rate()   * @last_rounded_m: cache of the last M result of omap2_dpll_round_rate()   * @max_multiplier: maximum valid non-bypass multiplier value (actual) @@ -130,12 +134,9 @@ struct clksel {   * XXX Some DPLLs have multiple bypass inputs, so it's not technically   * correct to only have one @clk_bypass pointer.   * - * XXX @rate_tolerance should probably be deprecated - currently there - * don't seem to be any usecases for DPLL rounding that is not exact. - *   * XXX The runtime-variable fields (@last_rounded_rate, @last_rounded_m,   * @last_rounded_n) should be separated from the runtime-fixed fields - * and placed into a differenct structure, so that the runtime-fixed data + * and placed into a different structure, so that the runtime-fixed data   * can be placed into read-only space.   */  struct dpll_data { @@ -146,7 +147,6 @@ struct dpll_data {  	struct clk		*clk_ref;  	void __iomem		*control_reg;  	u32			enable_mask; -	unsigned int		rate_tolerance;  	unsigned long		last_rounded_rate;  	u16			last_rounded_m;  	u16			max_multiplier; @@ -171,12 +171,24 @@ struct dpll_data {  #endif -/* struct clk.flags possibilities */ +/* + * struct clk.flags possibilities + * + * XXX document the rest of the clock flags here + * + * CLOCK_CLKOUTX2: (OMAP4 only) DPLL CLKOUT and CLKOUTX2 GATE_CTRL + *     bits share the same register.  This flag allows the + *     omap4_dpllmx*() code to determine which GATE_CTRL bit field + *     should be used.  This is a temporary solution - a better approach + *     would be to associate clock type-specific data with the clock, + *     similar to the struct dpll_data approach. + */  #define ENABLE_REG_32BIT	(1 << 0)	/* Use 32-bit access */  #define CLOCK_IDLE_CONTROL	(1 << 1)  #define CLOCK_NO_IDLE_PARENT	(1 << 2)  #define ENABLE_ON_INIT		(1 << 3)	/* Enable upon framework init */  #define INVERT_ENABLE		(1 << 4)	/* 0 enables, 1 disables */ +#define CLOCK_CLKOUTX2		(1 << 5)  /**   * struct clk - OMAP struct clk @@ -292,6 +304,8 @@ extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);  extern void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);  #endif  extern struct clk *omap_clk_get_by_name(const char *name); +extern int omap_clk_enable_autoidle_all(void); +extern int omap_clk_disable_autoidle_all(void);  extern const struct clkops clkops_null; diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index 29b2afb4288..1dd97e7461c 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h @@ -66,6 +66,7 @@ void omap2_set_globals_242x(void);  void omap2_set_globals_243x(void);  void omap2_set_globals_3xxx(void);  void omap2_set_globals_443x(void); +void omap2_set_globals_ti816x(void);  /* These get called from omap2_set_globals_xxxx(), do not call these */  void omap2_set_globals_tap(struct omap_globals *); diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 3fd8b405572..8198bb6cdb5 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -5,7 +5,7 @@   *   * Copyright (C) 2004, 2008 Nokia Corporation   * - * Copyright (C) 2009 Texas Instruments. + * Copyright (C) 2009-11 Texas Instruments.   *   * Written by Tony Lindgren <tony.lindgren@nokia.com>   * @@ -105,6 +105,12 @@ static inline int is_omap ##subclass (void)		\  	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\  } +#define IS_TI_SUBCLASS(subclass, id)			\ +static inline int is_ti ##subclass (void)		\ +{							\ +	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\ +} +  IS_OMAP_CLASS(7xx, 0x07)  IS_OMAP_CLASS(15xx, 0x15)  IS_OMAP_CLASS(16xx, 0x16) @@ -118,6 +124,8 @@ IS_OMAP_SUBCLASS(343x, 0x343)  IS_OMAP_SUBCLASS(363x, 0x363)  IS_OMAP_SUBCLASS(443x, 0x443) +IS_TI_SUBCLASS(816x, 0x816) +  #define cpu_is_omap7xx()		0  #define cpu_is_omap15xx()		0  #define cpu_is_omap16xx()		0 @@ -126,6 +134,7 @@ IS_OMAP_SUBCLASS(443x, 0x443)  #define cpu_is_omap243x()		0  #define cpu_is_omap34xx()		0  #define cpu_is_omap343x()		0 +#define cpu_is_ti816x()			0  #define cpu_is_omap44xx()		0  #define cpu_is_omap443x()		0 @@ -170,11 +179,11 @@ IS_OMAP_SUBCLASS(443x, 0x443)  #  undef  cpu_is_omap24xx  #  define cpu_is_omap24xx()		is_omap24xx()  # endif -# if defined (CONFIG_ARCH_OMAP2420) +# if defined (CONFIG_SOC_OMAP2420)  #  undef  cpu_is_omap242x  #  define cpu_is_omap242x()		is_omap242x()  # endif -# if defined (CONFIG_ARCH_OMAP2430) +# if defined (CONFIG_SOC_OMAP2430)  #  undef  cpu_is_omap243x  #  define cpu_is_omap243x()		is_omap243x()  # endif @@ -189,11 +198,11 @@ IS_OMAP_SUBCLASS(443x, 0x443)  #  undef  cpu_is_omap24xx  #  define cpu_is_omap24xx()		1  # endif -# if defined(CONFIG_ARCH_OMAP2420) +# if defined(CONFIG_SOC_OMAP2420)  #  undef  cpu_is_omap242x  #  define cpu_is_omap242x()		1  # endif -# if defined(CONFIG_ARCH_OMAP2430) +# if defined(CONFIG_SOC_OMAP2430)  #  undef  cpu_is_omap243x  #  define cpu_is_omap243x()		1  # endif @@ -201,7 +210,7 @@ IS_OMAP_SUBCLASS(443x, 0x443)  #  undef  cpu_is_omap34xx  #  define cpu_is_omap34xx()		1  # endif -# if defined(CONFIG_ARCH_OMAP3430) +# if defined(CONFIG_SOC_OMAP3430)  #  undef  cpu_is_omap343x  #  define cpu_is_omap343x()		1  # endif @@ -330,6 +339,7 @@ IS_OMAP_TYPE(3517, 0x3517)  # undef cpu_is_omap3530  # undef cpu_is_omap3505  # undef cpu_is_omap3517 +# undef cpu_is_ti816x  # define cpu_is_omap3430()		is_omap3430()  # define cpu_is_omap3503()		(cpu_is_omap3430() &&		\  						(!omap3_has_iva()) &&	\ @@ -345,6 +355,7 @@ IS_OMAP_TYPE(3517, 0x3517)  # define cpu_is_omap3517()		is_omap3517()  # undef cpu_is_omap3630  # define cpu_is_omap3630()		is_omap363x() +# define cpu_is_ti816x()		is_ti816x()  #endif  # if defined(CONFIG_ARCH_OMAP4) @@ -389,9 +400,15 @@ IS_OMAP_TYPE(3517, 0x3517)  #define OMAP3505_REV(v)		(OMAP35XX_CLASS | (0x3505 << 16) | (v << 8))  #define OMAP3517_REV(v)		(OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) +#define TI816X_CLASS		0x81600034 +#define TI8168_REV_ES1_0	TI816X_CLASS +#define TI8168_REV_ES1_1	(TI816X_CLASS | (OMAP_REVBITS_01 << 8)) +  #define OMAP443X_CLASS		0x44300044 -#define OMAP4430_REV_ES1_0	OMAP443X_CLASS -#define OMAP4430_REV_ES2_0	0x44301044 +#define OMAP4430_REV_ES1_0	(OMAP443X_CLASS | (0x10 << 8)) +#define OMAP4430_REV_ES2_0	(OMAP443X_CLASS | (0x20 << 8)) +#define OMAP4430_REV_ES2_1	(OMAP443X_CLASS | (0x21 << 8)) +#define OMAP4430_REV_ES2_2	(OMAP443X_CLASS | (0x22 << 8))  /*   * omap_chip bits @@ -419,11 +436,16 @@ IS_OMAP_TYPE(3517, 0x3517)  #define CHIP_IS_OMAP3630ES1_1           (1 << 9)  #define CHIP_IS_OMAP3630ES1_2           (1 << 10)  #define CHIP_IS_OMAP4430ES2		(1 << 11) +#define CHIP_IS_OMAP4430ES2_1		(1 << 12) +#define CHIP_IS_OMAP4430ES2_2		(1 << 13) +#define CHIP_IS_TI816X			(1 << 14)  #define CHIP_IS_OMAP24XX		(CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) -#define CHIP_IS_OMAP4430		(CHIP_IS_OMAP4430ES1 | \ -						 CHIP_IS_OMAP4430ES2) +#define CHIP_IS_OMAP4430		(CHIP_IS_OMAP4430ES1 |		\ +					 CHIP_IS_OMAP4430ES2 |		\ +					 CHIP_IS_OMAP4430ES2_1 |	\ +					 CHIP_IS_OMAP4430ES2_2)  /*   * "GE" here represents "greater than or equal to" in terms of ES @@ -455,6 +477,7 @@ extern u32 omap3_features;  #define OMAP3_HAS_ISP			BIT(4)  #define OMAP3_HAS_192MHZ_CLK		BIT(5)  #define OMAP3_HAS_IO_WAKEUP		BIT(6) +#define OMAP3_HAS_SDRC			BIT(7)  #define OMAP3_HAS_FEATURE(feat,flag)			\  static inline unsigned int omap3_has_ ##feat(void)	\ @@ -469,5 +492,6 @@ OMAP3_HAS_FEATURE(neon, NEON)  OMAP3_HAS_FEATURE(isp, ISP)  OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)  OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) +OMAP3_HAS_FEATURE(sdrc, SDRC)  #endif diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h index 537f4e449f5..0f140ecedb0 100644 --- a/arch/arm/plat-omap/include/plat/display.h +++ b/arch/arm/plat-omap/include/plat/display.h @@ -23,6 +23,7 @@  #include <linux/list.h>  #include <linux/kobject.h>  #include <linux/device.h> +#include <linux/platform_device.h>  #include <asm/atomic.h>  #define DISPC_IRQ_FRAMEDONE		(1 << 0) @@ -226,6 +227,16 @@ struct omap_dss_board_info {  	struct omap_dss_device *default_device;  }; +#if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS) +/* Init with the board info */ +extern int omap_display_init(struct omap_dss_board_info *board_data); +#else +static inline int omap_display_init(struct omap_dss_board_info *board_data) +{ +	return 0; +} +#endif +  struct omap_video_timings {  	/* Unit: pixels */  	u16 x_res; diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index dfa3aff9761..d6c70d2f403 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h @@ -3,6 +3,12 @@   *   * OMAP Dual-Mode Timers   * + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + * Tarun Kanti DebBarma <tarun.kanti@ti.com> + * Thara Gopinath <thara@ti.com> + * + * Platform device conversion and hwmod support. + *   * Copyright (C) 2005 Nokia Corporation   * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com>   * PWM and clock framwork support by Timo Teras. @@ -44,6 +50,11 @@  #define OMAP_TIMER_TRIGGER_OVERFLOW		0x01  #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE	0x02 +/* + * IP revision identifier so that Highlander IP + * in OMAP4 can be distinguished. + */ +#define OMAP_TIMER_IP_VERSION_1                        0x1  struct omap_dm_timer;  extern struct omap_dm_timer *gptimer_wakeup;  extern struct sys_timer omap_timer; diff --git a/arch/arm/plat-omap/include/plat/fpga.h b/arch/arm/plat-omap/include/plat/fpga.h index ae39bcb3f5b..bd3c6324ae1 100644 --- a/arch/arm/plat-omap/include/plat/fpga.h +++ b/arch/arm/plat-omap/include/plat/fpga.h @@ -30,18 +30,18 @@ extern void omap1510_fpga_init_irq(void);   * ---------------------------------------------------------------------------   */  /* maps in the FPGA registers and the ETHR registers */ -#define H2P2_DBG_FPGA_BASE		IOMEM(0xE8000000)	/* VA */ +#define H2P2_DBG_FPGA_BASE		0xE8000000		/* VA */  #define H2P2_DBG_FPGA_SIZE		SZ_4K			/* SIZE */  #define H2P2_DBG_FPGA_START		0x04000000		/* PA */  #define H2P2_DBG_FPGA_ETHR_START	(H2P2_DBG_FPGA_START + 0x300) -#define H2P2_DBG_FPGA_FPGA_REV		(H2P2_DBG_FPGA_BASE + 0x10)	/* FPGA Revision */ -#define H2P2_DBG_FPGA_BOARD_REV		(H2P2_DBG_FPGA_BASE + 0x12)	/* Board Revision */ -#define H2P2_DBG_FPGA_GPIO		(H2P2_DBG_FPGA_BASE + 0x14)	/* GPIO outputs */ -#define H2P2_DBG_FPGA_LEDS		(H2P2_DBG_FPGA_BASE + 0x16)	/* LEDs outputs */ -#define H2P2_DBG_FPGA_MISC_INPUTS	(H2P2_DBG_FPGA_BASE + 0x18)	/* Misc inputs */ -#define H2P2_DBG_FPGA_LAN_STATUS	(H2P2_DBG_FPGA_BASE + 0x1A)	/* LAN Status line */ -#define H2P2_DBG_FPGA_LAN_RESET		(H2P2_DBG_FPGA_BASE + 0x1C)	/* LAN Reset line */ +#define H2P2_DBG_FPGA_FPGA_REV		IOMEM(H2P2_DBG_FPGA_BASE + 0x10)	/* FPGA Revision */ +#define H2P2_DBG_FPGA_BOARD_REV		IOMEM(H2P2_DBG_FPGA_BASE + 0x12)	/* Board Revision */ +#define H2P2_DBG_FPGA_GPIO		IOMEM(H2P2_DBG_FPGA_BASE + 0x14)	/* GPIO outputs */ +#define H2P2_DBG_FPGA_LEDS		IOMEM(H2P2_DBG_FPGA_BASE + 0x16)	/* LEDs outputs */ +#define H2P2_DBG_FPGA_MISC_INPUTS	IOMEM(H2P2_DBG_FPGA_BASE + 0x18)	/* Misc inputs */ +#define H2P2_DBG_FPGA_LAN_STATUS	IOMEM(H2P2_DBG_FPGA_BASE + 0x1A)	/* LAN Status line */ +#define H2P2_DBG_FPGA_LAN_RESET		IOMEM(H2P2_DBG_FPGA_BASE + 0x1C)	/* LAN Reset line */  /* NOTE:  most boards don't have a static mapping for the FPGA ... */  struct h2p2_dbg_fpga { @@ -81,55 +81,55 @@ struct h2p2_dbg_fpga {   *  OMAP-1510 FPGA   * ---------------------------------------------------------------------------   */ -#define OMAP1510_FPGA_BASE		IOMEM(0xE8000000)	/* VA */ +#define OMAP1510_FPGA_BASE		0xE8000000		/* VA */  #define OMAP1510_FPGA_SIZE		SZ_4K  #define OMAP1510_FPGA_START		0x08000000		/* PA */  /* Revision */ -#define OMAP1510_FPGA_REV_LOW			(OMAP1510_FPGA_BASE + 0x0) -#define OMAP1510_FPGA_REV_HIGH			(OMAP1510_FPGA_BASE + 0x1) +#define OMAP1510_FPGA_REV_LOW			IOMEM(OMAP1510_FPGA_BASE + 0x0) +#define OMAP1510_FPGA_REV_HIGH			IOMEM(OMAP1510_FPGA_BASE + 0x1) -#define OMAP1510_FPGA_LCD_PANEL_CONTROL		(OMAP1510_FPGA_BASE + 0x2) -#define OMAP1510_FPGA_LED_DIGIT			(OMAP1510_FPGA_BASE + 0x3) -#define INNOVATOR_FPGA_HID_SPI			(OMAP1510_FPGA_BASE + 0x4) -#define OMAP1510_FPGA_POWER			(OMAP1510_FPGA_BASE + 0x5) +#define OMAP1510_FPGA_LCD_PANEL_CONTROL		IOMEM(OMAP1510_FPGA_BASE + 0x2) +#define OMAP1510_FPGA_LED_DIGIT			IOMEM(OMAP1510_FPGA_BASE + 0x3) +#define INNOVATOR_FPGA_HID_SPI			IOMEM(OMAP1510_FPGA_BASE + 0x4) +#define OMAP1510_FPGA_POWER			IOMEM(OMAP1510_FPGA_BASE + 0x5)  /* Interrupt status */ -#define OMAP1510_FPGA_ISR_LO			(OMAP1510_FPGA_BASE + 0x6) -#define OMAP1510_FPGA_ISR_HI			(OMAP1510_FPGA_BASE + 0x7) +#define OMAP1510_FPGA_ISR_LO			IOMEM(OMAP1510_FPGA_BASE + 0x6) +#define OMAP1510_FPGA_ISR_HI			IOMEM(OMAP1510_FPGA_BASE + 0x7)  /* Interrupt mask */ -#define OMAP1510_FPGA_IMR_LO			(OMAP1510_FPGA_BASE + 0x8) -#define OMAP1510_FPGA_IMR_HI			(OMAP1510_FPGA_BASE + 0x9) +#define OMAP1510_FPGA_IMR_LO			IOMEM(OMAP1510_FPGA_BASE + 0x8) +#define OMAP1510_FPGA_IMR_HI			IOMEM(OMAP1510_FPGA_BASE + 0x9)  /* Reset registers */ -#define OMAP1510_FPGA_HOST_RESET		(OMAP1510_FPGA_BASE + 0xa) -#define OMAP1510_FPGA_RST			(OMAP1510_FPGA_BASE + 0xb) +#define OMAP1510_FPGA_HOST_RESET		IOMEM(OMAP1510_FPGA_BASE + 0xa) +#define OMAP1510_FPGA_RST			IOMEM(OMAP1510_FPGA_BASE + 0xb) -#define OMAP1510_FPGA_AUDIO			(OMAP1510_FPGA_BASE + 0xc) -#define OMAP1510_FPGA_DIP			(OMAP1510_FPGA_BASE + 0xe) -#define OMAP1510_FPGA_FPGA_IO			(OMAP1510_FPGA_BASE + 0xf) -#define OMAP1510_FPGA_UART1			(OMAP1510_FPGA_BASE + 0x14) -#define OMAP1510_FPGA_UART2			(OMAP1510_FPGA_BASE + 0x15) -#define OMAP1510_FPGA_OMAP1510_STATUS		(OMAP1510_FPGA_BASE + 0x16) -#define OMAP1510_FPGA_BOARD_REV			(OMAP1510_FPGA_BASE + 0x18) -#define OMAP1510P1_PPT_DATA			(OMAP1510_FPGA_BASE + 0x100) -#define OMAP1510P1_PPT_STATUS			(OMAP1510_FPGA_BASE + 0x101) -#define OMAP1510P1_PPT_CONTROL			(OMAP1510_FPGA_BASE + 0x102) +#define OMAP1510_FPGA_AUDIO			IOMEM(OMAP1510_FPGA_BASE + 0xc) +#define OMAP1510_FPGA_DIP			IOMEM(OMAP1510_FPGA_BASE + 0xe) +#define OMAP1510_FPGA_FPGA_IO			IOMEM(OMAP1510_FPGA_BASE + 0xf) +#define OMAP1510_FPGA_UART1			IOMEM(OMAP1510_FPGA_BASE + 0x14) +#define OMAP1510_FPGA_UART2			IOMEM(OMAP1510_FPGA_BASE + 0x15) +#define OMAP1510_FPGA_OMAP1510_STATUS		IOMEM(OMAP1510_FPGA_BASE + 0x16) +#define OMAP1510_FPGA_BOARD_REV			IOMEM(OMAP1510_FPGA_BASE + 0x18) +#define OMAP1510P1_PPT_DATA			IOMEM(OMAP1510_FPGA_BASE + 0x100) +#define OMAP1510P1_PPT_STATUS			IOMEM(OMAP1510_FPGA_BASE + 0x101) +#define OMAP1510P1_PPT_CONTROL			IOMEM(OMAP1510_FPGA_BASE + 0x102) -#define OMAP1510_FPGA_TOUCHSCREEN		(OMAP1510_FPGA_BASE + 0x204) +#define OMAP1510_FPGA_TOUCHSCREEN		IOMEM(OMAP1510_FPGA_BASE + 0x204) -#define INNOVATOR_FPGA_INFO			(OMAP1510_FPGA_BASE + 0x205) -#define INNOVATOR_FPGA_LCD_BRIGHT_LO		(OMAP1510_FPGA_BASE + 0x206) -#define INNOVATOR_FPGA_LCD_BRIGHT_HI		(OMAP1510_FPGA_BASE + 0x207) -#define INNOVATOR_FPGA_LED_GRN_LO		(OMAP1510_FPGA_BASE + 0x208) -#define INNOVATOR_FPGA_LED_GRN_HI		(OMAP1510_FPGA_BASE + 0x209) -#define INNOVATOR_FPGA_LED_RED_LO		(OMAP1510_FPGA_BASE + 0x20a) -#define INNOVATOR_FPGA_LED_RED_HI		(OMAP1510_FPGA_BASE + 0x20b) -#define INNOVATOR_FPGA_CAM_USB_CONTROL		(OMAP1510_FPGA_BASE + 0x20c) -#define INNOVATOR_FPGA_EXP_CONTROL		(OMAP1510_FPGA_BASE + 0x20d) -#define INNOVATOR_FPGA_ISR2			(OMAP1510_FPGA_BASE + 0x20e) -#define INNOVATOR_FPGA_IMR2			(OMAP1510_FPGA_BASE + 0x210) +#define INNOVATOR_FPGA_INFO			IOMEM(OMAP1510_FPGA_BASE + 0x205) +#define INNOVATOR_FPGA_LCD_BRIGHT_LO		IOMEM(OMAP1510_FPGA_BASE + 0x206) +#define INNOVATOR_FPGA_LCD_BRIGHT_HI		IOMEM(OMAP1510_FPGA_BASE + 0x207) +#define INNOVATOR_FPGA_LED_GRN_LO		IOMEM(OMAP1510_FPGA_BASE + 0x208) +#define INNOVATOR_FPGA_LED_GRN_HI		IOMEM(OMAP1510_FPGA_BASE + 0x209) +#define INNOVATOR_FPGA_LED_RED_LO		IOMEM(OMAP1510_FPGA_BASE + 0x20a) +#define INNOVATOR_FPGA_LED_RED_HI		IOMEM(OMAP1510_FPGA_BASE + 0x20b) +#define INNOVATOR_FPGA_CAM_USB_CONTROL		IOMEM(OMAP1510_FPGA_BASE + 0x20c) +#define INNOVATOR_FPGA_EXP_CONTROL		IOMEM(OMAP1510_FPGA_BASE + 0x20d) +#define INNOVATOR_FPGA_ISR2			IOMEM(OMAP1510_FPGA_BASE + 0x20e) +#define INNOVATOR_FPGA_IMR2			IOMEM(OMAP1510_FPGA_BASE + 0x210)  #define OMAP1510_FPGA_ETHR_START		(OMAP1510_FPGA_START + 0x300) diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h index 85ded598853..12b31616503 100644 --- a/arch/arm/plat-omap/include/plat/gpmc.h +++ b/arch/arm/plat-omap/include/plat/gpmc.h @@ -41,6 +41,8 @@  #define GPMC_NAND_ADDRESS	0x0000000b  #define GPMC_NAND_DATA		0x0000000c +#define GPMC_ENABLE_IRQ		0x0000000d +  /* ECC commands */  #define GPMC_ECC_READ		0 /* Reset Hardware ECC for read */  #define GPMC_ECC_WRITE		1 /* Reset Hardware ECC for write */ @@ -78,6 +80,19 @@  #define WR_RD_PIN_MONITORING		0x00600000  #define GPMC_PREFETCH_STATUS_FIFO_CNT(val)	((val >> 24) & 0x7F)  #define GPMC_PREFETCH_STATUS_COUNT(val)	(val & 0x00003fff) +#define GPMC_IRQ_FIFOEVENTENABLE	0x01 +#define GPMC_IRQ_COUNT_EVENT		0x02 + +#define PREFETCH_FIFOTHRESHOLD_MAX	0x40 +#define PREFETCH_FIFOTHRESHOLD(val)	((val) << 8) + +enum omap_ecc { +		/* 1-bit ecc: stored at end of spare area */ +	OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ +	OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ +		/* 1-bit ecc: stored at begining of spare area as romcode */ +	OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ +};  /*   * Note that all values in this struct are in nanoseconds except sync_clk @@ -130,12 +145,11 @@ extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);  extern void gpmc_cs_free(int cs);  extern int gpmc_cs_set_reserved(int cs, int reserved);  extern int gpmc_cs_reserved(int cs); -extern int gpmc_prefetch_enable(int cs, int dma_mode, +extern int gpmc_prefetch_enable(int cs, int fifo_th, int dma_mode,  					unsigned int u32_count, int is_write);  extern int gpmc_prefetch_reset(int cs);  extern void omap3_gpmc_save_context(void);  extern void omap3_gpmc_restore_context(void); -extern void gpmc_init(void);  extern int gpmc_read_status(int cmd);  extern int gpmc_cs_configure(int cs, int cmd, int wval);  extern int gpmc_nand_read(int cs, int cmd); diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h index d5b26adfb89..e87efe1499b 100644 --- a/arch/arm/plat-omap/include/plat/hardware.h +++ b/arch/arm/plat-omap/include/plat/hardware.h @@ -286,5 +286,6 @@  #include <plat/omap24xx.h>  #include <plat/omap34xx.h>  #include <plat/omap44xx.h> +#include <plat/ti816x.h>  #endif	/* __ASM_ARCH_OMAP_HARDWARE_H */ diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h index ef4106c1318..d72ec85c97e 100644 --- a/arch/arm/plat-omap/include/plat/io.h +++ b/arch/arm/plat-omap/include/plat/io.h @@ -259,7 +259,7 @@ struct omap_sdrc_params;  extern void omap1_map_common_io(void);  extern void omap1_init_common_hw(void); -#ifdef CONFIG_ARCH_OMAP2420 +#ifdef CONFIG_SOC_OMAP2420  extern void omap242x_map_common_io(void);  #else  static inline void omap242x_map_common_io(void) @@ -267,7 +267,7 @@ static inline void omap242x_map_common_io(void)  }  #endif -#ifdef CONFIG_ARCH_OMAP2430 +#ifdef CONFIG_SOC_OMAP2430  extern void omap243x_map_common_io(void);  #else  static inline void omap243x_map_common_io(void) @@ -283,6 +283,14 @@ static inline void omap34xx_map_common_io(void)  }  #endif +#ifdef CONFIG_SOC_OMAPTI816X +extern void omapti816x_map_common_io(void); +#else +static inline void omapti816x_map_common_io(void) +{ +} +#endif +  #ifdef CONFIG_ARCH_OMAP4  extern void omap44xx_map_common_io(void);  #else diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 69230d68553..174f1b9c8c0 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -31,6 +31,7 @@ struct iommu {  	struct clk	*clk;  	void __iomem	*regbase;  	struct device	*dev; +	void		*isr_priv;  	unsigned int	refcount;  	struct mutex	iommu_lock;	/* global for this whole object */ @@ -47,7 +48,7 @@ struct iommu {  	struct list_head	mmap;  	struct mutex		mmap_lock; /* protect mmap */ -	int (*isr)(struct iommu *obj); +	int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, void *priv);  	void *ctx; /* iommu context: registres saved area */  	u32 da_start; @@ -109,6 +110,13 @@ struct iommu_platform_data {  	u32 da_end;  }; +/* IOMMU errors */ +#define OMAP_IOMMU_ERR_TLB_MISS		(1 << 0) +#define OMAP_IOMMU_ERR_TRANS_FAULT	(1 << 1) +#define OMAP_IOMMU_ERR_EMU_MISS		(1 << 2) +#define OMAP_IOMMU_ERR_TBLWALK_FAULT	(1 << 3) +#define OMAP_IOMMU_ERR_MULTIHIT_FAULT	(1 << 4) +  #if defined(CONFIG_ARCH_OMAP1)  #error "iommu for this processor not implemented yet"  #else @@ -154,11 +162,17 @@ extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end);  extern void flush_iotlb_all(struct iommu *obj);  extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); +extern void iopgtable_lookup_entry(struct iommu *obj, u32 da, u32 **ppgd, +				   u32 **ppte);  extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova);  extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end);  extern struct iommu *iommu_get(const char *name);  extern void iommu_put(struct iommu *obj); +extern int iommu_set_isr(const char *name, +			 int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, +				    void *priv), +			 void *isr_priv);  extern void iommu_save_ctx(struct iommu *obj);  extern void iommu_restore_ctx(struct iommu *obj); diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 2910de921c5..d7792837046 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h @@ -315,9 +315,12 @@  #define INT_34XX_SSM_ABORT_IRQ	6  #define INT_34XX_SYS_NIRQ	7  #define INT_34XX_D2D_FW_IRQ	8 +#define INT_34XX_L3_DBG_IRQ     9 +#define INT_34XX_L3_APP_IRQ     10  #define INT_34XX_PRCM_MPU_IRQ	11  #define INT_34XX_MCBSP1_IRQ	16  #define INT_34XX_MCBSP2_IRQ	17 +#define INT_34XX_GPMC_IRQ	20  #define INT_34XX_MCBSP3_IRQ	22  #define INT_34XX_MCBSP4_IRQ	23  #define INT_34XX_CAM_IRQ	24 @@ -411,7 +414,13 @@  #define TWL_IRQ_END		TWL6030_IRQ_END  #endif -#define NR_IRQS			TWL_IRQ_END +/* GPMC related */ +#define OMAP_GPMC_IRQ_BASE	(TWL_IRQ_END) +#define OMAP_GPMC_NR_IRQS	7 +#define OMAP_GPMC_IRQ_END	(OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS) + + +#define NR_IRQS			OMAP_GPMC_IRQ_END  #define OMAP_IRQ_BIT(irq)	(1 << ((irq) % 32)) diff --git a/arch/arm/plat-omap/include/plat/l3_2xxx.h b/arch/arm/plat-omap/include/plat/l3_2xxx.h new file mode 100644 index 00000000000..b8b5641379b --- /dev/null +++ b/arch/arm/plat-omap/include/plat/l3_2xxx.h @@ -0,0 +1,20 @@ +/* + * arch/arm/plat-omap/include/plat/l3_2xxx.h - L3 firewall definitions + * + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + *	Sumit Semwal + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ +#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_2XXX_H +#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_2XXX_H + +/* L3 CONNIDs */ +/* Display Sub system (DSS) */ +#define OMAP2_L3_CORE_FW_CONNID_DSS			8 + +#endif diff --git a/arch/arm/plat-omap/include/plat/l3_3xxx.h b/arch/arm/plat-omap/include/plat/l3_3xxx.h new file mode 100644 index 00000000000..cde1938c5f8 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/l3_3xxx.h @@ -0,0 +1,20 @@ +/* + * arch/arm/plat-omap/include/plat/l3_3xxx.h - L3 firewall definitions + * + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + *	Sumit Semwal + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ +#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_3XXX_H +#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_3XXX_H + +/* L3 Initiator IDs */ +/* Display Sub system (DSS) */ +#define OMAP3_L3_CORE_FW_INIT_ID_DSS			29 + +#endif diff --git a/arch/arm/plat-omap/include/plat/l4_2xxx.h b/arch/arm/plat-omap/include/plat/l4_2xxx.h new file mode 100644 index 00000000000..3f39cf8a35c --- /dev/null +++ b/arch/arm/plat-omap/include/plat/l4_2xxx.h @@ -0,0 +1,24 @@ +/* + * arch/arm/plat-omap/include/plat/l4_2xxx.h - L4 firewall definitions + * + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + *	Sumit Semwal + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ +#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L4_2XXX_H +#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L4_2XXX_H + +/* L4 CORE */ +/* Display Sub system (DSS) */ +#define OMAP2420_L4_CORE_FW_DSS_CORE_REGION			28 +#define OMAP2420_L4_CORE_FW_DSS_DISPC_REGION			29 +#define OMAP2420_L4_CORE_FW_DSS_RFBI_REGION			30 +#define OMAP2420_L4_CORE_FW_DSS_VENC_REGION			31 +#define OMAP2420_L4_CORE_FW_DSS_TA_REGION			32 + +#endif diff --git a/arch/arm/plat-omap/include/plat/l4_3xxx.h b/arch/arm/plat-omap/include/plat/l4_3xxx.h index 5e194937542..881a858b1ff 100644 --- a/arch/arm/plat-omap/include/plat/l4_3xxx.h +++ b/arch/arm/plat-omap/include/plat/l4_3xxx.h @@ -21,4 +21,14 @@  #define OMAP3_L4_CORE_FW_I2C3_REGION				73  #define OMAP3_L4_CORE_FW_I2C3_TA_REGION				74 +/* Display Sub system (DSS) */ +#define OMAP3_L4_CORE_FW_DSS_PROT_GROUP				2 + +#define OMAP3_L4_CORE_FW_DSS_DSI_REGION				104 +#define OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION			3 +#define OMAP3_L4_CORE_FW_DSS_CORE_REGION			4 +#define OMAP3_L4_CORE_FW_DSS_DISPC_REGION			4 +#define OMAP3_L4_CORE_FW_DSS_RFBI_REGION			5 +#define OMAP3_L4_CORE_FW_DSS_VENC_REGION			6 +#define OMAP3_L4_CORE_FW_DSS_TA_REGION				7  #endif diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index b87d83ccd54..f8f690ab299 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h @@ -37,6 +37,10 @@ static struct platform_device omap_mcbsp##port_nr = {	\  	.id	= OMAP_MCBSP##port_nr,			\  } +#define MCBSP_CONFIG_TYPE2	0x2 +#define MCBSP_CONFIG_TYPE3	0x3 +#define MCBSP_CONFIG_TYPE4	0x4 +  #define OMAP7XX_MCBSP1_BASE	0xfffb1000  #define OMAP7XX_MCBSP2_BASE	0xfffb1800 @@ -48,32 +52,14 @@ static struct platform_device omap_mcbsp##port_nr = {	\  #define OMAP1610_MCBSP2_BASE	0xfffb1000  #define OMAP1610_MCBSP3_BASE	0xe1017000 -#define OMAP24XX_MCBSP1_BASE	0x48074000 -#define OMAP24XX_MCBSP2_BASE	0x48076000 -#define OMAP2430_MCBSP3_BASE	0x4808c000 -#define OMAP2430_MCBSP4_BASE	0x4808e000 -#define OMAP2430_MCBSP5_BASE	0x48096000 - -#define OMAP34XX_MCBSP1_BASE	0x48074000 -#define OMAP34XX_MCBSP2_BASE	0x49022000 -#define OMAP34XX_MCBSP2_ST_BASE	0x49028000 -#define OMAP34XX_MCBSP3_BASE	0x49024000 -#define OMAP34XX_MCBSP3_ST_BASE	0x4902A000 -#define OMAP34XX_MCBSP3_BASE	0x49024000 -#define OMAP34XX_MCBSP4_BASE	0x49026000 -#define OMAP34XX_MCBSP5_BASE	0x48096000 - -#define OMAP44XX_MCBSP1_BASE	0x49022000 -#define OMAP44XX_MCBSP2_BASE	0x49024000 -#define OMAP44XX_MCBSP3_BASE	0x49026000 -#define OMAP44XX_MCBSP4_BASE	0x48096000 - -#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) +#ifdef CONFIG_ARCH_OMAP1  #define OMAP_MCBSP_REG_DRR2	0x00  #define OMAP_MCBSP_REG_DRR1	0x02  #define OMAP_MCBSP_REG_DXR2	0x04  #define OMAP_MCBSP_REG_DXR1	0x06 +#define OMAP_MCBSP_REG_DRR	0x02 +#define OMAP_MCBSP_REG_DXR	0x06  #define OMAP_MCBSP_REG_SPCR2	0x08  #define OMAP_MCBSP_REG_SPCR1	0x0a  #define OMAP_MCBSP_REG_RCR2	0x0c @@ -106,13 +92,6 @@ static struct platform_device omap_mcbsp##port_nr = {	\  #define OMAP_MCBSP_REG_XCCR	0x00  #define OMAP_MCBSP_REG_RCCR	0x00 -#define AUDIO_MCBSP_DATAWRITE	(OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1) -#define AUDIO_MCBSP_DATAREAD	(OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1) - -#define AUDIO_MCBSP		OMAP_MCBSP1 -#define AUDIO_DMA_TX		OMAP_DMA_MCBSP1_TX -#define AUDIO_DMA_RX		OMAP_DMA_MCBSP1_RX -  #else  #define OMAP_MCBSP_REG_DRR2	0x00 @@ -168,13 +147,6 @@ static struct platform_device omap_mcbsp##port_nr = {	\  #define OMAP_ST_REG_SFIRCR	0x28  #define OMAP_ST_REG_SSELCR	0x2C -#define AUDIO_MCBSP_DATAWRITE	(OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1) -#define AUDIO_MCBSP_DATAREAD	(OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1) - -#define AUDIO_MCBSP		OMAP_MCBSP2 -#define AUDIO_DMA_TX		OMAP24XX_DMA_MCBSP2_TX -#define AUDIO_DMA_RX		OMAP24XX_DMA_MCBSP2_RX -  #endif  /************************** McBSP SPCR1 bit definitions ***********************/ @@ -428,8 +400,9 @@ struct omap_mcbsp_platform_data {  #ifdef CONFIG_ARCH_OMAP3  	/* Sidetone block for McBSP 2 and 3 */  	unsigned long phys_base_st; -	u16 buffer_size;  #endif +	u16 buffer_size; +	unsigned int mcbsp_config_type;  };  struct omap_mcbsp_st_data { @@ -445,6 +418,7 @@ struct omap_mcbsp_st_data {  struct omap_mcbsp {  	struct device *dev;  	unsigned long phys_base; +	unsigned long phys_dma_base;  	void __iomem *io_base;  	u8 id;  	u8 free; @@ -471,7 +445,6 @@ struct omap_mcbsp {  	/* Protect the field .free, while checking if the mcbsp is in use */  	spinlock_t lock;  	struct omap_mcbsp_platform_data *pdata; -	struct clk *iclk;  	struct clk *fclk;  #ifdef CONFIG_ARCH_OMAP3  	struct omap_mcbsp_st_data *st_data; @@ -480,7 +453,17 @@ struct omap_mcbsp {  	u16 max_rx_thres;  #endif  	void *reg_cache; +	unsigned int mcbsp_config_type;  }; + +/** + * omap_mcbsp_dev_attr - OMAP McBSP device attributes for omap_hwmod + * @sidetone: name of the sidetone device + */ +struct omap_mcbsp_dev_attr { +	const char *sidetone; +}; +  extern struct omap_mcbsp **mcbsp_ptr;  extern int omap_mcbsp_count, omap_mcbsp_cache_size; @@ -488,8 +471,8 @@ extern int omap_mcbsp_count, omap_mcbsp_cache_size;  #define id_to_mcbsp_ptr(id)		mcbsp_ptr[id];  int omap_mcbsp_init(void); -void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, -					int size); +void omap_mcbsp_register_board_cfg(struct resource *res, int res_count, +			struct omap_mcbsp_platform_data *config, int size);  void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);  #ifdef CONFIG_ARCH_OMAP3  void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold); @@ -539,6 +522,9 @@ int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type);  void omap2_mcbsp1_mux_clkr_src(u8 mux);  void omap2_mcbsp1_mux_fsr_src(u8 mux); +int omap_mcbsp_dma_ch_params(unsigned int id, unsigned int stream); +int omap_mcbsp_dma_reg_params(unsigned int id, unsigned int stream); +  #ifdef CONFIG_ARCH_OMAP3  /* Sidetone specific API */  int omap_st_set_chgain(unsigned int id, int channel, s16 chgain); diff --git a/arch/arm/plat-omap/include/plat/mcspi.h b/arch/arm/plat-omap/include/plat/mcspi.h index 1254e4945b6..3d51b18131c 100644 --- a/arch/arm/plat-omap/include/plat/mcspi.h +++ b/arch/arm/plat-omap/include/plat/mcspi.h @@ -1,8 +1,19 @@  #ifndef _OMAP2_MCSPI_H  #define _OMAP2_MCSPI_H +#define OMAP2_MCSPI_REV 0 +#define OMAP3_MCSPI_REV 1 +#define OMAP4_MCSPI_REV 2 + +#define OMAP4_MCSPI_REG_OFFSET 0x100 +  struct omap2_mcspi_platform_config {  	unsigned short	num_cs; +	unsigned int regs_offset; +}; + +struct omap2_mcspi_dev_attr { +	unsigned short num_chipselect;  };  struct omap2_mcspi_device_config { diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index f57f36abb07..f38fef9f131 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h @@ -24,25 +24,19 @@  #define OMAP1_MMC2_BASE		0xfffb7c00	/* omap16xx only */  #define OMAP24XX_NR_MMC		2 -#define OMAP34XX_NR_MMC		3 -#define OMAP44XX_NR_MMC		5  #define OMAP2420_MMC_SIZE	OMAP1_MMC_SIZE -#define OMAP3_HSMMC_SIZE	0x200 -#define OMAP4_HSMMC_SIZE	0x1000  #define OMAP2_MMC1_BASE		0x4809c000 -#define OMAP2_MMC2_BASE		0x480b4000 -#define OMAP3_MMC3_BASE		0x480ad000 -#define OMAP4_MMC4_BASE		0x480d1000 -#define OMAP4_MMC5_BASE		0x480d5000 +  #define OMAP4_MMC_REG_OFFSET	0x100 -#define HSMMC5			(1 << 4) -#define HSMMC4			(1 << 3) -#define HSMMC3			(1 << 2) -#define HSMMC2			(1 << 1) -#define HSMMC1			(1 << 0)  #define OMAP_MMC_MAX_SLOTS	2 +#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT	BIT(1) + +struct omap_mmc_dev_attr { +	u8 flags; +}; +  struct omap_mmc_platform_data {  	/* back-link to device */  	struct device *dev; @@ -71,6 +65,9 @@ struct omap_mmc_platform_data {  	u64 dma_mask; +	/* Integrating attributes from the omap_hwmod layer */ +	u8 controller_flags; +  	/* Register offset deviation */  	u16 reg_offset; @@ -159,8 +156,7 @@ extern void omap_mmc_notify_cover_event(struct device *dev, int slot,  	defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)  void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,  				int nr_controllers); -void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, -				int nr_controllers); +void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data);  int omap_mmc_add(const char *name, int id, unsigned long base,  				unsigned long size, unsigned int irq,  				struct omap_mmc_platform_data *data); @@ -169,8 +165,7 @@ static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,  				int nr_controllers)  {  } -static inline void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, -				int nr_controllers) +static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)  {  }  static inline int omap_mmc_add(const char *name, int id, unsigned long base, diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h index ffd909fa528..999ffba2690 100644 --- a/arch/arm/plat-omap/include/plat/multi.h +++ b/arch/arm/plat-omap/include/plat/multi.h @@ -66,7 +66,7 @@  #  error "OMAP1 and OMAP2PLUS can't be selected at the same time"  # endif  #endif -#ifdef CONFIG_ARCH_OMAP2420 +#ifdef CONFIG_SOC_OMAP2420  # ifdef OMAP_NAME  #  undef  MULTI_OMAP2  #  define MULTI_OMAP2 @@ -74,7 +74,7 @@  #  define OMAP_NAME omap2420  # endif  #endif -#ifdef CONFIG_ARCH_OMAP2430 +#ifdef CONFIG_SOC_OMAP2430  # ifdef OMAP_NAME  #  undef  MULTI_OMAP2  #  define MULTI_OMAP2 diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h index 6562cd082bb..d86d1ecf006 100644 --- a/arch/arm/plat-omap/include/plat/nand.h +++ b/arch/arm/plat-omap/include/plat/nand.h @@ -8,8 +8,16 @@   * published by the Free Software Foundation.   */ +#include <plat/gpmc.h>  #include <linux/mtd/partitions.h> +enum nand_io { +	NAND_OMAP_PREFETCH_POLLED = 0,	/* prefetch polled mode, default */ +	NAND_OMAP_POLLED,		/* polled mode, without prefetch */ +	NAND_OMAP_PREFETCH_DMA,		/* prefetch enabled sDMA mode */ +	NAND_OMAP_PREFETCH_IRQ		/* prefetch enabled irq mode */ +}; +  struct omap_nand_platform_data {  	unsigned int		options;  	int			cs; @@ -20,8 +28,11 @@ struct omap_nand_platform_data {  	int			(*nand_setup)(void);  	int			(*dev_ready)(struct omap_nand_platform_data *);  	int			dma_channel; +	int			gpmc_irq; +	enum nand_io		xfer_type;  	unsigned long		phys_base;  	int			devsize; +	enum omap_ecc           ecc_opt;  };  /* minimum size for IO mapping */ diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 1eee85a8abb..8a1368fbbbd 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -1,7 +1,7 @@  /*   * omap_hwmod macros, structures   * - * Copyright (C) 2009-2010 Nokia Corporation + * Copyright (C) 2009-2011 Nokia Corporation   * Paul Walmsley   *   * Created in collaboration with (alphabetical order): BenoƮt Cousson, @@ -30,6 +30,7 @@  #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H  #include <linux/kernel.h> +#include <linux/init.h>  #include <linux/list.h>  #include <linux/ioport.h>  #include <linux/spinlock.h> @@ -178,7 +179,8 @@ struct omap_hwmod_omap2_firewall {  #define ADDR_TYPE_RT		(1 << 1)  /** - * struct omap_hwmod_addr_space - MPU address space handled by the hwmod + * struct omap_hwmod_addr_space - address space handled by the hwmod + * @name: name of the address space   * @pa_start: starting physical address   * @pa_end: ending physical address   * @flags: (see omap_hwmod_addr_space.flags macros above) @@ -187,6 +189,7 @@ struct omap_hwmod_omap2_firewall {   * structure.  GPMC is one example.   */  struct omap_hwmod_addr_space { +	const char *name;  	u32 pa_start;  	u32 pa_end;  	u8 flags; @@ -370,8 +373,10 @@ struct omap_hwmod_omap4_prcm {   *     of standby, rather than relying on module smart-standby   * HWMOD_INIT_NO_RESET: don't reset this module at boot - important for   *     SDRAM controller, etc. XXX probably belongs outside the main hwmod file + *     XXX Should be HWMOD_SETUP_NO_RESET   * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM   *     controller, etc. XXX probably belongs outside the main hwmod file + *     XXX Should be HWMOD_SETUP_NO_IDLE   * HWMOD_NO_AUTOIDLE: disable module autoidle (OCP_SYSCONFIG.AUTOIDLE)   *     when module is enabled, rather than the default, which is to   *     enable autoidle @@ -535,11 +540,12 @@ struct omap_hwmod {  	const struct omap_chip_id	omap_chip;  }; -int omap_hwmod_init(struct omap_hwmod **ohs); +int omap_hwmod_register(struct omap_hwmod **ohs);  struct omap_hwmod *omap_hwmod_lookup(const char *name);  int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),  			void *data); -int omap_hwmod_late_init(void); + +int __init omap_hwmod_setup_one(const char *name);  int omap_hwmod_enable(struct omap_hwmod *oh);  int _omap_hwmod_enable(struct omap_hwmod *oh); @@ -555,6 +561,7 @@ int omap_hwmod_enable_clocks(struct omap_hwmod *oh);  int omap_hwmod_disable_clocks(struct omap_hwmod *oh);  int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode); +int omap_hwmod_set_ocp_autoidle(struct omap_hwmod *oh, u8 autoidle);  int omap_hwmod_reset(struct omap_hwmod *oh);  void omap_hwmod_ocp_barrier(struct omap_hwmod *oh); @@ -589,6 +596,8 @@ int omap_hwmod_for_each_by_class(const char *classname,  int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state);  u32 omap_hwmod_get_context_loss_count(struct omap_hwmod *oh); +int omap_hwmod_no_setup_reset(struct omap_hwmod *oh); +  /*   * Chip variant-specific hwmod init routines - XXX should be converted   * to use initcalls once the initial boot ordering is straightened out diff --git a/arch/arm/plat-omap/include/plat/onenand.h b/arch/arm/plat-omap/include/plat/onenand.h index affe87e9ece..cbe897ca7f9 100644 --- a/arch/arm/plat-omap/include/plat/onenand.h +++ b/arch/arm/plat-omap/include/plat/onenand.h @@ -15,12 +15,20 @@  #define ONENAND_SYNC_READ	(1 << 0)  #define ONENAND_SYNC_READWRITE	(1 << 1) +struct onenand_freq_info { +	u16			maf_id; +	u16			dev_id; +	u16			ver_id; +}; +  struct omap_onenand_platform_data {  	int			cs;  	int			gpio_irq;  	struct mtd_partition	*parts;  	int			nr_parts; -	int                     (*onenand_setup)(void __iomem *, int freq); +	int			(*onenand_setup)(void __iomem *, int *freq_ptr); +	int		(*get_freq)(const struct onenand_freq_info *freq_info, +				    bool *clk_dep);  	int			dma_channel;  	u8			flags;  	u8			regulator_can_sleep; diff --git a/arch/arm/plat-omap/include/plat/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h index 2fdf8c80d39..267f43bb2a4 100644 --- a/arch/arm/plat-omap/include/plat/prcm.h +++ b/arch/arm/plat-omap/include/plat/prcm.h @@ -28,7 +28,6 @@  #define __ASM_ARM_ARCH_OMAP_PRCM_H  u32 omap_prcm_get_reset_sources(void); -void omap_prcm_arch_reset(char mode, const char *cmd);  int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest,  			 const char *name); diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h index efd87c8dda6..925b12b500d 100644 --- a/arch/arm/plat-omap/include/plat/sdrc.h +++ b/arch/arm/plat-omap/include/plat/sdrc.h @@ -124,8 +124,14 @@ struct omap_sdrc_params {  	u32 mr;  }; -void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, +#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) +void omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,  			    struct omap_sdrc_params *sdrc_cs1); +#else +static inline void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, +					  struct omap_sdrc_params *sdrc_cs1) {}; +#endif +  int omap2_sdrc_get_params(unsigned long r,  			  struct omap_sdrc_params **sdrc_cs0,  			  struct omap_sdrc_params **sdrc_cs1); diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h index cec5d56db2e..8061695aa52 100644 --- a/arch/arm/plat-omap/include/plat/serial.h +++ b/arch/arm/plat-omap/include/plat/serial.h @@ -51,6 +51,11 @@  #define OMAP4_UART3_BASE	0x48020000  #define OMAP4_UART4_BASE	0x4806e000 +/* TI816X serial ports */ +#define TI816X_UART1_BASE	0x48020000 +#define TI816X_UART2_BASE	0x48022000 +#define TI816X_UART3_BASE	0x48024000 +  /* External port on Zoom2/3 */  #define ZOOM_UART_BASE		0x10000000  #define ZOOM_UART_VIRT		0xfa400000 @@ -81,6 +86,9 @@  #define OMAP4UART2		OMAP2UART2  #define OMAP4UART3		43  #define OMAP4UART4		44 +#define TI816XUART1		81 +#define TI816XUART2		82 +#define TI816XUART3		83  #define ZOOM_UART		95		/* Only on zoom2/3 */  /* This is only used by 8250.c for omap1510 */ @@ -96,7 +104,6 @@  struct omap_board_data; -extern void __init omap_serial_early_init(void);  extern void omap_serial_init(void);  extern void omap_serial_init_port(struct omap_board_data *bdata);  extern int omap_uart_can_sleep(void); diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h index d0a119f735b..c5fa9e92900 100644 --- a/arch/arm/plat-omap/include/plat/system.h +++ b/arch/arm/plat-omap/include/plat/system.h @@ -4,48 +4,14 @@   */  #ifndef __ASM_ARCH_SYSTEM_H  #define __ASM_ARCH_SYSTEM_H -#include <linux/clk.h> -#include <asm/mach-types.h> -#include <mach/hardware.h> - -#include <plat/prcm.h> - -#ifndef CONFIG_MACH_VOICEBLUE -#define voiceblue_reset()		do {} while (0) -#else -extern void voiceblue_reset(void); -#endif +#include <asm/proc-fns.h>  static inline void arch_idle(void)  {  	cpu_do_idle();  } -static inline void omap1_arch_reset(char mode, const char *cmd) -{ -	/* -	 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 -	 * "Global Software Reset Affects Traffic Controller Frequency". -	 */ -	if (cpu_is_omap5912()) { -		omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), -				 DPLL_CTL); -		omap_writew(0x8, ARM_RSTCT1); -	} - -	if (machine_is_voiceblue()) -		voiceblue_reset(); -	else -		omap_writew(1, ARM_RSTCT1); -} - -static inline void arch_reset(char mode, const char *cmd) -{ -	if (!cpu_class_is_omap2()) -		omap1_arch_reset(mode, cmd); -	else -		omap_prcm_arch_reset(mode, cmd); -} +extern void (*arch_reset)(char, const char *);  #endif diff --git a/arch/arm/plat-omap/include/plat/ti816x.h b/arch/arm/plat-omap/include/plat/ti816x.h new file mode 100644 index 00000000000..50510f5dda1 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/ti816x.h @@ -0,0 +1,27 @@ +/* + * This file contains the address data for various TI816X modules. + * + * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + */ + +#ifndef __ASM_ARCH_TI816X_H +#define __ASM_ARCH_TI816X_H + +#define L4_SLOW_TI816X_BASE	0x48000000 + +#define TI816X_SCM_BASE		0x48140000 +#define TI816X_CTRL_BASE	TI816X_SCM_BASE +#define TI816X_PRCM_BASE	0x48180000 + +#define TI816X_ARM_INTC_BASE	0x48200000 + +#endif /* __ASM_ARCH_TI816X_H */ diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index ad98b85cae2..30b891c4a93 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h @@ -93,6 +93,10 @@ static inline void flush(void)  #define DEBUG_LL_ZOOM(mach)						\  	_DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART) +#define DEBUG_LL_TI816X(p, mach)					\ +	_DEBUG_LL_ENTRY(mach, TI816X_UART##p##_BASE, OMAP_PORT_SHIFT,	\ +		TI816XUART##p) +  static inline void __arch_decomp_setup(unsigned long arch_id)  {  	int port = 0; @@ -166,6 +170,9 @@ static inline void __arch_decomp_setup(unsigned long arch_id)  		DEBUG_LL_ZOOM(omap_zoom2);  		DEBUG_LL_ZOOM(omap_zoom3); +		/* TI8168 base boards using UART3 */ +		DEBUG_LL_TI816X(3, ti8168evm); +  	} while (0);  } diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 450a332f100..077192759af 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h @@ -91,6 +91,10 @@ extern int omap4430_phy_exit(struct device *dev);  #endif +extern void am35x_musb_reset(void); +extern void am35x_musb_phy_power(u8 on); +extern void am35x_musb_clear_irq(void); +extern void am35x_musb_set_mode(u8 musb_mode);  /*   * FIXME correct answer depends on hmc_mode,  |