Skip to content

Commit

Permalink
mtd: hyperbus: hbmc-am654: Fix direct mapping setup flash access
Browse files Browse the repository at this point in the history
[ 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>
  • Loading branch information
r-vignesh authored and gregkh committed Oct 29, 2020
1 parent 3b5f3ad commit 86e185a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/hyperbus/hbmc-am654.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ static int am654_hbmc_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, priv);

ret = of_address_to_resource(np, 0, &res);
priv->hbdev.np = of_get_next_child(np, NULL);
ret = of_address_to_resource(priv->hbdev.np, 0, &res);
if (ret)
return ret;

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

0 comments on commit 86e185a

Please sign in to comment.