ARM: mxs: Receive r0 and r1 passed from BootROM
Subsystems (2)
PATCH 1/1 ARM: mxs: Receive r0 and r1 passed from BootROM
Make sure value in register r0 and r1 is preserved and passed to the board_init_ll() and mxs_common_spl_init() where it can be processed further. The value in r0 can be configured during the BootStream generation to arbitary value, r1 contains pointer to return value from CALL'd function.
This patch also clears the value in r0 before returning to BootROM to make sure the BootROM is not confused by this value.
Finally, this patch cleans up some comments in the start.S file.
Signed-off-by Marek Vasut <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
--- arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 5 +-- arch/arm/cpu/arm926ejs/mxs/start.S | 50 +++++++++++++++++------------ arch/arm/include/asm/arch-mxs/sys_proto.h | 5 +-- board/bluegiga/apx4devkit/spl_boot.c | 4 +-- board/creative/xfi3/spl_boot.c | 4 +-- board/denx/m28evk/spl_boot.c | 4 +-- board/freescale/mx23evk/spl_boot.c | 4 +-- board/freescale/mx28evk/iomux.c | 4 +-- board/olimex/mx23_olinuxino/spl_boot.c | 4 +-- board/sandisk/sansa_fuze_plus/spl_boot.c | 4 +-- board/schulercontrol/sc_sps_1/spl_boot.c | 4 +-- 11 files changed, 52 insertions(+), 40 deletions(-)
NOTE: This can be nicely used for loading Linux using BootROM
directly from the SPL.
arch/arm/cpu/arm926ejs/mxs/spl_boot.c +3 -2
@@ -102,8 +102,9 @@ static uint8_t mxs_get_bootmode_index(void)return i; } -void mxs_common_spl_init (const iomux_cfg_t *iomux_setup, -const unsigned int iomux_size) +void mxs_common_spl_init (const uint32_t arg,const uint32_t *resptr, +const iomux_cfg_t *iomux_setup, +const unsigned int iomux_size) {struct mxs_spl_data *data = (struct mxs_spl_data *) ((CONFIG_SYS_TEXT_BASE -sizeof (struct mxs_spl_data )) & ~0xf );
arch/arm/cpu/arm926ejs/mxs/start.S +30 -20
69 lines not on this page · raw message
arch/arm/include/asm/arch-mxs/sys_proto.h +3 -2
@@ -28,8 +28,9 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int), int (*cd)(int));#include <asm/arch/iomux-mx28.h> #endif -void mxs_common_spl_init (const iomux_cfg_t *iomux_setup, -const unsigned int iomux_size); +void mxs_common_spl_init (const uint32_t arg,const uint32_t *resptr, +const iomux_cfg_t *iomux_setup, +const unsigned int iomux_size);#endif struct mxs_pair {
board/bluegiga/apx4devkit/spl_boot.c +2 -2
@@ -132,9 +132,9 @@ const iomux_cfg_t iomux_setup[] = { MX28_PAD_EMI_CKE__EMI_CKE | MUX_CONFIG_EMI, }; -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup));/* switch LED on */ gpio_direction_output (MX28_PAD_PWM3__GPIO_3_28 ,0 );
board/creative/xfi3/spl_boot.c +2 -2
@@ -128,7 +128,7 @@ void mxs_adjust_memory_params(uint32_t *dram_vals)memcpy (dram_vals, regs,sizeof (regs)); } -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup)); }
board/denx/m28evk/spl_boot.c +2 -2
@@ -200,7 +200,7 @@ const iomux_cfg_t iomux_setup[] = { (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP), }; -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup)); }
board/freescale/mx23evk/spl_boot.c +2 -2
@@ -129,7 +129,7 @@ void mxs_adjust_memory_params(uint32_t *dram_vals) dram_vals[HW_DRAM_CTL14 ] =HW_DRAM_CTL14_CONFIG ; } -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup)); }
board/freescale/mx28evk/iomux.c +2 -2
@@ -200,7 +200,7 @@ void mxs_adjust_memory_params(uint32_t *dram_vals) dram_vals[HW_DRAM_CTL29 ] =HW_DRAM_CTL29_CONFIG ; } -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup)); }
board/olimex/mx23_olinuxino/spl_boot.c +2 -2
@@ -85,7 +85,7 @@ const iomux_cfg_t iomux_setup[] = { (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL), }; -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup)); }
board/sandisk/sansa_fuze_plus/spl_boot.c +2 -2
@@ -137,7 +137,7 @@ void mxs_adjust_memory_params(uint32_t *dram_vals)memcpy (dram_vals, regs,sizeof (regs)); } -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup)); }
board/schulercontrol/sc_sps_1/spl_boot.c +2 -2
@@ -138,9 +138,9 @@ const iomux_cfg_t iomux_setup[] = { MX28_PAD_GPMI_D06__GPIO_0_6 | MUX_CONFIG_LED, }; -void board_init_ll (void ) +void board_init_ll (const uint32_t arg,const uint32_t *resptr) { -mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup)); +mxs_common_spl_init (arg, resptr, iomux_setup,ARRAY_SIZE (iomux_setup)); }void mxs_adjust_memory_params (uint32_t *dram_vals)
Signature · 1 line
1.7.10.4