ARM: samsung: Cleanup of various S3C bits
Subsystems (9)
Krzysztof Kozlowski
maintainercover ARM: samsung: Cleanup of various S3C bits
Hi,
I tried to cleanup few warnings in S3C machine code which lead to finding some bigger issues.
Patches touch mostly the ARM Samsung machine code except patch #1 (clk) and #5 (watchdog). They are independent from each other, except some conflicting lines.
The last three patches would welcome some testing... as I did not perform such (lack of S3C hardware).
Best regards,
Krzysztof
Krzysztof Kozlowski (7):
clk: samsung: s3c64xx: Declare s3c64xx_clk_init() in shared header
ARM: s3c64xx: Include header to fix -Wmissing-prototypes
ARM: s3c: Remove plat-samsung/.../samsung-time.h
ARM: samsung: Fix language typo
ARM: samsung: Kill useless HAVE_S3C2410_WATCHDOG
ARM: s3c64xx: Switch to generic watchdog driver reset
ARM: s3c24xx: Fix missing system reset
MAINTAINERS | 1 + arch/arm/Kconfig | 3 +- arch/arm/mach-exynos/Kconfig | 1 - arch/arm/mach-s3c24xx/common.h | 12 +++ arch/arm/mach-s3c24xx/mach-amlm5900.c | 2 - arch/arm/mach-s3c24xx/mach-anubis.c | 1 - arch/arm/mach-s3c24xx/mach-at2440evb.c | 1 - arch/arm/mach-s3c24xx/mach-bast.c | 1 - arch/arm/mach-s3c24xx/mach-gta02.c | 1 - arch/arm/mach-s3c24xx/mach-h1940.c | 1 - arch/arm/mach-s3c24xx/mach-jive.c | 1 - arch/arm/mach-s3c24xx/mach-mini2440.c | 1 - arch/arm/mach-s3c24xx/mach-n30.c | 1 - arch/arm/mach-s3c24xx/mach-nexcoder.c | 1 - arch/arm/mach-s3c24xx/mach-osiris.c | 1 - arch/arm/mach-s3c24xx/mach-otom.c | 1 - arch/arm/mach-s3c24xx/mach-qt2410.c | 1 - arch/arm/mach-s3c24xx/mach-rx1950.c | 1 - arch/arm/mach-s3c24xx/mach-rx3715.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2410.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2413.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2416.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2440.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2443.c | 1 - arch/arm/mach-s3c24xx/mach-tct_hammer.c | 1 - arch/arm/mach-s3c24xx/mach-vr1000.c | 1 - arch/arm/mach-s3c24xx/mach-vstms.c | 1 - arch/arm/mach-s3c64xx/Kconfig | 5 +- arch/arm/mach-s3c64xx/common.c | 16 +--- arch/arm/mach-s3c64xx/common.h | 17 +++- arch/arm/mach-s3c64xx/mach-anw6410.c | 2 - arch/arm/mach-s3c64xx/mach-crag6410.c | 2 - arch/arm/mach-s3c64xx/mach-hmt.c | 2 - arch/arm/mach-s3c64xx/mach-mini6410.c | 2 - arch/arm/mach-s3c64xx/mach-ncp.c | 2 - arch/arm/mach-s3c64xx/mach-real6410.c | 2 - arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 ---- arch/arm/mach-s3c64xx/mach-smartq.c | 1 - arch/arm/mach-s3c64xx/mach-smartq5.c | 2 - arch/arm/mach-s3c64xx/mach-smartq7.c | 2 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 2 - arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 - arch/arm/mach-s3c64xx/setup-spi.c | 1 + arch/arm/mach-s3c64xx/watchdog-reset.h | 16 ---- arch/arm/mach-s5pv210/Kconfig | 1 - arch/arm/plat-samsung/Kconfig | 10 +- arch/arm/plat-samsung/Makefile | 1 - .../plat-samsung/include/plat/samsung-time.h | 26 ------ arch/arm/plat-samsung/watchdog-reset.c | 93 ------------------- arch/arm64/Kconfig.platforms | 1 - drivers/clk/samsung/clk-s3c64xx.c | 1 + drivers/watchdog/Kconfig | 8 -- include/linux/clk/samsung.h | 21 +++++ 53 files changed, 59 insertions(+), 237 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/include/plat/samsung-time.h delete mode 100644 arch/arm/plat-samsung/watchdog-reset.c create mode 100644 include/linux/clk/samsung.h
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 1/7 clk: samsung: s3c64xx: Declare s3c64xx_clk_init() in shared header
The s3c64xx_clk_init() is defined and used by clk-s3c64xx driver and also used in mach-s3c64xx machine code. Move the declaration to a header to fix W=1 build warning:
drivers/clk/samsung/clk-s3c64xx.c:391:13: warning: no previous prototype for 's3c64xx_clk_init' [-Wmissing-prototypes]
391 | void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
--- MAINTAINERS | 1 + arch/arm/mach-s3c64xx/common.c | 1 + arch/arm/mach-s3c64xx/common.h | 2 -- drivers/clk/samsung/clk-s3c64xx.c | 1 + include/linux/clk/samsung.h | 21 +++++++++++++++++++++ 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 include/linux/clk/samsung.h
MAINTAINERS +1 -0
@@ -15294,6 +15294,7 @@ F: Documentation/devicetree/bindings/clock/samsung,s3c* F: Documentation/devicetree/bindings/clock/samsung,s5p* F: drivers/clk/samsung/ F: include/dt-bindings/clock/exynos*.h +F: include/linux/clk/samsung.h SAMSUNG SPI DRIVERS M: Kukjin Kim <[email protected]>
arch/arm/mach-s3c64xx/common.c +1 -0
@@ -24,6 +24,7 @@#include <linux/platform_device.h> #include <linux/reboot.h> #include <linux/io.h> +#include <linux/clk/samsung.h> #include <linux/dma-mapping.h> #include <linux/irq.h> #include <linux/gpio.h>
arch/arm/mach-s3c64xx/common.h +0 -2
@@ -22,8 +22,6 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size);void s3c64xx_restart (enum reboot_mode mode,const char *cmd);struct device_node ; -void s3c64xx_clk_init (struct device_node *np,unsigned long xtal_f, -unsigned long xusbxti_f,bool is_s3c6400,void __iomem *reg_base);void s3c64xx_set_xtal_freq (unsigned long freq);void s3c64xx_set_xusbxti_freq (unsigned long freq);
drivers/clk/samsung/clk-s3c64xx.c +1 -0
@@ -7,6 +7,7 @@#include <linux/slab.h> #include <linux/clk-provider.h> +#include <linux/clk/samsung.h> #include <linux/of.h> #include <linux/of_address.h>
include/linux/clk/samsung.h new file +21 -0
@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2020 Krzysztof Kozlowski <[email protected]> +*/ + +#ifndef __LINUX_CLK_SAMSUNG_H_ +#define __LINUX_CLK_SAMSUNG_H_ + +#ifdef CONFIG_ARCH_S3C64XX +void __init s3c64xx_clk_init (struct device_node *np,unsigned long xtal_f, +unsigned long xusbxti_f,bool s3c6400, +void __iomem *base); +#else +static inline void __init s3c64xx_clk_init (struct device_node *np, +unsigned long xtal_f, +unsigned long xusbxti_f, +bool s3c6400, +void __iomem *base) { } +#endif /* CONFIG_ARCH_S3C64XX */ + +#endif /* __LINUX_CLK_SAMSUNG_H_ */
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 2/7 ARM: s3c64xx: Include header to fix -Wmissing-prototypes
In reply to Krzysztof KozlowskiInclude the spi-s3c64xx.h header to fix W=1 build warning:
arch/arm/mach-s3c64xx/setup-spi.c:11:5: warning:
no previous prototype for 's3c64xx_spi0_cfg_gpio' [-Wmissing-prototypes]
11 | int s3c64xx_spi0_cfg_gpio(void)--- arch/arm/mach-s3c64xx/setup-spi.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-s3c64xx/setup-spi.c +1 -0
@@ -4,6 +4,7 @@// http://www.samsung.com/ #include <linux/gpio.h> +#include <linux/platform_data/spi-s3c64xx.h> #include <plat/gpio-cfg.h> #include <mach/gpio-samsung.h>
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 3/7 ARM: s3c: Remove plat-samsung/.../samsung-time.h
In reply to Krzysztof KozlowskiRemove the arch/arm/plat-samsung/include/plat/samsung-time.h header and move the contents to common.h headers in mach-s3c24xx and mach-s3c64xx. The definition of declared functions is already in common.c in mach directories, so it is logically to put declaration next to them.
This is also one step further towards removal of plat-samsung directory and it fixes W=1 build warnings:
arch/arm/mach-s3c64xx/common.c:174:13: warning:
no previous prototype for 'samsung_set_timer_source' [-Wmissing-prototypes]
174 | void __init samsung_set_timer_source(unsigned int event, unsigned int source)
arch/arm/mach-s3c64xx/common.c:180:13: warning:
no previous prototype for 'samsung_timer_init' [-Wmissing-prototypes]
180 | void __init samsung_timer_init(void)
--- arch/arm/mach-s3c24xx/common.h | 12 +++++++++ arch/arm/mach-s3c24xx/mach-amlm5900.c | 2 -- arch/arm/mach-s3c24xx/mach-anubis.c | 1 - arch/arm/mach-s3c24xx/mach-at2440evb.c | 1 - arch/arm/mach-s3c24xx/mach-bast.c | 1 - arch/arm/mach-s3c24xx/mach-gta02.c | 1 - arch/arm/mach-s3c24xx/mach-h1940.c | 1 - arch/arm/mach-s3c24xx/mach-jive.c | 1 - arch/arm/mach-s3c24xx/mach-mini2440.c | 1 - arch/arm/mach-s3c24xx/mach-n30.c | 1 - arch/arm/mach-s3c24xx/mach-nexcoder.c | 1 - arch/arm/mach-s3c24xx/mach-osiris.c | 1 - arch/arm/mach-s3c24xx/mach-otom.c | 1 - arch/arm/mach-s3c24xx/mach-qt2410.c | 1 - arch/arm/mach-s3c24xx/mach-rx1950.c | 1 - arch/arm/mach-s3c24xx/mach-rx3715.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2410.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2413.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2416.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2440.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2443.c | 1 - arch/arm/mach-s3c24xx/mach-tct_hammer.c | 1 - arch/arm/mach-s3c24xx/mach-vr1000.c | 1 - arch/arm/mach-s3c24xx/mach-vstms.c | 1 - arch/arm/mach-s3c64xx/common.h | 13 ++++++++++ arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 - arch/arm/mach-s3c64xx/mach-smartq.c | 1 - arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - .../plat-samsung/include/plat/samsung-time.h | 26 ------------------- 37 files changed, 25 insertions(+), 61 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/samsung-time.h
arch/arm/mach-s3c24xx/common.h +12 -0
@@ -123,4 +123,16 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f, void __iomem *reg_base);#endif +enum samsung_timer_mode { +SAMSUNG_PWM0 , +SAMSUNG_PWM1 , +SAMSUNG_PWM2 , +SAMSUNG_PWM3 , +SAMSUNG_PWM4 , +}; + +extern void __init samsung_set_timer_source (enum samsung_timer_mode event, +enum samsung_timer_mode source); +extern void __init samsung_timer_init (void ); +#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
arch/arm/mach-s3c24xx/mach-amlm5900.c +0 -2
@@ -45,8 +45,6 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> -#include <plat/samsung-time.h> -#include "common.h" static struct resource amlm5900_nor_resource =
arch/arm/mach-s3c24xx/mach-anubis.c +0 -1
@@ -44,7 +44,6 @@#include <plat/devs.h> #include <plat/cpu.h> #include <linux/platform_data/asoc-s3c24xx_simtec.h> -#include <plat/samsung-time.h> #include "anubis.h" #include "common.h"
arch/arm/mach-s3c24xx/mach-at2440evb.c +0 -1
@@ -43,7 +43,6 @@#include <plat/devs.h> #include <plat/cpu.h> #include <linux/platform_data/mmc-s3cmci.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c24xx/mach-bast.c +0 -1
@@ -50,7 +50,6 @@#include <plat/cpu-freq.h> #include <plat/devs.h> #include <plat/gpio-cfg.h> -#include <plat/samsung-time.h> #include "bast.h" #include "common.h"
arch/arm/mach-s3c24xx/mach-gta02.c +0 -1
@@ -67,7 +67,6 @@#include <plat/devs.h> #include <plat/gpio-cfg.h> #include <plat/pm.h> -#include <plat/samsung-time.h> #include "common.h" #include "gta02.h"
arch/arm/mach-s3c24xx/mach-h1940.c +0 -1
@@ -58,7 +58,6 @@#include <plat/devs.h> #include <plat/gpio-cfg.h> #include <plat/pm.h> -#include <plat/samsung-time.h> #include "common.h" #include "h1940.h"
arch/arm/mach-s3c24xx/mach-jive.c +0 -1
@@ -48,7 +48,6 @@#include <plat/cpu.h> #include <plat/pm.h> #include <linux/platform_data/usb-s3c2410_udc.h> -#include <plat/samsung-time.h> #include "common.h" #include "s3c2412-power.h"
arch/arm/mach-s3c24xx/mach-mini2440.c +0 -1
@@ -52,7 +52,6 @@#include <plat/gpio-cfg.h> #include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include <sound/s3c24xx_uda134x.h>
arch/arm/mach-s3c24xx/mach-n30.c +0 -1
@@ -48,7 +48,6 @@#include <plat/gpio-cfg.h> #include <linux/platform_data/mmc-s3cmci.h> #include <linux/platform_data/usb-s3c2410_udc.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c24xx/mach-nexcoder.c +0 -1
@@ -40,7 +40,6 @@#include <plat/gpio-cfg.h> #include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c24xx/mach-osiris.c +0 -1
@@ -40,7 +40,6 @@#include <plat/cpu-freq.h> #include <plat/devs.h> #include <plat/gpio-cfg.h> -#include <plat/samsung-time.h> #include <mach/hardware.h> #include <mach/regs-gpio.h>
arch/arm/mach-s3c24xx/mach-otom.c +0 -1
@@ -27,7 +27,6 @@#include <plat/cpu.h> #include <plat/devs.h> -#include <plat/samsung-time.h> #include "common.h" #include "otom.h"
arch/arm/mach-s3c24xx/mach-qt2410.c +0 -1
@@ -44,7 +44,6 @@#include <plat/devs.h> #include <plat/cpu.h> #include <plat/pm.h> -#include <plat/samsung-time.h> #include "common.h" #include "common-smdk.h"
arch/arm/mach-s3c24xx/mach-rx1950.c +0 -1
@@ -53,7 +53,6 @@#include <plat/cpu.h> #include <plat/devs.h> #include <plat/pm.h> -#include <plat/samsung-time.h> #include <plat/gpio-cfg.h> #include "common.h"
arch/arm/mach-s3c24xx/mach-rx3715.c +0 -1
@@ -43,7 +43,6 @@#include <plat/cpu.h> #include <plat/devs.h> #include <plat/pm.h> -#include <plat/samsung-time.h> #include "common.h" #include "h1940.h"
arch/arm/mach-s3c24xx/mach-smdk2410.c +0 -1
@@ -32,7 +32,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h" #include "common-smdk.h"
arch/arm/mach-s3c24xx/mach-smdk2413.c +0 -1
@@ -40,7 +40,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h" #include "common-smdk.h"
arch/arm/mach-s3c24xx/mach-smdk2416.c +0 -1
@@ -44,7 +44,6 @@#include <plat/sdhci.h> #include <linux/platform_data/usb-s3c2410_udc.h> #include <linux/platform_data/s3c-hsudc.h> -#include <plat/samsung-time.h> #include <plat/fb.h>
arch/arm/mach-s3c24xx/mach-smdk2440.c +0 -1
@@ -35,7 +35,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h" #include "common-smdk.h"
arch/arm/mach-s3c24xx/mach-smdk2443.c +0 -1
@@ -34,7 +34,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h" #include "common-smdk.h"
arch/arm/mach-s3c24xx/mach-tct_hammer.c +0 -1
@@ -36,7 +36,6 @@#include <linux/mtd/partitions.h> #include <linux/mtd/map.h> #include <linux/mtd/physmap.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c24xx/mach-vr1000.c +0 -1
@@ -42,7 +42,6 @@#include <plat/cpu.h> #include <plat/devs.h> #include <plat/gpio-cfg.h> -#include <plat/samsung-time.h> #include "bast.h" #include "common.h"
arch/arm/mach-s3c24xx/mach-vstms.c +0 -1
@@ -39,7 +39,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c64xx/common.h +13 -0
@@ -52,4 +52,17 @@ extern struct pl08x_platform_data s3c64xx_dma0_plat_data;extern struct pl08x_platform_data s3c64xx_dma1_plat_data;#endif +/* Samsung HR-Timer Clock mode */ +enum samsung_timer_mode { +SAMSUNG_PWM0 , +SAMSUNG_PWM1 , +SAMSUNG_PWM2 , +SAMSUNG_PWM3 , +SAMSUNG_PWM4 , +}; + +extern void __init samsung_set_timer_source (enum samsung_timer_mode event, +enum samsung_timer_mode source); +extern void __init samsung_timer_init (void ); +#endif /* __ARCH_ARM_MACH_S3C64XX_COMMON_H */
arch/arm/mach-s3c64xx/mach-anw6410.c +0 -1
@@ -44,7 +44,6 @@#include <mach/irqs.h> #include <mach/regs-gpio.h> #include <mach/gpio-samsung.h> -#include <plat/samsung-time.h> #include "common.h" #include "regs-modem.h"
arch/arm/mach-s3c64xx/mach-crag6410.c +0 -1
@@ -61,7 +61,6 @@#include <plat/adc.h> #include <linux/platform_data/i2c-s3c2410.h> #include <plat/pm.h> -#include <plat/samsung-time.h> #include "common.h" #include "crag6410.h"
arch/arm/mach-s3c64xx/mach-hmt.c +0 -1
@@ -39,7 +39,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c64xx/mach-mini6410.c +0 -1
@@ -39,7 +39,6 @@#include <video/platform_lcd.h> #include <video/samsung_fimd.h> -#include <plat/samsung-time.h> #include "common.h" #include "regs-modem.h"
arch/arm/mach-s3c64xx/mach-ncp.c +0 -1
@@ -36,7 +36,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c64xx/mach-real6410.c +0 -1
@@ -38,7 +38,6 @@#include <video/platform_lcd.h> #include <video/samsung_fimd.h> -#include <plat/samsung-time.h> #include "common.h" #include "regs-modem.h"
arch/arm/mach-s3c64xx/mach-smartq.c +0 -1
@@ -32,7 +32,6 @@#include <linux/platform_data/touchscreen-s3c2410.h> #include <video/platform_lcd.h> -#include <plat/samsung-time.h> #include "common.h" #include "mach-smartq.h"
arch/arm/mach-s3c64xx/mach-smartq5.c +0 -1
@@ -23,7 +23,6 @@#include <plat/devs.h> #include <plat/fb.h> #include <plat/gpio-cfg.h> -#include <plat/samsung-time.h> #include "common.h" #include "mach-smartq.h"
arch/arm/mach-s3c64xx/mach-smartq7.c +0 -1
@@ -23,7 +23,6 @@#include <plat/devs.h> #include <plat/fb.h> #include <plat/gpio-cfg.h> -#include <plat/samsung-time.h> #include "common.h" #include "mach-smartq.h"
arch/arm/mach-s3c64xx/mach-smdk6400.c +0 -1
@@ -30,7 +30,6 @@#include <plat/cpu.h> #include <linux/platform_data/i2c-s3c2410.h> #include <mach/gpio-samsung.h> -#include <plat/samsung-time.h> #include "common.h"
arch/arm/mach-s3c64xx/mach-smdk6410.c +0 -1
@@ -64,7 +64,6 @@#include <plat/adc.h> #include <linux/platform_data/touchscreen-s3c2410.h> #include <plat/keypad.h> -#include <plat/samsung-time.h> #include "backlight.h" #include "common.h"
arch/arm/plat-samsung/include/plat/samsung-time.h deleted +0 -26
@@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* Copyright 2011 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* Header file for samsung s3c and s5p time support -*/ - -#ifndef __ASM_PLAT_SAMSUNG_TIME_H -#define __ASM_PLAT_SAMSUNG_TIME_H __FILE__ - -/* Samsung HR-Timer Clock mode */ -enum samsung_timer_mode { -SAMSUNG_PWM0 , -SAMSUNG_PWM1 , -SAMSUNG_PWM2 , -SAMSUNG_PWM3 , -SAMSUNG_PWM4 , -}; - -extern void __init samsung_set_timer_source (enum samsung_timer_mode event, -enum samsung_timer_mode source); - -extern void __init samsung_timer_init (void ); - -#endif /* __ASM_PLAT_SAMSUNG_TIME_H */
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 4/7 ARM: samsung: Fix language typo
In reply to Krzysztof KozlowskiFix Complie -> Compile
--- arch/arm/plat-samsung/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-samsung/Kconfig +2 -2
@@ -154,7 +154,7 @@ config S3C_DEV_WDT bool default y if ARCH_S3C24XX help - Complie in platform device definition for Watchdog Timer + Compile in platform device definition for Watchdog Timer config S3C_DEV_NAND bool
@@ -169,7 +169,7 @@ config S3C_DEV_ONENAND config S3C_DEV_RTC bool help - Complie in platform device definition for RTC + Compile in platform device definition for RTC config SAMSUNG_DEV_ADC bool
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 5/7 ARM: samsung: Kill useless HAVE_S3C2410_WATCHDOG
In reply to Krzysztof KozlowskiA separate Kconfig option HAVE_S3C2410_WATCHDOG for Samsung SoCs does not have sense, because:
1. All ARMv7 and ARMv8 Samsung SoCs have watchdog,
2. All architecture Kconfigs were selecting it (if WATCHDOG framework is chosen),
3. HAVE_S3C2410_WATCHDOG is doing nothing except being a dependency of actual Samsung SoC watchdog driver, which is enabled manually by specific defconfigs.
HAVE_S3C2410_WATCHDOG can be safely removed.
--- arch/arm/Kconfig | 1 - arch/arm/mach-exynos/Kconfig | 1 - arch/arm/mach-s3c64xx/Kconfig | 2 -- arch/arm/mach-s5pv210/Kconfig | 1 - arch/arm64/Kconfig.platforms | 1 - drivers/watchdog/Kconfig | 8 -------- 6 files changed, 14 deletions(-)
arch/arm/Kconfig +0 -1
@@ -504,7 +504,6 @@ config ARCH_S3C24XX select GPIOLIB select GENERIC_IRQ_MULTI_HANDLER select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_IO_H select SAMSUNG_ATAGS
arch/arm/mach-exynos/Kconfig +0 -1
@@ -24,7 +24,6 @@ menuconfig ARCH_EXYNOS select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5 select HAVE_ARM_SCU if SMP select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOS
arch/arm/mach-s3c64xx/Kconfig +0 -2
@@ -13,7 +13,6 @@ menuconfig ARCH_S3C64XX select GPIO_SAMSUNG if ATAGS select GPIOLIB select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_TCM select PLAT_SAMSUNG select PM_GENERIC_DOMAINS if PM
@@ -165,7 +164,6 @@ config MACH_SMDK6410 bool "SMDK6410" depends on ATAGS select CPU_S3C6410 - select HAVE_S3C2410_WATCHDOG if WATCHDOG select S3C64XX_SETUP_FB_24BPP select S3C64XX_SETUP_I2C1 select S3C64XX_SETUP_IDE
arch/arm/mach-s5pv210/Kconfig +0 -1
@@ -14,7 +14,6 @@ config ARCH_S5PV210 select COMMON_CLK_SAMSUNG select GPIOLIB select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOS
arch/arm64/Kconfig.platforms +0 -1
@@ -80,7 +80,6 @@ config ARCH_EXYNOS select EXYNOS_CHIPID select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select EXYNOS_PMU - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOS
drivers/watchdog/Kconfig +0 -8
@@ -478,16 +478,8 @@ config IXP4XX_WATCHDOG Say N if you are unsure. -config HAVE_S3C2410_WATCHDOG - bool - help - This will include watchdog timer support for Samsung SoCs. If - you want to include watchdog support for any machine, kindly - select this in the respective mach-XXXX/Kconfig file. - config S3C2410_WATCHDOG tristate "S3C2410 Watchdog" - depends on HAVE_S3C2410_WATCHDOG || COMPILE_TEST select WATCHDOG_CORE select MFD_SYSCON if ARCH_EXYNOS help
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 6/7 ARM: s3c64xx: Switch to generic watchdog driver reset
In reply to Krzysztof KozlowskiSimilarly to commit f6361c6b3880 ("ARM: S3C24XX: remove separate restart code"), the platform watchdog reset code can be removed in favor of a generic watchdog driver which already handles reset.
This allows removal of a bunch of machine code and fixes also W=1 compile warnings:
arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes]
29 | void samsung_wdt_reset(void)
| ^~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes]
69 | void __init samsung_wdt_reset_of_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes]
89 | void __init samsung_wdt_reset_init(void __iomem *base)
--- arch/arm/mach-s3c64xx/Kconfig | 3 +- arch/arm/mach-s3c64xx/common.c | 15 +--- arch/arm/mach-s3c64xx/common.h | 2 - arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 - arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 ----- arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - arch/arm/mach-s3c64xx/watchdog-reset.h | 16 ----- arch/arm/plat-samsung/Kconfig | 6 -- arch/arm/plat-samsung/Makefile | 1 - arch/arm/plat-samsung/watchdog-reset.c | 93 ------------------------- 18 files changed, 5 insertions(+), 158 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/watchdog-reset.c
arch/arm/mach-s3c64xx/Kconfig +2 -1
@@ -18,9 +18,10 @@ menuconfig ARCH_S3C64XX select PM_GENERIC_DOMAINS if PM select S3C_DEV_NAND if ATAGS select S3C_GPIO_TRACK if ATAGS + select S3C2410_WATCHDOG select SAMSUNG_ATAGS if ATAGS select SAMSUNG_WAKEMASK if PM - select SAMSUNG_WDT_RESET + select WATCHDOG help Samsung S3C64XX series based systems
arch/arm/mach-s3c64xx/common.c +3 -12
@@ -50,7 +50,6 @@#include "common.h" #include "irq-uart.h" -#include "watchdog-reset.h" /* External clock frequency */ static unsigned long xtal_f__ro_after_init =12000000 ;
@@ -232,10 +231,11 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)/* * FIXME: there is no better place to put this at the moment * (s3c64xx_clk_init needs ioremap and must happen before init_time -* samsung_wdt_reset_init needs clocks) +* samsung_wdt_reset_init needs clocks). However +* samsung_wdt_reset_init() was removed in favor of watchdog driver +* so this should be revised. */ s3c64xx_clk_init (NULL , xtal_f, xusbxti_f,soc_is_s3c6400 (),S3C_VA_SYS ); -samsung_wdt_reset_init (S3C_VA_WATCHDOG );printk (KERN_DEBUG "%s: initialising interrupts\n" , __func__);
@@ -429,12 +429,3 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); - -void s3c64xx_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 ); -}
arch/arm/mach-s3c64xx/common.h +0 -2
@@ -19,8 +19,6 @@void s3c64xx_init_irq (u32 vic0,u32 vic1);void s3c64xx_init_io (struct map_desc *mach_desc,int size); -void s3c64xx_restart (enum reboot_mode mode,const char *cmd); -struct device_node ;void s3c64xx_set_xtal_freq (unsigned long freq);void s3c64xx_set_xusbxti_freq (unsigned long freq);
arch/arm/mach-s3c64xx/mach-anw6410.c +0 -1
@@ -228,5 +228,4 @@ MACHINE_START(ANW6410, "A&W6410") .map_io = anw6410_map_io, .init_machine = anw6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-crag6410.c +0 -1
@@ -877,5 +877,4 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") .map_io = crag6410_map_io, .init_machine = crag6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-hmt.c +0 -1
@@ -280,5 +280,4 @@ MACHINE_START(HMT, "Airgoo-HMT") .map_io = hmt_map_io, .init_machine = hmt_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-mini6410.c +0 -1
@@ -362,5 +362,4 @@ MACHINE_START(MINI6410, "MINI6410") .map_io = mini6410_map_io, .init_machine = mini6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-ncp.c +0 -1
@@ -98,5 +98,4 @@ MACHINE_START(NCP, "NCP") .map_io = ncp_map_io, .init_machine = ncp_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-real6410.c +0 -1
@@ -330,5 +330,4 @@ MACHINE_START(REAL6410, "REAL6410") .map_io = real6410_map_io, .init_machine = real6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +0 -17
@@ -12,7 +12,6 @@#include <mach/map.h> #include "common.h" -#include "watchdog-reset.h" /* * IO mapping for shared system controller IP.
@@ -39,20 +38,6 @@ static void __init s3c64xx_dt_map_io(void)panic ("SoC is not S3C64xx!" ); } -static void __init s3c64xx_dt_init_machine (void ) -{ -samsung_wdt_reset_of_init (); -} - -static void s3c64xx_dt_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 ); -} -static const char *const s3c64xx_dt_compat[]__initconst = {"samsung,s3c6400" ,"samsung,s3c6410" ,
@@ -63,6 +48,4 @@ DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")/* Maintainer: Tomasz Figa <[email protected]> */ .dt_compat = s3c64xx_dt_compat, .map_io = s3c64xx_dt_map_io, - .init_machine = s3c64xx_dt_init_machine, - .restart = s3c64xx_dt_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smartq5.c +0 -1
@@ -151,5 +151,4 @@ MACHINE_START(SMARTQ5, "SmartQ 5") .map_io = smartq_map_io, .init_machine = smartq5_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smartq7.c +0 -1
@@ -167,5 +167,4 @@ MACHINE_START(SMARTQ7, "SmartQ 7") .map_io = smartq_map_io, .init_machine = smartq7_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smdk6400.c +0 -1
@@ -88,5 +88,4 @@ MACHINE_START(SMDK6400, "SMDK6400") .map_io = smdk6400_map_io, .init_machine = smdk6400_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smdk6410.c +0 -1
@@ -704,5 +704,4 @@ MACHINE_START(SMDK6410, "SMDK6410") .map_io = smdk6410_map_io, .init_machine = smdk6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/watchdog-reset.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* Copyright (c) 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* S3C2410 - System define for arch_reset() function -*/ - -#ifndef __PLAT_SAMSUNG_WATCHDOG_RESET_H -#define __PLAT_SAMSUNG_WATCHDOG_RESET_H - -extern void samsung_wdt_reset (void ); -extern void samsung_wdt_reset_of_init (void ); -extern void samsung_wdt_reset_init (void __iomem *base); - -#endif /* __PLAT_SAMSUNG_WATCHDOG_RESET_H */
arch/arm/plat-samsung/Kconfig +0 -6
@@ -290,12 +290,6 @@ config SAMSUNG_WAKEMASK and above. This code allows a set of interrupt to wakeup-mask mappings. See <plat/wakeup-mask.h> -config SAMSUNG_WDT_RESET - bool - help - Compile support for system restart by triggering watchdog reset. - Used on SoCs that do not provide dedicated reset control. - config DEBUG_S3C_UART depends on PLAT_SAMSUNG int
arch/arm/plat-samsung/Makefile +0 -1
@@ -32,4 +32,3 @@ obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o obj-$(CONFIG_SAMSUNG_PM_DEBUG) += pm-debug.o obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o -obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o
arch/arm/plat-samsung/watchdog-reset.c deleted +0 -93
93 lines not on this page · raw message
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 7/7 ARM: s3c24xx: Fix missing system reset
In reply to Krzysztof KozlowskiCommit f6361c6b3880 ("ARM: S3C24XX: remove separate restart code") removed usage of the watchdog reset platform code in favor of the Samsung SoC watchdog driver. However the latter was not selected thus S3C24xx platforms lost reset abilities.
--- arch/arm/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/Kconfig +2 -0
@@ -506,8 +506,10 @@ config ARCH_S3C24XX select HAVE_S3C2410_I2C if I2C select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_IO_H + select S3C2410_WATCHDOG select SAMSUNG_ATAGS select USE_OF + select WATCHDOG help Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
Signature · 1 line
2.17.1
Re: [PATCH 5/7] ARM: samsung: Kill useless HAVE_S3C2410_WATCHDOG
In reply to Krzysztof KozlowskiQuoted 11 lines · Krzysztof Kozlowski
A separate
KconfigoptionHAVE_S3C2410_WATCHDOGfor Samsung SoCs does not have sense, because:
1. All ARMv7 and ARMv8 Samsung SoCs have watchdog,
2. All architecture Kconfigs were selecting it (if WATCHDOG framework is chosen),
3.HAVE_S3C2410_WATCHDOGis doing nothing except being a dependency of actual Samsung SoC watchdog driver, which is enabled manually by specific defconfigs.
HAVE_S3C2410_WATCHDOGcan be safely removed.
That is not really correct. HAVE_S3C2410_WATCHDOG is used to ensure that users can only enable S3C2410_WATCHDOG if the watchdog actually exists in a system. With this change, it can be enabled for all architectures and platforms.
NACK.
Guenter
Quoted 102 lines
Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/Kconfig | 1 - arch/arm/mach-exynos/Kconfig | 1 - arch/arm/mach-s3c64xx/Kconfig | 2 -- arch/arm/mach-s5pv210/Kconfig | 1 - arch/arm64/Kconfig.platforms | 1 - drivers/watchdog/Kconfig | 8 -------- 6 files changed, 14 deletions(-)arch/arm/Kconfig +0
-1@@ -504,7 +504,6 @@ config ARCH_S3C24XX select GPIOLIB select GENERIC_IRQ_MULTI_HANDLER select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_IO_H select SAMSUNG_ATAGSarch/arm/mach-exynos/Kconfig +0
-1@@ -24,7 +24,6 @@ menuconfig ARCH_EXYNOS select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5 select HAVE_ARM_SCU if SMP select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOSarch/arm/mach-s3c64xx/Kconfig +0
-2@@ -13,7 +13,6 @@ menuconfig ARCH_S3C64XX select GPIO_SAMSUNG if ATAGS select GPIOLIB select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_TCM select PLAT_SAMSUNG select PM_GENERIC_DOMAINS if PM@@ -165,7 +164,6 @@ config MACH_SMDK6410 bool "SMDK6410" depends on ATAGS select CPU_S3C6410 - select HAVE_S3C2410_WATCHDOG if WATCHDOG select S3C64XX_SETUP_FB_24BPP select S3C64XX_SETUP_I2C1 select S3C64XX_SETUP_IDEarch/arm/mach-s5pv210/Kconfig +0
-1@@ -14,7 +14,6 @@ config ARCH_S5PV210 select COMMON_CLK_SAMSUNG select GPIOLIB select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOSarch/arm64/Kconfig.platforms +0
-1@@ -80,7 +80,6 @@ config ARCH_EXYNOS select EXYNOS_CHIPID select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select EXYNOS_PMU - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOSdrivers/watchdog/Kconfig +0
-8@@ -478,16 +478,8 @@ config IXP4XX_WATCHDOG Say N if you are unsure. -config HAVE_S3C2410_WATCHDOG - bool - help - This will include watchdog timer support for Samsung SoCs. If - you want to include watchdog support for any machine, kindly - select this in the respective mach-XXXX/Kconfig file. - config S3C2410_WATCHDOG tristate "S3C2410 Watchdog" - depends on HAVE_S3C2410_WATCHDOG || COMPILE_TEST select WATCHDOG_CORE select MFD_SYSCON if ARCH_EXYNOS helpSignature · 1 line
2.17.1
Re: [PATCH 6/7] ARM: s3c64xx: Switch to generic watchdog driver reset
In reply to Krzysztof KozlowskiHi Krzysztof,
2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 32 lines
Similarly to commit
f6361c6b3880("ARM: S3C24XX: remove separate restart code"), the platform watchdog reset code can be removed in favor of a generic watchdog driver which already handles reset.This allows removal of a bunch of machine code and fixes also W=1 compile warnings:
arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes]
29 | voidsamsung_wdt_reset(void)
| ^~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes]
69 | void__initsamsung_wdt_reset_of_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes]
89 | void__initsamsung_wdt_reset_init(void __iomem *base)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c64xx/Kconfig | 3 +- arch/arm/mach-s3c64xx/common.c | 15 +--- arch/arm/mach-s3c64xx/common.h | 2 - arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 - arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 ----- arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 -
Quoted 9 lines
arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - arch/arm/mach-s3c64xx/watchdog-reset.h | 16 ----- arch/arm/plat-samsung/Kconfig | 6 -- arch/arm/plat-samsung/Makefile | 1 - arch/arm/plat-samsung/watchdog-reset.c | 93 ------------------------- 18 files changed, 5 insertions(+), 158 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/watchdog-reset.c
Thanks for the patch! Please see my comments inline.
Quoted 29 lines
arch/arm/mach-s3c64xx/Kconfig +2
-1@@ -18,9 +18,10 @@ menuconfig ARCH_S3C64XX select PM_GENERIC_DOMAINS if PM select S3C_DEV_NAND if ATAGS select S3C_GPIO_TRACK if ATAGS + select S3C2410_WATCHDOG select SAMSUNG_ATAGS if ATAGS select SAMSUNG_WAKEMASK if PM - select SAMSUNG_WDT_RESET + select WATCHDOG help Samsung S3C64XX series based systemsarch/arm/mach-s3c64xx/common.c +0
-1@@ -50,7 +50,6 @@#include "common.h" #include "irq-uart.h" -#include "watchdog-reset.h" /* External clock frequency */ static unsigned long xtal_f__ro_after_init =12000000 ;
arch/arm/mach-s3c64xx/common.c void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) · line 236
Quoted 7 lines
arch/arm/mach-s3c64xx/common.c +3
-1@@ -232,10 +231,11 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)/* * FIXME: there is no better place to put this at the moment * (s3c64xx_clk_init needs ioremap and must happen before init_time -* samsung_wdt_reset_init needs clocks) +* samsung_wdt_reset_init needs clocks). However +* samsung_wdt_reset_init() was removed in favor of watchdog driver +* so this should be revised.
This leaves the comment referring to an inexistent function.
I wonder if this being here is actually a problem at all. It's legacy code and probably there isn't much value in reshuffling it further. Rather than that, we would probably want to make sure that everything migrated to DT and just drop the board files.
Quoted 8 lines
arch/arm/mach-s3c64xx/common.c +0
-1*/ s3c64xx_clk_init (NULL , xtal_f, xusbxti_f,soc_is_s3c6400 (),S3C_VA_SYS ); -samsung_wdt_reset_init (S3C_VA_WATCHDOG );printk (KERN_DEBUG "%s: initialising interrupts\n" , __func__);@@ -429,12 +429,3 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ;
arch/arm/mach-s3c64xx/common.c static int __init s3c64xx_init_irq_eint(void) · line 439
Quoted 10 lines
arch/arm/mach-s3c64xx/common.c +0
-8}arch_initcall (s3c64xx_init_irq_eint); - -void s3c64xx_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );
Does this remove the soft reboot capability? I'm not sure how much of a problem that would be, though.
[snip]
Quoted 18 lines
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +0
-3@@ -12,7 +12,6 @@#include <mach/map.h> #include "common.h" -#include "watchdog-reset.h" /* * IO mapping for shared system controller IP. @@ -39,20 +38,6 @@ static void __init s3c64xx_dt_map_io(void)panic ("SoC is not S3C64xx!" ); } -static void __init s3c64xx_dt_init_machine (void ) -{
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c static void __init s3c64xx_dt_map_io(void) · line 53
Quoted 10 lines
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +0
-10-samsung_wdt_reset_of_init (); -} - -static void s3c64xx_dt_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );
Ditto.
Best regards,
Tomasz
Re: [PATCH 5/7] ARM: samsung: Kill useless HAVE_S3C2410_WATCHDOG
In reply to Guenter Roeck2020年7月29日(水) 19:02 Guenter Roeck <[email protected]>:
Quoted 14 lines · Krzysztof Kozlowski
Quoted 11 lines
A separate
KconfigoptionHAVE_S3C2410_WATCHDOGfor Samsung SoCs does not have sense, because:
1. All ARMv7 and ARMv8 Samsung SoCs have watchdog,
2. All architecture Kconfigs were selecting it (if WATCHDOG framework is chosen),
3.HAVE_S3C2410_WATCHDOGis doing nothing except being a dependency of actual Samsung SoC watchdog driver, which is enabled manually by specific defconfigs.
HAVE_S3C2410_WATCHDOGcan be safely removed.
Quoted 9 lines
That is not really correct.
HAVE_S3C2410_WATCHDOGis used to ensure that users can only enableS3C2410_WATCHDOGif the watchdog actually exists in a system. With this change, it can be enabled for all architectures and platforms.NACK.
Guenter
I'd side with Guenter on this. We better not flood users' screens with options that are not relevant to their hardware.
An alternative here could be making CONFIG_S3C2410_WATCHDOG depend on a general symbol for Samsung SoC support if there is such, but then, are we 100% sure that all the Samsung SoCs would actually have exactly this watchdog? If a new one shows up, one would have to bring back this HAVE_S3C2410_WATCHDOG symbol.
Best regards,
Tomasz
Quoted 102 lines
Quoted 102 lines
Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/Kconfig | 1 - arch/arm/mach-exynos/Kconfig | 1 - arch/arm/mach-s3c64xx/Kconfig | 2 -- arch/arm/mach-s5pv210/Kconfig | 1 - arch/arm64/Kconfig.platforms | 1 - drivers/watchdog/Kconfig | 8 -------- 6 files changed, 14 deletions(-)arch/arm/Kconfig +0
-1@@ -504,7 +504,6 @@ config ARCH_S3C24XX select GPIOLIB select GENERIC_IRQ_MULTI_HANDLER select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_IO_H select SAMSUNG_ATAGSarch/arm/mach-exynos/Kconfig +0
-1@@ -24,7 +24,6 @@ menuconfig ARCH_EXYNOS select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5 select HAVE_ARM_SCU if SMP select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOSarch/arm/mach-s3c64xx/Kconfig +0
-2@@ -13,7 +13,6 @@ menuconfig ARCH_S3C64XX select GPIO_SAMSUNG if ATAGS select GPIOLIB select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_TCM select PLAT_SAMSUNG select PM_GENERIC_DOMAINS if PM@@ -165,7 +164,6 @@ config MACH_SMDK6410 bool "SMDK6410" depends on ATAGS select CPU_S3C6410 - select HAVE_S3C2410_WATCHDOG if WATCHDOG select S3C64XX_SETUP_FB_24BPP select S3C64XX_SETUP_I2C1 select S3C64XX_SETUP_IDEarch/arm/mach-s5pv210/Kconfig +0
-1@@ -14,7 +14,6 @@ config ARCH_S5PV210 select COMMON_CLK_SAMSUNG select GPIOLIB select HAVE_S3C2410_I2C if I2C - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOSarch/arm64/Kconfig.platforms +0
-1@@ -80,7 +80,6 @@ config ARCH_EXYNOS select EXYNOS_CHIPID select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select EXYNOS_PMU - select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PINCTRL_EXYNOSdrivers/watchdog/Kconfig +0
-9@@ -478,16 +478,8 @@ config IXP4XX_WATCHDOG Say N if you are unsure. -config HAVE_S3C2410_WATCHDOG - bool - help - This will include watchdog timer support for Samsung SoCs. If - you want to include watchdog support for any machine, kindly - select this in the respective mach-XXXX/Kconfig file. - config S3C2410_WATCHDOG tristate "S3C2410 Watchdog" - depends on HAVE_S3C2410_WATCHDOG || COMPILE_TEST select WATCHDOG_CORE select MFD_SYSCON if ARCH_EXYNOS help --2.17.1
Re: [PATCH 1/7] clk: samsung: s3c64xx: Declare s3c64xx_clk_init() in shared header
In reply to Krzysztof Kozlowski2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 9 lines
The
s3c64xx_clk_init()is defined and used by clk-s3c64xx driver and also used in mach-s3c64xx machine code. Move the declaration to a header to fix W=1 build warning:
drivers/clk/samsung/clk-s3c64xx.c:391:13: warning: no previous prototype for 's3c64xx_clk_init' [-Wmissing-prototypes]
391 | void__inits3c64xx_clk_init(structdevice_node*np, unsigned longxtal_f,Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 9 lines
--- MAINTAINERS | 1 + arch/arm/mach-s3c64xx/common.c | 1 + arch/arm/mach-s3c64xx/common.h | 2 -- drivers/clk/samsung/clk-s3c64xx.c | 1 + include/linux/clk/samsung.h | 21 +++++++++++++++++++++ 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 include/linux/clk/samsung.h
Best regards,
Tomasz
Re: [PATCH 2/7] ARM: s3c64xx: Include header to fix -Wmissing-prototypes
In reply to Krzysztof Kozlowski2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 25 lines
Include the
spi-s3c64xx.hheader to fix W=1 build warning:arch/arm/mach-s3c64xx/setup-spi.c:11:5: warning: no previous prototype for 's3c64xx_spi0_cfg_gpio' [-Wmissing-prototypes] 11 | int s3c64xx_spi0_cfg_gpio(void)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c64xx/setup-spi.c | 1 + 1 file changed, 1 insertion(+)arch/arm/mach-s3c64xx/setup-spi.c +1
-1@@ -4,6 +4,7 @@// http://www.samsung.com/ #include <linux/gpio.h> +#include <linux/platform_data/spi-s3c64xx.h> #include <plat/gpio-cfg.h> #include <mach/gpio-samsung.h> --
Quoted 2 lines
2.17.1
Best regards,
Tomasz
Re: [PATCH 3/7] ARM: s3c: Remove plat-samsung/.../samsung-time.h
In reply to Krzysztof Kozlowski2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 50 lines
Remove the
arch/arm/plat-samsung/include/plat/samsung-time.hheader and move the contents tocommon.hheaders in mach-s3c24xx and mach-s3c64xx. The definition of declared functions is already incommon.cin mach directories, so it is logically to put declaration next to them.This is also one step further towards removal of plat-samsung directory and it fixes W=1 build warnings:
arch/arm/mach-s3c64xx/common.c:174:13: warning:
no previous prototype for 'samsung_set_timer_source' [-Wmissing-prototypes]
174 | void__initsamsung_set_timer_source(unsigned int event, unsigned int source)
arch/arm/mach-s3c64xx/common.c:180:13: warning:
no previous prototype for 'samsung_timer_init' [-Wmissing-prototypes]
180 | void__initsamsung_timer_init(void)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c24xx/common.h | 12 +++++++++ arch/arm/mach-s3c24xx/mach-amlm5900.c | 2 -- arch/arm/mach-s3c24xx/mach-anubis.c | 1 - arch/arm/mach-s3c24xx/mach-at2440evb.c | 1 - arch/arm/mach-s3c24xx/mach-bast.c | 1 - arch/arm/mach-s3c24xx/mach-gta02.c | 1 - arch/arm/mach-s3c24xx/mach-h1940.c | 1 - arch/arm/mach-s3c24xx/mach-jive.c | 1 - arch/arm/mach-s3c24xx/mach-mini2440.c | 1 - arch/arm/mach-s3c24xx/mach-n30.c | 1 - arch/arm/mach-s3c24xx/mach-nexcoder.c | 1 - arch/arm/mach-s3c24xx/mach-osiris.c | 1 - arch/arm/mach-s3c24xx/mach-otom.c | 1 - arch/arm/mach-s3c24xx/mach-qt2410.c | 1 - arch/arm/mach-s3c24xx/mach-rx1950.c | 1 - arch/arm/mach-s3c24xx/mach-rx3715.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2410.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2413.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2416.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2440.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2443.c | 1 - arch/arm/mach-s3c24xx/mach-tct_hammer.c | 1 - arch/arm/mach-s3c24xx/mach-vr1000.c | 1 - arch/arm/mach-s3c24xx/mach-vstms.c | 1 - arch/arm/mach-s3c64xx/common.h | 13 ++++++++++ arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 -
Quoted 9 lines
arch/arm/mach-s3c64xx/mach-smartq.c | 1 - arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - .../plat-samsung/include/plat/samsung-time.h | 26 ------------------- 37 files changed, 25 insertions(+), 61 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/samsung-time.h
For the s3c64xx bits:
I suppose the next step would be renaming those functions to s3c24xx_* and s3c64xx_* to avoid naming collisions?
Best regards,
Tomasz
Krzysztof Kozlowski
maintainerRe: [PATCH 3/7] ARM: s3c: Remove plat-samsung/.../samsung-time.h
Quoted 61 lines · Tomasz Figa
2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 50 lines
Remove the
arch/arm/plat-samsung/include/plat/samsung-time.hheader and move the contents tocommon.hheaders in mach-s3c24xx and mach-s3c64xx. The definition of declared functions is already incommon.cin mach directories, so it is logically to put declaration next to them.This is also one step further towards removal of plat-samsung directory and it fixes W=1 build warnings:
arch/arm/mach-s3c64xx/common.c:174:13: warning:
no previous prototype for 'samsung_set_timer_source' [-Wmissing-prototypes]
174 | void__initsamsung_set_timer_source(unsigned int event, unsigned int source)
arch/arm/mach-s3c64xx/common.c:180:13: warning:
no previous prototype for 'samsung_timer_init' [-Wmissing-prototypes]
180 | void__initsamsung_timer_init(void)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c24xx/common.h | 12 +++++++++ arch/arm/mach-s3c24xx/mach-amlm5900.c | 2 -- arch/arm/mach-s3c24xx/mach-anubis.c | 1 - arch/arm/mach-s3c24xx/mach-at2440evb.c | 1 - arch/arm/mach-s3c24xx/mach-bast.c | 1 - arch/arm/mach-s3c24xx/mach-gta02.c | 1 - arch/arm/mach-s3c24xx/mach-h1940.c | 1 - arch/arm/mach-s3c24xx/mach-jive.c | 1 - arch/arm/mach-s3c24xx/mach-mini2440.c | 1 - arch/arm/mach-s3c24xx/mach-n30.c | 1 - arch/arm/mach-s3c24xx/mach-nexcoder.c | 1 - arch/arm/mach-s3c24xx/mach-osiris.c | 1 - arch/arm/mach-s3c24xx/mach-otom.c | 1 - arch/arm/mach-s3c24xx/mach-qt2410.c | 1 - arch/arm/mach-s3c24xx/mach-rx1950.c | 1 - arch/arm/mach-s3c24xx/mach-rx3715.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2410.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2413.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2416.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2440.c | 1 - arch/arm/mach-s3c24xx/mach-smdk2443.c | 1 - arch/arm/mach-s3c24xx/mach-tct_hammer.c | 1 - arch/arm/mach-s3c24xx/mach-vr1000.c | 1 - arch/arm/mach-s3c24xx/mach-vstms.c | 1 - arch/arm/mach-s3c64xx/common.h | 13 ++++++++++ arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 -Quoted 9 lines
arch/arm/mach-s3c64xx/mach-smartq.c | 1 - arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - .../plat-samsung/include/plat/samsung-time.h | 26 ------------------- 37 files changed, 25 insertions(+), 61 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/samsung-time.h
Quoted 6 lines
For the s3c64xx bits:
Reviewed-by Tomasz Figa <[email protected]>I suppose the next step would be renaming those functions to s3c24xx_* and s3c64xx_* to avoid naming collisions?
That's a good point. I will send a follow up patch. Thanks!
Best regards,
Krzysztof
Krzysztof Kozlowski
maintainerRe: [PATCH 5/7] ARM: samsung: Kill useless HAVE_S3C2410_WATCHDOG
In reply to Tomasz FigaQuoted 25 lines · Tomasz Figa
2020年7月29日(水) 19:02 Guenter Roeck <[email protected]>:
Quoted 14 lines · Krzysztof Kozlowski
Quoted 11 lines
A separate
KconfigoptionHAVE_S3C2410_WATCHDOGfor Samsung SoCs does not have sense, because:
1. All ARMv7 and ARMv8 Samsung SoCs have watchdog,
2. All architecture Kconfigs were selecting it (if WATCHDOG framework is chosen),
3.HAVE_S3C2410_WATCHDOGis doing nothing except being a dependency of actual Samsung SoC watchdog driver, which is enabled manually by specific defconfigs.
HAVE_S3C2410_WATCHDOGcan be safely removed.Quoted 9 lines
That is not really correct.
HAVE_S3C2410_WATCHDOGis used to ensure that users can only enableS3C2410_WATCHDOGif the watchdog actually exists in a system. With this change, it can be enabled for all architectures and platforms.NACK.
Guenter
Quoted 8 lines
I'd side with Guenter on this. We better not flood users' screens with options that are not relevant to their hardware.
An alternative here could be making
CONFIG_S3C2410_WATCHDOGdepend on a general symbol for Samsung SoC support if there is such, but then, are we 100% sure that all the Samsung SoCs would actually have exactly this watchdog? If a new one shows up, one would have to bring back thisHAVE_S3C2410_WATCHDOGsymbol.
Ah, good points. Indeed for all of such SoC drivers we usually just depend on architecture to limit the choices on other architectures. In this case it would be:
depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 || COMPILE_TEST
I admit it is pretty long, but we already use this pattern. In shorter version (less ARCH*) for all drivers, in full version also in:drivers/iio/adc/Kconfigdrivers/gpu/drm/exynos/Kconfig
Have in mind that in general we follow the first approach and only three drivers have still the HAVE_xxx option (also HAVE_S3C2410_I2C and HAVE_S3C_RTC).
I can update therefore the "depends" while removing the HAVE_S3C2410_WATCHDOG option or just keep it.
Best regards,
Krzysztof
Krzysztof Kozlowski
maintainerRe: [PATCH 6/7] ARM: s3c64xx: Switch to generic watchdog driver reset
In reply to Tomasz FigaQuoted 73 lines · Tomasz Figa
Hi Krzysztof,
2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 32 lines
Similarly to commit
f6361c6b3880("ARM: S3C24XX: remove separate restart code"), the platform watchdog reset code can be removed in favor of a generic watchdog driver which already handles reset.This allows removal of a bunch of machine code and fixes also W=1 compile warnings:
arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes]
29 | voidsamsung_wdt_reset(void)
| ^~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes]
69 | void__initsamsung_wdt_reset_of_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes]
89 | void__initsamsung_wdt_reset_init(void __iomem *base)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c64xx/Kconfig | 3 +- arch/arm/mach-s3c64xx/common.c | 15 +--- arch/arm/mach-s3c64xx/common.h | 2 - arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 - arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 ----- arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 -Quoted 9 lines
arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - arch/arm/mach-s3c64xx/watchdog-reset.h | 16 ----- arch/arm/plat-samsung/Kconfig | 6 -- arch/arm/plat-samsung/Makefile | 1 - arch/arm/plat-samsung/watchdog-reset.c | 93 ------------------------- 18 files changed, 5 insertions(+), 158 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/watchdog-reset.cThanks for the patch! Please see my comments inline.
Quoted 26 lines
arch/arm/mach-s3c64xx/Kconfig +2
-1@@ -18,9 +18,10 @@ menuconfig ARCH_S3C64XX select PM_GENERIC_DOMAINS if PM select S3C_DEV_NAND if ATAGS select S3C_GPIO_TRACK if ATAGS + select S3C2410_WATCHDOG select SAMSUNG_ATAGS if ATAGS select SAMSUNG_WAKEMASK if PM - select SAMSUNG_WDT_RESET + select WATCHDOG help Samsung S3C64XX series based systemsarch/arm/mach-s3c64xx/common.c +0
-1@@ -50,7 +50,6 @@#include "common.h" #include "irq-uart.h" -#include "watchdog-reset.h"
Quoted 12 lines
arch/arm/mach-s3c64xx/common.c void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) · line 236
Quoted 10 lines
arch/arm/mach-s3c64xx/common.c +3
-1/* External clock frequency */ static unsigned long xtal_f__ro_after_init =12000000 ;@@ -232,10 +231,11 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)/* * FIXME: there is no better place to put this at the moment * (s3c64xx_clk_init needs ioremap and must happen before init_time -* samsung_wdt_reset_init needs clocks) +* samsung_wdt_reset_init needs clocks). However +* samsung_wdt_reset_init() was removed in favor of watchdog driver +* so this should be revised. This leaves the comment referring to an inexistent function.
Yes, I left it as a reference/reason. Although might be quite confusing now...
Quoted 5 lines
I wonder if this being here is actually a problem at all. It's legacy code and probably there isn't much value in reshuffling it further. Rather than that, we would probably want to make sure that everything migrated to DT and just drop the board files.
Maybe let's remove the FIXME and leave the clock init. Since all these times no one fixed the FIXME, so now with limited hardware access I do not expect any movements here.
Quoted 7 lines
Quoted 7 lines
arch/arm/mach-s3c64xx/common.c +0
-1*/ s3c64xx_clk_init (NULL , xtal_f, xusbxti_f,soc_is_s3c6400 (),S3C_VA_SYS ); -samsung_wdt_reset_init (S3C_VA_WATCHDOG );printk (KERN_DEBUG "%s: initialising interrupts\n" , __func__);
Quoted 15 lines
arch/arm/mach-s3c64xx/common.c static int __init s3c64xx_init_irq_eint(void) · line 439
Quoted 12 lines
arch/arm/mach-s3c64xx/common.c +0
-8@@ -429,12 +429,3 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); - -void s3c64xx_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );Does this remove the soft reboot capability? I'm not sure how much of a problem that would be, though.
1. No one cared about it in f6361c6b3880 :)
2. Exynos does not have it
3. Does soft_restart really work? It would be worth to keep it if more or less it was working.
Best regards,
Krzysztof
Quoted 35 lines
[snip]
Quoted 18 lines
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +0
-3@@ -12,7 +12,6 @@#include <mach/map.h> #include "common.h" -#include "watchdog-reset.h" /* * IO mapping for shared system controller IP. @@ -39,20 +38,6 @@ static void __init s3c64xx_dt_map_io(void)panic ("SoC is not S3C64xx!" ); } -static void __init s3c64xx_dt_init_machine (void ) -{arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c static void __init s3c64xx_dt_map_io(void) · line 53
Quoted 10 lines
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +0
-10-samsung_wdt_reset_of_init (); -} - -static void s3c64xx_dt_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );Ditto.
Best regards,
Tomasz
Krzysztof Kozlowski
maintainerRe: [PATCH 6/7] ARM: s3c64xx: Switch to generic watchdog driver reset
Quoted 123 lines · Krzysztof Kozlowski
Quoted 73 lines · Tomasz Figa
Hi Krzysztof,
2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 32 lines
Similarly to commit
f6361c6b3880("ARM: S3C24XX: remove separate restart code"), the platform watchdog reset code can be removed in favor of a generic watchdog driver which already handles reset.This allows removal of a bunch of machine code and fixes also W=1 compile warnings:
arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes]
29 | voidsamsung_wdt_reset(void)
| ^~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes]
69 | void__initsamsung_wdt_reset_of_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes]
89 | void__initsamsung_wdt_reset_init(void __iomem *base)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c64xx/Kconfig | 3 +- arch/arm/mach-s3c64xx/common.c | 15 +--- arch/arm/mach-s3c64xx/common.h | 2 - arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 - arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 ----- arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 -Quoted 9 lines
arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - arch/arm/mach-s3c64xx/watchdog-reset.h | 16 ----- arch/arm/plat-samsung/Kconfig | 6 -- arch/arm/plat-samsung/Makefile | 1 - arch/arm/plat-samsung/watchdog-reset.c | 93 ------------------------- 18 files changed, 5 insertions(+), 158 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/watchdog-reset.cThanks for the patch! Please see my comments inline.
Quoted 26 lines
arch/arm/mach-s3c64xx/Kconfig +2
-1@@ -18,9 +18,10 @@ menuconfig ARCH_S3C64XX select PM_GENERIC_DOMAINS if PM select S3C_DEV_NAND if ATAGS select S3C_GPIO_TRACK if ATAGS + select S3C2410_WATCHDOG select SAMSUNG_ATAGS if ATAGS select SAMSUNG_WAKEMASK if PM - select SAMSUNG_WDT_RESET + select WATCHDOG help Samsung S3C64XX series based systemsarch/arm/mach-s3c64xx/common.c +0
-1@@ -50,7 +50,6 @@#include "common.h" #include "irq-uart.h" -#include "watchdog-reset.h" Quoted 12 lines
arch/arm/mach-s3c64xx/common.c void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) · line 236
Quoted 10 lines
arch/arm/mach-s3c64xx/common.c +3
-1/* External clock frequency */ static unsigned long xtal_f__ro_after_init =12000000 ;@@ -232,10 +231,11 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)/* * FIXME: there is no better place to put this at the moment * (s3c64xx_clk_init needs ioremap and must happen before init_time -* samsung_wdt_reset_init needs clocks) +* samsung_wdt_reset_init needs clocks). However +* samsung_wdt_reset_init() was removed in favor of watchdog driver +* so this should be revised. This leaves the comment referring to an inexistent function.
Yes, I left it as a reference/reason. Although might be quite confusing now...
Quoted 5 lines
I wonder if this being here is actually a problem at all. It's legacy code and probably there isn't much value in reshuffling it further. Rather than that, we would probably want to make sure that everything migrated to DT and just drop the board files.
Maybe let's remove the FIXME and leave the clock init. Since all these times no one fixed the FIXME, so now with limited hardware access I do not expect any movements here.
Quoted 7 lines
Quoted 7 lines
arch/arm/mach-s3c64xx/common.c +0
-1*/ s3c64xx_clk_init (NULL , xtal_f, xusbxti_f,soc_is_s3c6400 (),S3C_VA_SYS ); -samsung_wdt_reset_init (S3C_VA_WATCHDOG );printk (KERN_DEBUG "%s: initialising interrupts\n" , __func__);Quoted 15 lines
arch/arm/mach-s3c64xx/common.c static int __init s3c64xx_init_irq_eint(void) · line 439
Quoted 12 lines
arch/arm/mach-s3c64xx/common.c +0
-8@@ -429,12 +429,3 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); - -void s3c64xx_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );Does this remove the soft reboot capability? I'm not sure how much of a problem that would be, though.
Quoted 4 lines
1. No one cared about it in
f6361c6b3880:)
2. Exynos does not have it
3. Doessoft_restartreally work? It would be worth to keep it if more or less it was working.
... and one more reason:
4. Look how much code I removed:
5 insertions(+), 158 deletions(-)
Isn't it nice? :)
Best regards,
Krzysztof
Stephen Boyd
maintainerRe: [PATCH 1/7] clk: samsung: s3c64xx: Declare s3c64xx_clk_init() in shared header
In reply to Krzysztof KozlowskiQuoting Krzysztof Kozlowski (2020-07-29 09:09:36)
Quoted 6 lines
include/linux/clk/samsung.h new file +0
-0
include/linux/clk/samsung.h line 10
Quoted 10 lines
include/linux/clk/samsung.h new file +10
-0@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2020 Krzysztof Kozlowski <[email protected]> +*/ + +#ifndef __LINUX_CLK_SAMSUNG_H_ +#define __LINUX_CLK_SAMSUNG_H_ + +#ifdef CONFIG_ARCH_S3C64XX +void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
Don't use __init in header files. It doesn't do anything.
include/linux/clk/samsung.h line 14
Quoted 4 lines
include/linux/clk/samsung.h new file +4
-0+ unsigned long xusbxti_f, bool s3c6400, + void __iomem *base); +#else +static inline void __init s3c64xx_clk_init(struct device_node *np,
Forward declare struct device_node;
include/linux/clk/samsung.h line 18
Quoted 4 lines
include/linux/clk/samsung.h new file +4
-0+unsigned long xtal_f, + unsigned long xusbxti_f, + bool s3c6400, + void __iomem *base) { }
Include <linux/compiler.h> (or compiler_types.h) for __iomem define please.
Quoted 3 lines
include/linux/clk/samsung.h new file +3
-0+#endif /* CONFIG_ARCH_S3C64XX */ + +#endif /* __LINUX_CLK_SAMSUNG_H_ */
Quoted 6 lines · Krzysztof Kozlowski
Hi,
I tried to cleanup few warnings in S3C machine code which lead to finding some bigger issues.
Quoted 6 lines
Patches touch mostly the ARM Samsung machine code except patch #1 (clk) and #5 (watchdog). They are independent from each other, except some conflicting lines.
The last three patches would welcome some testing... as I did not perform such (lack of S3C hardware).
I have an older series that I mean to repost. Please have a look at the s3c-multiplatform branch ofgit://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git
The patches in there need to be rebased on a newer kernel, which should be easy, but they will conflict with your work. If there is anything in there you can easily pick up into your series, please do so.
Arnd
Krzysztof Kozlowski
maintainerQuoted 14 lines · Arnd Bergmann
Quoted 6 lines · Krzysztof Kozlowski
Hi,
I tried to cleanup few warnings in S3C machine code which lead to finding some bigger issues.
Quoted 6 lines
Patches touch mostly the ARM Samsung machine code except patch #1 (clk) and #5 (watchdog). They are independent from each other, except some conflicting lines.
The last three patches would welcome some testing... as I did not perform such (lack of S3C hardware).
Quoted 8 lines
I have an older series that I mean to repost. Please have a look at the s3c-multiplatform branch of
git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground.gitThe patches in there need to be rebased on a newer kernel, which should be easy, but they will conflict with your work. If there is anything in there you can easily pick up into your series, please do so.
Indeed now I remember you were doing it some time ago but a follow up never happened. I can take a look and either cherry pick or even take over the series.
Best regards,
Krzysztof
Krzysztof Kozlowski
maintainerRe: [PATCH 1/7] clk: samsung: s3c64xx: Declare s3c64xx_clk_init() in shared header
In reply to Stephen BoydQuoted 27 lines · Stephen Boyd
Quoting Krzysztof Kozlowski (2020-07-29 09:09:36)
Quoted 6 lines
include/linux/clk/samsung.h new file +0
-0include/linux/clk/samsung.h line 10
Quoted 10 lines
include/linux/clk/samsung.h new file +10
-0@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2020 Krzysztof Kozlowski <[email protected]> +*/ + +#ifndef __LINUX_CLK_SAMSUNG_H_ +#define __LINUX_CLK_SAMSUNG_H_ + +#ifdef CONFIG_ARCH_S3C64XX +void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,Don't use
__initin header files. It doesn't do anything.include/linux/clk/samsung.h line 14
Quoted 4 lines
include/linux/clk/samsung.h new file +4
-0+ unsigned long xusbxti_f, bool s3c6400, + void __iomem *base); +#else +static inline void __init s3c64xx_clk_init(struct device_node *np,Forward declare struct
device_node;
Quoted 7 lines
include/linux/clk/samsung.h line 18
Quoted 4 lines
include/linux/clk/samsung.h new file +4
-0+unsigned long xtal_f, + unsigned long xusbxti_f, + bool s3c6400, + void __iomem *base) { }Include <
linux/compiler.h> (orcompiler_types.h) for__iomemdefine please.
Thanks for the feedback. I'll send v2.
Best regards,
Krzysztof
Tomasz Figa
Reviewed-byRe: [PATCH 6/7] ARM: s3c64xx: Switch to generic watchdog driver reset
In reply to Krzysztof Kozlowski2020年7月29日(水) 21:15 Krzysztof Kozlowski <[email protected]>:
Quoted 92 lines · Tomasz Figa
Quoted 73 lines
Hi Krzysztof,
2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 32 lines
Similarly to commit
f6361c6b3880("ARM: S3C24XX: remove separate restart code"), the platform watchdog reset code can be removed in favor of a generic watchdog driver which already handles reset.This allows removal of a bunch of machine code and fixes also W=1 compile warnings:
arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes]
29 | voidsamsung_wdt_reset(void)
| ^~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes]
69 | void__initsamsung_wdt_reset_of_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes]
89 | void__initsamsung_wdt_reset_init(void __iomem *base)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c64xx/Kconfig | 3 +- arch/arm/mach-s3c64xx/common.c | 15 +--- arch/arm/mach-s3c64xx/common.h | 2 - arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 - arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 ----- arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 -Quoted 9 lines
arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - arch/arm/mach-s3c64xx/watchdog-reset.h | 16 ----- arch/arm/plat-samsung/Kconfig | 6 -- arch/arm/plat-samsung/Makefile | 1 - arch/arm/plat-samsung/watchdog-reset.c | 93 ------------------------- 18 files changed, 5 insertions(+), 158 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/watchdog-reset.cThanks for the patch! Please see my comments inline.
Quoted 26 lines
arch/arm/mach-s3c64xx/Kconfig +2
-1@@ -18,9 +18,10 @@ menuconfig ARCH_S3C64XX select PM_GENERIC_DOMAINS if PM select S3C_DEV_NAND if ATAGS select S3C_GPIO_TRACK if ATAGS + select S3C2410_WATCHDOG select SAMSUNG_ATAGS if ATAGS select SAMSUNG_WAKEMASK if PM - select SAMSUNG_WDT_RESET + select WATCHDOG help Samsung S3C64XX series based systemsarch/arm/mach-s3c64xx/common.c +0
-1@@ -50,7 +50,6 @@#include "common.h" #include "irq-uart.h" -#include "watchdog-reset.h" Quoted 12 lines
arch/arm/mach-s3c64xx/common.c void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) · line 236
Quoted 10 lines
arch/arm/mach-s3c64xx/common.c +3
-1/* External clock frequency */ static unsigned long xtal_f__ro_after_init =12000000 ;@@ -232,10 +231,11 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)/* * FIXME: there is no better place to put this at the moment * (s3c64xx_clk_init needs ioremap and must happen before init_time -* samsung_wdt_reset_init needs clocks) +* samsung_wdt_reset_init needs clocks). However +* samsung_wdt_reset_init() was removed in favor of watchdog driver +* so this should be revised. This leaves the comment referring to an inexistent function.
Yes, I left it as a reference/reason. Although might be quite confusing now...
Quoted 1 line
Quoted 9 lines
Quoted 4 lines
I wonder if this being here is actually a problem at all. It's legacy code and probably there isn't much value in reshuffling it further. Rather than that, we would probably want to make sure that everything migrated to DT and just drop the board files.
Maybe let's remove the FIXME and leave the clock init. Since all these times no one fixed the FIXME, so now with limited hardware access I do not expect any movements here.
I think that would be fairly uncontroversial at this point.
Quoted 23 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/mach-s3c64xx/common.c +0
-1*/ s3c64xx_clk_init (NULL , xtal_f, xusbxti_f,soc_is_s3c6400 (),S3C_VA_SYS ); -samsung_wdt_reset_init (S3C_VA_WATCHDOG );printk (KERN_DEBUG "%s: initialising interrupts\n" , __func__);Quoted 15 lines
arch/arm/mach-s3c64xx/common.c static int __init s3c64xx_init_irq_eint(void) · line 439
Quoted 12 lines
arch/arm/mach-s3c64xx/common.c +0
-8@@ -429,12 +429,3 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); - -void s3c64xx_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );Does this remove the soft reboot capability? I'm not sure how much of a problem that would be, though.
Quoted 1 line
1. No one cared about it in
f6361c6b3880:)
That was a different SoC family, though.
Quoted 3 lines
2. Exynos does not have it
3. Doessoft_restartreally work? It would be worth to keep it if more or less it was working.
Anyway, I guess there is no way to know other than just removing it. It can be always brought back if it turns out that someone needs it. Please just mention that in the commit message.
With that addressed:
Quoted 39 lines
Best regards,
KrzysztofQuoted 35 lines
[snip]
Quoted 18 lines
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +0
-3@@ -12,7 +12,6 @@#include <mach/map.h> #include "common.h" -#include "watchdog-reset.h" /* * IO mapping for shared system controller IP. @@ -39,20 +38,6 @@ static void __init s3c64xx_dt_map_io(void)panic ("SoC is not S3C64xx!" ); } -static void __init s3c64xx_dt_init_machine (void ) -{arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c static void __init s3c64xx_dt_map_io(void) · line 53
Quoted 10 lines
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +0
-10-samsung_wdt_reset_of_init (); -} - -static void s3c64xx_dt_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );Ditto.
Best regards,
Tomasz
Krzysztof Kozlowski
maintainerRe: [PATCH 6/7] ARM: s3c64xx: Switch to generic watchdog driver reset
Quoted 136 lines · Tomasz Figa
2020年7月29日(水) 21:15 Krzysztof Kozlowski <[email protected]>:
Quoted 92 lines · Tomasz Figa
Quoted 73 lines
Hi Krzysztof,
2020年7月29日(水) 18:11 Krzysztof Kozlowski <[email protected]>:
Quoted 32 lines
Similarly to commit
f6361c6b3880("ARM: S3C24XX: remove separate restart code"), the platform watchdog reset code can be removed in favor of a generic watchdog driver which already handles reset.This allows removal of a bunch of machine code and fixes also W=1 compile warnings:
arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes]
29 | voidsamsung_wdt_reset(void)
| ^~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes]
69 | void__initsamsung_wdt_reset_of_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes]
89 | void__initsamsung_wdt_reset_init(void __iomem *base)Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/arm/mach-s3c64xx/Kconfig | 3 +- arch/arm/mach-s3c64xx/common.c | 15 +--- arch/arm/mach-s3c64xx/common.h | 2 - arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - arch/arm/mach-s3c64xx/mach-hmt.c | 1 - arch/arm/mach-s3c64xx/mach-mini6410.c | 1 - arch/arm/mach-s3c64xx/mach-ncp.c | 1 - arch/arm/mach-s3c64xx/mach-real6410.c | 1 - arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 ----- arch/arm/mach-s3c64xx/mach-smartq5.c | 1 - arch/arm/mach-s3c64xx/mach-smartq7.c | 1 - arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 -Quoted 9 lines
arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - arch/arm/mach-s3c64xx/watchdog-reset.h | 16 ----- arch/arm/plat-samsung/Kconfig | 6 -- arch/arm/plat-samsung/Makefile | 1 - arch/arm/plat-samsung/watchdog-reset.c | 93 ------------------------- 18 files changed, 5 insertions(+), 158 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/watchdog-reset.cThanks for the patch! Please see my comments inline.
Quoted 26 lines
arch/arm/mach-s3c64xx/Kconfig +2
-1@@ -18,9 +18,10 @@ menuconfig ARCH_S3C64XX select PM_GENERIC_DOMAINS if PM select S3C_DEV_NAND if ATAGS select S3C_GPIO_TRACK if ATAGS + select S3C2410_WATCHDOG select SAMSUNG_ATAGS if ATAGS select SAMSUNG_WAKEMASK if PM - select SAMSUNG_WDT_RESET + select WATCHDOG help Samsung S3C64XX series based systemsarch/arm/mach-s3c64xx/common.c +0
-1@@ -50,7 +50,6 @@#include "common.h" #include "irq-uart.h" -#include "watchdog-reset.h" Quoted 12 lines
arch/arm/mach-s3c64xx/common.c void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) · line 236
Quoted 10 lines
arch/arm/mach-s3c64xx/common.c +3
-1/* External clock frequency */ static unsigned long xtal_f__ro_after_init =12000000 ;@@ -232,10 +231,11 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)/* * FIXME: there is no better place to put this at the moment * (s3c64xx_clk_init needs ioremap and must happen before init_time -* samsung_wdt_reset_init needs clocks) +* samsung_wdt_reset_init needs clocks). However +* samsung_wdt_reset_init() was removed in favor of watchdog driver +* so this should be revised. This leaves the comment referring to an inexistent function.
Yes, I left it as a reference/reason. Although might be quite confusing now...
Quoted 1 line
Quoted 9 lines
Quoted 4 lines
I wonder if this being here is actually a problem at all. It's legacy code and probably there isn't much value in reshuffling it further. Rather than that, we would probably want to make sure that everything migrated to DT and just drop the board files.
Maybe let's remove the FIXME and leave the clock init. Since all these times no one fixed the FIXME, so now with limited hardware access I do not expect any movements here.
I think that would be fairly uncontroversial at this point.
Quoted 23 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/mach-s3c64xx/common.c +0
-1*/ s3c64xx_clk_init (NULL , xtal_f, xusbxti_f,soc_is_s3c6400 (),S3C_VA_SYS ); -samsung_wdt_reset_init (S3C_VA_WATCHDOG );printk (KERN_DEBUG "%s: initialising interrupts\n" , __func__);Quoted 15 lines
arch/arm/mach-s3c64xx/common.c static int __init s3c64xx_init_irq_eint(void) · line 439
Quoted 12 lines
arch/arm/mach-s3c64xx/common.c +0
-8@@ -429,12 +429,3 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); - -void s3c64xx_restart (enum reboot_mode mode,const char *cmd) -{ -if (mode !=REBOOT_SOFT ) -samsung_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 );Does this remove the soft reboot capability? I'm not sure how much of a problem that would be, though.
Quoted 1 line
1. No one cared about it in
f6361c6b3880:)That was a different SoC family, though.
Quoted 3 lines
2. Exynos does not have it
3. Doessoft_restartreally work? It would be worth to keep it if more or less it was working.
Quoted 7 lines
Anyway, I guess there is no way to know other than just removing it. It can be always brought back if it turns out that someone needs it. Please just mention that in the commit message.
With that addressed:
Reviewed-by Tomasz Figa <[email protected]>
Sure, I'll do it. Thanks for review.
Best regards,
Krzysztof