unsigned long size = 0;
int i;
+ printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
/* Init: no FLASHes known */
for (i=0; i < CFG_MAX_FLASH_BANKS; ++i) { // 1 bank
ulong flashbase = (i == 0) ? PHYS_FLASH_1 : PHYS_FLASH_2; // 0xb0000000, 0xb4000000
- volatile ulong * buscon = (ulong *)
+ printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
+ volatile ulong * buscon = (ulong *)
((i == 0) ? DANUBE_EBU_BUSCON0 : DANUBE_EBU_BUSCON1);
/* Disable write protection */
// *buscon &= ~AMAZON_EBU_BUSCON0_WRDIS;
/* Enable write protection */
*buscon |= DANUBE_EBU_BUSCON0_WRDIS;
+printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
#if 1
memset(&flash_info[i], 0, sizeof(flash_info_t));
#endif
+printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
flash_info[i].size =
flash_get_size((FPW *)flashbase, &flash_info[i]);
bootsect_size = 0x00002000 * (sizeof(FPW)/2);
sect_size = 0x00010000 * (sizeof(FPW)/2);
+ /* set sector offsets for bottom boot block type */
+ for (i = 0; i < 8; ++i) {
+ info->start[i] = base + (i * bootsect_size);
+ }
+ for (i = 8; i < info->sector_count; i++) {
+ info->start[i] = base + ((i - 7) * sect_size);
+ }
+ }
+ else if(((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_AMD)
+ && ((info->flash_id & FLASH_TYPEMASK)==FLASH_29LV320B)){
+ int bootsect_size; /* number of bytes/boot sector */
+ int sect_size; /* number of bytes/regular sector */
+
+ bootsect_size = 0x00002000 * (sizeof(FPW)/2);
+ sect_size = 0x00010000 * (sizeof(FPW)/2);
+
/* set sector offsets for bottom boot block type */
for (i = 0; i < 8; ++i) {
info->start[i] = base + (i * bootsect_size);
case FLASH_29LV640BB: //liupeng for MXIC FLASH_29LV640BB
fmt = "29LV640BB (64 Mbit, boot sector SA0~SA126 size 64k bytes,other sectors SA127~SA135 size 8k bytes)\n";
break;
+ case FLASH_29LV320B: //joelin for MXIC FLASH_29LV320AB
case FLASH_29LV320AB: //joelin for MXIC FLASH_29LV320AB
fmt = "29LV320AB (32 Mbit, boot sector SA0~SA7 size 8K bytes,other sectors SA8~SA70 size 64K bytes)\n";
break;
* This works for any bus width and any FLASH device width.
*/
-// printf("\n type is %08lx", addr[1] & 0xff); //joelin 10/06/2004 flash type
-// printf("\n type is %08lx", addr[0] & 0xff); //joelin 10/06/2004 flash type
+ printf("\n type is %08lx", addr[1] & 0xff); //joelin 10/06/2004 flash type
+ printf("\n type is %08lx", addr[0] & 0xff); //joelin 10/06/2004 flash type
// asm("SYNC");
switch (addr[1] & 0xff) {
case (uchar)AMD_MANUFACT:
+ printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
info->flash_id = FLASH_MAN_AMD;
break;
case (uchar)INTEL_MANUFACT: // 0x0089
+ printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
info->flash_id = FLASH_MAN_INTEL; //0x00300000
break;
//joelin for MXIC
case (uchar)MX_MANUFACT: // 0x00c2
+ printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
info->flash_id = FLASH_MAN_MX ;//0x00030000
break;
default:
+ printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
info->flash_id = FLASH_UNKNOWN;
info->sector_count = 0;
info->size = 0;
break;*/
}
+ printf("%s:%s[%d] %08lx\n", __FILE__, __func__, __LINE__, addr[0]);
/* Check 16 bits or 32 bits of ID so work on 32 or 16 bit bus. */
if (info->flash_id != FLASH_UNKNOWN) switch (addr[0]) {
+ case (FPW)EON_ID_EN29LV320B:
+ printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
+ info->flash_id += FLASH_29LV320B;
+ info->sector_count = 71;
+ info->size = 0x00400000 * (sizeof(FPW)/2);
+ break;
case (FPW)AMD_ID_LV640U: /* 29LV640 and 29LV641 have same ID */
info->flash_id += FLASH_AM640U;
info->sector_count = 128;
case FLASH_28F320J3A:
case FLASH_AM640U:
case FLASH_29LV640BB: //liupeng for MXIC MX29LV640BB
+ case FLASH_29LV320B:
case FLASH_29LV320AB: //joelin for MXIC MX29LV320AB
case FLASH_29LV160BB: //joelin for MXIC MX29LV160BB
break;
Index: u-boot-1.1.5/Makefile
===================================================================
--- u-boot-1.1.5.orig/Makefile 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/Makefile 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/Makefile 2009-11-09 16:35:03.000000000 +0100
@@ -24,7 +24,7 @@
VERSION = 1
PATCHLEVEL = 1
Index: u-boot-1.1.5/common/cmd_bootm.c
===================================================================
--- u-boot-1.1.5.orig/common/cmd_bootm.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/common/cmd_bootm.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/common/cmd_bootm.c 2009-11-09 16:35:03.000000000 +0100
@@ -31,6 +31,7 @@
#include <malloc.h>
#include <zlib.h>
Index: u-boot-1.1.5/common/cmd_flash.c
===================================================================
--- u-boot-1.1.5.orig/common/cmd_flash.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/common/cmd_flash.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/common/cmd_flash.c 2009-11-09 16:35:03.000000000 +0100
@@ -196,9 +196,17 @@
}
Index: u-boot-1.1.5/common/cmd_nvedit.c
===================================================================
--- u-boot-1.1.5.orig/common/cmd_nvedit.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/common/cmd_nvedit.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/common/cmd_nvedit.c 2009-11-09 16:35:03.000000000 +0100
@@ -540,8 +540,19 @@
extern char * env_name_spec;
Index: u-boot-1.1.5/common/console.c
===================================================================
--- u-boot-1.1.5.orig/common/console.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/common/console.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/common/console.c 2009-11-09 16:35:03.000000000 +0100
@@ -324,7 +324,7 @@
#endif
Index: u-boot-1.1.5/common/devices.c
===================================================================
--- u-boot-1.1.5.orig/common/devices.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/common/devices.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/common/devices.c 2009-11-09 16:35:03.000000000 +0100
@@ -39,6 +39,7 @@
list_t devlist = 0;
device_t *stdio_devices[] = { NULL, NULL, NULL };
Index: u-boot-1.1.5/common/env_common.c
===================================================================
--- u-boot-1.1.5.orig/common/env_common.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/common/env_common.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/common/env_common.c 2009-11-09 16:35:03.000000000 +0100
@@ -219,7 +219,9 @@
* We must allocate a buffer for the environment
*/
Index: u-boot-1.1.5/common/env_flash.c
===================================================================
--- u-boot-1.1.5.orig/common/env_flash.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/common/env_flash.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/common/env_flash.c 2009-11-09 16:35:03.000000000 +0100
@@ -66,7 +66,6 @@
#endif
Index: u-boot-1.1.5/config.mk
===================================================================
--- u-boot-1.1.5.orig/config.mk 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/config.mk 2009-10-04 23:32:51.000000000 +0200
++++ u-boot-1.1.5/config.mk 2009-11-09 16:35:03.000000000 +0100
@@ -127,10 +127,15 @@
OBJDUMP = $(CROSS_COMPILE)objdump
RANLIB = $(CROSS_COMPILE)RANLIB
Index: u-boot-1.1.5/drivers/Makefile
===================================================================
--- u-boot-1.1.5.orig/drivers/Makefile 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/drivers/Makefile 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/drivers/Makefile 2009-11-09 16:35:03.000000000 +0100
@@ -50,7 +50,7 @@
videomodes.o w83c553f.o \
ks8695eth.o \
Index: u-boot-1.1.5/include/asm-mips/mipsregs.h
===================================================================
--- u-boot-1.1.5.orig/include/asm-mips/mipsregs.h 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/include/asm-mips/mipsregs.h 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/include/asm-mips/mipsregs.h 2009-11-09 16:35:03.000000000 +0100
@@ -48,6 +48,7 @@
#define CP0_CAUSE $13
#define CP0_EPC $14
Index: u-boot-1.1.5/include/cmd_confdefs.h
===================================================================
--- u-boot-1.1.5.orig/include/cmd_confdefs.h 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/include/cmd_confdefs.h 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/include/cmd_confdefs.h 2009-11-09 16:35:03.000000000 +0100
@@ -94,6 +94,7 @@
#define CFG_CMD_EXT2 0x1000000000000000ULL /* EXT2 Support */
#define CFG_CMD_SNTP 0x2000000000000000ULL /* SNTP support */
Index: u-boot-1.1.5/include/config.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-1.1.5/include/config.h 2009-10-04 23:06:04.000000000 +0200
++++ u-boot-1.1.5/include/config.h 2009-11-09 16:35:03.000000000 +0100
@@ -0,0 +1,2 @@
+/* Automatically generated - do not edit */
+#include <configs/danube.h>
Index: u-boot-1.1.5/include/config.mk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-1.1.5/include/config.mk 2009-10-04 23:06:04.000000000 +0200
++++ u-boot-1.1.5/include/config.mk 2009-11-09 16:35:03.000000000 +0100
@@ -0,0 +1,5 @@
+ARCH = mips
+CPU = mips
Index: u-boot-1.1.5/include/flash.h
===================================================================
--- u-boot-1.1.5.orig/include/flash.h 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/include/flash.h 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/include/flash.h 2009-11-09 16:36:11.000000000 +0100
@@ -79,7 +79,7 @@
extern unsigned long flash_init (void);
extern void flash_print_info (flash_info_t *);
extern int flash_sect_protect (int flag, ulong addr_first, ulong addr_last);
/* common/flash.c */
-@@ -299,6 +299,10 @@
+@@ -131,7 +131,9 @@
+ #define MT2_MANUFACT 0x002C002C /* alternate MICRON manufacturer ID*/
+ #define EXCEL_MANUFACT 0x004A004A /* Excel Semiconductor */
+
+- /* Micron Technologies (INTEL compat.) */
++#define EON_ID_EN29LV320B 0x22f9
++#define FLASH_29LV320B 0xE0
++/* Micron Technologies (INTEL compat.) */
+ #define MT_ID_28F400_T 0x44704470 /* 28F400B3 ID ( 4 M, top boot sector) */
+ #define MT_ID_28F400_B 0x44714471 /* 28F400B3 ID ( 4 M, bottom boot sect) */
+
+@@ -299,6 +301,10 @@
#define TOSH_ID_FVT160 0xC2 /* TC58FVT160 ID (16 M, top ) */
#define TOSH_ID_FVB160 0x43 /* TC58FVT160 ID (16 M, bottom ) */
/*-----------------------------------------------------------------------
* Internal FLASH identification codes
*
-@@ -422,6 +426,10 @@
+@@ -422,6 +428,10 @@
#define FLASH_S29GL064M 0x00F0 /* Spansion S29GL064M-R6 */
#define FLASH_S29GL128N 0x00F1 /* Spansion S29GL128N */
Index: u-boot-1.1.5/include/image.h
===================================================================
--- u-boot-1.1.5.orig/include/image.h 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/include/image.h 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/include/image.h 2009-11-09 16:35:03.000000000 +0100
@@ -132,6 +132,7 @@
#define IH_COMP_NONE 0 /* No Compression Used */
#define IH_COMP_GZIP 1 /* gzip Compression Used */
Index: u-boot-1.1.5/include/syscall.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-1.1.5/include/syscall.h 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/include/syscall.h 2009-11-09 16:35:03.000000000 +0100
@@ -0,0 +1,42 @@
+#ifndef __MON_SYS_CALL_H__
+#define __MON_SYS_CALL_H__
Index: u-boot-1.1.5/ld_uboot.conf
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-1.1.5/ld_uboot.conf 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/ld_uboot.conf 2009-11-09 16:35:03.000000000 +0100
@@ -0,0 +1,8 @@
+TAG_DWNLD()
+{
Index: u-boot-1.1.5/lib_generic/Makefile
===================================================================
--- u-boot-1.1.5.orig/lib_generic/Makefile 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/lib_generic/Makefile 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/lib_generic/Makefile 2009-11-09 16:35:03.000000000 +0100
@@ -28,7 +28,7 @@
COBJS = bzlib.o bzlib_crctable.o bzlib_decompress.o \
bzlib_randtable.o bzlib_huffman.o \
Index: u-boot-1.1.5/lib_mips/board.c
===================================================================
--- u-boot-1.1.5.orig/lib_mips/board.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/lib_mips/board.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/lib_mips/board.c 2009-11-09 16:35:03.000000000 +0100
@@ -29,9 +29,30 @@
#include <net.h>
#include <environment.h>
Index: u-boot-1.1.5/lib_mips/time.c
===================================================================
--- u-boot-1.1.5.orig/lib_mips/time.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/lib_mips/time.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/lib_mips/time.c 2009-11-09 16:35:03.000000000 +0100
@@ -80,6 +80,19 @@
/*NOP*/;
}
Index: u-boot-1.1.5/net/eth.c
===================================================================
--- u-boot-1.1.5.orig/net/eth.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/net/eth.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/net/eth.c 2009-11-09 16:35:03.000000000 +0100
@@ -25,6 +25,9 @@
#include <command.h>
#include <net.h>
Index: u-boot-1.1.5/tools/mkimage.c
===================================================================
--- u-boot-1.1.5.orig/tools/mkimage.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/tools/mkimage.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/tools/mkimage.c 2009-11-09 16:35:03.000000000 +0100
@@ -28,6 +28,7 @@
#ifndef __WIN32__
#include <netinet/in.h> /* for host / network byte order conversions */
Index: u-boot-1.1.5/cpu/mips/cache.S
===================================================================
--- u-boot-1.1.5.orig/cpu/mips/cache.S 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/cpu/mips/cache.S 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/cpu/mips/cache.S 2009-11-09 16:35:03.000000000 +0100
@@ -29,7 +29,9 @@
#include <asm/mipsregs.h>
#include <asm/addrspace.h>
Index: u-boot-1.1.5/cpu/mips/config.mk
===================================================================
--- u-boot-1.1.5.orig/cpu/mips/config.mk 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/cpu/mips/config.mk 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/cpu/mips/config.mk 2009-11-09 16:35:03.000000000 +0100
@@ -20,20 +20,26 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
Index: u-boot-1.1.5/cpu/mips/cpu.c
===================================================================
--- u-boot-1.1.5.orig/cpu/mips/cpu.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/cpu/mips/cpu.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/cpu/mips/cpu.c 2009-11-09 16:35:03.000000000 +0100
@@ -23,7 +23,12 @@
#include <common.h>
Index: u-boot-1.1.5/cpu/mips/incaip_clock.c
===================================================================
--- u-boot-1.1.5.orig/cpu/mips/incaip_clock.c 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/cpu/mips/incaip_clock.c 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/cpu/mips/incaip_clock.c 2009-11-09 16:35:03.000000000 +0100
@@ -22,8 +22,9 @@
*/
Index: u-boot-1.1.5/cpu/mips/start.S
===================================================================
--- u-boot-1.1.5.orig/cpu/mips/start.S 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/cpu/mips/start.S 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/cpu/mips/start.S 2009-11-09 16:35:03.000000000 +0100
@@ -27,7 +27,9 @@
#include <version.h>
#include <asm/regdef.h>
Index: u-boot-1.1.5/tools/Makefile
===================================================================
--- u-boot-1.1.5.orig/tools/Makefile 2006-10-20 17:54:33.000000000 +0200
-+++ u-boot-1.1.5/tools/Makefile 2009-10-04 23:06:03.000000000 +0200
++++ u-boot-1.1.5/tools/Makefile 2009-11-09 16:35:03.000000000 +0100
@@ -21,7 +21,7 @@
# MA 02111-1307 USA
#