From patchwork Thu May 21 23:14:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1295750 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=CnUCekKI; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Sln53cl8z9sSc for ; Fri, 22 May 2020 09:14:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B6999813D4; Fri, 22 May 2020 01:14:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1590102854; bh=UakBeoGGSiTEReyDimkcO7OCq4E28xGwnWfwawZIY/I=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=CnUCekKIQCzQVhzZKsJJ7tjdpanQyoawJIaBvwZooSksRwVRAAAT2VcA2zZiUhe/P /X5vS7NSo8S9wJG/VexgZUWBw6db1t7/5thy+eBo1/UQuuQwridWLlTnv+oa9DsdpX p36e9vVkgWLkC+OB724v5Jx7I9PJD+eMU7+OP2c4hAbCa58iHqTXNGtXwumiJxk2RF VbOFx5Lc6i4d6Zjl2mZtO+rfhfEYO85NpjiavXKTHo0NbsHLYc72Nb56YohIE1POVY P+lzLt2hwWFc0O2cskw1xR65urCn6m4oNHPVnN75ByvDIcWAwoW42wPn52NDW/3Oyq XcbmvN0k9S2jA== Received: by phobos.denx.de (Postfix, from userid 109) id 43B838179A; Fri, 22 May 2020 01:14:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B69FD813C6 for ; Fri, 22 May 2020 01:14:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49Slmx3zFfz1rs2p; Fri, 22 May 2020 01:14:09 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49Slmx3mS1z1qrhn; Fri, 22 May 2020 01:14:09 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id HCemzJCDtF9G; Fri, 22 May 2020 01:14:08 +0200 (CEST) X-Auth-Info: 3WDfGgPYMg/BtUYCFX+FrpsO12vXyj0XSTxSsv5W5jU= Received: from desktop.lan (ip-86-49-35-8.net.upcbroadband.cz [86.49.35.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 22 May 2020 01:14:08 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , "NXP i . MX U-Boot Team" , Peng Fan , Stefano Babic Subject: [PATCH] ARM: imx: soc: Add reset for non-DM case Date: Fri, 22 May 2020 01:14:06 +0200 Message-Id: <20200521231406.171674-1-marex@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This is another in series of patches which remove ad-hoc reset_cpu() hacks from board files. This one is for iMX7, so implement default reset_cpu() there to prevent it from showing up in board files. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: NXP i.MX U-Boot Team Cc: Peng Fan Cc: Stefano Babic --- arch/arm/mach-imx/mx7/soc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 798fe74a3d..e7c71dfe8e 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -419,3 +420,15 @@ void reset_misc(void) #endif } +#if !CONFIG_IS_ENABLED(SYSRESET) +void reset_cpu(ulong addr) +{ + struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; + + /* Clear WDA to trigger WDOG_B immediately */ + writew(SET_WCR_WT(1) | WCR_WDT | WCR_WDE | WCR_SRS, &wdog->wcr); + + while (1) + ; +} +#endif