]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mach-snapdragon: Remove RPMH power domain DT fixup code
authorAswin Murugan <aswin.murugan@oss.qualcomm.com>
Fri, 13 Feb 2026 11:10:08 +0000 (16:40 +0530)
committerCasey Connolly <casey.connolly@linaro.org>
Mon, 27 Apr 2026 10:33:29 +0000 (12:33 +0200)
Remove the device tree fixup code that was stripping power-domains
properties from device tree nodes. This fixup was a temporary
workaround needed when RPMH power domain driver support was not
available in U-Boot.

Now that RPMH power domain driver support has been added, the power
domain properties can be preserved in the device tree, allowing proper
power domain management. If a suitable power domain driver is not found
for the power-controller node, it will be handled with a warning in
dev_power_domain_ctrl().

Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://patch.msgid.link/20260213111009.1254360-4-aswin.murugan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
arch/arm/mach-snapdragon/of_fixup.c

index 5b6076ea8e574243c4a7aef290cd8794ca575f45..286541c8edc777589b7c319f98e6afc3c9b41e85 100644 (file)
@@ -134,36 +134,6 @@ static void fixup_usb_nodes(struct device_node *root)
        }
 }
 
-/* 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(); \
@@ -176,7 +146,6 @@ static int qcom_of_fixup_nodes(void * __maybe_unused ctx, struct event *event)
        struct device_node *root = event->data.of_live_built.root;
 
        time_call(fixup_usb_nodes, root);
-       time_call(fixup_power_domains, root);
 
        return 0;
 }