summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2006-08-07 14:31:21 +0200
committerStefan Roese <sr@denx.de>2006-08-07 14:31:21 +0200
commit9ede3cc5113de1d55978d63f19358acf048a23fb (patch)
treedf32f3c36d898c650e63186b15eb6c152e9c1bd2
parente335496a3222125a30136ad2c7762429b75624ed (diff)
downloadtalos-obmc-uboot-9ede3cc5113de1d55978d63f19358acf048a23fb.tar.gz
talos-obmc-uboot-9ede3cc5113de1d55978d63f19358acf048a23fb.zip
Add Macronix MXLV320T flash support for AMCC Bamboo
Patch by Stefan Roese, 07 Aug 2006
-rw-r--r--CHANGELOG3
-rw-r--r--board/amcc/common/flash.c30
2 files changed, 33 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d4802d57a0..21dd657401 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
Changes since U-Boot 1.1.4:
======================================================================
+* Add Macronix MXLV320T flash support for AMCC Bamboo
+ Patch by Stefan Roese, 07 Aug 2006
+
* Change "mii info" to not print an error upon missing PHY at address
Patch by Stefan Roese, 07 Aug 2006
diff --git a/board/amcc/common/flash.c b/board/amcc/common/flash.c
index 3a50b095ca..a0acbba70c 100644
--- a/board/amcc/common/flash.c
+++ b/board/amcc/common/flash.c
@@ -76,6 +76,9 @@ void flash_print_info(flash_info_t * info)
case FLASH_MAN_SST:
printf("SST ");
break;
+ case FLASH_MAN_MX:
+ printf ("MACRONIX ");
+ break;
default:
printf("Unknown Vendor ");
break;
@@ -124,6 +127,9 @@ void flash_print_info(flash_info_t * info)
case FLASH_STMW320DT:
printf ("M29W320DT (32 M, top sector)\n");
break;
+ case FLASH_MXLV320T:
+ printf ("MXLV320T (32 Mbit, top sector)\n");
+ break;
default:
printf("Unknown Chip Type\n");
break;
@@ -375,6 +381,7 @@ int flash_erase(flash_info_t * info, int s_first, int s_last)
{
if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320B) ||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320T) ||
+ ((info->flash_id & FLASH_TYPEMASK) == FLASH_MXLV320T) ||
((info->flash_id & FLASH_TYPEMASK) == FLASH_STMW320DT)) {
return flash_erase_2(info, s_first, s_last);
} else {
@@ -555,6 +562,7 @@ static int write_word(flash_info_t * info, ulong dest, ulong data)
{
if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320B) ||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320T) ||
+ ((info->flash_id & FLASH_TYPEMASK) == FLASH_MXLV320T) ||
((info->flash_id & FLASH_TYPEMASK) == FLASH_STMW320DT)) {
return write_word_2(info, dest, data);
} else {
@@ -648,6 +656,9 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
case (CFG_FLASH_WORD_SIZE) STM_MANUFACT:
info->flash_id = FLASH_MAN_STM;
break;
+ case (CFG_FLASH_WORD_SIZE) MX_MANUFACT:
+ info->flash_id = FLASH_MAN_MX;
+ break;
default:
info->flash_id = FLASH_UNKNOWN;
info->sector_count = 0;
@@ -676,6 +687,12 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
info->sector_count = 67;
info->size = 0x00400000; break; /* => 4 MB */
+ case (CFG_FLASH_WORD_SIZE)MX_ID_LV320T:
+ info->flash_id += FLASH_MXLV320T;
+ info->sector_count = 71;
+ info->size = 0x00400000;
+ break; /* => 4 MB */
+
default:
info->flash_id = FLASH_UNKNOWN;
return (0); /* => no or unknown flash */
@@ -711,6 +728,19 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
--i;
info->start[i] = base;
}
+ } else if ((info->flash_id & FLASH_TYPEMASK) == FLASH_MXLV320T) {
+ i = info->sector_count - 1;
+ info->start[i--] = base + info->size - 0x00002000;
+ info->start[i--] = base + info->size - 0x00004000;
+ info->start[i--] = base + info->size - 0x00006000;
+ info->start[i--] = base + info->size - 0x00008000;
+ info->start[i--] = base + info->size - 0x0000a000;
+ info->start[i--] = base + info->size - 0x0000c000;
+ info->start[i--] = base + info->size - 0x0000e000;
+ info->start[i--] = base + info->size - 0x00010000;
+
+ for (; i >= 0; i--)
+ info->start[i] = base + i * 0x00010000;
} else {
if (info->flash_id & FLASH_BTYPE) {
/* set sector offsets for bottom boot block type */
OpenPOWER on IntegriCloud