{
unsigned char buf[64];
int ram_type = MICRON_128MB_166MHZ;
+ int mfr, id;
int ret;
/* reset sdrc controller */
/* read NAND id to guess what RAM is attached */
early_nand_init();
- ret = nand_read_param_page(buf, sizeof(buf));
- if (ret == 0) {
- if (strncmp((char *)buf + 44, "MT29F4G16ABBDA", 14) == 0)
- ram_type = MICRON_256MB_200MHZ;
+ ret = nand_readid(&mfr, &id);
+ if (ret == 0 && id == 0xb3) {
+ ram_type = MICRON_256MB_200MHZ;
+ } else {
+ /* others share the same id (bc), luckily NAND model differs */
+ ret = nand_read_param_page(buf, sizeof(buf));
+ if (ret == 0) {
+ if (strncmp((char *)buf + 44, "MT29F4G16ABBDA", 14) == 0)
+ ram_type = MICRON_256MB_200MHZ;
+ }
}
if (ram_type == MICRON_256MB_200MHZ) {
#define MT29F1G_ID 0xa1 /* x8, 1GiB */
#define MT29F2G_ID 0xba /* x16, 2GiB */
#define MT29F4G_ID 0xbc /* x16, 4GiB */
+#define MT29F8G_ID 0xb3 /* x16, 8GiB */
#define ADDR_COLUMN 1
#define ADDR_PAGE 2
NAND_DISABLE_CE();
if (((mfr == MT29F1G_MFR || mfr == MT29F1G_MFR2 || mfr == MT29F1G_MFR3) &&
- (id == MT29F1G_ID || id == MT29F2G_ID || id == MT29F4G_ID)) ||
+ (id == MT29F1G_ID || id == MT29F2G_ID || id == MT29F4G_ID || id == MT29F8G_ID)) ||
(mfr == K9F1G08R0A_MFR && (id == K9F1G08R0A_ID))) {
return 0;
} else {