Browse Source

[Improve][All][Uboot]

2021.07.07 / Folus Wen

Actions:
1. Uboot version separate to 01.01(2G with BCH8), 02.01(2G with BCH16), 03.01(1G with BCH16) depend on flash ic & ECC algorithm.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 years ago
parent
commit
1ac3f00994

+ 5 - 5
Makefile

@@ -545,7 +545,7 @@ AW-Regular-uboot:
 	@echo    Building U-boot
 	@echo ===================================
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[AW-Regular]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts
-	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F16G08_BCH16
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/AW-Regular/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/AW-Regular/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/AW-Regular/Images/
@@ -617,7 +617,7 @@ BYTON-GB-uboot:
 	@echo    Building U-boot
 	@echo ===================================
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[BYTON-GB]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts
-	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F16G08
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F16G08_BCH16
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/BYTON-GB/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/BYTON-GB/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/BYTON-GB/Images/
@@ -1041,7 +1041,7 @@ Noodoe-uboot:
 	@echo    Building U-boot
 	@echo ===================================
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[Noodoe]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts
-	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F16G08_BCH16
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/Noodoe/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/Noodoe/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/Noodoe/Images/
@@ -1187,7 +1187,7 @@ AW-CCS-uboot:
 	@echo    Building U-boot
 	@echo ===================================
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[AW-CCS]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts
-	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08_BCH16
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/AW-CCS/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/AW-CCS/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/AW-CCS/Images/
@@ -1623,7 +1623,7 @@ AW-ChargeLab-uboot:
 	@echo    Building U-boot
 	@echo ===================================
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[AW-ChargeLab]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts
-	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F16G08_BCH16
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/AW-ChargeLab/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/AW-ChargeLab/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/AW-ChargeLab/Images/

+ 7 - 1
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/common/autoboot.c

@@ -17,7 +17,13 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define uboot_version "01.02"
+#if defined(MT29F16G08_BCH16)
+	#define uboot_version "02.01"
+#elif defined(MT29F8G08_BCH16)
+	#define uboot_version "03.01"
+#else
+	#define uboot_version "01.01"
+#endif
 
 #define MAX_DELAY_STOP_STR 32
 

+ 51 - 13
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/include/configs/am335x_evm.h

@@ -230,7 +230,7 @@
 
 #ifdef CONFIG_NAND
 /* NAND: device related configs */
-#if defined(MT29F8G08)
+#if defined(MT29F8G08_BCH16)
 	#define CONFIG_SYS_NAND_ECCPOS	{ 2, 3, 4, 5, 6, 7, 8, 9, \
 					  10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
 					  20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
@@ -257,6 +257,33 @@
 	#define CONFIG_SYS_NAND_OOBSIZE		256//64 /*++++ vern,NAND,20161127 ---*/
 	#define CONFIG_SYS_NAND_PAGE_SIZE	4096//2048 /*++++ vern,NAND,20161127 ---*/
 	#define CONFIG_SYS_NAND_BLOCK_SIZE	(64*4096)//(128*1024)/*++++ vern,NAND,20161127 ---*/
+#elif defined(MT29F16G08_BCH16)
+	#define CONFIG_SYS_NAND_ECCPOS  { 2, 3, 4, 5, 6, 7, 8, 9, \
+                                          10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
+                                          20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
+                                          30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
+                                          40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
+                                          50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
+                                          60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
+                                          70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
+                                          80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
+                                          90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
+                                          100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
+                                          110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \
+                                          120, 121, 122, 123, 124, 125, 126, 127, 128, 129, \
+                                          130, 131, 132, 133, 134, 135, 136, 137, 138, 139, \
+                                          140, 141, 142, 143, 144, 145, 146, 147, 148, 149, \
+                                          150, 151, 152, 153, 154, 155, 156, 157, 158, 159, \
+                                          160, 161, 162, 163, 164, 165, 166, 167, 168, 169, \
+                                          170, 171, 172, 173, 174, 175, 176, 177, 178, 179, \
+                                          180, 181, 182, 183, 184, 185, 186, 187, 188, 189, \
+                                          190, 191, 192, 193, 194, 195, 196, 197, 198, 199, \
+                                          200, 201, 202, 203, 204, 205, 206, 207, 208, 209, }
+        #define CONFIG_SYS_NAND_ECCBYTES        26
+        #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_BCH16_CODE_HW
+        #define CONFIG_SYS_NAND_OOBSIZE         224//64 /*++++ vern,NAND,20161127 ---*/
+        #define CONFIG_SYS_NAND_PAGE_SIZE       4096//2048 /*++++ vern,NAND,20161127 ---*/
+        #define CONFIG_SYS_NAND_BLOCK_SIZE      (64*4096)//(128*1024)/*++++ vern,NAND,20161127 ---*/
 #elif defined(MT29F16G08)
 	#define CONFIG_SYS_NAND_ECCPOS	{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, \
 					 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, \
@@ -274,18 +301,29 @@
 	#define CONFIG_SYS_NAND_PAGE_SIZE	4096//2048 /*++++ vern,NAND,20161127 ---*/
 	#define CONFIG_SYS_NAND_BLOCK_SIZE	(64*4096)//(128*1024)/*++++ vern,NAND,20161127 ---*/
 #else
-	#define CONFIG_SYS_NAND_ECCPOS  {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, \
-                                         16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, \
-                                         28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
-                                         40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, \
-                                         52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, \
-                                         64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, \
-                                         76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, \
-                                         88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
-                                         100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
-                                         110, 111, 112, 113 }
-        #define CONFIG_SYS_NAND_ECCBYTES        14
-        #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_BCH8_CODE_HW
+	#define CONFIG_SYS_NAND_ECCPOS  { 2, 3, 4, 5, 6, 7, 8, 9, \
+                                          10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
+                                          20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
+                                          30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
+                                          40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
+                                          50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
+                                          60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
+                                          70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
+                                          80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
+                                          90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
+                                          100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
+                                          110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \
+                                          120, 121, 122, 123, 124, 125, 126, 127, 128, 129, \
+                                          130, 131, 132, 133, 134, 135, 136, 137, 138, 139, \
+                                          140, 141, 142, 143, 144, 145, 146, 147, 148, 149, \
+                                          150, 151, 152, 153, 154, 155, 156, 157, 158, 159, \
+                                          160, 161, 162, 163, 164, 165, 166, 167, 168, 169, \
+                                          170, 171, 172, 173, 174, 175, 176, 177, 178, 179, \
+                                          180, 181, 182, 183, 184, 185, 186, 187, 188, 189, \
+                                          190, 191, 192, 193, 194, 195, 196, 197, 198, 199, \
+                                          200, 201, 202, 203, 204, 205, 206, 207, 208, 209, }
+        #define CONFIG_SYS_NAND_ECCBYTES        26
+        #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_BCH16_CODE_HW
         #define CONFIG_SYS_NAND_OOBSIZE         224//64 /*++++ vern,NAND,20161127 ---*/
         #define CONFIG_SYS_NAND_PAGE_SIZE       4096//2048 /*++++ vern,NAND,20161127 ---*/
         #define CONFIG_SYS_NAND_BLOCK_SIZE      (64*4096)//(128*1024)/*++++ vern,NAND,20161127 ---*/