diff options
Diffstat (limited to 'arch/arm/include/asm/arch-omap5')
| -rw-r--r-- | arch/arm/include/asm/arch-omap5/clocks.h | 10 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-omap5/cpu.h | 2 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-omap5/i2c.h | 2 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-omap5/omap.h | 36 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-omap5/sys_proto.h | 22 | 
5 files changed, 26 insertions, 46 deletions
| diff --git a/arch/arm/include/asm/arch-omap5/clocks.h b/arch/arm/include/asm/arch-omap5/clocks.h index cfde37433..68afa7669 100644 --- a/arch/arm/include/asm/arch-omap5/clocks.h +++ b/arch/arm/include/asm/arch-omap5/clocks.h @@ -190,6 +190,10 @@  #define OPTFCLKEN_SRCOMP_FCLK_SHIFT		8  #define OPTFCLKEN_SRCOMP_FCLK_MASK		(1 << 8) +/* PRM_RSTTIME */ +#define RSTTIME1_SHIFT				0 +#define RSTTIME1_MASK				(0x3ff << 0) +  /* Clock frequencies */  #define OMAP_SYS_CLK_FREQ_38_4_MHZ	38400000  #define OMAP_SYS_CLK_IND_38_4_MHZ	6 @@ -251,4 +255,10 @@  #define DPLL_NO_LOCK	0  #define DPLL_LOCK	1 +/* + * MAX value for PRM_RSTTIME[9:0]RSTTIME1 stored is 0x3ff. + * 0x3ff is in the no of FUNC_32K_CLK cycles. Converting cycles + * into microsec and passing the value. + */ +#define CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC	31219  #endif /* _CLOCKS_OMAP5_H_ */ diff --git a/arch/arm/include/asm/arch-omap5/cpu.h b/arch/arm/include/asm/arch-omap5/cpu.h index 5e6201323..044ab5581 100644 --- a/arch/arm/include/asm/arch-omap5/cpu.h +++ b/arch/arm/include/asm/arch-omap5/cpu.h @@ -142,6 +142,8 @@ struct watchdog {  #define I2C_BASE1		(OMAP54XX_L4_PER_BASE + 0x70000)  #define I2C_BASE2		(OMAP54XX_L4_PER_BASE + 0x72000)  #define I2C_BASE3		(OMAP54XX_L4_PER_BASE + 0x60000) +#define I2C_BASE4		(OMAP54XX_L4_PER_BASE + 0x7A000) +#define I2C_BASE5		(OMAP54XX_L4_PER_BASE + 0x7C000)  /* MUSB base */  #define MUSB_BASE		(OMAP54XX_L4_CORE_BASE + 0xAB000) diff --git a/arch/arm/include/asm/arch-omap5/i2c.h b/arch/arm/include/asm/arch-omap5/i2c.h index 68be03be5..ec39a5318 100644 --- a/arch/arm/include/asm/arch-omap5/i2c.h +++ b/arch/arm/include/asm/arch-omap5/i2c.h @@ -23,7 +23,7 @@  #ifndef _OMAP5_I2C_H_  #define _OMAP5_I2C_H_ -#define I2C_BUS_MAX	3 +#define I2C_BUS_MAX	5  #define I2C_DEFAULT_BASE	I2C_BASE1  struct i2c { diff --git a/arch/arm/include/asm/arch-omap5/omap.h b/arch/arm/include/asm/arch-omap5/omap.h index 887fcaa5f..4f43a903d 100644 --- a/arch/arm/include/asm/arch-omap5/omap.h +++ b/arch/arm/include/asm/arch-omap5/omap.h @@ -191,19 +191,6 @@ struct s32ktimer {  /* base address for indirect vectors (internal boot mode) */  #define SRAM_ROM_VECT_BASE	0x4031F000 -#define SRAM_SCRATCH_SPACE_ADDR		NON_SECURE_SRAM_START -/* - * SRAM scratch space entries - */ -#define OMAP5_SRAM_SCRATCH_OMAP5_REV	SRAM_SCRATCH_SPACE_ADDR -#define OMAP5_SRAM_SCRATCH_EMIF_T_NUM	(SRAM_SCRATCH_SPACE_ADDR + 0xC) -#define OMAP5_SRAM_SCRATCH_EMIF_T_DEN	(SRAM_SCRATCH_SPACE_ADDR + 0x10) -#define OMAP_SRAM_SCRATCH_PRCM_PTR      (SRAM_SCRATCH_SPACE_ADDR + 0x14) -#define OMAP_SRAM_SCRATCH_DPLLS_PTR     (SRAM_SCRATCH_SPACE_ADDR + 0x18) -#define OMAP_SRAM_SCRATCH_VCORES_PTR    (SRAM_SCRATCH_SPACE_ADDR + 0x1C) -#define OMAP5_SRAM_SCRATCH_SYS_CTRL	(SRAM_SCRATCH_SPACE_ADDR + 0x20) -#define OMAP5_SRAM_SCRATCH_SPACE_END	(SRAM_SCRATCH_SPACE_ADDR + 0x24) -  /* Silicon revisions */  #define OMAP4430_SILICON_ID_INVALID	0xFFFFFFFF  #define OMAP4430_ES1_0	0x44300100 @@ -214,21 +201,6 @@ struct s32ktimer {  #define OMAP4460_ES1_0	0x44600100  #define OMAP4460_ES1_1	0x44600110 -/* ROM code defines */ -/* Boot device */ -#define BOOT_DEVICE_MASK	0xFF -#define BOOT_DEVICE_OFFSET	0x8 -#define DEV_DESC_PTR_OFFSET	0x4 -#define DEV_DATA_PTR_OFFSET	0x18 -#define BOOT_MODE_OFFSET	0x8 -#define RESET_REASON_OFFSET     0x9 -#define CH_FLAGS_OFFSET         0xA - -#define CH_FLAGS_CHSETTINGS	(0x1 << 0) -#define	CH_FLAGS_CHRAM		(0x1 << 1) -#define CH_FLAGS_CHFLASH	(0x1 << 2) -#define CH_FLAGS_CHMMCSD	(0x1 << 3) -  /* CONTROL_SRCOMP_XXX_SIDE */  #define OVERRIDE_XS_SHIFT		30  #define OVERRIDE_XS_MASK		(1 << 30) @@ -249,14 +221,6 @@ struct srcomp_params {  	s8 multiply_factor;  }; -struct omap_boot_parameters { -	char *boot_message; -	unsigned int mem_boot_descriptor; -	unsigned char omap_bootdevice; -	unsigned char reset_reason; -	unsigned char ch_flags; -}; -  struct ctrl_ioregs {  	u32 ctrl_ddrch;  	u32 ctrl_lpddr2ch; diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h b/arch/arm/include/asm/arch-omap5/sys_proto.h index e66ab4434..b79161d79 100644 --- a/arch/arm/include/asm/arch-omap5/sys_proto.h +++ b/arch/arm/include/asm/arch-omap5/sys_proto.h @@ -27,6 +27,8 @@  #include <asm/omap_common.h>  #include <asm/arch/clocks.h> +DECLARE_GLOBAL_DATA_PTR; +  struct pad_conf_entry {  	u32 offset;  	u32 val; @@ -64,14 +66,7 @@ u32 warm_reset(void);  void force_emif_self_refresh(void);  void get_ioregs(const struct ctrl_ioregs **regs);  void srcomp_enable(void); - -/* - * This is used to verify if the configuration header - * was executed by Romcode prior to control of transfer - * to the bootloader. SPL is responsible for saving and - * passing this to the u-boot. - */ -extern struct omap_boot_parameters boot_params; +void setup_warmreset_time(void);  static inline u32 running_from_sdram(void)  { @@ -91,7 +86,7 @@ static inline u8 uboot_loaded_by_spl(void)  	 * variable by both SPL and u-boot.Check out for CHSETTINGS, which is a  	 * mandatory section if CH is present.  	 */ -	if ((boot_params.ch_flags) & (CH_FLAGS_CHSETTINGS)) +	if ((gd->arch.omap_boot_params.ch_flags) & (CH_FLAGS_CHSETTINGS))  		return 0;  	else  		return running_from_sdram(); @@ -122,4 +117,13 @@ static inline u32 omap_hw_init_context(void)  #endif  } +static inline u32 div_round_up(u32 num, u32 den) +{ +	return (num + den - 1)/den; +} + +static inline u32 usec_to_32k(u32 usec) +{ +	return div_round_up(32768 * usec, 1000000); +}  #endif |