/* Set the row address for a NAND flash memory device using the Cadence NAND controller. */
static void row_address_set(struct cadence_nand_params *params, uint32_t *local_row_address, uint32_t page_set)
/* Set the row address for a NAND flash memory device using the Cadence NAND controller. */
static void row_address_set(struct cadence_nand_params *params, uint32_t *local_row_address, uint32_t page_set)
{
	uint32_t block_number = 0;
	block_number = ((page_set) / (params->npages_per_block));
	*local_row_address = 0;
	*local_row_address |= ROW_VAL_SET((params->page_size_bit) - 1, 0,
					  ((page_set) % (params->npages_per_block)));
	*local_row_address |=
		ROW_VAL_SET((params->block_size_bit) - 1, (params->page_size_bit), block_number);
	*local_row_address |= ROW_VAL_SET((params->lun_size_bit) - 1, (params->block_size_bit),
					  (block_number / params->nblocks_per_lun));
}