int *maf_id, int *dev_id,
const struct nand_flash_dev *type)
{
+ const char *name;
int i, maf_idx;
u8 id_data[8];
int ret;
chip->cmdfunc = nand_command_lp;
/* TODO onfi flash name */
- MTDDEBUG (MTD_DEBUG_LEVEL0, "NAND device: Manufacturer ID:"
- " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, *dev_id,
- nand_manuf_ids[maf_idx].name,
+ name = type->name;
#ifdef CONFIG_SYS_NAND_ONFI_DETECTION
- chip->onfi_version ? chip->onfi_params.model : type->name);
-#else
- type->name);
+ if (chip->onfi_version)
+ name = chip->onfi_params.model;
#endif
+ MTDDEBUG(MTD_DEBUG_LEVEL0, "NAND device: Manufacturer ID:"
+ " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, *dev_id,
+ nand_manuf_ids[maf_idx].name, name);
return type;
}