Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: hyperbus: hbmc-am654: Fix direct mapping setup flash access

Setting up of direct mapping should be done with flash node's IO
address space and not with controller's IO region.

Fixes: b6fe8bc67d2d3 ("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

+2 -2
+2 -2
drivers/mtd/hyperbus/hbmc-am654.c
··· 70 70 71 71 platform_set_drvdata(pdev, priv); 72 72 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); 74 75 if (ret) 75 76 return ret; 76 77 ··· 104 103 priv->ctlr.dev = dev; 105 104 priv->ctlr.ops = &am654_hbmc_ops; 106 105 priv->hbdev.ctlr = &priv->ctlr; 107 - priv->hbdev.np = of_get_next_child(dev->of_node, NULL); 108 106 ret = hyperbus_register_device(&priv->hbdev); 109 107 if (ret) { 110 108 dev_err(dev, "failed to register controller\n");