From patchwork Sun Jan 8 19:50:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Vandeputte X-Patchwork-Id: 712420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3txTST5df3z9s2Q for ; Mon, 9 Jan 2017 06:51:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ncentric.com header.i=@ncentric.com header.b="PIOm3fjf"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cQJV9-0003Sk-BK; Sun, 08 Jan 2017 19:51:35 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cQJV4-0003FY-F4 for lede-dev@lists.infradead.org; Sun, 08 Jan 2017 19:51:33 +0000 Received: by mail-wm0-x22e.google.com with SMTP id k184so94580861wme.1 for ; Sun, 08 Jan 2017 11:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com; s=google; h=from:to:cc:subject:date:message-id; bh=z0YWMXnHwdD0aLdQncn0DDRTRyOaSDakwmETbsRdfv4=; b=PIOm3fjfNwJ+HozLdxiM8JQvKTeb9qKigk6H9NeNKls1jLyByVRmdn3sFPibP7lGhv CG/Zs6kXNazZ/rlvF/tnhkA8RGsQest8ZKR3WxXcHsc7z7YEhkxXs9M4scb2g8mD21nt qP03DNBWfAhSKM+iH/dIArMBhpVstAje1piFA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z0YWMXnHwdD0aLdQncn0DDRTRyOaSDakwmETbsRdfv4=; b=YsCrgDTzEUZ812kcyv49G16lXuNa54nVRyjSpoBN/NuN1SAP12Zuhy8Pu7opGDZ0HK m0Rmz7fBvRpLEkqMiLiOfk1/8wV47YRIUusgUd3WAGrY8SQvu7leLhMlVW0yLcR9c7SX dSyJqa5qy14DuFHCZcrcT+sfBHvCG8m/pDkkFHABjRI654GJv33aIJDzBQpT76mnm6rL vOaJEZDd3tKWzlCMUpn5/f6VYdxuE9u9QzL0pFgG6DO9i/v5/82S+notEGmqe3oa7UhO UJ5E4+XbhrMOdPXCHFot7fXB5IplS5jxg+MEhHnX04N2ouUqK01WsWuK1D1+iO1dRux6 ztMA== X-Gm-Message-State: AIkVDXI7Zw/zMDP9x24alOWODPLvfRXTM1B3jUyraiWL7uyWWTA1K54wZlPoOl4LFWm/V5vW X-Received: by 10.223.171.13 with SMTP id q13mr9208229wrc.146.1483905066894; Sun, 08 Jan 2017 11:51:06 -0800 (PST) Received: from kvdp-VirtualBox.telenet.be (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id v3sm120617399wjp.13.2017.01.08.11.51.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Jan 2017 11:51:06 -0800 (PST) From: Koen Vandeputte To: lede-dev@lists.infradead.org Date: Sun, 8 Jan 2017 20:50:58 +0100 Message-Id: <1483905058-3382-1-git-send-email-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170108_115130_895522_84AB9318 X-CRM114-Status: GOOD ( 14.32 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [LEDE-DEV] [PATCH] cns3xxx - Remove deprecated mpcore watchdog device X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tharvey@gateworks.com, Koen Vandeputte , nbd@nbd.name MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- .../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 - ---- -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) {