diff options
author | Marek Vasut <marex@denx.de> | 2012-05-01 11:09:44 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-05-15 08:31:35 +0200 |
commit | 0239c2fb4a24f99e7d63d7ec0be04a05f0b895f4 (patch) | |
tree | ace53e94c3808eeb389d05163e7053aec5466bb0 /arch/arm/cpu/arm926ejs/mx28/mx28.c | |
parent | 9a0f98d39714f5d681ee541e88a91a59a4e5407f (diff) | |
download | u-boot-imx-0239c2fb4a24f99e7d63d7ec0be04a05f0b895f4.zip u-boot-imx-0239c2fb4a24f99e7d63d7ec0be04a05f0b895f4.tar.gz u-boot-imx-0239c2fb4a24f99e7d63d7ec0be04a05f0b895f4.tar.bz2 |
i.MX28: Improve passing of data from SPL to U-Boot
Pass memory size from SPL via structure located in SRAM instead of SCRATCH
registers. This allows passing more data about boot from SPL to U-Boot, like the
boot mode pads configuration.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/mx28/mx28.c')
-rw-r--r-- | arch/arm/cpu/arm926ejs/mx28/mx28.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index dc0338d..54a68e1 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -279,22 +279,16 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) int mx28_dram_init(void) { - struct mx28_digctl_regs *digctl_regs = - (struct mx28_digctl_regs *)MXS_DIGCTL_BASE; - uint32_t sz[2]; + struct mx28_spl_data *data = (struct mx28_spl_data *) + ((CONFIG_SYS_TEXT_BASE - sizeof(struct mx28_spl_data)) & ~0xf); - sz[0] = readl(&digctl_regs->hw_digctl_scratch0); - sz[1] = readl(&digctl_regs->hw_digctl_scratch1); - - if (sz[0] != sz[1]) { + if (data->mem_dram_size == 0) { printf("MX28:\n" - "Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n" - "HW_DIGCTRL_SCRATCH1 is not the same. Please\n" - "verify these two registers contain valid RAM size!\n"); + "Error, the RAM size passed up from SPL is 0!\n"); hang(); } - gd->ram_size = sz[0]; + gd->ram_size = data->mem_dram_size; return 0; } |