From fda06812a068f916f64d9d1b3d1730e8213195b3 Mon Sep 17 00:00:00 2001 From: SRICHARAN R Date: Wed, 24 Apr 2013 00:41:23 +0000 Subject: ARM: OMAP: Correct save_boot_params and replace with 'C' function Currently save_boot_params saves the boot parameters passed from romcode. But this is not stored in a writable location consistently. So the current code would not work for a 'XIP' boot. Change this by saving the boot parameters in 'gd' which is always writable. Also add a 'C' function instead of an assembly code that is more readable. Signed-off-by: Sricharan R --- arch/arm/include/asm/global_data.h | 8 ++++++++ arch/arm/include/asm/omap_boot.h | 1 + arch/arm/include/asm/omap_common.h | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'arch/arm/include/asm') diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 37ac0daa70b..7611d0a18bd 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -24,6 +24,10 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H +#ifdef CONFIG_OMAP +#include +#endif + /* Architecture-specific global data */ struct arch_global_data { #if defined(CONFIG_FSL_ESDHC) @@ -51,6 +55,10 @@ struct arch_global_data { unsigned long tlb_addr; unsigned long tlb_size; #endif + +#ifdef CONFIG_OMAP + struct omap_boot_parameters omap_boot_params; +#endif }; #include diff --git a/arch/arm/include/asm/omap_boot.h b/arch/arm/include/asm/omap_boot.h index 87a95302fa1..a803965ac59 100644 --- a/arch/arm/include/asm/omap_boot.h +++ b/arch/arm/include/asm/omap_boot.h @@ -45,5 +45,6 @@ struct omap_boot_parameters { unsigned char omap_bootdevice; unsigned char reset_reason; unsigned char ch_flags; + unsigned long omap_bootmode; }; #endif diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 837b69fdabe..eebc9c7cbf1 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -597,5 +597,7 @@ static inline u32 omap_revision(void) #define OMAP_SRAM_SCRATCH_DPLLS_PTR (SRAM_SCRATCH_SPACE_ADDR + 0x18) #define OMAP_SRAM_SCRATCH_VCORES_PTR (SRAM_SCRATCH_SPACE_ADDR + 0x1C) #define OMAP_SRAM_SCRATCH_SYS_CTRL (SRAM_SCRATCH_SPACE_ADDR + 0x20) -#define OMAP_SRAM_SCRATCH_SPACE_END (SRAM_SCRATCH_SPACE_ADDR + 0x24) +#define OMAP_SRAM_SCRATCH_BOOT_PARAMS (SRAM_SCRATCH_SPACE_ADDR + 0x24) +#define OMAP5_SRAM_SCRATCH_SPACE_END (SRAM_SCRATCH_SPACE_ADDR + 0x28) + #endif /* _OMAP_COMMON_H_ */ -- cgit v1.2.3