{
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) {