/* Send the column address to the NAND Flash chip.  */
static void write_column_address(const struct nand_flash_raw *raw, uint16_t column_address)
/* Send the column address to the NAND Flash chip.  */
static void write_column_address(const struct nand_flash_raw *raw, uint16_t column_address)
{
	uint16_t page_data_size =
			nand_flash_model_get_page_data_size(MODEL(raw));
	if (nand_flash_model_get_data_bus_width(MODEL(raw)) == 16) {
		column_address >>= 1;
	}
	while (page_data_size > 2) {
		if (nand_flash_model_get_data_bus_width(MODEL(raw)) == 16) {
			WRITE_ADDRESS16(raw, (column_address & 0xFF));
		} else {
			WRITE_ADDRESS(raw, (column_address & 0xFF));
		}
		page_data_size >>= 8;
		column_address >>= 8;
	}
}