/* Configure the transfer settings of the Cadence NAND controller. */
static int cdns_nand_transfer_config(uintptr_t base_address)
/* Configure the transfer settings of the Cadence NAND controller. */
static int cdns_nand_transfer_config(uintptr_t base_address)
{
	int ret = 0;
	ret = cdns_nand_wait_idle(base_address);
	if (ret != 0) {
		LOG_ERR("Wait for controller to be in idle state Failed");
		return ret;
	}
	sys_write32(ENABLE, CNF_CTRLCFG(base_address, TRANS_CFG0));
	sys_write32(DISABLE, CNF_CTRLCFG(base_address, MULTIPLANE_CFG));
	sys_write32(DISABLE, CNF_CTRLCFG(base_address, CACHE_CFG));
	sys_write32(CLEAR_ALL_INTERRUPT, (base_address + INTR_STATUS));
	return 0;
}