/* Read and return the identifiers of a NAND Flash chip.  */
uint32_t nand_flash_raw_read_id(const struct nand_flash_raw *raw)
/* Read and return the identifiers of a NAND Flash chip.  */
uint32_t nand_flash_raw_read_id(const struct nand_flash_raw *raw)
{
	uint32_t chip_id;
	ENABLE_CE(raw);
	WRITE_COMMAND(raw, NAND_COMMAND_READID);
	WRITE_ADDRESS(raw, 0);
	delay_us(1);
	chip_id = READ_DATA8(raw);
	chip_id |= (READ_DATA8(raw) << 8);
	chip_id |= (READ_DATA8(raw) << 16);
	chip_id |= (READ_DATA8(raw) << 24);
	DISABLE_CE(raw);
	return chip_id;
}