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 *)
+ volatile ulong * buscon = (ulong *)
((i == 0) ? DANUBE_EBU_BUSCON0 : DANUBE_EBU_BUSCON1);
/* Disable write protection */
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:
/* 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:
+ 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;