Skip to content

Commit 50415e6

Browse files
r-vigneshgregkh
authored andcommitted
mtd: hyperbus: hbmc-am654: Fix direct mapping setup flash access
[ Upstream commit aca31ce ] Setting up of direct mapping should be done with flash node's IO address space and not with controller's IO region. Fixes: b6fe8bc ("mtd: hyperbus: move direct mapping setup to AM654 HBMC driver") Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Link: https://lore.kernel.org/r/20200924081214.16934-3-vigneshr@ti.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2a989f2 commit 50415e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/mtd/hyperbus/hbmc-am654.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ static int am654_hbmc_probe(struct platform_device *pdev)
7070

7171
platform_set_drvdata(pdev, priv);
7272

73-
ret = of_address_to_resource(np, 0, &res);
73+
priv->hbdev.np = of_get_next_child(np, NULL);
74+
ret = of_address_to_resource(priv->hbdev.np, 0, &res);
7475
if (ret)
7576
return ret;
7677

@@ -103,7 +104,6 @@ static int am654_hbmc_probe(struct platform_device *pdev)
103104
priv->ctlr.dev = dev;
104105
priv->ctlr.ops = &am654_hbmc_ops;
105106
priv->hbdev.ctlr = &priv->ctlr;
106-
priv->hbdev.np = of_get_next_child(dev->of_node, NULL);
107107
ret = hyperbus_register_device(&priv->hbdev);
108108
if (ret) {
109109
dev_err(dev, "failed to register controller\n");

0 commit comments

Comments
 (0)