From 9d2edccb154bd98baf7f1e21d23f799e4f5e8359 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 8 May 2023 06:04:33 +0200 Subject: [PATCH 01/24] ARM: s3c: remove obsolete config S3C64XX_SETUP_IDE Commit 0d297df03890 ("ARM: s3c: simplify platform code") removes the line in Makefile.s3c64xx to configure the inclusion of setup-ide-s3c64xx.c, with CONFIG_S3C64XX_SETUP_IDE. So, since then, config S3C64XX_SETUP_IDE has no effect and any further purpose. Remove the obsolete config S3C64XX_SETUP_IDE. Signed-off-by: Lukas Bulwahn Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230508040433.13648-1-lukas.bulwahn@gmail.com Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c/Kconfig.s3c64xx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm/mach-s3c/Kconfig.s3c64xx b/arch/arm/mach-s3c/Kconfig.s3c64xx index 01a7a8eec6e8..8f40af063ad6 100644 --- a/arch/arm/mach-s3c/Kconfig.s3c64xx +++ b/arch/arm/mach-s3c/Kconfig.s3c64xx @@ -69,11 +69,6 @@ config S3C64XX_SETUP_I2C1 help Common setup code for i2c bus 1. -config S3C64XX_SETUP_IDE - bool - help - Common setup code for S3C64XX IDE. - config S3C64XX_SETUP_FB_24BPP bool help @@ -110,7 +105,6 @@ config MACH_WLF_CRAGG_6410 select S3C64XX_DEV_SPI0 select S3C64XX_SETUP_FB_24BPP select S3C64XX_SETUP_I2C1 - select S3C64XX_SETUP_IDE select S3C64XX_SETUP_KEYPAD select S3C64XX_SETUP_SDHCI select S3C64XX_SETUP_SPI From 4e486a650162a20e5c3c7987715f8297c84c85f4 Mon Sep 17 00:00:00 2001 From: Artur Weber Date: Mon, 1 May 2023 21:55:15 +0200 Subject: [PATCH 02/24] ARM: exynos: Re-introduce Exynos4212 support Support for the Exynos4212 SoC was originally dropped as there were no boards using it. We will be adding a device that uses it, so add back the relevant code. This reverts commit 9e43eca3c87476f75680f472ff3ebcd85f357b86. Signed-off-by: Artur Weber Link: https://lore.kernel.org/r/20230501195525.6268-4-aweber.kernel@gmail.com Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-exynos/Kconfig | 5 +++++ arch/arm/mach-exynos/common.h | 8 ++++++++ arch/arm/mach-exynos/exynos.c | 2 ++ arch/arm/mach-exynos/firmware.c | 8 +++++++- arch/arm/mach-exynos/pm.c | 2 +- arch/arm/mach-exynos/suspend.c | 4 ++++ 6 files changed, 27 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4d3b40e4049a..b3d5df5225fe 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -78,6 +78,11 @@ config CPU_EXYNOS4210 default y depends on ARCH_EXYNOS4 +config SOC_EXYNOS4212 + bool "Samsung Exynos4212" + default y + depends on ARCH_EXYNOS4 + config SOC_EXYNOS4412 bool "Samsung Exynos4412" default y diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 29eb075b24a4..c9e85d33c309 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -15,6 +15,7 @@ #define EXYNOS3_SOC_MASK 0xFFFFF000 #define EXYNOS4210_CPU_ID 0x43210000 +#define EXYNOS4212_CPU_ID 0x43220000 #define EXYNOS4412_CPU_ID 0xE4412200 #define EXYNOS4_CPU_MASK 0xFFFE0000 @@ -34,6 +35,7 @@ static inline int is_samsung_##name(void) \ IS_SAMSUNG_CPU(exynos3250, EXYNOS3250_SOC_ID, EXYNOS3_SOC_MASK) IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK) +IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) IS_SAMSUNG_CPU(exynos5410, EXYNOS5410_SOC_ID, EXYNOS5_SOC_MASK) @@ -52,6 +54,12 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK) # define soc_is_exynos4210() 0 #endif +#if defined(CONFIG_SOC_EXYNOS4212) +# define soc_is_exynos4212() is_samsung_exynos4212() +#else +# define soc_is_exynos4212() 0 +#endif + #if defined(CONFIG_SOC_EXYNOS4412) # define soc_is_exynos4412() is_samsung_exynos4412() #else diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 966a0995e047..2e8099479ffa 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -180,6 +180,7 @@ static void __init exynos_dt_machine_init(void) exynos_cpuidle.dev.platform_data = &cpuidle_coupled_exynos_data; #endif if (of_machine_is_compatible("samsung,exynos4210") || + of_machine_is_compatible("samsung,exynos4212") || (of_machine_is_compatible("samsung,exynos4412") && (of_machine_is_compatible("samsung,trats2") || of_machine_is_compatible("samsung,midas") || @@ -194,6 +195,7 @@ static char const *const exynos_dt_compat[] __initconst = { "samsung,exynos3250", "samsung,exynos4", "samsung,exynos4210", + "samsung,exynos4212", "samsung,exynos4412", "samsung,exynos5", "samsung,exynos5250", diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 2da5b60b59e2..a5e22678e27b 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -63,12 +63,18 @@ static int exynos_cpu_boot(int cpu) * * On Exynos5 devices the call is ignored by trustzone firmware. */ - if (!soc_is_exynos4210() && !soc_is_exynos4412()) + if (!soc_is_exynos4210() && !soc_is_exynos4212() && + !soc_is_exynos4412()) return 0; /* * The second parameter of SMC_CMD_CPU1BOOT command means CPU id. + * But, Exynos4212 has only one secondary CPU so second parameter + * isn't used for informing secure firmware about CPU id. */ + if (soc_is_exynos4212()) + cpu = 0; + exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0); return 0; } diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 30f4e55bf39e..0019d21bff90 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -161,7 +161,7 @@ void exynos_enter_aftr(void) exynos_pm_central_suspend(); - if (soc_is_exynos4412()) { + if (soc_is_exynos4212() || soc_is_exynos4412()) { /* Setting SEQ_OPTION register */ pmu_raw_writel(S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0, S5P_CENTRAL_SEQ_OPTION); diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 6d5d7696aaf7..cac4e82f6c82 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -231,6 +231,7 @@ static int __init exynos_pmu_irq_init(struct device_node *node, EXYNOS_PMU_IRQ(exynos3250_pmu_irq, "samsung,exynos3250-pmu"); EXYNOS_PMU_IRQ(exynos4210_pmu_irq, "samsung,exynos4210-pmu"); +EXYNOS_PMU_IRQ(exynos4212_pmu_irq, "samsung,exynos4212-pmu"); EXYNOS_PMU_IRQ(exynos4412_pmu_irq, "samsung,exynos4412-pmu"); EXYNOS_PMU_IRQ(exynos5250_pmu_irq, "samsung,exynos5250-pmu"); EXYNOS_PMU_IRQ(exynos5420_pmu_irq, "samsung,exynos5420-pmu"); @@ -640,6 +641,9 @@ static const struct of_device_id exynos_pmu_of_device_ids[] __initconst = { }, { .compatible = "samsung,exynos4210-pmu", .data = &exynos4_pm_data, + }, { + .compatible = "samsung,exynos4212-pmu", + .data = &exynos4_pm_data, }, { .compatible = "samsung,exynos4412-pmu", .data = &exynos4_pm_data, From 31345a0f59015fada9d15c3e737ed8d27ef5be40 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 16 May 2023 16:28:05 -0700 Subject: [PATCH 03/24] MAINTAINERS: Replace my email address Switch to the corporate email address for Broadcom related entries. Link: https://lore.kernel.org/r/20230516232806.2922593-1-florian.fainelli@broadcom.com Signed-off-by: Florian Fainelli --- MAINTAINERS | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7e0b87d5aa2e..9f6b001d254b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3903,7 +3903,7 @@ S: Supported F: drivers/net/ethernet/broadcom/b44.* BROADCOM B53/SF2 ETHERNET SWITCH DRIVER -M: Florian Fainelli +M: Florian Fainelli L: netdev@vger.kernel.org L: openwrt-devel@lists.openwrt.org (subscribers-only) S: Supported @@ -3917,7 +3917,7 @@ BROADCOM BCMBCA ARM ARCHITECTURE M: William Zhang M: Anand Gore M: Kursad Oney -M: Florian Fainelli +M: Florian Fainelli M: Rafał Miłecki R: Broadcom internal kernel review list L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) @@ -3942,7 +3942,7 @@ N: bcm[9]?6858 N: bcm[9]?6878 BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) @@ -3956,7 +3956,7 @@ N: bcm283* N: raspberrypi BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE -M: Florian Fainelli +M: Florian Fainelli M: Ray Jui M: Scott Branden R: Broadcom internal kernel review list @@ -3995,7 +3995,7 @@ F: Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml F: drivers/pinctrl/bcm/pinctrl-bcm4908.c BROADCOM BCM5301X ARM ARCHITECTURE -M: Florian Fainelli +M: Florian Fainelli M: Hauke Mehrtens M: Rafał Miłecki R: Broadcom internal kernel review list @@ -4007,7 +4007,7 @@ F: arch/arm/boot/dts/bcm953012* F: arch/arm/mach-bcm/bcm_5301x.c BROADCOM BCM53573 ARM ARCHITECTURE -M: Florian Fainelli +M: Florian Fainelli M: Rafał Miłecki R: Broadcom internal kernel review list L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) @@ -4022,7 +4022,7 @@ S: Maintained F: drivers/usb/gadget/udc/bcm63xx_udc.* BROADCOM BCM7XXX ARM ARCHITECTURE -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained @@ -4055,7 +4055,7 @@ S: Maintained F: drivers/cpufreq/bmips-cpufreq.c BROADCOM BMIPS MIPS ARCHITECTURE -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: linux-mips@vger.kernel.org S: Maintained @@ -4123,7 +4123,7 @@ F: drivers/net/wireless/broadcom/brcm80211/ BROADCOM BRCMSTB GPIO DRIVER M: Doug Berger -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list S: Supported F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.yaml @@ -4182,7 +4182,7 @@ F: drivers/spi/spi-bcm63xx-hsspi.c F: drivers/spi/spi-bcmbca-hsspi.c BROADCOM ETHERNET PHY DRIVERS -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: netdev@vger.kernel.org S: Supported @@ -4193,7 +4193,7 @@ F: include/linux/brcmphy.h BROADCOM GENET ETHERNET DRIVER M: Doug Berger -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: netdev@vger.kernel.org S: Supported @@ -4277,7 +4277,7 @@ F: drivers/firmware/broadcom/* BROADCOM PMB (POWER MANAGEMENT BUS) DRIVER M: Rafał Miłecki -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: linux-pm@vger.kernel.org S: Maintained @@ -4337,7 +4337,7 @@ F: include/linux/platform_data/brcmnand.h BROADCOM STB PCIE DRIVER M: Jim Quinlan M: Nicolas Saenz Julienne -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: linux-pci@vger.kernel.org S: Maintained @@ -4345,7 +4345,7 @@ F: Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml F: drivers/pci/controller/pcie-brcmstb.c BROADCOM SYSTEMPORT ETHERNET DRIVER -M: Florian Fainelli +M: Florian Fainelli R: Broadcom internal kernel review list L: netdev@vger.kernel.org S: Supported From 1d5d24abc6c0908c116953290be4f8523f65efb7 Mon Sep 17 00:00:00 2001 From: Kamal Dasu Date: Fri, 19 May 2023 12:56:58 -0400 Subject: [PATCH 04/24] MAINTAINERS: Replace my email address Switch to the corporate email address for Broadcom related entries. Signed-off-by: Kamal Dasu Link: https://lore.kernel.org/r/20230519165658.29296-1-kamal.dasu@broadcom.com Signed-off-by: Florian Fainelli --- MAINTAINERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9f6b001d254b..361c62bc714b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4130,7 +4130,7 @@ F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.yaml F: drivers/gpio/gpio-brcmstb.c BROADCOM BRCMSTB I2C DRIVER -M: Kamal Dasu +M: Kamal Dasu R: Broadcom internal kernel review list L: linux-i2c@vger.kernel.org S: Supported @@ -4293,7 +4293,7 @@ F: drivers/bcma/ F: include/linux/bcma/ BROADCOM SPI DRIVER -M: Kamal Dasu +M: Kamal Dasu R: Broadcom internal kernel review list S: Maintained F: Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.yaml @@ -4327,7 +4327,7 @@ F: drivers/memory/brcmstb_dpfe.c BROADCOM STB NAND FLASH DRIVER M: Brian Norris -M: Kamal Dasu +M: Kamal Dasu R: Broadcom internal kernel review list L: linux-mtd@lists.infradead.org S: Maintained @@ -18896,7 +18896,7 @@ K: \bsecure_computing K: \bTIF_SECCOMP\b SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) Broadcom BRCMSTB DRIVER -M: Kamal Dasu +M: Kamal Dasu M: Al Cooper R: Broadcom internal kernel review list L: linux-mmc@vger.kernel.org From 30955b4afc2bbea9046c60df994297fac5edc02c Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:30:57 +0200 Subject: [PATCH 05/24] ARM: davinci: fix davinci_cpufreq_init() declaration The davinci_cpufreq_init() declaration is only seen by its caller but not the definition: drivers/cpufreq/davinci-cpufreq.c:153:12: error: no previous prototype for 'davinci_cpufreq_init' Move it into the platform_data header that is already used an interface between the two places. Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230516153109.514251-2-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-davinci/common.c | 1 + arch/arm/mach-davinci/common.h | 6 ------ include/linux/platform_data/davinci-cpufreq.h | 6 ++++++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index c1ce6b2a8d48..7bc7018688de 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-davinci/common.h b/arch/arm/mach-davinci/common.h index b4fd0e9acf6c..8aa6d4fc3f6f 100644 --- a/arch/arm/mach-davinci/common.h +++ b/arch/arm/mach-davinci/common.h @@ -55,12 +55,6 @@ extern void davinci_common_init(const struct davinci_soc_info *soc_info); extern void davinci_init_ide(void); void davinci_init_late(void); -#ifdef CONFIG_CPU_FREQ -int davinci_cpufreq_init(void); -#else -static inline int davinci_cpufreq_init(void) { return 0; } -#endif - #ifdef CONFIG_SUSPEND int davinci_pm_init(void); #else diff --git a/include/linux/platform_data/davinci-cpufreq.h b/include/linux/platform_data/davinci-cpufreq.h index bc208c64e3d7..1ef91c36f609 100644 --- a/include/linux/platform_data/davinci-cpufreq.h +++ b/include/linux/platform_data/davinci-cpufreq.h @@ -16,4 +16,10 @@ struct davinci_cpufreq_config { int (*init)(void); }; +#ifdef CONFIG_CPU_FREQ +int davinci_cpufreq_init(void); +#else +static inline int davinci_cpufreq_init(void) { return 0; } +#endif + #endif /* _MACH_DAVINCI_CPUFREQ_H */ From 419013740ea1e4343d8ade535d999f59fa28e460 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:30:58 +0200 Subject: [PATCH 06/24] ARM: ep93xx: fix missing-prototype warnings ep93xx_clocksource_read() is only called from the file it is declared in, while ep93xx_timer_init() is declared in a header that is not included here. arch/arm/mach-ep93xx/timer-ep93xx.c:120:13: error: no previous prototype for 'ep93xx_timer_init' arch/arm/mach-ep93xx/timer-ep93xx.c:63:5: error: no previous prototype for 'ep93xx_clocksource_read' Fixes: 000bc17817bf ("ARM: ep93xx: switch to GENERIC_CLOCKEVENTS") Acked-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230516153109.514251-3-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-ep93xx/timer-ep93xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c index dd4b164d1831..a9efa7bc2fa1 100644 --- a/arch/arm/mach-ep93xx/timer-ep93xx.c +++ b/arch/arm/mach-ep93xx/timer-ep93xx.c @@ -9,6 +9,7 @@ #include #include #include "soc.h" +#include "platform.h" /************************************************************************* * Timer handling for EP93xx @@ -60,7 +61,7 @@ static u64 notrace ep93xx_read_sched_clock(void) return ret; } -u64 ep93xx_clocksource_read(struct clocksource *c) +static u64 ep93xx_clocksource_read(struct clocksource *c) { u64 ret; From 774f60dd6abc85ba01f4969a091991c089d22ed0 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:30:59 +0200 Subject: [PATCH 07/24] ARM: highbank: add missing include highbank_pm_init() is declared in core.h this is not included in the file that defines it. arch/arm/mach-highbank/pm.c:43:13: error: no previous prototype for 'highbank_pm_init' Acked-by: Andre Przywara Link: https://lore.kernel.org/r/20230516153109.514251-4-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-highbank/pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index 561941baeda9..3fdbdb83113b 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c @@ -12,6 +12,8 @@ #include +#include "core.h" + #define HIGHBANK_SUSPEND_PARAM \ ((0 << PSCI_0_2_POWER_STATE_ID_SHIFT) | \ (1 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | \ From 5692520a040b7029f0ba94b1128d564f44a68e8d Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:00 +0200 Subject: [PATCH 08/24] ARM: imx: add missing include imx25_pm_init() is declared in common.h but this is not included before its definition: arch/arm/mach-imx/pm-imx25.c:31:13: error: no previous prototype for 'imx25_pm_init' Link: https://lore.kernel.org/r/20230516153109.514251-5-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-imx/pm-imx25.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/pm-imx25.c b/arch/arm/mach-imx/pm-imx25.c index f253e5019465..0c574e8607fd 100644 --- a/arch/arm/mach-imx/pm-imx25.c +++ b/arch/arm/mach-imx/pm-imx25.c @@ -6,6 +6,7 @@ #include #include #include +#include "common.h" static int imx25_suspend_enter(suspend_state_t state) { From ecd2a5769d09e57b6d9cafdbcf91c13f31286b06 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:02 +0200 Subject: [PATCH 09/24] ARM: lpc32xx: add missing include lpc32xx_loopback_set() is defined in linux/soc/nxp/lpc32xx-misc.h but this is not included before the function definition. arch/arm/mach-lpc32xx/serial.c:63:6: error: no previous prototype for 'lpc32xx_loopback_set' Fixes: ffba29c9ebd0 ("serial: lpc32xx: allow compile testing") Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20230516153109.514251-7-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-lpc32xx/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-lpc32xx/serial.c b/arch/arm/mach-lpc32xx/serial.c index 3e765c4bf986..3b1203db81b2 100644 --- a/arch/arm/mach-lpc32xx/serial.c +++ b/arch/arm/mach-lpc32xx/serial.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "lpc32xx.h" #include "common.h" From 94c1c0a29bfccf94c70afef5d89734bce778add6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:03 +0200 Subject: [PATCH 10/24] ARM: omap1: add missing include The omap_serial_wakeup_init() declaration is not visible where it is defined, so make sure "common.h" is included here, avoiding: arch/arm/mach-omap1/serial.c:221:12: error: no previous prototype for 'omap_serial_wakeup_init' [-Werror=missing-prototypes] Acked-by: Tony Lindgren Acked-by: Aaro Koskinen Link: https://lore.kernel.org/r/20230516153109.514251-8-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap1/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index c7f590645774..19ea9842acc1 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -19,6 +19,7 @@ #include +#include "common.h" #include "serial.h" #include "mux.h" #include "pm.h" From 861bc1d2886d47bd57a2cbf2cda87fdbe3eb9d08 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:04 +0200 Subject: [PATCH 11/24] ARM: omap2: fix missing tick_broadcast() prototype omap2 contains a hack to define tick_broadcast() on non-SMP configurations in place of the normal SMP definition. This one causes a warning because of a missing prototype: arch/arm/mach-omap2/board-generic.c:44:6: error: no previous prototype for 'tick_broadcast' Make sure to always include the header with the declaration. Fixes: d86ad463d670 ("ARM: OMAP2+: Fix regression for using local timer on non-SMP SoCs") Acked-by: Aaro Koskinen Link: https://lore.kernel.org/r/20230516153109.514251-9-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap2/board-generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 1610c567a6a3..10d2f078e4a8 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include From f8ef1233939495c405a9faa4bd1ae7d3f581bae4 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:05 +0200 Subject: [PATCH 12/24] ARM: orion5x: fix d2net gpio initialization The DT version of this board has a custom file with the gpio device. However, it does nothing because the d2net_init() has no caller or prototype: arch/arm/mach-orion5x/board-d2net.c:101:13: error: no previous prototype for 'd2net_init' Call it from the board-dt file as intended. Fixes: 94b0bd366e36 ("ARM: orion5x: convert d2net to Device Tree") Reviewed-by: Andrew Lunn Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230516153109.514251-10-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-orion5x/board-dt.c | 3 +++ arch/arm/mach-orion5x/common.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c index e3736ffc8347..be47492c6640 100644 --- a/arch/arm/mach-orion5x/board-dt.c +++ b/arch/arm/mach-orion5x/board-dt.c @@ -60,6 +60,9 @@ static void __init orion5x_dt_init(void) if (of_machine_is_compatible("maxtor,shared-storage-2")) mss2_init(); + if (of_machine_is_compatible("lacie,d2-network")) + d2net_init(); + of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL); } diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index f2e0577bf50f..8df70e23aa82 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h @@ -73,6 +73,12 @@ extern void mss2_init(void); static inline void mss2_init(void) {} #endif +#ifdef CONFIG_MACH_D2NET_DT +void d2net_init(void); +#else +static inline void d2net_init(void) {} +#endif + /***************************************************************************** * Helpers to access Orion registers ****************************************************************************/ From a9ae9c526cc232b69b0bc9d668e303c90600e848 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:06 +0200 Subject: [PATCH 13/24] ARM: pxa: fix missing-prototypes warnings The PXA platform has a number of configurations that end up with a warning like these when building with W=1: drivers/hwmon/max1111.c:83:5: error: no previous prototype for 'max1111_read_channel' [-Werror=missing-prototypes] arch/arm/mach-pxa/reset.c:86:6: error: no previous prototype for 'pxa_restart' [-Werror=missing-prototypes] arch/arm/mach-pxa/mfp-pxa2xx.c:254:5: error: no previous prototype for 'keypad_set_wake' [-Werror=missing-prototypes] drivers/clk/pxa/clk-pxa25x.c:70:14: error: no previous prototype for 'pxa25x_get_clk_frequency_khz' [-Werror=missing-prototypes] drivers/clk/pxa/clk-pxa25x.c:325:12: error: no previous prototype for 'pxa25x_clocks_init' [-Werror=missing-prototypes] drivers/clk/pxa/clk-pxa27x.c:74:14: error: no previous prototype for 'pxa27x_get_clk_frequency_khz' [-Werror=missing-prototypes] drivers/clk/pxa/clk-pxa27x.c:102:6: error: no previous prototype for 'pxa27x_is_ppll_disabled' [-Werror=missing-prototypes] drivers/clk/pxa/clk-pxa27x.c:470:12: error: no previous prototype for 'pxa27x_clocks_init' [-Werror=missing-prototypes] arch/arm/mach-pxa/pxa27x.c:44:6: error: no previous prototype for 'pxa27x_clear_otgph' [-Werror=missing-prototypes] arch/arm/mach-pxa/pxa27x.c:58:6: error: no previous prototype for 'pxa27x_configure_ac97reset' [-Werror=missing-prototypes] arch/arm/mach-pxa/spitz_pm.c:170:15: error: no previous prototype for 'spitzpm_read_devdata' [-Werror=missing-prototypes] The problem is that there is a declaration for each of these, but it's only seen by the caller and not the callee. Moving these into appropriate header files ensures that both use the same calling conventions and it avoids the warnings. Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20230516153109.514251-11-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/generic.h | 15 --------------- arch/arm/mach-pxa/mfp-pxa2xx.c | 1 + arch/arm/mach-pxa/pxa25x.c | 1 + arch/arm/mach-pxa/pxa27x.c | 3 +++ arch/arm/mach-pxa/reset.c | 1 + arch/arm/mach-pxa/spitz_pm.c | 2 +- drivers/clk/pxa/clk-pxa25x.c | 2 ++ drivers/clk/pxa/clk-pxa27x.c | 3 ++- drivers/hwmon/max1111.c | 1 + drivers/usb/gadget/udc/pxa27x_udc.c | 6 ------ drivers/usb/host/ohci-pxa27x.c | 7 +------ include/linux/platform_data/asoc-pxa.h | 1 + include/linux/platform_data/pxa2xx_udc.h | 6 ++++++ include/linux/soc/pxa/smemc.h | 16 ++++++++++++++++ sound/arm/pxa2xx-ac97-lib.c | 2 -- 15 files changed, 36 insertions(+), 31 deletions(-) diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index 7bb1499de4c5..c9c2c46ecead 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h @@ -27,7 +27,6 @@ extern void __init pxa25x_map_io(void); extern void __init pxa26x_init_irq(void); #define pxa27x_handle_irq ichp_handle_irq -extern unsigned pxa27x_get_clk_frequency_khz(int); extern void __init pxa27x_init_irq(void); extern void __init pxa27x_map_io(void); @@ -52,18 +51,4 @@ extern void pxa2xx_clear_reset_status(unsigned int); static inline void pxa2xx_clear_reset_status(unsigned int mask) {} #endif -/* - * Once fully converted to the clock framework, all these functions should be - * removed, and replaced with a clk_get(NULL, "core"). - */ -#ifdef CONFIG_PXA25x -extern unsigned pxa25x_get_clk_frequency_khz(int); -#else -#define pxa25x_get_clk_frequency_khz(x) (0) -#endif - -#ifdef CONFIG_PXA27x -#else -#define pxa27x_get_clk_frequency_khz(x) (0) -#endif diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index b556452dfcf9..f5a3d890f682 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c @@ -20,6 +20,7 @@ #include "pxa2xx-regs.h" #include "mfp-pxa2xx.h" +#include "mfp-pxa27x.h" #include "generic.h" diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 1b83be181bab..9d2127264c1d 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 4135ba2877c4..b1e89a70a886 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -31,7 +32,9 @@ #include "irqs.h" #include "pxa27x.h" #include "reset.h" +#include #include +#include #include "pm.h" #include "addr-map.h" #include "smemc.h" diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index f0be90573ad3..27293549f8ad 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c @@ -10,6 +10,7 @@ #include "regs-ost.h" #include "reset.h" #include "smemc.h" +#include "generic.h" static void do_hw_reset(void); diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 6689b67f9ce5..1c021cef965f 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -166,7 +166,7 @@ static bool spitz_charger_wakeup(void) gpio_get_value(SPITZ_GPIO_SYNC); } -unsigned long spitzpm_read_devdata(int type) +static unsigned long spitzpm_read_devdata(int type) { switch (type) { case SHARPSL_STATUS_ACIN: diff --git a/drivers/clk/pxa/clk-pxa25x.c b/drivers/clk/pxa/clk-pxa25x.c index 93d5907b8530..0a4da519d704 100644 --- a/drivers/clk/pxa/clk-pxa25x.c +++ b/drivers/clk/pxa/clk-pxa25x.c @@ -11,10 +11,12 @@ */ #include #include +#include #include #include #include #include +#include #include #include "clk-pxa.h" diff --git a/drivers/clk/pxa/clk-pxa27x.c b/drivers/clk/pxa/clk-pxa27x.c index 116c6ac666e3..2bea89874ec1 100644 --- a/drivers/clk/pxa/clk-pxa27x.c +++ b/drivers/clk/pxa/clk-pxa27x.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "clk-pxa.h" @@ -99,7 +100,7 @@ unsigned int pxa27x_get_clk_frequency_khz(int info) return (unsigned int)clks[0] / KHz; } -bool pxa27x_is_ppll_disabled(void) +static bool pxa27x_is_ppll_disabled(void) { unsigned long ccsr = readl(clk_regs + CCSR); diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index 4c5487aeb3cf..5cc08c720b52 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c @@ -80,6 +80,7 @@ static int max1111_read(struct device *dev, int channel) #ifdef CONFIG_SHARPSL_PM static struct max1111_data *the_max1111; +int max1111_read_channel(int channel); int max1111_read_channel(int channel) { if (!the_max1111 || !the_max1111->spi) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c index 0ecdfd2ba9e9..fdf9cd4506b0 100644 --- a/drivers/usb/gadget/udc/pxa27x_udc.c +++ b/drivers/usb/gadget/udc/pxa27x_udc.c @@ -2472,12 +2472,6 @@ static void pxa_udc_shutdown(struct platform_device *_dev) udc_disable(udc); } -#ifdef CONFIG_PXA27x -extern void pxa27x_clear_otgph(void); -#else -#define pxa27x_clear_otgph() do {} while (0) -#endif - #ifdef CONFIG_PM /** * pxa_udc_suspend - Suspend udc device diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 0bc7e96bcc93..dcac2938789a 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -263,12 +264,6 @@ static inline void pxa27x_reset_hc(struct pxa27x_ohci *pxa_ohci) __raw_writel(uhchr & ~UHCHR_FHR, pxa_ohci->mmio_base + UHCHR); } -#ifdef CONFIG_PXA27x -extern void pxa27x_clear_otgph(void); -#else -#define pxa27x_clear_otgph() do {} while (0) -#endif - static int pxa27x_start_hc(struct pxa27x_ohci *pxa_ohci, struct device *dev) { int retval; diff --git a/include/linux/platform_data/asoc-pxa.h b/include/linux/platform_data/asoc-pxa.h index 327454cd8246..7b5b9e20fbf5 100644 --- a/include/linux/platform_data/asoc-pxa.h +++ b/include/linux/platform_data/asoc-pxa.h @@ -27,5 +27,6 @@ typedef struct { } pxa2xx_audio_ops_t; extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops); +extern void pxa27x_configure_ac97reset(int reset_gpio, bool to_gpio); #endif diff --git a/include/linux/platform_data/pxa2xx_udc.h b/include/linux/platform_data/pxa2xx_udc.h index ff9c35dca59d..bc99cc6a3c5f 100644 --- a/include/linux/platform_data/pxa2xx_udc.h +++ b/include/linux/platform_data/pxa2xx_udc.h @@ -25,4 +25,10 @@ struct pxa2xx_udc_mach_info { int gpio_pullup; /* high == pullup activated */ }; +#ifdef CONFIG_PXA27x +extern void pxa27x_clear_otgph(void); +#else +#define pxa27x_clear_otgph() do {} while (0) +#endif + #endif diff --git a/include/linux/soc/pxa/smemc.h b/include/linux/soc/pxa/smemc.h index f1ffea236c15..4feb1dded3ec 100644 --- a/include/linux/soc/pxa/smemc.h +++ b/include/linux/soc/pxa/smemc.h @@ -10,4 +10,20 @@ int pxa2xx_smemc_get_sdram_rows(void); unsigned int pxa3xx_smemc_get_memclkdiv(void); void __iomem *pxa_smemc_get_mdrefr(void); +/* + * Once fully converted to the clock framework, all these functions should be + * removed, and replaced with a clk_get(NULL, "core"). + */ +#ifdef CONFIG_PXA25x +extern unsigned pxa25x_get_clk_frequency_khz(int); +#else +#define pxa25x_get_clk_frequency_khz(x) (0) +#endif + +#ifdef CONFIG_PXA27x +extern unsigned pxa27x_get_clk_frequency_khz(int); +#else +#define pxa27x_get_clk_frequency_khz(x) (0) +#endif + #endif diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 2ca33fd5a575..a03a3291de84 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@ -33,8 +33,6 @@ static struct clk *ac97conf_clk; static int reset_gpio; static void __iomem *ac97_reg_base; -extern void pxa27x_configure_ac97reset(int reset_gpio, bool to_gpio); - /* * Beware PXA27x bugs: * From 6475f4bb3fbd24b4b2b7c41b3777a62b20b016e2 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:07 +0200 Subject: [PATCH 14/24] ARM: sa1100: address missing prototype warnings There are three warnings for mach-sa1100 when building with W=1: arch/arm/common/sa1111.c:699:1: error: no previous prototype for 'sa1111_configure_smc' [-Werror=missing-prototypes] 699 | sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac, | ^~~~~~~~~~~~~~~~~~~~ arch/arm/mach-sa1100/assabet.c:718:13: error: no previous prototype for 'assabet_init_irq' [-Werror=missing-prototypes] 718 | void __init assabet_init_irq(void) | ^~~~~~~~~~~~~~~~ arch/arm/mach-sa1100/pm.c:126:12: error: no previous prototype for 'sa11x0_pm_init' [-Werror=missing-prototypes] 126 | int __init sa11x0_pm_init(void) | ^~~~~~~~~~~~~~ The first two are only used locally and can be 'static', while the last one needs to include the right header. Link: https://lore.kernel.org/r/20230516153109.514251-12-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/common/sa1111.c | 2 +- arch/arm/mach-sa1100/assabet.c | 2 +- arch/arm/mach-sa1100/pm.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index aad6ba236f0f..77c83ba81715 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -695,7 +695,7 @@ static u32 sa1111_dma_mask[] = { /* * Configure the SA1111 shared memory controller. */ -void +static void sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac, unsigned int cas_latency) { diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index d000c678b439..2b833aa0212b 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c @@ -710,7 +710,7 @@ static void __init assabet_map_io(void) sa1100_register_uart(2, 3); } -void __init assabet_init_irq(void) +static void __init assabet_init_irq(void) { u32 def_val; diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index 9a7079f565bd..0c21ef45db68 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c @@ -33,6 +33,8 @@ #include #include +#include "generic.h" + extern int sa1100_finish_suspend(unsigned long); #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x From 5e40c79a513bff9b9f5c00d469de31d7318e3252 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:08 +0200 Subject: [PATCH 15/24] ARM: spear: include "pl080.h" for pl080_get_signal() prototype pl080_get_signal() and pl080_put_signal() are declared in pl080.h and defined in pl080.c, but this file is missing an include of the header: arch/arm/mach-spear/pl080.c:27:5: error: no previous prototype for 'pl080_get_signal' arch/arm/mach-spear/pl080.c:62:6: error: no previous prototype for 'pl080_put_signal' Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20230516153109.514251-13-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-spear/pl080.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-spear/pl080.c b/arch/arm/mach-spear/pl080.c index d6b8627d2544..47243a8153d0 100644 --- a/arch/arm/mach-spear/pl080.c +++ b/arch/arm/mach-spear/pl080.c @@ -16,6 +16,7 @@ #include #include "spear.h" #include "misc_regs.h" +#include "pl080.h" static spinlock_t lock = __SPIN_LOCK_UNLOCKED(x); From 88813f05b834756dfcadb7fbd7bf8f21e69b7811 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 16 May 2023 17:31:09 +0200 Subject: [PATCH 16/24] ARM: versatile: mark mmc_status() static mmc_status() is only used in the file it is defined in, and no longer has an 'extern' declaration: arch/arm/mach-versatile/versatile.c:56:14: error: no previous prototype for 'mmc_status' Fixes: 16956fed35fe ("ARM: versatile: switch to DT only booting and remove legacy code") Link: https://lore.kernel.org/r/20230516153109.514251-14-arnd@kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-versatile/versatile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-versatile/versatile.c b/arch/arm/mach-versatile/versatile.c index 02ba68abe533..7ef03d0c224d 100644 --- a/arch/arm/mach-versatile/versatile.c +++ b/arch/arm/mach-versatile/versatile.c @@ -53,7 +53,7 @@ static void __iomem *versatile_sys_base; -unsigned int mmc_status(struct device *dev) +static unsigned int mmc_status(struct device *dev) { struct amba_device *adev = container_of(dev, struct amba_device, dev); u32 mask; From ca027ae58eaab3632966158ce440a7f50da52bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 26 May 2023 23:40:03 +0200 Subject: [PATCH 17/24] ARM: s3c: Switch i2c drivers back to use .probe() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230526214003.2134595-1-u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c/mach-crag6410-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c index 4edde13b89b5..8fce1e815ee8 100644 --- a/arch/arm/mach-s3c/mach-crag6410-module.c +++ b/arch/arm/mach-s3c/mach-crag6410-module.c @@ -418,7 +418,7 @@ static struct i2c_driver wlf_gf_module_driver = { .driver = { .name = "wlf-gf-module" }, - .probe_new = wlf_gf_module_probe, + .probe = wlf_gf_module_probe, .id_table = wlf_gf_module_id, }; From b5b2e006c98f97f2c83aeeb6e7e8fb32198cc43a Mon Sep 17 00:00:00 2001 From: Franziska Naepelt Date: Tue, 30 May 2023 20:24:03 +0200 Subject: [PATCH 18/24] ARM: omap: Fix checkpatch issues This removes the following checkpatch issues: - ERROR: space required after that ',' (ctx:VxV) - WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Franziska Naepelt Message-Id: <20230530182403.35646-1-franziska.naepelt@gmail.com> [tony@atomide.com: add space also around '-' in addition to ','] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/sram-init.c | 2 +- arch/arm/mach-omap2/sram.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap1/sram-init.c b/arch/arm/mach-omap1/sram-init.c index 26427d6be896..736a72a2b184 100644 --- a/arch/arm/mach-omap1/sram-init.c +++ b/arch/arm/mach-omap1/sram-init.c @@ -23,7 +23,7 @@ #define OMAP1_SRAM_PA 0x20000000 #define SRAM_BOOTLOADER_SZ 0x80 -#define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1))) +#define ROUND_DOWN(value, boundary) ((value) & (~((boundary) - 1))) static void __iomem *omap_sram_base; static unsigned long omap_sram_start; diff --git a/arch/arm/mach-omap2/sram.c b/arch/arm/mach-omap2/sram.c index 815d390109d2..898b011ae8d9 100644 --- a/arch/arm/mach-omap2/sram.c +++ b/arch/arm/mach-omap2/sram.c @@ -45,7 +45,7 @@ #define GP_DEVICE 0x300 -#define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1))) +#define ROUND_DOWN(value, boundary) ((value) & (~((boundary) - 1))) static unsigned long omap_sram_start; static unsigned long omap_sram_size; @@ -118,7 +118,7 @@ static void omap_sram_reset(void) */ static int is_sram_locked(void) { - if (OMAP2_DEVICE_TYPE_GP == omap_type()) { + if (omap_type() == OMAP2_DEVICE_TYPE_GP) { /* RAMFW: R/W access to all initiators for all qualifier sets */ if (cpu_is_omap242x()) { writel_relaxed(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */ From 5b4560cf15602a4217d2f5664cf031d98780f0f0 Mon Sep 17 00:00:00 2001 From: Prathu Baronia Date: Thu, 18 May 2023 16:03:24 +0530 Subject: [PATCH 19/24] arm: omap1: replace printk() with pr_err macro Use pr_err() macro instead of printk(KERN_ERR "..."). Signed-off-by: Prathu Baronia Message-Id: <20230518103324.881394-1-quic_pbaronia@quicinc.com> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 9761d8404949..6a5815aa05e6 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -632,7 +632,7 @@ static int __init omap_pm_init(void) error = sysfs_create_file(power_kobj, &sleep_while_idle_attr.attr); if (error) - printk(KERN_ERR "sysfs_create_file failed: %d\n", error); + pr_err("sysfs_create_file failed: %d\n", error); if (cpu_is_omap16xx()) { /* configure LOW_PWR pin */ From 937e87229ea04e94c4f1a2f3f5ae9d2c56989acd Mon Sep 17 00:00:00 2001 From: Franziska Naepelt Date: Wed, 31 May 2023 19:04:27 +0200 Subject: [PATCH 20/24] ARM: omap2: Fix checkpatch issues The following checkpatch issues have been resolved: arch/arm/mach-omap2/omap-wakeupgen.c WARNING: Missing a blank line after declarations arch/arm/mach-omap2/omap_hwmod_3xxx_data.c ERROR: space prohibited before that ',' (ctx:WxE) WARNING: Use lore.kernel.org archive links when possible arch/arm/mach-omap2/omap_phy_internal.c WARNING: Block comments should align the * on each line arch/arm/mach-omap2/sdrc2xxx.c WARNING: It's generally not useful to have the filename in the file arch/arm/mach-omap2/ti81xx-restart.c ERROR: trailing statements should be on next line Signed-off-by: Franziska Naepelt Message-ID: <20230531170427.42199-1-franziska.naepelt@gmail.com> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap-wakeupgen.c | 1 + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 11 +++++------ arch/arm/mach-omap2/omap_phy_internal.c | 12 ++++++------ arch/arm/mach-omap2/sdrc2xxx.c | 2 -- arch/arm/mach-omap2/ti81xx-restart.c | 3 ++- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c index 8d21e3a3c05f..6f0d6120c174 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c @@ -374,6 +374,7 @@ static void irq_restore_context(void) static void irq_save_secure_context(void) { u32 ret; + ret = omap_secure_dispatcher(OMAP4_HAL_SAVEGIC_INDEX, FLAG_START_CRITICAL, 0, 0, 0, 0, 0); diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index cb33f0382a90..5cbdf58ad59f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -1851,7 +1851,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { .fw = { .omap2 = { .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, - .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP , + .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, .flags = OMAP_FIREWALL_L4, }, }, @@ -2172,7 +2172,7 @@ static struct omap_hwmod am35xx_emac_hwmod = { /* * According to Mark Greer, the MPU will not return from WFI * when the EMAC signals an interrupt. - * http://www.spinics.net/lists/arm-kernel/msg174734.html + * https://lore.kernel.org/all/1336770778-23044-3-git-send-email-mgreer@animalcreek.com/ */ .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI), }; @@ -2346,13 +2346,12 @@ static struct omap_hwmod_ocp_if *omap36xx_sham_hwmod_ocp_ifs[] __initdata = { NULL }; - /* * Apparently the SHA/MD5 and AES accelerator IP blocks are * only present on some AM35xx chips, and no one knows which - * ones. See - * http://www.spinics.net/lists/arm-kernel/msg215466.html So - * if you need these IP blocks on an AM35xx, try uncommenting + * ones. + * See https://lore.kernel.org/all/20130108203853.GB1876@animalcreek.com/ + * So if you need these IP blocks on an AM35xx, try uncommenting * the following lines. */ static struct omap_hwmod_ocp_if *am35xx_sham_hwmod_ocp_ifs[] __initdata = { diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index 21c6e7929d37..a1d001170a68 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * This file configures the internal USB PHY in OMAP4430. Used - * with TWL6030 transceiver and MUSB on OMAP4430. - * - * Copyright (C) 2010 Texas Instruments Incorporated - https://www.ti.com - * Author: Hema HK - */ + * This file configures the internal USB PHY in OMAP4430. Used + * with TWL6030 transceiver and MUSB on OMAP4430. + * + * Copyright (C) 2010 Texas Instruments Incorporated - https://www.ti.com + * Author: Hema HK + */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c index 529d46cfdea2..5a275b4fd404 100644 --- a/arch/arm/mach-omap2/sdrc2xxx.c +++ b/arch/arm/mach-omap2/sdrc2xxx.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * linux/arch/arm/mach-omap2/sdrc2xxx.c - * * SDRAM timing related functions for OMAP2xxx * * Copyright (C) 2005, 2008 Texas Instruments Inc. diff --git a/arch/arm/mach-omap2/ti81xx-restart.c b/arch/arm/mach-omap2/ti81xx-restart.c index d6dc518b1dde..5b5fb37caa50 100644 --- a/arch/arm/mach-omap2/ti81xx-restart.c +++ b/arch/arm/mach-omap2/ti81xx-restart.c @@ -26,5 +26,6 @@ void ti81xx_restart(enum reboot_mode mode, const char *cmd) { omap2_prm_set_mod_reg_bits(TI81XX_GLOBAL_RST_COLD, 0, TI81XX_PRM_DEVICE_RSTCTRL); - while (1); + while (1) + ; } From 8f7913c04f6a7b90bcf998ece17395d7090f6d44 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 6 Jun 2023 21:13:04 +0200 Subject: [PATCH 21/24] Input: ads7846 - Fix usage of match data device_get_match_data() returns the match data directly, fix this up and fix the probe crash. Fixes: 767d83361aaa ("Input: ads7846 - Convert to use software nodes") Reported-by: Guenter Roeck Signed-off-by: Linus Walleij Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20230606191304.3804174-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann --- drivers/input/touchscreen/ads7846.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 40eb27f1b23f..fe6fe8acd8a6 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -1117,20 +1117,13 @@ MODULE_DEVICE_TABLE(of, ads7846_dt_ids); static const struct ads7846_platform_data *ads7846_get_props(struct device *dev) { struct ads7846_platform_data *pdata; - const struct platform_device_id *pdev_id; u32 value; - pdev_id = device_get_match_data(dev); - if (!pdev_id) { - dev_err(dev, "Unknown device model\n"); - return ERR_PTR(-EINVAL); - } - pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return ERR_PTR(-ENOMEM); - pdata->model = (unsigned long)pdev_id->driver_data; + pdata->model = (u32)device_get_match_data(dev); device_property_read_u16(dev, "ti,vref-delay-usecs", &pdata->vref_delay_usecs); From 11ca605653480b2ddc70ec142a0a686796a7fc87 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 9 Jun 2023 22:20:56 +0200 Subject: [PATCH 22/24] Input: ads7846 - fix pointer cast warning The previous bugfix caused a warning on 64-bit builds: drivers/input/touchscreen/ads7846.c:1126:17: warning: cast to smaller integer type 'u32' (aka 'unsigned int') from 'const void *' [-Wvoid-pointer-to-int-cast] Change the cast back to something that works on both 32-bit and 64-bit kernels. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306100442.jStknDT1-lkp@intel.com/ Fixes: 8f7913c04f6a7 ("Input: ads7846 - Fix usage of match data") Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann --- drivers/input/touchscreen/ads7846.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index fe6fe8acd8a6..faea40dd66d0 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -1123,7 +1123,7 @@ static const struct ads7846_platform_data *ads7846_get_props(struct device *dev) if (!pdata) return ERR_PTR(-ENOMEM); - pdata->model = (u32)device_get_match_data(dev); + pdata->model = (uintptr_t)device_get_match_data(dev); device_property_read_u16(dev, "ti,vref-delay-usecs", &pdata->vref_delay_usecs); From 825edae7d1c39171634253203f03cf6c6cf380bc Mon Sep 17 00:00:00 2001 From: Justin Chen Date: Fri, 16 Jun 2023 15:20:44 -0700 Subject: [PATCH 23/24] MAINTAINERS: Replace my email address Switch to corporate email address for Broadcom related entries. Signed-off-by: Justin Chen Link: https://lore.kernel.org/r/1686954044-48410-1-git-send-email-justin.chen@broadcom.com Signed-off-by: Florian Fainelli --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 361c62bc714b..1e629a65d965 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4039,7 +4039,7 @@ N: bcm7038 N: bcm7120 BROADCOM BDC DRIVER -M: Justin Chen +M: Justin Chen M: Al Cooper L: linux-usb@vger.kernel.org R: Broadcom internal kernel review list @@ -4146,7 +4146,7 @@ F: Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml F: drivers/tty/serial/8250/8250_bcm7271.c BROADCOM BRCMSTB USB EHCI DRIVER -M: Justin Chen +M: Justin Chen M: Al Cooper R: Broadcom internal kernel review list L: linux-usb@vger.kernel.org @@ -4163,7 +4163,7 @@ F: Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml F: drivers/usb/misc/brcmstb-usb-pinmap.c BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER -M: Justin Chen +M: Justin Chen M: Al Cooper R: Broadcom internal kernel review list L: linux-kernel@vger.kernel.org From c1d57ee6eb99699f5ccd92fc6e8c5a79103dcaae Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 14 Jun 2023 11:30:32 +0200 Subject: [PATCH 24/24] ARM: omap2: Fix copy/paste bug I mistyped one of the SD/MMC GPIO lines on the Nokia n810 which was supposed to be "vio" as "vsd". Fix it up. Reported-by: Peter Vasil Signed-off-by: Linus Walleij Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20230614093032.403982-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap2/board-n8x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 564bf80a2621..8e3b5068d4ab 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -158,7 +158,7 @@ static struct gpiod_lookup_table nokia810_mmc_gpio_table = { "vsd", 1, GPIO_ACTIVE_HIGH), /* Slot index 1, VIO power, GPIO 9 */ GPIO_LOOKUP_IDX("gpio-0-15", 9, - "vsd", 1, GPIO_ACTIVE_HIGH), + "vio", 1, GPIO_ACTIVE_HIGH), { } }, };