}
}
-/* Remove all references to the rpmhpd device */
-static void fixup_power_domains(struct device_node *root)
-{
- struct device_node *pd = NULL, *np = NULL;
- struct property *prop;
- const __be32 *val;
-
- /* All Qualcomm platforms name the rpm(h)pd "power-controller" */
- for_each_of_allnodes_from(root, pd) {
- if (pd->name && !strcmp("power-controller", pd->name))
- break;
- }
-
- /* Sanity check that this is indeed a power domain controller */
- if (!of_find_property(pd, "#power-domain-cells", NULL)) {
- log_err("Found power-controller but it doesn't have #power-domain-cells\n");
- return;
- }
-
- /* Remove all references to the power domain controller */
- for_each_of_allnodes_from(root, np) {
- if (!(prop = of_find_property(np, "power-domains", NULL)))
- continue;
-
- val = prop->value;
- if (val[0] == cpu_to_fdt32(pd->phandle))
- of_remove_property(np, prop);
- }
-}
-
#define time_call(func, ...) \
do { \
u64 start = timer_get_us(); \
struct device_node *root = event->data.of_live_built.root;
time_call(fixup_usb_nodes, root);
- time_call(fixup_power_domains, root);
return 0;
}