[U-Boot] [Patch V2 1/3] armv8: ls1043aqds: fix to get boot device info from FPGA

The LBMAP switches on the board will tell which boot device is used. Only QSPI boot is supported if the boot device is IFCCard.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com --- board/freescale/ls1043aqds/ls1043aqds.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c index 7e47ef0..9447c93 100644 --- a/board/freescale/ls1043aqds/ls1043aqds.c +++ b/board/freescale/ls1043aqds/ls1043aqds.c @@ -47,7 +47,7 @@ enum { int checkboard(void) { char buf[64]; -#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_QSPI_BOOT) +#ifndef CONFIG_SD_BOOT u8 sw; #endif
@@ -55,8 +55,6 @@ int checkboard(void)
#ifdef CONFIG_SD_BOOT puts("SD\n"); -#elif defined(CONFIG_QSPI_BOOT) - puts("QSPI\n"); #else sw = QIXIS_READ(brdcfg[0]); sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT; @@ -67,8 +65,8 @@ int checkboard(void) puts("PromJet\n"); else if (sw == 0x9) puts("NAND\n"); - else if (sw == 0x15) - printf("IFCCard\n"); + else if (sw == 0xF) + printf("QSPI\n"); else printf("invalid setting of SW%u\n", QIXIS_LBMAP_SWITCH); #endif

Get the clocks from FPGA through IFC or I2C. So it needs I2C early init if booting with IFC disabled.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com --- board/freescale/ls1043aqds/ls1043aqds.c | 4 ++++ include/configs/ls1043aqds.h | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c index 9447c93..b7e9c21 100644 --- a/board/freescale/ls1043aqds/ls1043aqds.c +++ b/board/freescale/ls1043aqds/ls1043aqds.c @@ -230,6 +230,10 @@ int board_early_init_f(void) #ifdef CONFIG_LPUART u8 uart; #endif + +#ifdef CONFIG_SYS_I2C_EARLY_INIT + i2c_early_init_f(); +#endif fsl_lsch2_early_init_f();
#ifdef CONFIG_HAS_FSL_XHCI_USB diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h index a19eaee..520b28c 100644 --- a/include/configs/ls1043aqds.h +++ b/include/configs/ls1043aqds.h @@ -29,8 +29,8 @@ unsigned long get_board_sys_clk(void); unsigned long get_board_ddr_clk(void); #endif
-#define CONFIG_SYS_CLK_FREQ 100000000 -#define CONFIG_DDR_CLK_FREQ 100000000 +#define CONFIG_SYS_CLK_FREQ get_board_sys_clk() +#define CONFIG_DDR_CLK_FREQ get_board_ddr_clk()
#define CONFIG_SKIP_LOWLEVEL_INIT
@@ -225,6 +225,7 @@ unsigned long get_board_ddr_clk(void);
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_QIXIS_I2C_ACCESS +#define CONFIG_SYS_I2C_EARLY_INIT #define CONFIG_SYS_NO_FLASH #endif

Now I2C is initialized early enough to access FPGA so it supports to show board info as early as other boot methods.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com --- include/configs/ls1043aqds.h | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h index 520b28c..ee8cb23 100644 --- a/include/configs/ls1043aqds.h +++ b/include/configs/ls1043aqds.h @@ -10,11 +10,7 @@ #include "ls1043a_common.h"
#define CONFIG_DISPLAY_CPUINFO -#ifdef CONFIG_QSPI_BOOT -#define CONFIG_DISPLAY_BOARDINFO_LATE -#else #define CONFIG_DISPLAY_BOARDINFO -#endif
#if defined(CONFIG_NAND_BOOT) || defined(CONFIG_SD_BOOT) #define CONFIG_SYS_TEXT_BASE 0x82000000

On 06/12/2016 08:30 PM, Gong Qianyu wrote:
The LBMAP switches on the board will tell which boot device is used. Only QSPI boot is supported if the boot device is IFCCard.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com
board/freescale/ls1043aqds/ls1043aqds.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
This set is applied to u-boot-fsl-qoriq. Awaiting upstream. Thanks.
York
participants (2)
-
Gong Qianyu
-
york sun