]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
board/mpl/mip405: use the CFI driver for the MIP405/MIP405T board
authorDavid Müller <d.mueller@elsoft.ch>
Thu, 22 Dec 2011 12:38:21 +0000 (13:38 +0100)
committerStefan Roese <sr@denx.de>
Mon, 9 Jan 2012 08:25:01 +0000 (09:25 +0100)
Signed-off-by: David Mueller <d.mueller@elsoft.ch>
Signed-off-by: Stefan Roese <sr@denx.de>
board/mpl/mip405/Makefile
board/mpl/mip405/mip405.c
include/configs/MIP405.h

index 5dd0b2f8e5ad9cf3a1217a8e1ae01eb195005c1a..9921545bfa55c8a56d13b70e6d03e89f20622ad1 100644 (file)
@@ -28,8 +28,10 @@ endif
 
 LIB    = $(obj)lib$(BOARD).o
 
-COBJS  = $(BOARD).o ../common/flash.o cmd_mip405.o ../common/pci.o \
-                       ../common/usb_uhci.o ../common/common_util.o
+COBJS  = $(BOARD).o cmd_mip405.o \
+               ../common/pci.o \
+               ../common/usb_uhci.o \
+               ../common/common_util.o
 
 SOBJS  = init.o
 
index 9d0db644626900a655e3c95e21dbaec124b2e28e..56a84e9afab6901a97c69e0f1057788161c02fb8 100644 (file)
@@ -498,6 +498,27 @@ int board_early_init_f (void)
        return 0;
 }
 
+int board_early_init_r(void)
+{
+       int mode;
+
+       /*
+        * since we are relocated, we can finally enable i-cache
+        * and set up the flash CS correctly
+        */
+       icache_enable();
+       setup_cs_reloc();
+       /* get and display boot mode */
+       mode = get_boot_mode();
+       if (mode & BOOT_PCI)
+               printf("PCI Boot %s Map\n", (mode & BOOT_MPS) ?
+                       "MPS" : "Flash");
+       else
+               printf("%s Boot\n", (mode & BOOT_MPS) ?
+                       "MPS" : "Flash");
+
+       return 0;
+}
 
 /*
  * Get some PLD Registers
@@ -671,7 +692,6 @@ static int test_dram (unsigned long ramsize)
 /* used to check if the time in RTC is valid */
 static unsigned long start;
 static struct rtc_time tm;
-extern flash_info_t flash_info[];      /* info for FLASH chips */
 
 int misc_init_r (void)
 {
index 247cd2ff6e206d13eedb9efded637239ce4a35e0..9961fb55ca509c3e6c6381bad334837e21ef4dd8 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max number of memory banks           */
-#define CONFIG_SYS_MAX_FLASH_SECT      256     /* max number of sectors on one chip    */
+#define CONFIG_SYS_UPDATE_FLASH_SIZE
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_FLASH_EMPTY_INFO
 
-#define CONFIG_SYS_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_FLASH_CFI_DRIVER
+
+#define CONFIG_FLASH_SHOW_PROGRESS     45
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     1
+#define CONFIG_SYS_MAX_FLASH_SECT      256
 
 /*
  * JFFS2 partitions
 #define FLASH_SIZE_PRELIM       3  /* maximal flash FLASH size bank #0 */
 
 #define CONFIG_BOARD_EARLY_INIT_F 1
+#define CONFIG_BOARD_EARLY_INIT_R
 
 /* Peripheral Bus Mapping */
 #define PER_PLD_ADDR           0xF4000000 /* smallest window is 1MByte 0x10 0000*/