/* Send the row address to the NAND Flash chip.  */
static void write_row_address(const struct nand_flash_raw *raw, uint32_t row_address)
/* Send the row address to the NAND Flash chip.  */
static void write_row_address(const struct nand_flash_raw *raw, uint32_t row_address)
{
	uint32_t num_page =
			nand_flash_model_get_device_size_in_pages(MODEL(raw));
	while (num_page > 0) {
		if (nand_flash_model_get_data_bus_width(MODEL(raw)) == 16) {
			WRITE_ADDRESS16(raw, (row_address & 0xFF));
		} else {
			WRITE_ADDRESS(raw, (row_address & 0xFF));
		}
		num_page >>= 8;
		row_address >>= 8;
	}
}