mtd: nand: pxa3xx: set mtd->dev
authorRobert Marko <robert.marko@sartura.hr>
Wed, 5 Jan 2022 15:01:00 +0000 (16:01 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 17 Jan 2022 19:45:24 +0000 (14:45 -0500)
Currently the pxa3xx driver does not set the udevice in the mtd_info
struct and this prevents the mtd from parsing the partitions via DTS
like for SPI-NOR.

So simply set the mtd->dev to the driver udevice.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/mtd/nand/raw/pxa3xx_nand.c

index 3a9c9ca..20d1aee 100644 (file)
@@ -1913,6 +1913,7 @@ static int pxa3xx_nand_probe(struct udevice *dev)
                 * user's mtd partitions configuration would get broken.
                 */
                mtd->name = "pxa3xx_nand-0";
+               mtd->dev = dev;
                info->cs = cs;
                ret = pxa3xx_nand_scan(mtd);
                if (ret) {