From c63f5b454885b191483cb67a43892f92ec99eca2 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 9 Jun 2023 12:32:52 -0600 Subject: [PATCH 01/49] ARM: omap2: Use of_range_to_resource() for "ranges" parsing "ranges" is a standard property with common parsing functions. Users shouldn't be implementing their own parsing of it. Use the recently added of_range_to_resource() function instead for OMAP hwmod. Signed-off-by: Rob Herring Message-ID: <20230609183252.1767487-1-robh@kernel.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod.c | 45 +++++--------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index aac4c4ee2528..1e17b5f77588 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2194,23 +2194,8 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh, struct resource *res) { struct property *prop; - const __be32 *ranges; const char *name; - u32 nr_addr, nr_size; - u64 base, size; - int len, error; - - if (!res) - return -EINVAL; - - ranges = of_get_property(np, "ranges", &len); - if (!ranges) - return -ENOENT; - - len /= sizeof(*ranges); - - if (len < 3) - return -EINVAL; + int err; of_property_for_each_string(np, "compatible", prop, name) if (!strncmp("ti,sysc-", name, 8)) @@ -2219,26 +2204,12 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh, if (!name) return -ENOENT; - error = of_property_read_u32(np, "#address-cells", &nr_addr); - if (error) - return -ENOENT; + err = of_range_to_resource(np, 0, res); + if (err) + return err; - error = of_property_read_u32(np, "#size-cells", &nr_size); - if (error) - return -ENOENT; - - if (nr_addr != 1 || nr_size != 1) { - pr_err("%s: invalid range for %s->%pOFn\n", __func__, - oh->name, np); - return -EINVAL; - } - - ranges++; - base = of_translate_address(np, ranges++); - size = be32_to_cpup(ranges); - - pr_debug("omap_hwmod: %s %pOFn at 0x%llx size 0x%llx\n", - oh->name, np, base, size); + pr_debug("omap_hwmod: %s %pOFn at %pR\n", + oh->name, np, &res); if (oh && oh->mpu_rt_idx) { omap_hwmod_fix_mpu_rt_idx(oh, np, res); @@ -2246,10 +2217,6 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh, return 0; } - res->start = base; - res->end = base + size - 1; - res->flags = IORESOURCE_MEM; - return 0; } From 847fb80cc01a54bc827b02547bb8743bdb59ddab Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Wed, 7 Jun 2023 22:12:11 -0600 Subject: [PATCH 02/49] ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch() If function pwrdm_read_prev_pwrst() returns -EINVAL, we will end up accessing array pwrdm->state_counter through negative index -22. This is wrong and the compiler is legitimately warning us about this potential problem. Fix this by sanity checking the value stored in variable _prev_ before accessing array pwrdm->state_counter. Address the following -Warray-bounds warning: arch/arm/mach-omap2/powerdomain.c:178:45: warning: array subscript -22 is below array bounds of 'unsigned int[4]' [-Warray-bounds] Link: https://github.com/KSPP/linux/issues/307 Fixes: ba20bb126940 ("OMAP: PM counter infrastructure.") Cc: stable@vger.kernel.org Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/20230607050639.LzbPn%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Message-ID: Acked-by: Ard Biesheuvel Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/powerdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 777f9f8e7cd8..5e05dd1324e7 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -174,7 +174,7 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) break; case PWRDM_STATE_PREV: prev = pwrdm_read_prev_pwrst(pwrdm); - if (pwrdm->state != prev) + if (prev >= 0 && pwrdm->state != prev) pwrdm->state_counter[prev]++; if (prev == PWRDM_POWER_RET) _update_logic_membank_counters(pwrdm); From e06b83d8a44ea54fb401690329a130b89b8b7819 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:56:38 -0600 Subject: [PATCH 03/49] ARM: hisi: Drop unused includes of_platform.h is not needed, so drop it. Signed-off-by: Rob Herring Signed-off-by: Wei Xu --- arch/arm/mach-hisi/hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-hisi/hotplug.c b/arch/arm/mach-hisi/hotplug.c index c517941416f1..f5655ad1c351 100644 --- a/arch/arm/mach-hisi/hotplug.c +++ b/arch/arm/mach-hisi/hotplug.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include "core.h" From 66ba9c05fc51d3357298dccf718ee83469978da8 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:55:04 -0600 Subject: [PATCH 04/49] ARM: imx: Drop unused includes Several includes are not needed, so drop them. of_platform.h (for now) implicitly includes platform_device.h and of.h, so add explicit includes of those as needed. Signed-off-by: Rob Herring Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-imx1.c | 4 ---- arch/arm/mach-imx/mach-imx25.c | 5 ----- arch/arm/mach-imx/mach-imx27.c | 6 ------ arch/arm/mach-imx/mach-imx35.c | 8 -------- arch/arm/mach-imx/mach-imx50.c | 1 - arch/arm/mach-imx/mach-imx51.c | 5 +---- arch/arm/mach-imx/mach-imx53.c | 8 -------- arch/arm/mach-imx/mach-imx6sx.c | 2 -- arch/arm/mach-imx/mach-imx6ul.c | 4 ---- arch/arm/mach-imx/mach-imx7d.c | 2 +- arch/arm/mach-imx/pm-imx5.c | 1 + arch/arm/mach-imx/pm-imx6.c | 1 + 12 files changed, 4 insertions(+), 43 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx1.c b/arch/arm/mach-imx/mach-imx1.c index 8eca92d66a2e..a4688f575ffe 100644 --- a/arch/arm/mach-imx/mach-imx1.c +++ b/arch/arm/mach-imx/mach-imx1.c @@ -3,15 +3,11 @@ * Copyright (C) 2014 Alexander Shiyan */ -#include #include -#include #include "common.h" #include "hardware.h" -#define MX1_AVIC_ADDR 0x00223000 - static void __init imx1_init_early(void) { mxc_set_cpu_type(MXC_CPU_MX1); diff --git a/arch/arm/mach-imx/mach-imx25.c b/arch/arm/mach-imx/mach-imx25.c index 51927bd08aef..114df312a99a 100644 --- a/arch/arm/mach-imx/mach-imx25.c +++ b/arch/arm/mach-imx/mach-imx25.c @@ -3,12 +3,7 @@ * Copyright 2012 Sascha Hauer, Pengutronix */ -#include -#include -#include -#include #include -#include #include "common.h" #include "hardware.h" diff --git a/arch/arm/mach-imx/mach-imx27.c b/arch/arm/mach-imx/mach-imx27.c index e325c9468105..ada84fe8a1fd 100644 --- a/arch/arm/mach-imx/mach-imx27.c +++ b/arch/arm/mach-imx/mach-imx27.c @@ -4,14 +4,8 @@ */ #include -#include -#include -#include -#include -#include #include #include -#include #include "common.h" #include "hardware.h" diff --git a/arch/arm/mach-imx/mach-imx35.c b/arch/arm/mach-imx/mach-imx35.c index 0fc08218b77d..35dbc719fb6d 100644 --- a/arch/arm/mach-imx/mach-imx35.c +++ b/arch/arm/mach-imx/mach-imx35.c @@ -5,15 +5,7 @@ * based on imx27-dt.c */ -#include -#include -#include -#include -#include -#include #include -#include -#include #include "common.h" #include "mx35.h" diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c index a2d35f9ba474..9dc9d0ae9342 100644 --- a/arch/arm/mach-imx/mach-imx50.c +++ b/arch/arm/mach-imx/mach-imx50.c @@ -5,7 +5,6 @@ * Copyright 2011 Linaro Ltd. */ -#include #include #include "common.h" diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index 8b748a1854d7..510801f6f71c 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c @@ -5,12 +5,9 @@ */ #include -#include +#include #include -#include -#include #include -#include #include "common.h" #include "hardware.h" diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 8223c5aee45d..6622406e0081 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -4,15 +4,7 @@ * Copyright 2011 Linaro Ltd. */ -#include -#include -#include -#include -#include -#include -#include #include -#include #include "common.h" #include "hardware.h" diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index e65ed5218f53..9ababf4ac210 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c @@ -5,12 +5,10 @@ #include #include -#include #include #include #include #include -#include #include "common.h" #include "cpuidle.h" diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c index 7a0299de1db6..cb6d29c2bb5f 100644 --- a/arch/arm/mach-imx/mach-imx6ul.c +++ b/arch/arm/mach-imx/mach-imx6ul.c @@ -3,12 +3,8 @@ * Copyright (C) 2015 Freescale Semiconductor, Inc. */ #include -#include #include -#include -#include #include -#include #include "common.h" #include "cpuidle.h" diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c index 6fdd06bcf988..9587885fb1ac 100644 --- a/arch/arm/mach-imx/mach-imx7d.c +++ b/arch/arm/mach-imx/mach-imx7d.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c index 2e3af2bc7758..6f0de45b71e9 100644 --- a/arch/arm/mach-imx/pm-imx5.c +++ b/arch/arm/mach-imx/pm-imx5.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index 045b9fdd342d..b36f05b54cc7 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include From 37e2d7d23765c3948e21cb361100f1baeb65f4f3 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:54:40 -0600 Subject: [PATCH 05/49] ARM: socfpga: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. A couple of other includes are unused and can be dropped too. Signed-off-by: Rob Herring Signed-off-by: Dinh Nguyen --- arch/arm/mach-socfpga/l2_cache.c | 2 +- arch/arm/mach-socfpga/ocram.c | 4 +--- arch/arm/mach-socfpga/pm.c | 2 ++ arch/arm/mach-socfpga/socfpga.c | 4 +--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-socfpga/l2_cache.c b/arch/arm/mach-socfpga/l2_cache.c index 99fb95361590..86e011eeb444 100644 --- a/arch/arm/mach-socfpga/l2_cache.c +++ b/arch/arm/mach-socfpga/l2_cache.c @@ -3,7 +3,7 @@ * Copyright Altera Corporation (C) 2016. All rights reserved. */ #include -#include +#include #include #include "core.h" diff --git a/arch/arm/mach-socfpga/ocram.c b/arch/arm/mach-socfpga/ocram.c index b4d397e834a0..9f1a249debf6 100644 --- a/arch/arm/mach-socfpga/ocram.c +++ b/arch/arm/mach-socfpga/ocram.c @@ -4,10 +4,8 @@ */ #include #include -#include -#include +#include #include -#include #include "core.h" diff --git a/arch/arm/mach-socfpga/pm.c b/arch/arm/mach-socfpga/pm.c index 365c0428b21b..ab1c08f971f0 100644 --- a/arch/arm/mach-socfpga/pm.c +++ b/arch/arm/mach-socfpga/pm.c @@ -13,7 +13,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index 9e4cb2ffd580..4332af2d8b86 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c @@ -3,13 +3,11 @@ * Copyright (C) 2012-2015 Altera Corporation */ #include +#include #include -#include -#include #include #include -#include #include #include #include From 91b631c25f6a21fe70f3fbc5c54aa05e617279bd Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:57:03 -0600 Subject: [PATCH 06/49] ARM: bcm: Drop unused includes Several includes are not needed, so drop them. of_platform.h is not needed, but it implicitly includes of.h which is needed. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230717225704.3215469-1-robh@kernel.org Signed-off-by: Florian Fainelli --- arch/arm/mach-bcm/bcm_5301x.c | 2 -- arch/arm/mach-bcm/board_bcm23550.c | 2 -- arch/arm/mach-bcm/brcmstb.c | 1 - arch/arm/mach-bcm/platsmp-brcmstb.c | 2 +- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c index fe067f6cebb6..cd29496da1ea 100644 --- a/arch/arm/mach-bcm/bcm_5301x.c +++ b/arch/arm/mach-bcm/bcm_5301x.c @@ -5,8 +5,6 @@ * * Licensed under the GNU/GPL. See COPYING for details. */ -#include -#include #include #include diff --git a/arch/arm/mach-bcm/board_bcm23550.c b/arch/arm/mach-bcm/board_bcm23550.c index dd6e9cb785e0..3784b7372ad8 100644 --- a/arch/arm/mach-bcm/board_bcm23550.c +++ b/arch/arm/mach-bcm/board_bcm23550.c @@ -1,8 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only // Copyright (C) 2016 Broadcom -#include - #include static const char * const bcm23550_dt_compat[] = { diff --git a/arch/arm/mach-bcm/brcmstb.c b/arch/arm/mach-bcm/brcmstb.c index 2e3385ced82a..43bc98e388bf 100644 --- a/arch/arm/mach-bcm/brcmstb.c +++ b/arch/arm/mach-bcm/brcmstb.c @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c index 8989299ebdd6..07aeda1d66a8 100644 --- a/arch/arm/mach-bcm/platsmp-brcmstb.c +++ b/arch/arm/mach-bcm/platsmp-brcmstb.c @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include #include #include From bfb345a7bdc186ebbf2b9c53215f0f7b9bdba9fd Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:56:14 -0600 Subject: [PATCH 07/49] ARM: shmobile: rcar-gen2: Drop unused OF includes of_platform.h is not needed, so drop it. Signed-off-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230717225614.3214179-1-robh@kernel.org Signed-off-by: Geert Uytterhoeven --- arch/arm/mach-shmobile/setup-rcar-gen2.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index 3edbf0719fb3..c38367a10c79 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include From 630c191b3396c6aaccab1234f8834848a2c42e8a Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:56:09 -0600 Subject: [PATCH 08/49] ARM: keystone: Drop unused includes Several includes are not needed, so drop them. of_platform.h is not needed, but it implicitly includes platform_device.h (for now) which is needed. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230717225610.3214029-1-robh@kernel.org Signed-off-by: Nishanth Menon --- arch/arm/mach-keystone/keystone.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index 68039aad3014..e0ca26182e0b 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c @@ -7,12 +7,10 @@ * Santosh Shilimkar */ #include -#include #include #include -#include -#include #include +#include #include #include From 11795e02c142c536644a07825c8dbc4058ddfac3 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 14 Jul 2023 11:51:38 -0600 Subject: [PATCH 09/49] soc: microchip: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230714175139.4067685-1-robh@kernel.org [claudiu.beznea: added link] Signed-off-by: Claudiu Beznea --- drivers/soc/atmel/sfr.c | 1 - drivers/soc/microchip/mpfs-sys-controller.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/atmel/sfr.c b/drivers/soc/atmel/sfr.c index 0525eef49d1a..cc94ca1b494c 100644 --- a/drivers/soc/atmel/sfr.c +++ b/drivers/soc/atmel/sfr.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/drivers/soc/microchip/mpfs-sys-controller.c b/drivers/soc/microchip/mpfs-sys-controller.c index 216d9f4ea0ce..fbcd5fd24d7c 100644 --- a/drivers/soc/microchip/mpfs-sys-controller.c +++ b/drivers/soc/microchip/mpfs-sys-controller.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include From d4b564a524612ee8766a51128eca17e43b40d16e Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:54:29 -0600 Subject: [PATCH 10/49] ARM: at91: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. A couple of other includes are unused and can be dropped too. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230717225429.3211307-1-robh@kernel.org Signed-off-by: Claudiu Beznea --- arch/arm/mach-at91/pm.c | 1 + arch/arm/mach-at91/samv7.c | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 437dd0352fd4..1a26af0fabc7 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-at91/samv7.c b/arch/arm/mach-at91/samv7.c index 28f998f0fba5..22d00005ec09 100644 --- a/arch/arm/mach-at91/samv7.c +++ b/arch/arm/mach-at91/samv7.c @@ -5,14 +5,7 @@ * Copyright (C) 2013 Atmel, * 2016 Andras Szemzo */ -#include -#include -#include -#include #include -#include -#include -#include "generic.h" static const char *const samv7_dt_board_compat[] __initconst = { "atmel,samv7", From 96a49448c4777940b16eecdfc61f935fa380d864 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Tue, 25 Jul 2023 22:11:05 +0800 Subject: [PATCH 11/49] ARM: at91: Remove unused extern declarations commit 157576d55233 ("misc: remove atmel_tclib") left behind this. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20230725141105.26904-1-yuehaibing@huawei.com Signed-off-by: Claudiu Beznea --- include/soc/at91/atmel_tcb.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/soc/at91/atmel_tcb.h b/include/soc/at91/atmel_tcb.h index 1d7071dc0bca..26b56a07bd1f 100644 --- a/include/soc/at91/atmel_tcb.h +++ b/include/soc/at91/atmel_tcb.h @@ -77,9 +77,6 @@ struct atmel_tc { bool allocated; }; -extern struct atmel_tc *atmel_tc_alloc(unsigned block); -extern void atmel_tc_free(struct atmel_tc *tc); - /* platform-specific ATMEL_TC_TIMER_CLOCKx divisors (0 means 32KiHz) */ extern const u8 atmel_tc_divisors[5]; From fda31904ffbc7231898198333804fa551b681387 Mon Sep 17 00:00:00 2001 From: Andreas Kemnade Date: Mon, 15 May 2023 09:45:12 +0200 Subject: [PATCH 12/49] MAINTAINERS: add board bindings list to OMAP2+ files Add list of OMAP2+ boards to the corresponding section CC: linux-omap@vger.kernel.org Signed-off-by: Andreas Kemnade Message-ID: <20230515074512.66226-3-andreas@kemnade.info> Signed-off-by: Tony Lindgren --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3be1bdfe8ecc..1844a8e30e03 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15505,6 +15505,7 @@ W: http://www.muru.com/linux/omap/ W: http://linux.omap.com/ Q: http://patchwork.kernel.org/project/linux-omap/list/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git +F: Documentation/devicetree/bindings/arm/ti/omap.yaml F: arch/arm/configs/omap2plus_defconfig F: arch/arm/mach-omap2/ F: drivers/bus/ti-sysc.c From 1047e2142ebfe3bb88d0c2470de6f437050c7a54 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 20 Jul 2023 11:27:43 -0600 Subject: [PATCH 13/49] ARM: omap2: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Message-ID: <20230720172743.2918601-1-robh@kernel.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-generic.c | 3 +-- arch/arm/mach-omap2/omap4-common.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 10d2f078e4a8..fde6ccb3df6e 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -9,11 +9,10 @@ * to support the OMAP2+ device tree boards with an unique board file. */ #include -#include -#include #include #include #include +#include #include #include diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index d9ed2a5dcd5e..5d924b85b694 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -12,10 +12,9 @@ #include #include #include -#include #include +#include #include -#include #include #include #include From b5bd2ccac2d5b2830c1d59e759e5e35e50639b99 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:56:23 -0600 Subject: [PATCH 14/49] ARM: meson: Drop unused includes of_platform.h is not needed, so drop it. Signed-off-by: Rob Herring Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230717225623.3214384-1-robh@kernel.org Signed-off-by: Neil Armstrong --- arch/arm/mach-meson/meson.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-meson/meson.c b/arch/arm/mach-meson/meson.c index de56e707c7aa..d3ae89dd84bb 100644 --- a/arch/arm/mach-meson/meson.c +++ b/arch/arm/mach-meson/meson.c @@ -3,7 +3,6 @@ * Copyright (C) 2014 Carlo Caione */ -#include #include static const char * const meson_common_board_compat[] = { From 04a0137fc36d0b544afd5afd59f8f739ca97e33e Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 26 Jul 2023 11:04:40 -0500 Subject: [PATCH 15/49] ARM: keystone: Merge memory.h into the only file that uses it The defines in memory.h can go into the file that makes use of them. No reason to have a header here, remove. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20230726160441.101566-1-afd@ti.com Signed-off-by: Nishanth Menon --- arch/arm/mach-keystone/keystone.c | 12 ++++++++++-- arch/arm/mach-keystone/memory.h | 18 ------------------ 2 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 arch/arm/mach-keystone/memory.h diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index e0ca26182e0b..e8a06bd69bf2 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c @@ -18,10 +18,18 @@ #include #include -#include "memory.h" - #include "keystone.h" +#define KEYSTONE_LOW_PHYS_START 0x80000000ULL +#define KEYSTONE_LOW_PHYS_SIZE 0x80000000ULL /* 2G */ +#define KEYSTONE_LOW_PHYS_END (KEYSTONE_LOW_PHYS_START + \ + KEYSTONE_LOW_PHYS_SIZE - 1) + +#define KEYSTONE_HIGH_PHYS_START 0x800000000ULL +#define KEYSTONE_HIGH_PHYS_SIZE 0x400000000ULL /* 16G */ +#define KEYSTONE_HIGH_PHYS_END (KEYSTONE_HIGH_PHYS_START + \ + KEYSTONE_HIGH_PHYS_SIZE - 1) + #ifdef CONFIG_ARM_LPAE static int keystone_platform_notifier(struct notifier_block *nb, unsigned long event, void *data) diff --git a/arch/arm/mach-keystone/memory.h b/arch/arm/mach-keystone/memory.h deleted file mode 100644 index 1b9ed1271e05..000000000000 --- a/arch/arm/mach-keystone/memory.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright 2014 Texas Instruments, Inc. - * Santosh Shilimkar - */ -#ifndef __MEMORY_H -#define __MEMORY_H - -#define KEYSTONE_LOW_PHYS_START 0x80000000ULL -#define KEYSTONE_LOW_PHYS_SIZE 0x80000000ULL /* 2G */ -#define KEYSTONE_LOW_PHYS_END (KEYSTONE_LOW_PHYS_START + \ - KEYSTONE_LOW_PHYS_SIZE - 1) - -#define KEYSTONE_HIGH_PHYS_START 0x800000000ULL -#define KEYSTONE_HIGH_PHYS_SIZE 0x400000000ULL /* 16G */ -#define KEYSTONE_HIGH_PHYS_END (KEYSTONE_HIGH_PHYS_START + \ - KEYSTONE_HIGH_PHYS_SIZE - 1) -#endif /* __MEMORY_H */ From d33dbddf43a055f69bda7f3488bb1e136d1b6bbc Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 26 Jul 2023 11:04:41 -0500 Subject: [PATCH 16/49] ARM: keystone: Merge PM function into main support file The one function left in this file does not justify a whole extra file nor the keystone.h support file used to forward declare that function. Merge this into the main keystone.c file. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20230726160441.101566-2-afd@ti.com Signed-off-by: Nishanth Menon --- arch/arm/mach-keystone/Makefile | 3 -- arch/arm/mach-keystone/keystone.c | 38 +++++++++++++++++++++-- arch/arm/mach-keystone/keystone.h | 16 ---------- arch/arm/mach-keystone/pm_domain.c | 50 ------------------------------ 4 files changed, 36 insertions(+), 71 deletions(-) delete mode 100644 arch/arm/mach-keystone/keystone.h delete mode 100644 arch/arm/mach-keystone/pm_domain.c diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile index 0c1d54aec60f..66598d29dd3c 100644 --- a/arch/arm/mach-keystone/Makefile +++ b/arch/arm/mach-keystone/Makefile @@ -1,5 +1,2 @@ # SPDX-License-Identifier: GPL-2.0 obj-y := keystone.o - -# PM domain driver for Keystone SOCs -obj-$(CONFIG_ARCH_KEYSTONE) += pm_domain.o diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index e8a06bd69bf2..f63671a3024c 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c @@ -6,10 +6,14 @@ * Cyril Chemparathy * Santosh Shilimkar */ + #include #include #include +#include +#include #include +#include #include #include @@ -18,8 +22,6 @@ #include #include -#include "keystone.h" - #define KEYSTONE_LOW_PHYS_START 0x80000000ULL #define KEYSTONE_LOW_PHYS_SIZE 0x80000000ULL /* 2G */ #define KEYSTONE_LOW_PHYS_END (KEYSTONE_LOW_PHYS_START + \ @@ -30,6 +32,38 @@ #define KEYSTONE_HIGH_PHYS_END (KEYSTONE_HIGH_PHYS_START + \ KEYSTONE_HIGH_PHYS_SIZE - 1) +static struct dev_pm_domain keystone_pm_domain = { + .ops = { + USE_PM_CLK_RUNTIME_OPS + USE_PLATFORM_PM_SLEEP_OPS + }, +}; + +static struct pm_clk_notifier_block platform_domain_notifier = { + .pm_domain = &keystone_pm_domain, + .con_ids = { NULL }, +}; + +static const struct of_device_id of_keystone_table[] = { + {.compatible = "ti,k2hk"}, + {.compatible = "ti,k2e"}, + {.compatible = "ti,k2l"}, + { /* end of list */ }, +}; + +static int __init keystone_pm_runtime_init(void) +{ + struct device_node *np; + + np = of_find_matching_node(NULL, of_keystone_table); + if (!np) + return 0; + + pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); + + return 0; +} + #ifdef CONFIG_ARM_LPAE static int keystone_platform_notifier(struct notifier_block *nb, unsigned long event, void *data) diff --git a/arch/arm/mach-keystone/keystone.h b/arch/arm/mach-keystone/keystone.h deleted file mode 100644 index 71ff8cd2ee4a..000000000000 --- a/arch/arm/mach-keystone/keystone.h +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright 2013 Texas Instruments, Inc. - * Cyril Chemparathy - * Santosh Shilimkar - */ - -#ifndef __KEYSTONE_H__ -#define __KEYSTONE_H__ - -#ifndef __ASSEMBLER__ - -extern int keystone_pm_runtime_init(void); - -#endif /* __ASSEMBLER__ */ -#endif /* __KEYSTONE_H__ */ diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c deleted file mode 100644 index 5eea01cbecf0..000000000000 --- a/arch/arm/mach-keystone/pm_domain.c +++ /dev/null @@ -1,50 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * PM domain driver for Keystone2 devices - * - * Copyright 2013 Texas Instruments, Inc. - * Santosh Shilimkar - * - * Based on Kevins work on DAVINCI SOCs - * Kevin Hilman - */ - -#include -#include -#include -#include -#include - -#include "keystone.h" - -static struct dev_pm_domain keystone_pm_domain = { - .ops = { - USE_PM_CLK_RUNTIME_OPS - USE_PLATFORM_PM_SLEEP_OPS - }, -}; - -static struct pm_clk_notifier_block platform_domain_notifier = { - .pm_domain = &keystone_pm_domain, - .con_ids = { NULL }, -}; - -static const struct of_device_id of_keystone_table[] = { - {.compatible = "ti,k2hk"}, - {.compatible = "ti,k2e"}, - {.compatible = "ti,k2l"}, - { /* end of list */ }, -}; - -int __init keystone_pm_runtime_init(void) -{ - struct device_node *np; - - np = of_find_matching_node(NULL, of_keystone_table); - if (!np) - return 0; - - pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); - - return 0; -} From c0b736d3b57891b4776d70b2ba134876b195c908 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:41 -0600 Subject: [PATCH 17/49] ARM: l2x0: Add explicit includes for init and types The cache-l2x0.h header uses u32 type and the __init and __iomem attributes, so it should have explicit includes for those. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-1-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/hardware/cache-l2x0.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index a6d4ee86ba54..5a7ee70f561c 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h @@ -9,6 +9,8 @@ #define __ASM_ARM_HARDWARE_L2X0_H #include +#include +#include #define L2X0_CACHE_ID 0x000 #define L2X0_CACHE_TYPE 0x004 From b8678ca577e10b725389676c6a4bb69dc64d0bcc Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:42 -0600 Subject: [PATCH 18/49] ARM: sti: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Acked-by: Patrice Chotard Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-2-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-sti/board-dt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c index ffecbf29646f..488084b61b4a 100644 --- a/arch/arm/mach-sti/board-dt.c +++ b/arch/arm/mach-sti/board-dt.c @@ -4,8 +4,6 @@ * Author(s): Srinivas Kandagatla */ -#include -#include #include #include From 17f269e70382adb4d5b84ea5d272eb1636599887 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:43 -0600 Subject: [PATCH 19/49] ARM: alpine: Drop unused includes of_platform.h is not needed, drop it. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-3-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-alpine/alpine_machine.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-alpine/alpine_machine.c b/arch/arm/mach-alpine/alpine_machine.c index d256a99e9b99..bc491bbbabf8 100644 --- a/arch/arm/mach-alpine/alpine_machine.c +++ b/arch/arm/mach-alpine/alpine_machine.c @@ -5,8 +5,6 @@ * Copyright (C) 2015 Annapurna Labs Ltd. */ -#include - #include static const char * const al_match[] __initconst = { From fe260f5e65e1188a1aa248b40f26edd24b8cb5e9 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:44 -0600 Subject: [PATCH 20/49] ARM: berlin: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-4-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-berlin/berlin.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c index 2424ad40190c..13d5c899f09e 100644 --- a/arch/arm/mach-berlin/berlin.c +++ b/arch/arm/mach-berlin/berlin.c @@ -8,11 +8,6 @@ * (c) Marvell International Ltd. */ -#include -#include -#include -#include -#include #include static const char * const berlin_dt_compat[] = { From 9d2af67ba0c814ec51333cd12edb3dd49b7bd052 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:45 -0600 Subject: [PATCH 21/49] ARM: dove: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-5-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-dove/common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index cd4ae7e4768d..3aea90bbb41a 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include #include #include From fcd346e833e98b4f56243ac8bee8f17bc9f101ae Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:46 -0600 Subject: [PATCH 22/49] ARM: hpe: Drop unused includes of_platform.h is not needed, so drop it. Acked-by: Nick Hawkins Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-6-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-hpe/gxp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-hpe/gxp.c b/arch/arm/mach-hpe/gxp.c index ef3341373006..581c8da517b8 100644 --- a/arch/arm/mach-hpe/gxp.c +++ b/arch/arm/mach-hpe/gxp.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2022 Hewlett-Packard Enterprise Development Company, L.P. */ -#include #include static const char * const gxp_board_dt_compat[] = { From 89ce0a2fc143c22a40f2dfe0f4ce0672fa45ee5a Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:47 -0600 Subject: [PATCH 23/49] ARM: mmp: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-7-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-mmp/mmp-dt.c | 3 --- arch/arm/mach-mmp/mmp2-dt.c | 4 ---- arch/arm/mach-mmp/mmp3.c | 4 ---- 3 files changed, 11 deletions(-) diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c index 3f43c0867dca..8479996a8f2e 100644 --- a/arch/arm/mach-mmp/mmp-dt.c +++ b/arch/arm/mach-mmp/mmp-dt.c @@ -6,12 +6,9 @@ * Author: Haojian Zhuang */ -#include -#include #include #include #include -#include #include #include "common.h" diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c index 34a5fe4b3949..e5ddc327651b 100644 --- a/arch/arm/mach-mmp/mmp2-dt.c +++ b/arch/arm/mach-mmp/mmp2-dt.c @@ -6,13 +6,9 @@ * Author: Haojian Zhuang */ -#include -#include -#include #include #include #include -#include #include #include "common.h" diff --git a/arch/arm/mach-mmp/mmp3.c b/arch/arm/mach-mmp/mmp3.c index b0e86964f302..073a4ee219cb 100644 --- a/arch/arm/mach-mmp/mmp3.c +++ b/arch/arm/mach-mmp/mmp3.c @@ -5,10 +5,6 @@ * Copyright (C) 2019 Lubomir Rintel */ -#include -#include -#include -#include #include #include From 23174ee58007f7e325b1f67ddc3a01fb0d83d18f Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:48 -0600 Subject: [PATCH 24/49] ARM: nomadik: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-8-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-nomadik/cpu-8815.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 51f88a297c4e..0eed60917dcf 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -5,25 +5,12 @@ #include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include -#include #include -#include -#include - /* * These are the only hard-coded address offsets we still have to use. */ From 152d11a0b5095e4eb7858e2d331523cb2f2fc3f1 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:49 -0600 Subject: [PATCH 25/49] ARM: npcm: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-9-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-npcm/platsmp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c index 21633c70fe7f..41891d3aa124 100644 --- a/arch/arm/mach-npcm/platsmp.c +++ b/arch/arm/mach-npcm/platsmp.c @@ -5,12 +5,9 @@ #define pr_fmt(fmt) "nuvoton,npcm7xx-smp: " fmt #include -#include #include #include #include -#include -#include #include #include #include From ce2ab51a1861bb6c3ef7d624696acc7655bcfe87 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:50 -0600 Subject: [PATCH 26/49] ARM: nspire: Drop unused includes Several includes are not needed, so drop them. io.h was implicitly included and is needed. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-10-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-nspire/nspire.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c index 2d4abb0288b9..d20974a9fbc1 100644 --- a/arch/arm/mach-nspire/nspire.c +++ b/arch/arm/mach-nspire/nspire.c @@ -5,17 +5,10 @@ * Copyright (C) 2013 Daniel Tang */ #include -#include -#include -#include -#include -#include -#include -#include +#include #include #include -#include #include "mmio.h" From 48f1138f9c43d328dc6dd9ee03dd2d36dc18885a Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:51 -0600 Subject: [PATCH 27/49] ARM: pxa: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-11-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/pxa-dt.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c index 5e5d543fdf46..a292de91dce5 100644 --- a/arch/arm/mach-pxa/pxa-dt.c +++ b/arch/arm/mach-pxa/pxa-dt.c @@ -5,13 +5,7 @@ * Copyright (C) 2012 Daniel Mack */ -#include -#include -#include -#include #include -#include -#include "irqs.h" #include "generic.h" From ab7c1ad11da41de9d5b75bc9171a3485f5aa7923 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:52 -0600 Subject: [PATCH 28/49] ARM: rockchip: Drop unused includes Several includes are not needed, so drop them. of_platform.h is not needed, but it implicitly includes of.h which is needed. Signed-off-by: Rob Herring Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-12-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-rockchip/rockchip.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c index beea4564eed4..82102fbabf92 100644 --- a/arch/arm/mach-rockchip/rockchip.c +++ b/arch/arm/mach-rockchip/rockchip.c @@ -9,15 +9,11 @@ #include #include #include +#include #include -#include -#include #include -#include -#include #include #include -#include #include "core.h" #include "pm.h" From d6c97c96d2b4ce3d9f14970420684fae40c5287b Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:53 -0600 Subject: [PATCH 29/49] ARM: versatile: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-13-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-versatile/realview.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-versatile/realview.c b/arch/arm/mach-versatile/realview.c index feab66080ba2..a3933e2373d5 100644 --- a/arch/arm/mach-versatile/realview.c +++ b/arch/arm/mach-versatile/realview.c @@ -4,9 +4,7 @@ * * Author: Linus Walleij */ -#include #include -#include static const char *const realview_dt_platform_compat[] __initconst = { "arm,realview-eb", From 1402f75d9bdcacfb1ff9d0caa77bd53037d869cc Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:54 -0600 Subject: [PATCH 30/49] ARM: mvebu: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-14-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-mvebu/kirkwood.c | 1 + arch/arm/mach-mvebu/pmsu.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c index 8ff34753e760..73b2a86d6489 100644 --- a/arch/arm/mach-mvebu/kirkwood.c +++ b/arch/arm/mach-mvebu/kirkwood.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 6f366d8c4231..79c5171f06ec 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c @@ -23,8 +23,8 @@ #include #include #include +#include #include -#include #include #include #include From 544885aa07504fdffaf5a467b9dd8bde80d628dd Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:55 -0600 Subject: [PATCH 31/49] ARM: spear: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Viresh Kumar Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-15-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-spear/spear1340.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c index a391f154eff9..70986ef6c877 100644 --- a/arch/arm/mach-spear/spear1340.c +++ b/arch/arm/mach-spear/spear1340.c @@ -10,7 +10,7 @@ #define pr_fmt(fmt) "SPEAr1340: " fmt -#include +#include #include #include "generic.h" From 53c5ae638da0d68ff6906370c5e37166c79ebf72 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:56 -0600 Subject: [PATCH 32/49] bus: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Acked-by: Laurentiu Tudor Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-16-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/bus/fsl-mc/fsl-mc-bus.c | 1 + drivers/bus/fsl-mc/fsl-mc-msi.c | 2 -- drivers/bus/hisi_lpc.c | 2 +- drivers/bus/omap_l3_smx.c | 1 - drivers/bus/simple-pm-bus.c | 2 ++ drivers/bus/sunxi-rsb.c | 2 +- drivers/bus/ti-pwmss.c | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 4352745a923c..7c57e7d2ff55 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-msi.c index f3f8af9426c9..82cd69f7884c 100644 --- a/drivers/bus/fsl-mc/fsl-mc-msi.c +++ b/drivers/bus/fsl-mc/fsl-mc-msi.c @@ -7,8 +7,6 @@ * */ -#include -#include #include #include #include diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index 5b65a48f17e7..cdc4e38c113e 100644 --- a/drivers/bus/hisi_lpc.c +++ b/drivers/bus/hisi_lpc.c @@ -13,9 +13,9 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c index bb1606f5ce2d..9ba18c39c671 100644 --- a/drivers/bus/omap_l3_smx.c +++ b/drivers/bus/omap_l3_smx.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "omap_l3_smx.h" diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index 4da77ca7b75a..aafcc481de91 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -11,6 +11,8 @@ #include #include +#include +#include #include #include #include diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c index 696c0aefb0ca..cae64cf5a387 100644 --- a/drivers/bus/sunxi-rsb.c +++ b/drivers/bus/sunxi-rsb.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/bus/ti-pwmss.c b/drivers/bus/ti-pwmss.c index e9c26c94251b..480a4de76cd4 100644 --- a/drivers/bus/ti-pwmss.c +++ b/drivers/bus/ti-pwmss.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include static const struct of_device_id pwmss_of_match[] = { { .compatible = "ti,am33xx-pwmss" }, From 5b45759c0b58ade7c6a552fb58f2ce74ebaab053 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:57 -0600 Subject: [PATCH 33/49] firmware: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Dinh Nguyen Acked-by: Thierry Reding Signed-off-by: Rob Herring Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-17-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/firmware/arm_scmi/driver.c | 4 ++-- drivers/firmware/imx/imx-dsp.c | 1 - drivers/firmware/imx/imx-scu-irq.c | 1 + drivers/firmware/imx/imx-scu.c | 1 + drivers/firmware/mtk-adsp-ipc.c | 1 - drivers/firmware/raspberrypi.c | 1 + drivers/firmware/scpi_pm_domain.c | 3 ++- drivers/firmware/stratix10-rsu.c | 1 - drivers/firmware/tegra/bpmp.c | 3 +-- drivers/firmware/xilinx/zynqmp.c | 1 + 10 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index b5957cc12fee..87383c05424b 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/firmware/imx/imx-dsp.c b/drivers/firmware/imx/imx-dsp.c index a6c06d7476c3..3dba590a2a95 100644 --- a/drivers/firmware/imx/imx-dsp.c +++ b/drivers/firmware/imx/imx-dsp.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index d9dcc20945c6..a149537e0639 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #define IMX_SC_IRQ_FUNC_ENABLE 1 diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c index 47db49911e7b..2e5914f3a110 100644 --- a/drivers/firmware/imx/imx-scu.c +++ b/drivers/firmware/imx/imx-scu.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/drivers/firmware/mtk-adsp-ipc.c b/drivers/firmware/mtk-adsp-ipc.c index 3c071f814455..85e94ddc7204 100644 --- a/drivers/firmware/mtk-adsp-ipc.c +++ b/drivers/firmware/mtk-adsp-ipc.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index c3bc29e0a488..f66efaa5196d 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/firmware/scpi_pm_domain.c b/drivers/firmware/scpi_pm_domain.c index 800673910b51..2231e6dd2070 100644 --- a/drivers/firmware/scpi_pm_domain.c +++ b/drivers/firmware/scpi_pm_domain.c @@ -8,7 +8,8 @@ #include #include #include -#include +#include +#include #include #include diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c index e51c95f8d445..ab3074705380 100644 --- a/drivers/firmware/stratix10-rsu.c +++ b/drivers/firmware/stratix10-rsu.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 17bd3590aaa2..51d062e0c3f1 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -8,8 +8,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index f8c4eb2b43f8..eb9ad5ae393f 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include From 96b75c9d4bf251ec76c0a629af893632fae25c32 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:58 -0600 Subject: [PATCH 34/49] soc: aspeed: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-18-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/soc/aspeed/aspeed-lpc-snoop.c | 1 - drivers/soc/aspeed/aspeed-p2a-ctrl.c | 2 +- drivers/soc/aspeed/aspeed-uart-routing.c | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c index eceeaf8dfbeb..773dbcbc03a6 100644 --- a/drivers/soc/aspeed/aspeed-lpc-snoop.c +++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/soc/aspeed/aspeed-p2a-ctrl.c b/drivers/soc/aspeed/aspeed-p2a-ctrl.c index 20b5fb2a207c..548f44da28a9 100644 --- a/drivers/soc/aspeed/aspeed-p2a-ctrl.c +++ b/drivers/soc/aspeed/aspeed-p2a-ctrl.c @@ -18,8 +18,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/drivers/soc/aspeed/aspeed-uart-routing.c b/drivers/soc/aspeed/aspeed-uart-routing.c index ef8b24fd1851..8c89ad312c1d 100644 --- a/drivers/soc/aspeed/aspeed-uart-routing.c +++ b/drivers/soc/aspeed/aspeed-uart-routing.c @@ -5,8 +5,7 @@ */ #include #include -#include -#include +#include #include #include #include From d01e0aec6d5082b3efcd3e255e04f1eac49b1abe Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:42:59 -0600 Subject: [PATCH 35/49] soc: mediatek: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-19-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/soc/mediatek/mtk-cmdq-helper.c | 1 + drivers/soc/mediatek/mtk-devapc.c | 2 +- drivers/soc/mediatek/mtk-mmsys.c | 2 +- drivers/soc/mediatek/mtk-mutex.c | 3 +-- drivers/soc/mediatek/mtk-pmic-wrap.c | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c index c1837a468267..b0cd071c4719 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #define CMDQ_WRITE_ENABLE_MASK BIT(0) diff --git a/drivers/soc/mediatek/mtk-devapc.c b/drivers/soc/mediatek/mtk-devapc.c index bad139cb117e..b28feb967540 100644 --- a/drivers/soc/mediatek/mtk-devapc.c +++ b/drivers/soc/mediatek/mtk-devapc.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index 9619faa796e8..ffb75711a1da 100644 --- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c index 4aa0913817ae..9d9f5ae578ac 100644 --- a/drivers/soc/mediatek/mtk-mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -6,8 +6,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c index 11095b8de71a..efd9cae212dc 100644 --- a/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c @@ -8,7 +8,8 @@ #include #include #include -#include +#include +#include #include #include #include From 0e7ed4dda9efabb468b836a50238c53cca21de0c Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:43:00 -0600 Subject: [PATCH 36/49] soc: rockchip: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-20-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/soc/rockchip/grf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c index 15a3970e3509..30203ec447e5 100644 --- a/drivers/soc/rockchip/grf.c +++ b/drivers/soc/rockchip/grf.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include From adedd5d129b1f00f03c0a8486d228d27ba8e323e Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:43:01 -0600 Subject: [PATCH 37/49] soc: sunxi: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-21-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/soc/sunxi/sunxi_sram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c index 4c4864cd2342..4458b2e0562b 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include From 1c37c34e2d1ea7706ad067ed84825dcb05516a82 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:43:02 -0600 Subject: [PATCH 38/49] soc: xilinx: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-22-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/soc/xilinx/zynqmp_power.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c index 641dcc958911..913417506468 100644 --- a/drivers/soc/xilinx/zynqmp_power.c +++ b/drivers/soc/xilinx/zynqmp_power.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include From 5df5b2e04749164dfb27d870c734136ea5ccf229 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 3 Aug 2023 16:43:03 -0600 Subject: [PATCH 39/49] soc: fsl: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-23-d8de2cc88bff@kernel.org Signed-off-by: Arnd Bergmann --- drivers/soc/fsl/dpaa2-console.c | 3 ++- drivers/soc/fsl/qe/qe.c | 3 ++- drivers/soc/fsl/qe/qe_common.c | 1 - drivers/soc/fsl/qe/qe_tdm.c | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/soc/fsl/dpaa2-console.c b/drivers/soc/fsl/dpaa2-console.c index 53917410f2bd..1dca693b6b38 100644 --- a/drivers/soc/fsl/dpaa2-console.c +++ b/drivers/soc/fsl/dpaa2-console.c @@ -9,9 +9,10 @@ #define pr_fmt(fmt) "dpaa2-console: " fmt #include -#include +#include #include #include +#include #include #include #include diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index b3c226eb5292..95168b574627 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -25,7 +25,8 @@ #include #include #include -#include +#include +#include #include #include diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c index a0cb8e746879..9729ce86db59 100644 --- a/drivers/soc/fsl/qe/qe_common.c +++ b/drivers/soc/fsl/qe/qe_common.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/soc/fsl/qe/qe_tdm.c b/drivers/soc/fsl/qe/qe_tdm.c index 7d7d78d3ee50..a3b691875c8e 100644 --- a/drivers/soc/fsl/qe/qe_tdm.c +++ b/drivers/soc/fsl/qe/qe_tdm.c @@ -9,9 +9,7 @@ */ #include #include -#include -#include -#include +#include #include static int set_tdm_framer(const char *tdm_framer_type) From 47c128c65ff71c2d59354acb9b189b110a31e802 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 2 Aug 2023 10:33:32 -0500 Subject: [PATCH 40/49] ARM: nspire: Use syscon-reboot to handle restart Writing this bit can be handled by the DT syscon-reboot driver. Enable that driver and remove the machine_desc version. Signed-off-by: Andrew Davis Tested-by: Fabian Vogt Reviewed-by: Linus Walleij Reviewed-by: Fabian Vogt Signed-off-by: Arnd Bergmann --- arch/arm/mach-nspire/Kconfig | 2 ++ arch/arm/mach-nspire/mmio.h | 3 --- arch/arm/mach-nspire/nspire.c | 10 ---------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-nspire/Kconfig b/arch/arm/mach-nspire/Kconfig index b7a3871876d7..0ffdcaca1e6b 100644 --- a/arch/arm/mach-nspire/Kconfig +++ b/arch/arm/mach-nspire/Kconfig @@ -9,5 +9,7 @@ config ARCH_NSPIRE select ARM_VIC select ARM_TIMER_SP804 select NSPIRE_TIMER + select POWER_RESET + select POWER_RESET_SYSCON help This enables support for systems using the TI-NSPIRE CPU diff --git a/arch/arm/mach-nspire/mmio.h b/arch/arm/mach-nspire/mmio.h index 48e32f13f311..2ce0656139ec 100644 --- a/arch/arm/mach-nspire/mmio.h +++ b/arch/arm/mach-nspire/mmio.h @@ -5,9 +5,6 @@ * Copyright (C) 2013 Daniel Tang */ -#define NSPIRE_MISC_PHYS_BASE 0x900A0000 -#define NSPIRE_MISC_HWRESET 0x08 - #define NSPIRE_PWR_PHYS_BASE 0x900B0000 #define NSPIRE_PWR_VIRT_BASE 0xFEEB0000 #define NSPIRE_PWR_BUS_DISABLE1 0x18 diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c index d20974a9fbc1..f0c0d6fe2136 100644 --- a/arch/arm/mach-nspire/nspire.c +++ b/arch/arm/mach-nspire/nspire.c @@ -20,16 +20,6 @@ static const char *const nspire_dt_match[] __initconst = { NULL, }; -static void nspire_restart(enum reboot_mode mode, const char *cmd) -{ - void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K); - if (!base) - return; - - writel(2, base + NSPIRE_MISC_HWRESET); -} - DT_MACHINE_START(NSPIRE, "TI-NSPIRE") .dt_compat = nspire_dt_match, - .restart = nspire_restart, MACHINE_END From e4011d83f2c72a5ce94d0d89e47d9e597884f6e1 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 2 Aug 2023 10:33:33 -0500 Subject: [PATCH 41/49] ARM: nspire: Remove unused header file mmio.h The Nspire boardfile platform drivers have all been converted. None of the definitions in this header are used anymore. Remove it. While here lets remove all the other unused headers and the file name from in the file itself. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann --- arch/arm/mach-nspire/mmio.h | 13 ------------- arch/arm/mach-nspire/nspire.c | 7 ------- 2 files changed, 20 deletions(-) delete mode 100644 arch/arm/mach-nspire/mmio.h diff --git a/arch/arm/mach-nspire/mmio.h b/arch/arm/mach-nspire/mmio.h deleted file mode 100644 index 2ce0656139ec..000000000000 --- a/arch/arm/mach-nspire/mmio.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * linux/arch/arm/mach-nspire/mmio.h - * - * Copyright (C) 2013 Daniel Tang - */ - -#define NSPIRE_PWR_PHYS_BASE 0x900B0000 -#define NSPIRE_PWR_VIRT_BASE 0xFEEB0000 -#define NSPIRE_PWR_BUS_DISABLE1 0x18 -#define NSPIRE_PWR_BUS_DISABLE2 0x20 - -#define NSPIRE_LCD_PHYS_BASE 0xC0000000 diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c index f0c0d6fe2136..2fbfc23237ff 100644 --- a/arch/arm/mach-nspire/nspire.c +++ b/arch/arm/mach-nspire/nspire.c @@ -1,16 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * linux/arch/arm/mach-nspire/nspire.c - * * Copyright (C) 2013 Daniel Tang */ -#include -#include #include -#include - -#include "mmio.h" static const char *const nspire_dt_match[] __initconst = { "ti,nspire", From a34d8a4b803ff6baa82bbd6a3fdfa877bfc6ffe2 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sun, 23 Jul 2023 15:19:22 +0200 Subject: [PATCH 42/49] MAINTAINERS: soc: reference maintainer profile Mention the SoC maintainer profile in P: entry. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Randy Dunlap Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230723131924.78190-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7f9bc0e7e0f9..59f7275c5432 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1558,6 +1558,7 @@ M: Olof Johansson M: soc@kernel.org L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained +P: Documentation/process/maintainer-soc.rst C: irc://irc.libera.chat/armlinux T: git git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git F: Documentation/process/maintainer-soc.rst From f1b518b45d39ba81e5b3a156aa0dd3f856675f02 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sun, 23 Jul 2023 15:19:23 +0200 Subject: [PATCH 43/49] Documentation/process: maintainer-soc: add clean platforms profile Some SoC platforms require that commits must not bring any new dtbs_check warnings. Maintainers of such platforms usually have some automation set, so any new warning will be spotted sooner or later. Worst case: they run the tests themselves. Document requirements for such platforms, so contributors can expect their patches being dropped or ignored, if they bring new warnings for existing boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230723131924.78190-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann --- .../process/maintainer-handbooks.rst | 1 + .../process/maintainer-soc-clean-dts.rst | 25 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Documentation/process/maintainer-soc-clean-dts.rst diff --git a/Documentation/process/maintainer-handbooks.rst b/Documentation/process/maintainer-handbooks.rst index 9992bfd7eaa3..976391cec528 100644 --- a/Documentation/process/maintainer-handbooks.rst +++ b/Documentation/process/maintainer-handbooks.rst @@ -17,5 +17,6 @@ Contents: maintainer-netdev maintainer-soc + maintainer-soc-clean-dts maintainer-tip maintainer-kvm-x86 diff --git a/Documentation/process/maintainer-soc-clean-dts.rst b/Documentation/process/maintainer-soc-clean-dts.rst new file mode 100644 index 000000000000..1b32430d0cfc --- /dev/null +++ b/Documentation/process/maintainer-soc-clean-dts.rst @@ -0,0 +1,25 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============================================== +SoC Platforms with DTS Compliance Requirements +============================================== + +Overview +-------- + +SoC platforms or subarchitectures should follow all the rules from +Documentation/process/maintainer-soc.rst. This document referenced in +MAINTAINERS impose additional requirements listed below. + +Strict DTS DT Schema and dtc Compliance +--------------------------------------- + +No changes to the SoC platform Devicetree sources (DTS files) should introduce +new ``make dtbs_check W=1`` warnings. Warnings in a new board DTS, which are +results of issues in an included DTSI file, are considered existing, not new +warnings. The platform maintainers have automation in place which should point +out any new warnings. + +If a commit introducing new warnings gets accepted somehow, the resulting +issues shall be fixed in reasonable time (e.g. within one release) or the +commit reverted. diff --git a/MAINTAINERS b/MAINTAINERS index 59f7275c5432..b93e4de47cd0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1561,7 +1561,7 @@ S: Maintained P: Documentation/process/maintainer-soc.rst C: irc://irc.libera.chat/armlinux T: git git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git -F: Documentation/process/maintainer-soc.rst +F: Documentation/process/maintainer-soc*.rst F: arch/arm/boot/dts/Makefile F: arch/arm64/boot/dts/Makefile From c25223cba5aa9a536392933782d4a7df71d9093b Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sun, 23 Jul 2023 15:19:24 +0200 Subject: [PATCH 44/49] MAINTAINER: samsung: document dtbs_check requirement for Samsung Samsung ARM/ARM64 SoCs (including legacy S3C64xx and S5PV210) are also expected not to bring any new dtbs_check warnings. In fact this have been already enforced and tested since few release. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20230723131924.78190-3-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b93e4de47cd0..4feac955d633 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2634,6 +2634,7 @@ R: Alim Akhtar L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-samsung-soc@vger.kernel.org S: Maintained +P: Documentation/process/maintainer-soc-clean-dts.rst Q: https://patchwork.kernel.org/project/linux-samsung-soc/list/ B: mailto:linux-samsung-soc@vger.kernel.org C: irc://irc.libera.chat/linux-exynos From 38d0e83b9656c15ea0b320852ff16d7360c548df Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Wed, 12 Jul 2023 10:41:31 +0200 Subject: [PATCH 45/49] Documentation/process: maintainer-soc: document dtbs_check requirement for Samsung Samsung ARM/ARM64 SoCs (except legacy S5PV210) are also expected not to bring any new dtbs_check warnings. In fact this have been already enforced and tested since few release. Cc: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230712084131.127982-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann --- Documentation/process/maintainer-soc.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/process/maintainer-soc.rst b/Documentation/process/maintainer-soc.rst index 49f08289d62c..12637530d68f 100644 --- a/Documentation/process/maintainer-soc.rst +++ b/Documentation/process/maintainer-soc.rst @@ -133,8 +133,8 @@ with the dt-bindings that describe the ABI. Please read the section more information on the validation of devicetrees. For new platforms, or additions to existing ones, ``make dtbs_check`` should not -add any new warnings. For RISC-V, as it has the advantage of being a newer -architecture, ``make dtbs_check W=1`` is required to not add any new warnings. +add any new warnings. For RISC-V and Samsung SoC, ``make dtbs_check W=1`` is +required to not add any new warnings. If in any doubt about a devicetree change, reach out to the devicetree maintainers. From a2773f3d69f6d498fad0fdaac7d3b407ed8f1e61 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:54:56 -0600 Subject: [PATCH 46/49] ARM: mvebu: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/kirkwood.c | 1 + arch/arm/mach-mvebu/pmsu.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c index 8ff34753e760..73b2a86d6489 100644 --- a/arch/arm/mach-mvebu/kirkwood.c +++ b/arch/arm/mach-mvebu/kirkwood.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 6f366d8c4231..79c5171f06ec 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c @@ -23,8 +23,8 @@ #include #include #include +#include #include -#include #include #include #include From 693d28730db31cbd6f57ab7591950ca734a7bf1d Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 17 Jul 2023 16:56:45 -0600 Subject: [PATCH 47/49] ARM: dove: Drop unused includes Several includes are not needed, so drop them. Signed-off-by: Rob Herring Signed-off-by: Gregory CLEMENT --- arch/arm/mach-dove/common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index cd4ae7e4768d..3aea90bbb41a 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include #include #include From 8787bc51a7e22bcc419223d2c49a15b36b98e9c9 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 14 Aug 2023 13:40:51 +0200 Subject: [PATCH 48/49] ARM: s5pv210: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230720172751.2918776-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230814114051.25840-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-s5pv210/s5pv210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s5pv210/s5pv210.c b/arch/arm/mach-s5pv210/s5pv210.c index a21ed3bb992a..7d4a10184160 100644 --- a/arch/arm/mach-s5pv210/s5pv210.c +++ b/arch/arm/mach-s5pv210/s5pv210.c @@ -7,7 +7,7 @@ // Tomasz Figa #include -#include +#include #include #include From 6e73bd23a1cdcf1416ebd57ff673b5f601963ed2 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 23 Aug 2023 11:56:38 -0500 Subject: [PATCH 49/49] ARM: davinci: Drop unused includes of_platform.h include is not needed, so drop it. It implicitly includes of.h (for now) which is needed. Signed-off-by: Rob Herring Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230823165637.2466480-1-robh@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-davinci/pdata-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c index b8b5f1a5e092..b5b5c7bda61e 100644 --- a/arch/arm/mach-davinci/pdata-quirks.c +++ b/arch/arm/mach-davinci/pdata-quirks.c @@ -5,7 +5,7 @@ * Copyright (C) 2016 BayLibre, Inc */ #include -#include +#include #include #include