/* Reads and returns the identifiers of a NAND Flash chip.  */
uint32_t nand_flash_raw_read_id(const struct nand_flash_raw *raw)
/* Reads and returns the identifiers of a NAND Flash chip.  */
uint32_t nand_flash_raw_read_id(const struct nand_flash_raw *raw)
{
	uint32_t chip_id;
	smc_nfc_send_command(SMC, 
			NFCADDR_CMD_NFCCMD        |
			NFCADDR_CMD_NFC_READ      |
			0                         |
			NFCADDR_CMD_CSID(BOARD_NAND_CS)        |
			NFCADDR_CMD_ACYCLE_ONE    |
			(NAND_COMMAND_READID << 2),
			0,
			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);
	return chip_id;
}