armv8: ls1043a: remove redundant code in board files
PATCH 1/2 armv8: ls1043a: remove redundant code in board files
gd->env_addr will be initialized in env_init() in common/env_nowhere.c if CONFIG_ENV_IS_NOWHERE is defined. So no need to do it again.
Signed-off-by Gong Qianyu <[email protected]>
--- board/freescale/ls1043aqds/ls1043aqds.c | 4 ---- board/freescale/ls1043ardb/ls1043ardb.c | 5 ----- 2 files changed, 9 deletions(-)
board/freescale/ls1043aqds/ls1043aqds.c +0 -4
@@ -325,10 +325,6 @@ int board_init(void)#ifdef CONFIG_LAYERSCAPE_NS_ACCESS enable_layerscape_ns_access ();#endif - -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif return 0 ; }
board/freescale/ls1043ardb/ls1043ardb.c +0 -5
@@ -19,7 +19,6 @@#include <fsl_csu.h> #include <fsl_esdhc.h> #include <fsl_ifc.h> -#include <environment.h> #include <fsl_sec.h> #include "cpld.h" #ifdef CONFIG_U_QE
@@ -95,10 +94,6 @@ int board_init(void)init_final_memctl_regs ();#endif -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif -#ifdef CONFIG_LAYERSCAPE_NS_ACCESS enable_layerscape_ns_access ();#endif
Signature · 1 line
2.1.0.27.g96db324
PATCH 2/2 armv8: ls1043ardb: fix types of variables
Using u16 for cfg_rcw_src and u8 for sd1refclk_sel is enough.
Signed-off-by Gong Qianyu <[email protected]>
--- board/freescale/ls1043ardb/ls1043ardb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
board/freescale/ls1043ardb/ls1043ardb.c +3 -3
@@ -30,12 +30,12 @@ DECLARE_GLOBAL_DATA_PTR;int checkboard (void ) { -static const char *freq[3 ] = {"100.00MHZ" ,"156.25MHZ" }; +static const char *freq[2 ] = {"100.00MHZ" ,"156.25MHZ" };#ifndef CONFIG_SD_BOOT u8 cfg_rcw_src1, cfg_rcw_src2; -u32 cfg_rcw_src; +u16 cfg_rcw_src;#endif -u32 sd1refclk_sel; +u8 sd1refclk_sel;printf ("Board: LS1043ARDB, boot from " );
Signature · 1 line
2.1.0.27.g96db324
PATCH 2/2 armv8: ls1043ardb: fix types of variables
Quoted 7 lines · Gong Qianyu
Using u16 for
cfg_rcw_srcand u8 forsd1refclk_selis enough.Signed-off-by Gong Qianyu <[email protected]>--- board/freescale/ls1043ardb/ls1043ardb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-fsl-qoriq master, awaiting upstream.
Thanks.
York
PATCH 1/2 armv8: ls1043a: remove redundant code in board files
In reply to Gong QianyuQuoted 10 lines · Gong Qianyu
gd->env_addrwill be initialized inenv_init()incommon/env_nowhere.cifCONFIG_ENV_IS_NOWHEREis defined. So no need to do it again.Signed-off-by Gong Qianyu <[email protected]>--- board/freescale/ls1043aqds/ls1043aqds.c | 4 ---- board/freescale/ls1043ardb/ls1043ardb.c | 5 ----- 2 files changed, 9 deletions(-)
Applied to u-boot-fsl-qoriq master, awaiting upstream.
Thanks.
York