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

index 9aebb9a71757cfbcbb23192adf24d40936e9e6e6..48fe7501e09be3318abc527ba0169974957e5ef7 100644 (file)
@@ -28,11 +28,12 @@ endif
 
 LIB    = $(obj)lib$(BOARD).o
 
-COBJS  = $(BOARD).o \
-         ../common/flash.o cmd_pip405.o ../common/pci.o \
-         ../common/isa.o ../common/kbd.o \
-         ../common/usb_uhci.o \
-         ../common/common_util.o
+COBJS  = $(BOARD).o cmd_pip405.o \
+               ../common/pci.o \
+               ../common/isa.o \
+               ../common/kbd.o \
+               ../common/usb_uhci.o \
+               ../common/common_util.o
 
 SOBJS  = init.o
 
index a1f0b656d4ee22efd51454dab66d33a17f79a557..75f57ad8ee19830c83db37042d25c5b30329b9da 100644 (file)
@@ -566,7 +566,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;
+}
 /* ------------------------------------------------------------------------- */
 
 /*
@@ -660,9 +680,6 @@ static int test_dram (unsigned long ramsize)
        return (1);
 }
 
-
-extern flash_info_t flash_info[];      /* info for FLASH chips */
-
 int misc_init_r (void)
 {
        /* adjust flash start and size as well as the offset */
index 07415f4b5743fc8420f2646af9ce48dc5970654a..242aa314a1a07dc8915d666301f5cda8ceba6541 100644 (file)
 #define SPD_EEPROM_ADDRESS      0x50
 
 #define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_BOARD_EARLY_INIT_R
+
 /**************************************************************
  * Environment definitions
  **************************************************************/
 /*-----------------------------------------------------------------------
  * 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_CFI
+#define CONFIG_FLASH_CFI_DRIVER
+
+#define CONFIG_FLASH_SHOW_PROGRESS     45
 
-#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_MAX_FLASH_BANKS     1
+#define CONFIG_SYS_MAX_FLASH_SECT      256
 
 /*
  * Init Memory Controller: