@@ -7,6 +7,10 @@ Required properties:
- interrupts : The interrupt number.
- dm-mask : DMA bit mask
+Optional properties:
+ - max-banks : Maximum number of banks supported by hardware. If not
+ specified, it is determined based on the "features" register of hardware.
+
The device tree may optionally contain sub-nodes describing partitions of the
address space. See partition.txt for more detail.
@@ -1353,7 +1353,8 @@ static void denali_hw_init(struct denali_nand_info *denali)
*/
denali->bbtskipbytes = ioread32(denali->flash_reg +
SPARE_AREA_SKIP_BYTES);
- detect_max_banks(denali);
+ if (!denali->max_banks)
+ detect_max_banks(denali);
denali_nand_reset(denali);
iowrite32(0x0F, denali->flash_reg + RB_PIN_ENABLED);
iowrite32(CHIP_EN_DONT_CARE__FLAG,
@@ -85,6 +85,9 @@ static int denali_dt_probe(struct platform_device *ofdev)
denali->dev->dma_mask = NULL;
}
+ of_property_read_u32(ofdev->dev.of_node, "max-banks",
+ &denali->max_banks);
+
dt->clk = devm_clk_get(&ofdev->dev, NULL);
if (IS_ERR(dt->clk)) {
dev_err(&ofdev->dev, "no clk available\n");