mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
imx: power-domain: Descend into pgc subnode if present
In case the power domain node structure is gpc@303a0000/pgc/power-domain@N, do not bind power domain driver to the 'pgc' node, but rather descend into it and only bind power domain drivers to power-domain@N subnodes. This way we do not waste one useless driver instance associated with 'pgc' node. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-defconfig Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
20874a6072
commit
8741d92756
@ -73,6 +73,12 @@ static int imx8m_power_domain_bind(struct udevice *dev)
|
|||||||
/* Bind the subnode to this driver */
|
/* Bind the subnode to this driver */
|
||||||
name = fdt_get_name(gd->fdt_blob, offset, NULL);
|
name = fdt_get_name(gd->fdt_blob, offset, NULL);
|
||||||
|
|
||||||
|
/* Descend into 'pgc' subnode */
|
||||||
|
if (!strstr(name, "power-domain")) {
|
||||||
|
offset = fdt_first_subnode(gd->fdt_blob, offset);
|
||||||
|
name = fdt_get_name(gd->fdt_blob, offset, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
ret = device_bind_with_driver_data(dev, dev->driver, name,
|
ret = device_bind_with_driver_data(dev, dev->driver, name,
|
||||||
dev->driver_data,
|
dev->driver_data,
|
||||||
offset_to_ofnode(offset),
|
offset_to_ofnode(offset),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user