/* Use the configuration feature register to determine the maximum number of banks that the hardware supports.  */
static void denali_detect_max_banks(struct denali_nand_info *denali)
/* Use the configuration feature register to determine the maximum number of banks that the hardware supports.  */
static void denali_detect_max_banks(struct denali_nand_info *denali)
{
	uint32_t features = ioread32(denali->reg + FEATURES);
	denali->max_banks = 1 << FIELD_GET(FEATURES__N_BANKS, features);
	if (denali->revision < 0x0501)
		denali->max_banks <<= 1;
}