imx8: cpu: restrict checking ROM passover info for revA
Subsystems (3)
PATCH 1/1 imx8: cpu: restrict checking ROM passover info for revA
Passover info only for revA.
move get_cpu_rev out of CONFIG_CPU to avoid build failure when using get_cpu_rev in SPL.
Add a CONFIG_SPL_BUILD for passover usage, no need to execute it again in normal U-Boot stage. Also if still checking passover info in normal U-Boot stage, need to make the passover code executed after arch_cpu_init_dm.
So to make it easy and clean, only execute the code for SPL stage.
--- arch/arm/mach-imx/imx8/cpu.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-)
arch/arm/mach-imx/imx8/cpu.c +22 -17
@@ -35,15 +35,20 @@ struct pass_over_info_t *get_pass_over_info(void)int arch_cpu_init (void ) { -struct pass_over_info_t *pass_over =get_pass_over_info (); - -if (pass_over && pass_over->g_ap_mu ==0 ) { -/* -* When ap_mu is 0, means the U-Boot booted -* from first container -*/ -sc_misc_boot_status (-1 ,SC_MISC_BOOT_STATUS_SUCCESS ); +#ifdef CONFIG_SPL_BUILD +struct pass_over_info_t *pass_over; + +if (is_soc_rev (CHIP_REV_A )) { + pass_over =get_pass_over_info (); +if (pass_over && pass_over->g_ap_mu ==0 ) { +/* +* When ap_mu is 0, means the U-Boot booted +* from first container +*/ +sc_misc_boot_status (-1 ,SC_MISC_BOOT_STATUS_SUCCESS ); + } } +#endif return 0 ; }
@@ -507,15 +512,6 @@ err:printf ("%s: fuse %d, err: %d\n" , __func__, word[i], ret); } -#if CONFIG_IS_ENABLED (CPU ) -struct cpu_imx_platdata { -const char *name; -const char *rev; -const char *type; -u32 cpurev; -u32 freq_mhz; -}; -u32 get_cpu_rev (void ) {u32 id =0 , rev =0 ;
@@ -531,6 +527,15 @@ u32 get_cpu_rev(void)return (id <<12 ) | rev; } +#if CONFIG_IS_ENABLED (CPU ) +struct cpu_imx_platdata { +const char *name; +const char *rev; +const char *type; +u32 cpurev; +u32 freq_mhz; +}; +const char *get_imx8_type (u32 imxtype) {switch (imxtype) {
Signature · 1 line
2.14.1
Quoted 9 lines
Passover info only for revA.
moveget_cpu_revout ofCONFIG_CPUto avoid build failure when usingget_cpu_revin SPL.
Add aCONFIG_SPL_BUILDfor passover usage, no need to execute it again in normal U-Boot stage. Also if still checking passover info in normal U-Boot stage, need to make the passover code executed afterarch_cpu_init_dm.
So to make it easy and clean, only execute the code for SPL stage.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================