From patchwork Thu Feb 2 20:12:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 9553215 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B9E060405 for ; Thu, 2 Feb 2017 20:14:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C0E82849B for ; Thu, 2 Feb 2017 20:14:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F2792849D; Thu, 2 Feb 2017 20:14:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 047262849B for ; Thu, 2 Feb 2017 20:13:59 +0000 (UTC) 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 1cZNlU-0004ql-9W; Thu, 02 Feb 2017 20:13:56 +0000 Received: from mail-pf0-f195.google.com ([209.85.192.195]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cZNlP-0004pK-0N for linux-arm-kernel@lists.infradead.org; Thu, 02 Feb 2017 20:13:53 +0000 Received: by mail-pf0-f195.google.com with SMTP id 19so2164125pfo.3 for ; Thu, 02 Feb 2017 12:13:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dax/okxoaUs2bv/HUq75usC+xXBLHPI03RnC/xaAGrE=; b=j4hCAXFFixp0482C0L+WiO+6YHBa/wUBfamMPlRuCkBOCRQEzs4gl4vD/cHe0fWSN/ SHFlNDueTsb8RCyxhR9lcs4a+gbTemihJQBe7SBz50k/f49VYjxBtLebDGh+8v5gNuy0 91uUqduyQ65TeiMuwbd/++SaaG5y4DcSSfaAChaNoKIo8rNw8PqhH5ARPpFsBfNiHzXN hrUIzCrseieATIuPWoGqaPHzJRryoUvy0oikeZ0tG4nYNHGDPjkZ137KPTB1YTi14eVX oMeimvFMjl2G9/Z8voVXq4+Mo31Erj5AqIJotgK5PHdyCwFJfYf1kOkS5VXlZ/2kwZ0o J0+w== 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=dax/okxoaUs2bv/HUq75usC+xXBLHPI03RnC/xaAGrE=; b=PWfEhN9yMJ/aF5V+Quu2YFHeRQ6CJEp4+5cfwfaGNrbhIrG4RUIL+xIDEUVZl3yz1V Ka1k4L/D+mLrxzmEM3EuJ9aXMj3HBBaHgFANlDb3xU4eKq79YxGPbHY5Kdk2OGA8HV2T D3WiOLTVAuaqiRXrxgmayUBr7Ydw1BIro4is2xtV4SUBKd7f8//+sc9/waqusAjh1puw PJ4Jxj04TRWRUnkLNRfmnWjTTFXsaTvVOHoS/3k+/JFmyaj+/qCNfczc2hm4wsLnT51O d8c532ghErBn3HTU/XuANzQdNr7TOnhSQl9xmf97e5g+hphlsE5xCuO4apfddq/KZiwk hmkg== X-Gm-Message-State: AIkVDXIqbhTG9H4dQ2KrBu9iu1ArSZDdAa3/sERbljEkvXNokNp1DNgPHdT/Dko1iLEELQ== X-Received: by 10.98.57.154 with SMTP id u26mr13064897pfj.136.1486066349731; Thu, 02 Feb 2017 12:12:29 -0800 (PST) Received: from fainelli-desktop.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id t6sm61313876pgt.8.2017.02.02.12.12.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Feb 2017 12:12:29 -0800 (PST) From: Florian Fainelli To: arm@kernel.org Subject: [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing Date: Thu, 2 Feb 2017 12:12:26 -0800 Message-Id: <20170202201226.29631-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170202_121351_085269_2042C6F5 X-CRM114-Status: GOOD ( 10.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Ryan Mallon , arnd@arndb.de, khilman@kernel.org, Russell King , open list , Hartley Sweeten , olof@lixom.net, "moderated list:ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The TS-72xx/73xx boards have a CPLD watchdog which is configured to reset the board after 8 seconds, if the kernel is large enough that this takes about this time to decompress the kernel, we will encounter a spurious reboot. Do not pull ts72xx.h, but instead locally define what we need to disable the watchdog. Signed-off-by: Florian Fainelli Reviewed-by: H Hartley Sweeten --- Arnd, this is a recent, so you can queue this up, thanks! arch/arm/mach-ep93xx/include/mach/uncompress.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h index 03c42e5400d2..b0cf2de77f81 100644 --- a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h @@ -10,6 +10,7 @@ */ #include +#include static unsigned char __raw_readb(unsigned int ptr) { @@ -75,8 +76,19 @@ static void ethernet_reset(void) ; } +#define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000 +#define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000 +#define TS72XX_WDT_FEED_VAL 0x05 + +static void __maybe_unused ts72xx_watchdog_disable(void) +{ + __raw_writeb(TS72XX_WDT_FEED_VAL, TS72XX_WDT_FEED_PHYS_BASE); + __raw_writeb(0, TS72XX_WDT_CONTROL_PHYS_BASE); +} static void arch_decomp_setup(void) { + if (machine_is_ts72xx()) + ts72xx_watchdog_disable(); ethernet_reset(); }