mxs: Use SoC agnostic configuration option for power switch setting
Subsystems (2)
PATCH 1/3 mxs: Use SoC agnostic configuration option for power switch setting
The power switch option is compatible with i.MX23 and i.MX28 so the configration option needs to reflect it. We choose 'CONFIG_SPL_MXS_PSWITCH_WAIT' for the option name.
--- arch/arm/cpu/arm926ejs/mxs/mxs_init.h | 2 +- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/arm926ejs/mxs/mxs_init.h +1 -1
@@ -30,7 +30,7 @@ void early_delay(int delay);void mxs_power_init (void ); -#ifdef CONFIG_SPL_MX28_PSWITCH_WAIT +#ifdef CONFIG_SPL_MXS_PSWITCH_WAIT void mxs_power_wait_pswitch (void );#else static inline void mxs_power_wait_pswitch (void ) { }
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +1 -1
@@ -921,7 +921,7 @@ void mxs_power_init(void)early_delay (1000 ); } -#ifdef CONFIG_SPL_MX28_PSWITCH_WAIT +#ifdef CONFIG_SPL_MXS_PSWITCH_WAIT void mxs_power_wait_pswitch (void ) { struct mxs_power_regs *power_regs =
Signature · 1 line
1.8.1
PATCH 2/3 mx23: Enable bit 24 of HW_DRAM_CTL08 as did in imx-bootlets
--- arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +1 -1
@@ -90,7 +90,7 @@ static uint32_t dram_vals[] = {#elif defined(CONFIG_MX23 )0x01010001 ,0x00010100 ,0x01000101 ,0x00000001 ,0x00000101 ,0x00000000 ,0x00010000 ,0x01000001 , -0x00000000 ,0x00000001 ,0x07000200 ,0x00070202 , +0x01000000 ,0x00000001 ,0x07000200 ,0x00070202 ,0x02020000 ,0x04040a01 ,0x00000201 ,0x02040000 ,0x02000000 ,0x19000f08 ,0x0d0d0000 ,0x02021313 , 0x02061521, 0x0000000a, 0x00080008, 0x00200020,
Signature · 1 line
1.8.1
PATCH 2/3 mx23: Enable bit 24 of HW_DRAM_CTL08 as did in imx-bootlets
Dear Otavio Salvador,
What does "bit 24" mean and what impact does it have? Commit message is missing. Also, I don't see patch 3/3
Quoted 10 lines
Signed-off-by Otavio Salvador <[email protected]>--- arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.cindex 836e636..a9efd87 100644
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c static uint32_t dram_vals[] = { · line 96
Quoted 8 lines
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +1
-1@@ -90,7 +90,7 @@ static uint32_t dram_vals[] = {#elif defined(CONFIG_MX23 )0x01010001 ,0x00010100 ,0x01000101 ,0x00000001 ,0x00000101 ,0x00000000 ,0x00010000 ,0x01000001 , -0x00000000 ,0x00000001 ,0x07000200 ,0x00070202 , +0x01000000 ,0x00000001 ,0x07000200 ,0x00070202 ,0x02020000 ,0x04040a01 ,0x00000201 ,0x02040000 ,0x02000000 ,0x19000f08 ,0x0d0d0000 ,0x02021313 , 0x02061521, 0x0000000a, 0x00080008, 0x00200020,
Best regards,
Marek Vasut
PATCH 3/3 mx23evk: Adjust DRAM control register to use full 128MB of RAM
In reply to Otavio Salvador--- board/freescale/mx23evk/spl_boot.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
board/freescale/mx23evk/spl_boot.c +10 -0
@@ -98,6 +98,16 @@ const iomux_cfg_t iomux_setup[] = { (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), }; +#define HW_DRAM_CTL14 (0x38 >> 2) +#define CS_MAP 0x3 +#define INTAREF 0x2 +#define HW_DRAM_CTL14_CONFIG (INTAREF << 8 | CS_MAP) + +void mxs_adjust_memory_params (uint32_t *dram_vals) +{ + dram_vals[HW_DRAM_CTL14 ] =HW_DRAM_CTL14_CONFIG ; +} +void board_init_ll (void ) {mxs_common_spl_init (iomux_setup,ARRAY_SIZE (iomux_setup));
Signature · 1 line
1.8.1
PATCH 1/3 mxs: Use SoC agnostic configuration option for power switch setting
In reply to Otavio SalvadorDear Otavio Salvador,
Quoted 3 lines
The power switch option is compatible with i.MX23 and i.MX28 so the configration option needs to reflect it. We choose '
CONFIG_SPL_MXS_PSWITCH_WAIT' for the option name.
The Subject should be "Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT" or something
Quoted 25 lines
Signed-off-by Otavio Salvador <[email protected]>--- arch/arm/cpu/arm926ejs/mxs/mxs_init.h | 2 +- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/arch/arm/cpu/arm926ejs/mxs/mxs_init.hindex 2ddc5bc..084def5 100644arch/arm/cpu/arm926ejs/mxs/mxs_init.h +1
-1@@ -30,7 +30,7 @@ void early_delay(int delay);void mxs_power_init (void ); -#ifdef CONFIG_SPL_MX28_PSWITCH_WAIT +#ifdef CONFIG_SPL_MXS_PSWITCH_WAIT void mxs_power_wait_pswitch (void );#else static inline void mxs_power_wait_pswitch (void ) { }(quoted diff) +0
-0
b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.cindex e9d6302..287c698 100644
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c void mxs_power_init(void) · line 927
Quoted 8 lines
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +1
-1@@ -921,7 +921,7 @@ void mxs_power_init(void)early_delay (1000 ); } -#ifdef CONFIG_SPL_MX28_PSWITCH_WAIT +#ifdef CONFIG_SPL_MXS_PSWITCH_WAIT void mxs_power_wait_pswitch (void ) { struct mxs_power_regs *power_regs =
Best regards,
Marek Vasut