U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: pxa3xx: set mtd->dev
@ 2022-01-05 15:01 Robert Marko
  2022-01-05 15:38 ` Stefan Roese
  2022-01-18 18:41 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Marko @ 2022-01-05 15:01 UTC (permalink / raw)
  To: u-boot, marek.behun, sr, pali; +Cc: Robert Marko

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>
---
 drivers/mtd/nand/raw/pxa3xx_nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index 8ff58a7038..eb739bb3b9 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -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) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-18 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05 15:01 [PATCH] mtd: nand: pxa3xx: set mtd->dev Robert Marko
2022-01-05 15:38 ` Stefan Roese
2022-01-18 18:41 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox