mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
power: domain: imx8m: convert ofnode API to dev_read API
Replace ofnode_for_each_subnode(subnode, dev_ofnode(dev)) with dev_for_each_subnode(subnode, dev) and ofnode_read_u32_default( dev_ofnode(dev), ...) with dev_read_u32_default(dev, ...). No functional change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -476,7 +476,7 @@ static int imx8m_power_domain_bind(struct udevice *dev)
|
||||
const char *name;
|
||||
int ret = 0;
|
||||
|
||||
ofnode_for_each_subnode(subnode, dev_ofnode(dev)) {
|
||||
dev_for_each_subnode(subnode, dev) {
|
||||
/* Bind the subnode to this driver */
|
||||
name = ofnode_get_name(subnode);
|
||||
|
||||
@@ -531,7 +531,7 @@ static int imx8m_power_domain_of_to_plat(struct udevice *dev)
|
||||
struct imx_pgc_domain_data *domain_data =
|
||||
(struct imx_pgc_domain_data *)dev_get_driver_data(dev);
|
||||
|
||||
pdata->resource_id = ofnode_read_u32_default(dev_ofnode(dev), "reg", -1);
|
||||
pdata->resource_id = dev_read_u32_default(dev, "reg", -1);
|
||||
pdata->domain = &domain_data->domains[pdata->resource_id];
|
||||
pdata->regs = domain_data->pgc_regs;
|
||||
pdata->base = dev_read_addr_ptr(dev->parent);
|
||||
|
||||
Reference in New Issue
Block a user