[U-Boot] [PATCH v3 03/10] MIPS: qemu-malta: enable flash support

Gabor Juhos juhosg at openwrt.org
Wed May 22 15:57:39 CEST 2013


Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
---
Changes since v2:
 - remove CONFIG_SYS_WRITE_SWAPPED_DATA option, it is not
   needed since the __raw_* IO accessors has been fixed.
 - rebased against the master branch of git.denx.de/u-boot.git

Changes since v1:
 - rebased against mips/testing

Changes since RFC: ---

Screenshot:

  U-Boot 2013.04-00239-gea7c438 (May 22 2013 - 13:03:22)

  Board: MIPS Malta CoreLV (Qemu)
  DRAM:  256 MiB
  pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0)
  Flash: 4 MiB
  Using default environment

  In:    serial
  Out:   serial
  Err:   serial
  qemu-malta # flinfo

  Bank # 1: CFI conformant flash (32 x 32)  Size: 4 MB in 64 Sectors
    Intel Extended command set, Manufacturer ID: 0x00, Device ID: 0x00
    Erase timeout: 16384 ms, write timeout: 3 ms
    Buffer write timeout: 3 ms, buffer size: 2048 bytes

    Sector Start Addresses:
    BFC00000   RO   BFC10000   RO   BFC20000        BFC30000        BFC40000
    BFC50000        BFC60000        BFC70000        BFC80000        BFC90000
    BFCA0000        BFCB0000        BFCC0000        BFCD0000        BFCE0000
    BFCF0000        BFD00000        BFD10000        BFD20000        BFD30000
    BFD40000        BFD50000        BFD60000        BFD70000        BFD80000
    BFD90000        BFDA0000        BFDB0000        BFDC0000        BFDD0000
    BFDE0000        BFDF0000        BFE00000        BFE10000        BFE20000
    BFE30000        BFE40000        BFE50000        BFE60000        BFE70000
    BFE80000        BFE90000        BFEA0000        BFEB0000        BFEC0000
    BFED0000        BFEE0000        BFEF0000        BFF00000        BFF10000
    BFF20000        BFF30000        BFF40000        BFF50000        BFF60000
    BFF70000        BFF80000        BFF90000        BFFA0000        BFFB0000
    BFFC0000        BFFD0000        BFFE0000        BFFF0000
  qemu-malta #
---
 arch/mips/include/asm/malta.h |    2 ++
 include/configs/qemu-malta.h  |    9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/malta.h b/arch/mips/include/asm/malta.h
index f2bbf0f..ab951e6 100644
--- a/arch/mips/include/asm/malta.h
+++ b/arch/mips/include/asm/malta.h
@@ -16,4 +16,6 @@
 #define MALTA_RESET_BASE	0x1f000500
 #define GORESET			0x42
 
+#define MALTA_FLASH_BASE	0x1fc00000
+
 #endif /* _MIPS_ASM_MALTA_H */
diff --git a/include/configs/qemu-malta.h b/include/configs/qemu-malta.h
index c72c5dd..436bb49 100644
--- a/include/configs/qemu-malta.h
+++ b/include/configs/qemu-malta.h
@@ -34,7 +34,7 @@
  * Memory map
  */
 #define CONFIG_SYS_TEXT_BASE		0xbfc00000 /* Rom version */
-#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 
 #define CONFIG_SYS_SDRAM_BASE		0x80000000 /* Cached addr */
 #define CONFIG_SYS_MEM_SIZE		(256 * 1024 * 1024)
@@ -86,7 +86,12 @@
 /*
  * Flash configuration
  */
-#define CONFIG_SYS_NO_FLASH
+#define CONFIG_SYS_FLASH_BASE		(KSEG1 | MALTA_FLASH_BASE)
+#define CONFIG_SYS_MAX_FLASH_BANKS	1
+#define CONFIG_SYS_MAX_FLASH_SECT	128
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
 
 /*
  * Commands
-- 
1.7.10



More information about the U-Boot mailing list