[LEDE-DEV] [PATCH v2] cns3xxx: remove deprecated mpcore watchdog device

Koen Vandeputte koen.vandeputte at ncentric.com
Sun Jan 8 12:14:25 PST 2017


This code was exclusively used by the mpcore_wdt
driver which got removed from the kernel mid 2013.

https://www.spinics.net/lists/linux-watchdog/msg02724.html

Tested on Laguna GW2388

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 .../cns3xxx/base-files/lib/upgrade/platform.sh     |  2 +-
 .../cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c   | 21 --------
 .../cns3xxx/patches-4.4/020-watchdog_support.patch | 59 ----------------------
 .../cns3xxx/patches-4.4/095-gpio_support.patch     |  2 +-
 .../patches-4.4/097-l2x0_cmdline_disable.patch     |  2 +-
 5 files changed, 3 insertions(+), 83 deletions(-)
 delete mode 100644 target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch

diff --git a/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh b/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
index 4efa47d..0becdd2 100644
--- a/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
@@ -27,5 +27,5 @@ disable_watchdog() {
 	}
 }
 
-# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog unless kernel cmdline has a mpcore_wdt.nowayout=0
+# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog
 #append sysupgrade_pre_upgrade disable_watchdog
diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
index 4a59612..58a0a70 100644
--- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
+++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
@@ -628,25 +628,6 @@ static struct i2c_board_info __initdata laguna_i2c_devices[] = {
 };
 
 /*
- * Watchdog
- */
-
-static struct resource laguna_watchdog_resources[] = {
-	[0] = {
-		.start	= CNS3XXX_TC11MP_TWD_BASE + 0x100, // CPU0 watchdog
-		.end	= CNS3XXX_TC11MP_TWD_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device laguna_watchdog = {
-	.name		= "mpcore_wdt",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(laguna_watchdog_resources),
-	.resource	= laguna_watchdog_resources,
-};
-
-/*
  * GPS PPS
  */
 static struct pps_gpio_platform_data laguna_pps_data = {
@@ -816,8 +797,6 @@ static void __init laguna_init(void)
 				      cns3xxx_cpu_clock() * (1000000 / 8));
 	clk_register_clkdev(clk, "cpu", NULL);
 
-	platform_device_register(&laguna_watchdog);
-
 	platform_device_register(&laguna_i2c_controller);
 
 	/* Set I2C 0-3 drive strength to 21 mA */
diff --git a/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch b/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch
deleted file mode 100644
index 74ffcc3..0000000
--- a/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-1. Made the connection between CNS3xxx SOCs(ARCH_CNS3xxx) and MPcore watchdog
-   since the CNS3xxx SOCs have ARM11 MPcore CPU.
-2. Enable mpcore_watchdog option as module to default configuration at
-   arch/arm/configs/cns3420vb_defconfig.
-
-Signed-off-by: Tommy Lin <tommy.lin at caviumnetworks.com>
-
----
-arch/arm/Kconfig                     |    1 +
- arch/arm/configs/cns3420vb_defconfig |    2 ++
- arch/arm/mach-cns3xxx/cns3420vb.c    |   22 ++++++++++++++++++++++
- 3 files changed, 25 insertions(+), 0 deletions(-)
-
---- a/arch/arm/configs/cns3420vb_defconfig
-+++ b/arch/arm/configs/cns3420vb_defconfig
-@@ -56,6 +56,8 @@ CONFIG_LEGACY_PTY_COUNT=16
- # CONFIG_HW_RANDOM is not set
- # CONFIG_HWMON is not set
- # CONFIG_VGA_CONSOLE is not set
-+CONFIG_WATCHDOG=y
-+CONFIG_MPCORE_WATCHDOG=m
- # CONFIG_HID_SUPPORT is not set
- # CONFIG_USB_SUPPORT is not set
- CONFIG_MMC=y
---- a/arch/arm/mach-cns3xxx/cns3420vb.c
-+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -206,10 +206,32 @@ static struct platform_device cns3xxx_us
- 	},
- };
- 
-+/* Watchdog */
-+static struct resource cns3xxx_watchdog_resources[] = {
-+	[0] = {
-+		.start = CNS3XXX_TC11MP_TWD_BASE,
-+		.end   = CNS3XXX_TC11MP_TWD_BASE + PAGE_SIZE - 1,
-+		.flags = IORESOURCE_MEM,
-+	},
-+	[1] = {
-+		.start = IRQ_LOCALWDOG,
-+		.end   = IRQ_LOCALWDOG,
-+		.flags = IORESOURCE_IRQ,
-+	}
-+};
-+
-+static struct platform_device cns3xxx_watchdog_device = {
-+	.name		= "mpcore_wdt",
-+	.id		= -1,
-+	.num_resources	= ARRAY_SIZE(cns3xxx_watchdog_resources),
-+	.resource	= cns3xxx_watchdog_resources,
-+};
-+
- /*
-  * Initialization
-  */
- static struct platform_device *cns3420_pdevs[] __initdata = {
-+	&cns3xxx_watchdog_device,
- 	&cns3420_nor_pdev,
- 	&cns3xxx_usb_ehci_device,
- 	&cns3xxx_usb_ohci_device,
diff --git a/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch b/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
index 79a937a..cece982 100644
--- a/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
+++ b/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -245,6 +245,10 @@ static void __init cns3420_init(void)
+@@ -223,6 +223,10 @@ static void __init cns3420_init(void)
  
  	cns3xxx_ahci_init();
  	cns3xxx_sdhci_init();
diff --git a/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch b/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
index 25d3005..b4720b1 100644
--- a/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
+++ b/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
@@ -43,7 +43,7 @@
  
 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -239,8 +239,6 @@ static struct platform_device *cns3420_p
+@@ -217,8 +217,6 @@ static struct platform_device *cns3420_p
  
  static void __init cns3420_init(void)
  {
-- 
2.7.4




More information about the Lede-dev mailing list