mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
clk: aspeed: Use dev_read_addr_ptr()
Replace devfdt_get_addr_ptr() with dev_read_addr_ptr() when retrieving the register base address. dev_read_addr_ptr() supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -544,9 +544,9 @@ static int ast2500_clk_of_to_plat(struct udevice *dev)
|
||||
{
|
||||
struct ast2500_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->scu = devfdt_get_addr_ptr(dev);
|
||||
if (IS_ERR(priv->scu))
|
||||
return PTR_ERR(priv->scu);
|
||||
priv->scu = dev_read_addr_ptr(dev);
|
||||
if (!priv->scu)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1174,9 +1174,9 @@ static int ast2600_clk_probe(struct udevice *dev)
|
||||
{
|
||||
struct ast2600_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->scu = devfdt_get_addr_ptr(dev);
|
||||
if (IS_ERR(priv->scu))
|
||||
return PTR_ERR(priv->scu);
|
||||
priv->scu = dev_read_addr_ptr(dev);
|
||||
if (!priv->scu)
|
||||
return -EINVAL;
|
||||
|
||||
ast2600_init_rgmii_clk(priv->scu, &rgmii_clk_defconfig);
|
||||
ast2600_init_rmii_clk(priv->scu, &rmii_clk_defconfig);
|
||||
|
||||
Reference in New Issue
Block a user