diff options
| author | Sricharan <r.sricharan@ti.com> | 2011-11-15 09:50:03 -0500 | 
|---|---|---|
| committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-11-15 22:25:50 +0100 | 
| commit | 78f455c055ddf55a1a2dd6ae5e2d060ed2e5bd0e (patch) | |
| tree | c124c8e56d72e9e46f70516fa9dd3dabdac22d9a /arch/arm/cpu/armv7/omap-common/hwinit-common.c | |
| parent | bb772a594493092adfb18a56889e0bce855eed99 (diff) | |
| download | olio-uboot-2014.01-78f455c055ddf55a1a2dd6ae5e2d060ed2e5bd0e.tar.xz olio-uboot-2014.01-78f455c055ddf55a1a2dd6ae5e2d060ed2e5bd0e.zip | |
omap4/5: Add support for booting with CH.
Configuration header(CH) is 512 byte header attached to an OMAP
boot image that will help ROM code to initialize clocks, SDRAM
etc and copy U-Boot directly into SDRAM. CH can help us in
by-passing SPL and directly boot U-boot, hence it's an alternative
for SPL. However, we intend to support both CH and SPL for OMAP4/5.
Initialization done through CH is limited and is not equivalent
to that done by SPL. So U-Boot has to distinguish between the
two cases and handle them accordingly. This patch takes care
of doing this.
Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common/hwinit-common.c')
| -rw-r--r-- | arch/arm/cpu/armv7/omap-common/hwinit-common.c | 24 | 
1 files changed, 22 insertions, 2 deletions
| diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index 5cf4e2bb2..f65705db1 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -31,9 +31,18 @@  #include <asm/arch/sys_proto.h>  #include <asm/sizes.h>  #include <asm/emif.h> +#include <asm/omap_common.h>  DECLARE_GLOBAL_DATA_PTR; +/* + * This is used to verify if the configuration header + * was executed by rom code prior to control of transfer + * to the bootloader. SPL is responsible for saving and + * passing the boot_params pointer to the u-boot. + */ +struct omap_boot_parameters boot_params __attribute__ ((section(".data"))); +  #ifdef CONFIG_SPL_BUILD  /*   * We use static variables because global data is not ready yet. @@ -41,12 +50,11 @@ DECLARE_GLOBAL_DATA_PTR;   * We would not typically need to save these parameters in regular   * U-Boot. This is needed only in SPL at the moment.   */ -u32 omap_bootdevice = BOOT_DEVICE_MMC1;  u32 omap_bootmode = MMCSD_MODE_FAT;  u32 omap_boot_device(void)  { -	return omap_bootdevice; +	return (u32) (boot_params.omap_bootdevice);  }  u32 omap_boot_mode(void) @@ -71,12 +79,16 @@ static void set_mux_conf_regs(void)  		set_muxconf_regs_essential();  		break;  	case OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL: +#ifdef CONFIG_SYS_ENABLE_PADS_ALL  		set_muxconf_regs_non_essential(); +#endif  		break;  	case OMAP_INIT_CONTEXT_UBOOT_FROM_NOR:  	case OMAP_INIT_CONTEXT_UBOOT_AFTER_CH:  		set_muxconf_regs_essential(); +#ifdef CONFIG_SYS_ENABLE_PADS_ALL  		set_muxconf_regs_non_essential(); +#endif  		break;  	}  } @@ -103,6 +115,13 @@ void omap_rev_string(char *omap_rev_string)  		minor_rev);  } +#ifdef CONFIG_SPL_BUILD +static void init_boot_params(void) +{ +	boot_params_ptr = (u32 *) &boot_params; +} +#endif +  /*   * Routine: s_init   * Description: Does early system init of watchdog, muxing,  andclocks @@ -131,6 +150,7 @@ void s_init(void)  #ifdef CONFIG_SPL_BUILD  	/* For regular u-boot sdram_init() is called from dram_init() */  	sdram_init(); +	init_boot_params();  #endif  } |