Commit eb11b5a9 authored by Rob Herring's avatar Rob Herring

ARM: broadcom: Use of_get_cpu_hwid()

Replace open coded parsing of CPU nodes 'reg' property with
of_get_cpu_hwid().

Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Tested-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211006164332.1981454-4-robh@kernel.org
parent ca96bbe2
......@@ -91,10 +91,10 @@ static int bcm63xx_pmb_get_resources(struct device_node *dn,
struct of_phandle_args args;
int ret;
ret = of_property_read_u32(dn, "reg", cpu);
if (ret) {
*cpu = of_get_cpu_hwid(dn, 0);
if (*cpu == ~0U) {
pr_err("CPU is missing a reg node\n");
return ret;
return -ENODEV;
}
ret = of_parse_phandle_with_args(dn, "resets", "#reset-cells",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment