Skip to contentSkip to conversation

Add Watchdog support for Samsung SMDK6410, S5P6440 and S5Pv210

PATCH New Kukjin Kim 3 participants 10 messages May 20, 2010

Subsystems (4)
lore
Share & tools
lore

Kukjin Kim

author
#0 lore raw

cover Add Watchdog support for Samsung SMDK6410, S5P6440 and S5Pv210

This patches add Watchdog support for SMDK6410, S5P6440 and S5PV210.

- Add HAVE_S3C2410_WATCHDOG for selecting watchgog driver compile in each machine
- Add S3C_DEV_WDT for watchdog device definitions
- Fix freeing memory part when memory region could not be allocated s3c2410_wdt
- Add machine dependent part for watchdog support

[PATCH 1/5] ARM: SAMSUNG: Move WDT device definitions in plat-samsung
[PATCH 2/5] [WATCHDOG] s3c2410_wdt - Avoid freeing memory, if memory region could not be allocated [PATCH 3/5] ARM: SMDK6410: Add Watchdog support for SMDK6410
[PATCH 4/5] ARM: S5P6440: Add Watchdog support for S5P6440
[PATCH 5/5] ARM: S5PV210: Add Watchdog support for S5PV210

author
#1 lore raw

PATCH 1/5 ARM: SAMSUNG: Move WDT device definitions in plat-samsung

From: Banajit Goswami <[email protected]>

This patch moves the definitions of watchdog timer device from plat-s3c24xx to plat-samsung. This will enable all Samsung S3C and S5P series SoC's to use common WDT device definition.

And adds HAVE_S3C2410_WATCHDOG for selecting in each machine without modifying Kconfig in drivers directory.

---
 arch/arm/Kconfig                         |    1 +
 arch/arm/mach-s3c2410/include/mach/map.h |    1 +
 arch/arm/plat-s3c24xx/devs.c             |   26 -------------------
 arch/arm/plat-samsung/Kconfig            |    6 ++++
 arch/arm/plat-samsung/Makefile           |    1 +
 arch/arm/plat-samsung/dev-wdt.c          |   40 ++++++++++++++++++++++++++++++
 drivers/watchdog/Kconfig                 |   10 ++++---
 7 files changed, 55 insertions(+), 30 deletions(-)
 create mode 100644 arch/arm/plat-samsung/dev-wdt.c
arch/arm/Kconfig +1 -0
index 3f8718f..8e2bb6b 100644
@@ -651,6 +651,7 @@ config ARCH_S3C2410
 	select GENERIC_GPIO
 	select ARCH_HAS_CPUFREQ
 	select HAVE_CLK
+	select HAVE_S3C2410_WATCHDOG
 	help
 	  Samsung S3C2410X CPU based systems, such as the Simtec Electronics
 	  BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
arch/arm/mach-s3c2410/include/mach/map.h +1 -0
index f07d680..16fbc3c 100644
@@ -111,6 +111,7 @@
 #define S3C_PA_USBHOST	S3C2410_PA_USBHOST
 #define S3C_PA_HSMMC0	    S3C2443_PA_HSMMC
 #define S3C_PA_HSMMC1	    S3C2416_PA_HSMMC0
+#define S3C_PA_WDT	    S3C2410_PA_WATCHDOG
 #define S3C_PA_NAND	    S3C24XX_PA_NAND
 
 #endif /* __ASM_ARCH_MAP_H */
arch/arm/plat-s3c24xx/devs.c +0 -26
index 5858373..452e184 100644
@@ -234,32 +234,6 @@ void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
 	}
 }
 
-
-/* Watchdog */
-
-static struct resource s3c_wdt_resource[] = {
-	[0] = {
-		.start = S3C24XX_PA_WATCHDOG,
-		.end   = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1,
-		.flags = IORESOURCE_MEM,
-	},
-	[1] = {
-		.start = IRQ_WDT,
-		.end   = IRQ_WDT,
-		.flags = IORESOURCE_IRQ,
-	}
-
-};
-
-struct platform_device s3c_device_wdt = {
-	.name		  = "s3c2410-wdt",
-	.id		  = -1,
-	.num_resources	  = ARRAY_SIZE(s3c_wdt_resource),
-	.resource	  = s3c_wdt_resource,
-};
-
-EXPORT_SYMBOL(s3c_device_wdt);
-
 /* IIS */
 
 static struct resource s3c_iis_resource[] = {
arch/arm/plat-samsung/Kconfig +6 -0
index 287e6f7..72dae49 100644
@@ -185,6 +185,12 @@ config S3C_DEV_USB_HSOTG
 	help
 	  Compile in platform device definition for USB high-speed OtG
 
+config S3C_DEV_WDT
+	bool
+	default y if ARCH_S3C2410
+	help
+	  Complie in platform device definition for Watchdog Timer
+
 config S3C_DEV_NAND
 	bool
 	help
arch/arm/plat-samsung/Makefile +1 -0
index 0ad820a..0a92369 100644
@@ -40,6 +40,7 @@ obj-$(CONFIG_S3C_DEV_FB)	+= dev-fb.o
 obj-y				+= dev-uart.o
 obj-$(CONFIG_S3C_DEV_USB_HOST)	+= dev-usb.o
 obj-$(CONFIG_S3C_DEV_USB_HSOTG)	+= dev-usb-hsotg.o
+obj-$(CONFIG_S3C_DEV_WDT)	+= dev-wdt.o
 obj-$(CONFIG_S3C_DEV_NAND)	+= dev-nand.o
 
 # DMA support
arch/arm/plat-samsung/dev-wdt.c new file +40 -0
new file mode 100644
index 0000000..5efca87
@@ -0,0 +1,40 @@
+/* linux/arch/arm/plat-samsung/dev-wdt.c
+ *
+ * Copyright (c) 2004 Simtec Electronics
+ *	Ben Dooks <[email protected]>
+ *
+ * S3C series device definition for the watchdog timer
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+
+static struct resource s3c_wdt_resource[] = {
+	[0] = {
+		.start	= S3C_PA_WDT,
+		.end	= S3C_PA_WDT + SZ_1M - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= IRQ_WDT,
+		.end	= IRQ_WDT,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device s3c_device_wdt = {
+	.name		= "s3c2410-wdt",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(s3c_wdt_resource),
+	.resource	= s3c_wdt_resource,
+};
+EXPORT_SYMBOL(s3c_device_wdt);
drivers/watchdog/Kconfig +6 -4
index 0bf5020..d52118f 100644
@@ -145,13 +145,15 @@ config KS8695_WATCHDOG
 	  Watchdog timer embedded into KS8695 processor. This will reboot your
 	  system when the timeout is reached.
 
+config HAVE_S3C2410_WATCHDOG
+	bool
+
 config S3C2410_WATCHDOG
 	tristate "S3C2410 Watchdog"
-	depends on ARCH_S3C2410
+	depends on HAVE_S3C2410_WATCHDOG
 	help
-	  Watchdog timer block in the Samsung S3C2410 chips. This will
-	  reboot the system when the timer expires with the watchdog
-	  enabled.
+	  Watchdog timer block in the Samsung SoCs. This will reboot
+	  the system when the timer expires with the watchdog enabled.
 
 	  The driver is limited by the speed of the system's PCLK
 	  signal, so with reasonably fast systems (PCLK around 50-66MHz)
Signature · 1 line
1.6.2.5
#2 lore raw

PATCH 1/5 ARM: SAMSUNG: Move WDT device definitions in plat-samsung

Quoted 11 lines · Kukjin Kim

From: Banajit Goswami <[email protected]>

This patch moves the definitions of watchdog timer device from plat-s3c24xx to plat-samsung. This will enable all Samsung S3C and S5P series SoC's to use common WDT device definition.

And adds HAVE_S3C2410_WATCHDOG for selecting in each machine without modifying Kconfig in drivers directory.

Quoted 8 lines
---
 arch/arm/Kconfig                         |    1 +
 arch/arm/mach-s3c2410/include/mach/map.h |    1 +
 arch/arm/plat-s3c24xx/devs.c             |   26 -------------------
 arch/arm/plat-samsung/Kconfig            |    6 ++++
 arch/arm/plat-samsung/Makefile           |    1 +
 arch/arm/plat-samsung/dev-wdt.c          |   40 ++++++++++++++++++++++++++++++
 drivers/watchdog/Kconfig                 |   10 ++++---

actually, please split into drivers/watchdog/Kconfig and the rest. it would make it easier and avoid a nasty crioss-tree merge.

Quoted 144 lines
 7 files changed, 55 insertions(+), 30 deletions(-)
 create mode 100644 arch/arm/plat-samsung/dev-wdt.c
arch/arm/Kconfig +1 -0
index 3f8718f..8e2bb6b 100644
@@ -651,6 +651,7 @@ config ARCH_S3C2410
 	select GENERIC_GPIO
 	select ARCH_HAS_CPUFREQ
 	select HAVE_CLK
+	select HAVE_S3C2410_WATCHDOG
 	help
 	  Samsung S3C2410X CPU based systems, such as the Simtec Electronics
 	  BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
arch/arm/mach-s3c2410/include/mach/map.h +1 -0
index f07d680..16fbc3c 100644
@@ -111,6 +111,7 @@
 #define S3C_PA_USBHOST	S3C2410_PA_USBHOST
 #define S3C_PA_HSMMC0	    S3C2443_PA_HSMMC
 #define S3C_PA_HSMMC1	    S3C2416_PA_HSMMC0
+#define S3C_PA_WDT	    S3C2410_PA_WATCHDOG
 #define S3C_PA_NAND	    S3C24XX_PA_NAND
 
 #endif /* __ASM_ARCH_MAP_H */
arch/arm/plat-s3c24xx/devs.c +0 -26
index 5858373..452e184 100644
@@ -234,32 +234,6 @@ void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
 	}
 }
 
-
-/* Watchdog */
-
-static struct resource s3c_wdt_resource[] = {
-	[0] = {
-		.start = S3C24XX_PA_WATCHDOG,
-		.end   = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1,
-		.flags = IORESOURCE_MEM,
-	},
-	[1] = {
-		.start = IRQ_WDT,
-		.end   = IRQ_WDT,
-		.flags = IORESOURCE_IRQ,
-	}
-
-};
-
-struct platform_device s3c_device_wdt = {
-	.name		  = "s3c2410-wdt",
-	.id		  = -1,
-	.num_resources	  = ARRAY_SIZE(s3c_wdt_resource),
-	.resource	  = s3c_wdt_resource,
-};
-
-EXPORT_SYMBOL(s3c_device_wdt);
-
 /* IIS */
 
 static struct resource s3c_iis_resource[] = {
arch/arm/plat-samsung/Kconfig +6 -0
index 287e6f7..72dae49 100644
@@ -185,6 +185,12 @@ config S3C_DEV_USB_HSOTG
 	help
 	  Compile in platform device definition for USB high-speed OtG
 
+config S3C_DEV_WDT
+	bool
+	default y if ARCH_S3C2410
+	help
+	  Complie in platform device definition for Watchdog Timer
+
 config S3C_DEV_NAND
 	bool
 	help
arch/arm/plat-samsung/Makefile +1 -0
index 0ad820a..0a92369 100644
@@ -40,6 +40,7 @@ obj-$(CONFIG_S3C_DEV_FB)	+= dev-fb.o
 obj-y				+= dev-uart.o
 obj-$(CONFIG_S3C_DEV_USB_HOST)	+= dev-usb.o
 obj-$(CONFIG_S3C_DEV_USB_HSOTG)	+= dev-usb-hsotg.o
+obj-$(CONFIG_S3C_DEV_WDT)	+= dev-wdt.o
 obj-$(CONFIG_S3C_DEV_NAND)	+= dev-nand.o
 
 # DMA support
arch/arm/plat-samsung/dev-wdt.c new file +40 -0
new file mode 100644
index 0000000..5efca87
@@ -0,0 +1,40 @@
+/* linux/arch/arm/plat-samsung/dev-wdt.c
+ *
+ * Copyright (c) 2004 Simtec Electronics
+ *	Ben Dooks <[email protected]>
+ *
+ * S3C series device definition for the watchdog timer
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+
+static struct resource s3c_wdt_resource[] = {
+	[0] = {
+		.start	= S3C_PA_WDT,
+		.end	= S3C_PA_WDT + SZ_1M - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= IRQ_WDT,
+		.end	= IRQ_WDT,
+		.flags	= IORESOURCE_IRQ,
+	}
+};
+
+struct platform_device s3c_device_wdt = {
+	.name		= "s3c2410-wdt",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(s3c_wdt_resource),
+	.resource	= s3c_wdt_resource,
+};
+EXPORT_SYMBOL(s3c_device_wdt);
drivers/watchdog/Kconfig +0 -0
index 0bf5020..d52118f 100644

drivers/watchdog/Kconfig config KS8695_WATCHDOG · line 150

Quoted 6 lines
drivers/watchdog/Kconfig +3 -0
@@ -145,13 +145,15 @@ config KS8695_WATCHDOG
 	  Watchdog timer embedded into KS8695 processor. This will reboot your
 	  system when the timeout is reached.
 
+config HAVE_S3C2410_WATCHDOG
+	bool
+

a basic helptext here would be nice.

drivers/watchdog/Kconfig config KS8695_WATCHDOG · line 153

Quoted 4 lines
drivers/watchdog/Kconfig +1 -1
 config S3C2410_WATCHDOG
 	tristate "S3C2410 Watchdog"
-	depends on ARCH_S3C2410
+	depends on HAVE_S3C2410_WATCHDOG

can we either leave ARCH_S3C2410 in the depends on line for the moment so if we fail to merge part of the arch/arm updates then this still keeps working.

Quoted 12 lines
drivers/watchdog/Kconfig +2 -3
 	help
-	  Watchdog timer block in the Samsung S3C2410 chips. This will
-	  reboot the system when the timer expires with the watchdog
-	  enabled.
+	  Watchdog timer block in the Samsung SoCs. This will reboot
+	  the system when the timer expires with the watchdog enabled.
 
 	  The driver is limited by the speed of the system's PCLK
 	  signal, so with reasonably fast systems (PCLK around 50-66MHz)
Signature · 1 line
1.6.2.5
Signature · 5 lines
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.
author
#3 lore raw

PATCH 2/5 s3c2410_wdt - Avoid freeing memory, if memory region could not be allocated

In reply to Kukjin Kim

From: Banajit Goswami <[email protected]>

In case the WDT device memory allocation fails, this patch modifies the driver such that, it does not try to free the memory on exit.

---
 drivers/watchdog/s3c2410_wdt.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/watchdog/s3c2410_wdt.c +1 -2
index e4cebef..d421258 100644
@@ -426,8 +426,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
 	wdt_mem = request_mem_region(res->start, size, pdev->name);
 	if (wdt_mem == NULL) {
 		dev_err(dev, "failed to get memory region\n");
-		ret = -ENOENT;
-		goto err_req;
+		return -ENOMEM;
 	}
 
 	wdt_base = ioremap(res->start, size);
Signature · 1 line
1.6.2.5
#4 lore raw

PATCH 2/5 s3c2410_wdt - Avoid freeing memory, if memory region could not be allocated

Hello.

Quoted 3 lines · Kukjin Kim

From: Banajit Goswami <[email protected]>

In case the WDT device memory allocation fails, this patch modifies the

This is not memory allocation.

Quoted 13 lines

driver such that, it does not try to free the memory on exit.

---
 drivers/watchdog/s3c2410_wdt.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/watchdog/s3c2410_wdt.c +0 -0
index e4cebef..d421258 100644

drivers/watchdog/s3c2410_wdt.c static int __devinit s3c2410wdt_probe(struct platform_device *pdev) · line 429

Quoted 6 lines
drivers/watchdog/s3c2410_wdt.c +1 -2
@@ -426,8 +426,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
 	wdt_mem = request_mem_region(res->start, size, pdev->name);
 	if (wdt_mem == NULL) {
 		dev_err(dev, "failed to get memory region\n");
-		ret = -ENOENT;
-		goto err_req;
+		return -ENOMEM;

It should be EBUSY actually...

WBR, Sergei

author
#5 lore raw

PATCH 2/5 s3c2410_wdt - Avoid freeing memory, if memory region could not be allocated

Quoted 10 lines · Sergei Shtylyov

Hello.

Quoted 3 lines · Kukjin Kim

From: Banajit Goswami <[email protected]>

In case the WDT device memory allocation fails, this patch modifies the

This is not memory allocation.

Ok, will fix it.

Quoted 10 lines

Review

Quoted 10 lines

driver such that, it does not try to free the memory on exit.

---
 drivers/watchdog/s3c2410_wdt.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/watchdog/s3c2410_wdt.c

Quoted 5 lines

drivers/watchdog/s3c2410_wdt.c static int __devinit s3c2410wdt_probe(struct

Quoted 4 lines

index e4cebef..d421258 100644

drivers/watchdog/s3c2410_wdt.c +0 -0
@@ -426,8 +426,7 @@ static int __devinit s3c2410wdt_probe(struct

platform_device *pdev)

Quoted 8 lines

drivers/watchdog/s3c2410_wdt.c static int __devinit s3c2410wdt_probe(struct platform_device *pdev) · line 429

Quoted 6 lines
drivers/watchdog/s3c2410_wdt.c +1 -2
 	wdt_mem = request_mem_region(res->start, size, pdev->name);
 	if (wdt_mem == NULL) {
 		dev_err(dev, "failed to get memory region\n");
-		ret = -ENOENT;
-		goto err_req;
+		return -ENOMEM;

It should be EBUSY actually...

Ok, will fix it.

Quoted 3 lines

WBR, Sergei

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

author
#6 lore raw

PATCH 3/5 ARM: SMDK6410: Add Watchdog support for SMDK6410

In reply to Kukjin Kim

From: Banajit Goswami <[email protected]>

This patch adds support for Watchdog timer for Samsung S3C6410

---
 arch/arm/mach-s3c64xx/Kconfig            |    2 ++
 arch/arm/mach-s3c64xx/include/mach/map.h |    1 +
 arch/arm/mach-s3c64xx/mach-smdk6410.c    |    1 +
 3 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -0
index 959df38..c3822fb 100644
@@ -91,6 +91,8 @@ config MACH_SMDK6410
 	select S3C_DEV_FB
 	select S3C_DEV_USB_HOST
 	select S3C_DEV_USB_HSOTG
+	select S3C_DEV_WDT
+	select HAVE_S3C2410_WATCHDOG
 	select S3C64XX_SETUP_SDHCI
 	select S3C64XX_SETUP_I2C1
 	select S3C64XX_SETUP_FB_24BPP
arch/arm/mach-s3c64xx/include/mach/map.h +1 -0
index 801c1c0..ab06afd 100644
@@ -103,5 +103,6 @@
 #define S3C_PA_USBHOST		S3C64XX_PA_USBHOST
 #define S3C_PA_USB_HSOTG	S3C64XX_PA_USB_HSOTG
 #define S3C_VA_USB_HSPHY	S3C64XX_VA_USB_HSPHY
+#define S3C_PA_WDT		S3C64XX_PA_WATCHDOG
 
 #endif /* __ASM_ARCH_6400_MAP_H */
arch/arm/mach-s3c64xx/mach-smdk6410.c +1 -0
index 10cf64a..d10e26d 100644
@@ -264,6 +264,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
 	&smdk6410_lcd_powerdev,
 
 	&smdk6410_smsc911x,
+	&s3c_device_wdt,
 };
 
 #ifdef CONFIG_REGULATOR
Signature · 1 line
1.6.2.5
author
#7 lore raw

PATCH 4/5 ARM: S5P6440: Add Watchdog support for S5P6440

In reply to Kukjin Kim

From: Banajit Goswami <[email protected]>

This patch adds support for Watchdog timer for Samsung S5P6440.

---
 arch/arm/mach-s5p6440/Kconfig            |    2 ++
 arch/arm/mach-s5p6440/include/mach/map.h |    1 +
 arch/arm/mach-s5p6440/mach-smdk6440.c    |    1 +
 3 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-s5p6440/Kconfig +2 -0
index 4c29ff8..0a0eb5b 100644
@@ -15,6 +15,8 @@ config CPU_S5P6440
 config MACH_SMDK6440
 	bool "SMDK6440"
 	select CPU_S5P6440
+	select S3C_DEV_WDT
+	select HAVE_S3C2410_WATCHDOG
 	help
 	  Machine support for the Samsung SMDK6440
 
arch/arm/mach-s5p6440/include/mach/map.h +1 -0
index 8924e5a..c015de6 100644
@@ -64,5 +64,6 @@
 /* compatibiltiy defines. */
 #define S3C_PA_UART		S5P6440_PA_UART
 #define S3C_PA_IIC		S5P6440_PA_IIC0
+#define S3C_PA_WDT		S5P6440_PA_WDT
 
 #endif /* __ASM_ARCH_MAP_H */
arch/arm/mach-s5p6440/mach-smdk6440.c +1 -0
index 3ae88f2..ae50345 100644
@@ -84,6 +84,7 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
 };
 
 static struct platform_device *smdk6440_devices[] __initdata = {
+	&s3c_device_wdt,
 };
 
 static void __init smdk6440_map_io(void)
Signature · 1 line
1.6.2.5
author
#8 lore raw

PATCH 5/5 ARM: S5PV210: Add Watchdog support for S5PV210

In reply to Kukjin Kim

From: Banajit Goswami <[email protected]>

This patch adds support for Watchdog timer for Samsung S5PV210.

---
 arch/arm/mach-s5pv210/Kconfig            |    4 ++++
 arch/arm/mach-s5pv210/include/mach/map.h |    3 +++
 arch/arm/mach-s5pv210/mach-smdkc110.c    |    1 +
 arch/arm/mach-s5pv210/mach-smdkv210.c    |    1 +
 4 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/Kconfig +4 -0
index af33a1a..8931d8a 100644
@@ -24,6 +24,8 @@ config MACH_SMDKV210
 	bool "SMDKV210"
 	select CPU_S5PV210
 	select ARCH_SPARSEMEM_ENABLE
+	select S3C_DEV_WDT
+	select HAVE_S3C2410_WATCHDOG
 	help
 	  Machine support for Samsung SMDKV210
 
@@ -31,6 +33,8 @@ config MACH_SMDKC110
 	bool "SMDKC110"
 	select CPU_S5PV210
 	select ARCH_SPARSEMEM_ENABLE
+	select S3C_DEV_WDT
+	select HAVE_S3C2410_WATCHDOG
 	help
 	  Machine support for Samsung SMDKC110
 	  S5PC110(MCP) is one of package option of S5PV210
arch/arm/mach-s5pv210/include/mach/map.h +3 -0
index c22694c..c37f2c5 100644
@@ -32,6 +32,8 @@
 
 #define S5PV210_PA_SYSTIMER	(0xE2600000)
 
+#define S5PV210_PA_WATCHDOG	(0xE2700000)
+
 #define S5PV210_PA_UART		(0xE2900000)
 
 #define S5P_PA_UART0		(S5PV210_PA_UART + 0x0)
@@ -61,5 +63,6 @@
 /* compatibiltiy defines. */
 #define S3C_PA_UART		S5PV210_PA_UART
 #define S3C_PA_IIC		S5PV210_PA_IIC0
+#define S3C_PA_WDT		S5PV210_PA_WATCHDOG
 
 #endif /* __ASM_ARCH_MAP_H */
arch/arm/mach-s5pv210/mach-smdkc110.c +1 -0
index ab4869d..6af4ccf 100644
@@ -72,6 +72,7 @@ static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
 };
 
 static struct platform_device *smdkc110_devices[] __initdata = {
+	&s3c_device_wdt,
 };
 
 static void __init smdkc110_map_io(void)
arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
index a278832..8ea203d 100644
@@ -72,6 +72,7 @@ static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
 };
 
 static struct platform_device *smdkv210_devices[] __initdata = {
+	&s3c_device_wdt,
 };
 
 static void __init smdkv210_map_io(void)
Signature · 1 line
1.6.2.5
#9 lore raw

cover Add Watchdog support for Samsung SMDK6410, S5P6440 and S5Pv210

In reply to Kukjin Kim
Quoted 6 lines · Kukjin Kim

This patches add Watchdog support for SMDK6410, S5P6440 and S5PV210.

- Add HAVE_S3C2410_WATCHDOG for selecting watchgog driver compile in each machine
- Add S3C_DEV_WDT for watchdog device definitions
- Fix freeing memory part when memory region could not be allocated s3c2410_wdt
- Add machine dependent part for watchdog support

ok, the will look at merging the device side of this. Please orward the drivers/watchdog patches to the relevant maintainer with

Quoted 9 lines

[PATCH 1/5] ARM: SAMSUNG: Move WDT device definitions in plat-samsung
[PATCH 2/5] [WATCHDOG] s3c2410_wdt - Avoid freeing memory, if memory region could not be allocated [PATCH 3/5] ARM: SMDK6410: Add Watchdog support for SMDK6410
[PATCH 4/5] ARM: S5P6440: Add Watchdog support for S5P6440
[PATCH 5/5] ARM: S5PV210: Add Watchdog support for S5PV210
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.