From 762133d6a67fa027345fdc30737277465b4893dd Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 19 Oct 2021 14:43:12 +0200 Subject: dt-bindings: net: wireless: ti,wlcore: Convert to json-schema The Texas Instruments Wilink 6/7/8 (wl12xx/wl18xx) Wireless LAN Controllers can be connected via SPI or via SDIO. Convert the two Device Tree binding documents to json-schema, and merge them into a single document. Add missing ti,wl1285 compatible value. Add missing interrupt-names property. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/23a2fbc46255a988e5d36f6c14abb7130480d200.1634646975.git.geert+renesas@glider.be Signed-off-by: Rob Herring --- arch/arm/boot/dts/omap3-gta04a5.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/omap3-gta04a5.dts b/arch/arm/boot/dts/omap3-gta04a5.dts index 9ce8d81250aa..b4c4ca7e1842 100644 --- a/arch/arm/boot/dts/omap3-gta04a5.dts +++ b/arch/arm/boot/dts/omap3-gta04a5.dts @@ -79,7 +79,7 @@ /* * for WL183x module see - * Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt + * Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml */ &wifi_pwrseq { -- cgit 1.4.1 From ca96bbe2469ffefd475c89c4d22b72f6dddb4a5c Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 6 Oct 2021 11:43:22 -0500 Subject: ARM: Use of_get_cpu_hwid() Replace the open coded parsing of CPU nodes' 'reg' property with of_get_cpu_hwid(). This change drops an error message for missing 'reg' property, but that should not be necessary as the DT tools will ensure 'reg' is present. Cc: Russell King Signed-off-by: Rob Herring Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20211006164332.1981454-3-robh@kernel.org --- arch/arm/kernel/devtree.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index 28311dd0fee6..02839d8b6202 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c @@ -84,33 +84,15 @@ void __init arm_dt_init_cpu_maps(void) return; for_each_of_cpu_node(cpu) { - const __be32 *cell; - int prop_bytes; - u32 hwid; + u32 hwid = of_get_cpu_hwid(cpu, 0); pr_debug(" * %pOF...\n", cpu); - /* - * A device tree containing CPU nodes with missing "reg" - * properties is considered invalid to build the - * cpu_logical_map. - */ - cell = of_get_property(cpu, "reg", &prop_bytes); - if (!cell || prop_bytes < sizeof(*cell)) { - pr_debug(" * %pOF missing reg property\n", cpu); - of_node_put(cpu); - return; - } /* * Bits n:24 must be set to 0 in the DT since the reg property * defines the MPIDR[23:0]. */ - do { - hwid = be32_to_cpu(*cell++); - prop_bytes -= sizeof(*cell); - } while (!hwid && prop_bytes > 0); - - if (prop_bytes || (hwid & ~MPIDR_HWID_BITMASK)) { + if (hwid & ~MPIDR_HWID_BITMASK) { of_node_put(cpu); return; } -- cgit 1.4.1 From eb11b5a9562ed450c63d2396c571c5375129cb3f Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 6 Oct 2021 11:43:23 -0500 Subject: ARM: broadcom: Use of_get_cpu_hwid() Replace open coded parsing of CPU nodes 'reg' property with of_get_cpu_hwid(). Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Russell King Signed-off-by: Rob Herring Acked-by: Florian Fainelli Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20211006164332.1981454-4-robh@kernel.org --- arch/arm/mach-bcm/bcm63xx_pmb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-bcm/bcm63xx_pmb.c b/arch/arm/mach-bcm/bcm63xx_pmb.c index 0e5a05bac3ea..003f1472ab45 100644 --- a/arch/arm/mach-bcm/bcm63xx_pmb.c +++ b/arch/arm/mach-bcm/bcm63xx_pmb.c @@ -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", -- cgit 1.4.1