MLK-23693-3: mtd: rawnand: gpmi: add imx8dxl nand support
imx8dxl ddr3 board doesn't have CS control connected by default, add new device tree property to specify imx8dxl ddr3 evk supports only one cs. Signed-off-by: Han Xu <han.xu@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
c520bb1de3
commit
892c9f919b
|
@ -2825,6 +2825,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
|
|||
{
|
||||
struct nand_chip *chip = &this->nand;
|
||||
struct mtd_info *mtd = nand_to_mtd(chip);
|
||||
u32 max_cs;
|
||||
int ret;
|
||||
|
||||
/* init the MTD data structures */
|
||||
|
@ -2855,7 +2856,12 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
|
|||
this->base.ops = &gpmi_nand_controller_ops;
|
||||
chip->controller = &this->base;
|
||||
|
||||
ret = nand_scan(chip, (GPMI_IS_MX6(this) || GPMI_IS_MX8(this)) ? 2 : 1);
|
||||
max_cs = (GPMI_IS_MX6(this) || GPMI_IS_MX8(this)) ? 2 : 1;
|
||||
|
||||
/* override the max_cs if board has other limitations */
|
||||
of_property_read_u32(this->pdev->dev.of_node, "max-cs", &max_cs);
|
||||
|
||||
ret = nand_scan(chip, max_cs);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
|
||||
|
|
Loading…
Reference in New Issue