[U-Boot] [PATCH 34/37] Blackfin: bf548-ezkit: bump SPI flash size up

Mike Frysinger vapier at gentoo.org
Sat Oct 2 22:05:55 CEST 2010


The current size used (256KiB) is smaller than the LDR created for
the bf548-ezkit, so 'run update' doesn't work correctly.  So bump
up the size a bit by making this flexible per-board config.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 include/configs/bf548-ezkit.h     |    1 +
 include/configs/bfin_adi_common.h |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h
index d299dc1..4412177 100644
--- a/include/configs/bf548-ezkit.h
+++ b/include/configs/bf548-ezkit.h
@@ -182,6 +182,7 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_RTC_BFIN
 #define CONFIG_UART_CONSOLE	1
+#define CONFIG_BFIN_SPI_IMG_SIZE 0x50000
 
 #ifndef __ADSPBF542__
 /* Don't waste time transferring a logo over the UART */
diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index 3e9f3b2..608788a 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -172,9 +172,12 @@
 #   define UBOOT_ENV_UPDATE \
 		"eeprom write $(loadaddr) 0x0 $(filesize)"
 #  else
+#   ifndef CONFIG_BFIN_SPI_IMG_SIZE
+#    define CONFIG_BFIN_SPI_IMG_SIZE 0x40000
+#   endif
 #   define UBOOT_ENV_UPDATE \
 		"sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
-		"sf erase 0 0x40000;" \
+		"sf erase 0 " MK_STR(CONFIG_BFIN_SPI_IMG_SIZE) ";" \
 		"sf write $(loadaddr) 0 $(filesize)"
 #  endif
 # elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
-- 
1.7.3.1



More information about the U-Boot mailing list