aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorWalter Lozano2020-06-25 01:10:13 -0300
committerSimon Glass2020-07-09 22:00:29 -0600
commit51f1263d8933fcae877b7698c0cb06d3ab495439 (patch)
treeec59f38d7e8ccd3c12cc910a78f60feab2ba5d1f /drivers/spi
parentdf29730410ae2b1a861dcd094c14ea1a12892109 (diff)
dtoc: extend dtoc to use struct driver_info when linking nodes
In the current implementation, when dtoc parses a dtb to generate a struct platdata it converts the information related to linked nodes as pointers to struct platdata of destination nodes. By doing this, it makes difficult to get pointer to udevices created based on these information. This patch extends dtoc to use struct driver_info when populating information about linked nodes, which makes it easier to later get the devices created. In this context, reimplement functions like clk_get_by_index_platdata() which made use of the previous approach. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/rk_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index add3e49c306..b6f95fa9a47 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -183,7 +183,7 @@ static int conv_of_platdata(struct udevice *dev)
plat->base = dtplat->reg[0];
plat->frequency = 20000000;
- ret = clk_get_by_index_platdata(dev, 0, dtplat->clocks, &priv->clk);
+ ret = clk_get_by_driver_info(dev, dtplat->clocks, &priv->clk);
if (ret < 0)
return ret;
dev->req_seq = 0;