[U-Boot] [PATCH 1/1] board/ls2081ardb: Update qspi flash type and checkboard

Santan Kumar santan.kumar at nxp.com
Fri Jun 9 06:18:06 UTC 2017


Patch makes below changes:
 -As per updated board design, different QSPI flash is connected on boards,
	hence change QSPI flash type from n25q512a to s25fs512ss
 -Remove deprecated config : CONFIG_DISPLAY_BOARDINFO_LATE
 -Increase env size from 64kb to 256kb for qspi boot
 -Update checkboard() to detect boot source and display message

Signed-off-by: Santan Kumar <santan.kumar at nxp.com>
Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur at nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain at nxp.com>
---
 arch/arm/dts/fsl-ls2081a-rdb.dts        |  4 ++--
 board/freescale/ls2080ardb/ls2080ardb.c | 15 +++------------
 include/configs/ls2080a_common.h        |  2 +-
 include/configs/ls2080ardb.h            |  7 +------
 4 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/arch/arm/dts/fsl-ls2081a-rdb.dts b/arch/arm/dts/fsl-ls2081a-rdb.dts
index 6489362..aa4aa68 100644
--- a/arch/arm/dts/fsl-ls2081a-rdb.dts
+++ b/arch/arm/dts/fsl-ls2081a-rdb.dts
@@ -41,7 +41,7 @@
 	bus-num = <0>;
 	status = "okay";
 
-	qflash0: n25q512a at 0 {
+	qflash0: s25fs512s at 0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "spi-flash";
@@ -49,7 +49,7 @@
 		reg = <0>;
 	};
 
-	qflash1: n25q512a at 1 {
+	qflash1: s25fs512s at 1 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "spi-flash";
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 210142c..9d21d1e 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -71,36 +71,27 @@ int checkboard(void)
 #ifdef CONFIG_TARGET_LS2081ARDB
 #ifdef CONFIG_FSL_QIXIS
 	sw = QIXIS_READ(arch);
-	printf("Board Arch: V%d, ", sw >> 4);
 	printf("Board version: %c, ", (sw & 0xf) + 'A');
 
 	sw = QIXIS_READ(brdcfg[0]);
-	sw = (sw & QIXIS_QMAP_MASK) >> QIXIS_QMAP_SHIFT;
+	sw = sw  >> QIXIS_QMAP_SHIFT;
 	switch (sw) {
 	case 0:
+	case 4:
 		puts("boot from QSPI DEV#0\n");
-		puts("QSPI_CSA_1 mapped to QSPI DEV#1\n");
 		break;
 	case 1:
 		puts("boot from QSPI DEV#1\n");
-		puts("QSPI_CSA_1 mapped to QSPI DEV#0\n");
 		break;
 	case 2:
-		puts("boot from QSPI EMU\n");
-		puts("QSPI_CSA_1 mapped to QSPI DEV#0\n");
-		break;
 	case 3:
 		puts("boot from QSPI EMU\n");
-		puts("QSPI_CSA_1 mapped to QSPI DEV#1\n");
-		break;
-	case 4:
-		puts("boot from QSPI DEV#0\n");
-		puts("QSPI_CSA_1 mapped to QSPI EMU\n");
 		break;
 	default:
 		printf("invalid setting of SW%u\n", sw);
 		break;
 	}
+	printf("FPGA: v%d.%d\n", QIXIS_READ(scver), QIXIS_READ(tagdata));
 #endif
 	puts("SERDES1 Reference : ");
 	printf("Clock1 = 100MHz ");
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index e311d0b..68191f2 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -34,7 +34,7 @@
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SIZE			0x2000          /* 8KB */
 #define CONFIG_ENV_OFFSET		0x300000        /* 3MB */
-#define CONFIG_ENV_SECT_SIZE		0x10000
+#define CONFIG_ENV_SECT_SIZE		0x40000
 #endif
 
 #define CONFIG_SUPPORT_RAW_INITRD
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 2dab065..a5f7eea 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -18,7 +18,6 @@
 #define CONFIG_QIXIS_I2C_ACCESS
 #endif
 #define CONFIG_SYS_I2C_EARLY_INIT
-#define CONFIG_DISPLAY_BOARDINFO_LATE
 #endif
 
 #define I2C_MUX_CH_VOL_MONITOR		0xa
@@ -293,19 +292,15 @@ unsigned long get_board_sys_clk(void);
 /* SPI */
 #if defined(CONFIG_FSL_QSPI) || defined(CONFIG_FSL_DSPI)
 #define CONFIG_SPI_FLASH
-#ifdef CONFIG_FSL_QSPI
+#ifdef CONFIG_FSL_DSPI
 #define CONFIG_SPI_FLASH_STMICRO
 #endif
 #ifdef CONFIG_FSL_QSPI
-#ifdef CONFIG_TARGET_LS2081ARDB
-#define CONFIG_SPI_FLASH_STMICRO
-#else
 #define CONFIG_SPI_FLASH_SPANSION
 #endif
 #define FSL_QSPI_FLASH_SIZE		SZ_64M	/* 64MB */
 #define FSL_QSPI_FLASH_NUM		2
 #endif
-#endif
 
 /*
  * RTC configuration
-- 
1.9.1



More information about the U-Boot mailing list