]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: rawnand: omap_gpmc: fix OF based partition parsing for NAND
authorRoger Quadros <rogerq@kernel.org>
Thu, 11 Jan 2024 13:19:19 +0000 (15:19 +0200)
committerDario Binacchi <dario.binacchi@amarulasolutions.com>
Mon, 15 Jan 2024 07:58:24 +0000 (08:58 +0100)
Set NAND chip ofnode and device so OF based partition parsing
can work.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499178.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/mtd/nand/raw/omap_gpmc.c

index c430f6d31c7f4f12dedd028d7742f5a1d802b409..2f8fa7d73d21c97b0b81f72ce6b5352ce9ef3b11 100644 (file)
@@ -1189,6 +1189,8 @@ static int gpmc_nand_probe(struct udevice *dev)
 
        base = devm_ioremap(dev, res.start, resource_size(&res));
        gpmc_nand_init(nand, base);
+       mtd->dev = dev;
+       nand_set_flash_node(nand, dev_ofnode(dev));
 
        ret = nand_scan(mtd, CONFIG_SYS_NAND_MAX_CHIPS);
        if (ret)