Skip to contentSkip to conversation

armv8: ls1043a: remove redundant code in board files

PATCH New Gong Qianyu 2 participants 4 messages Apr 26, 2016 – May 24, 2016

lore
Share & tools
lore
#0 lore raw

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.

---
 board/freescale/ls1043aqds/ls1043aqds.c | 4 ----
 board/freescale/ls1043ardb/ls1043ardb.c | 5 -----
 2 files changed, 9 deletions(-)
board/freescale/ls1043aqds/ls1043aqds.c +0 -4
index fba6b88..a59b8f4 100644
@@ -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
index ec5fdbf..f1d4c39 100644
@@ -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
#1 lore raw

PATCH 2/2 armv8: ls1043ardb: fix types of variables

Using u16 for cfg_rcw_src and u8 for sd1refclk_sel is enough.

---
 board/freescale/ls1043ardb/ls1043ardb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
board/freescale/ls1043ardb/ls1043ardb.c +3 -3
index f1d4c39..2685dac 100644
@@ -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
#2 lore raw

PATCH 2/2 armv8: ls1043ardb: fix types of variables

Quoted 7 lines · Gong Qianyu

Using u16 for cfg_rcw_src and u8 for sd1refclk_sel is enough.

---
 board/freescale/ls1043ardb/ls1043ardb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-fsl-qoriq master, awaiting upstream.

Thanks.

York

#3 lore raw

PATCH 1/2 armv8: ls1043a: remove redundant code in board files

In reply to Gong Qianyu
Quoted 10 lines · Gong Qianyu

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.

---
 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