From patchwork Mon May 6 14:17:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 1095852 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="rYdJKJNx"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44yPwG376fz9s7T for ; Tue, 7 May 2019 00:18:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F277FC21DAF; Mon, 6 May 2019 14:18:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BC2ECC21C27; Mon, 6 May 2019 14:18:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B4C52C21C27; Mon, 6 May 2019 14:18:00 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by lists.denx.de (Postfix) with ESMTPS id 57525C21BE5 for ; Mon, 6 May 2019 14:18:00 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id r7so17457811wrr.13 for ; Mon, 06 May 2019 07:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LXNDP1d9e/Spvjv0YNom5+WCwotXMmLuv8+jEd6zJYM=; b=rYdJKJNxYTBbXAOhOPACm1xS5SGW0j/FLlBHB63sPDceg64PkQ6EM6e+LSAiYSR1xx YnG02i+lQ8+YJR1Yjq2h4/DDhvaJ9iSFcJ536ohNtw/+2Z/7uPAufaumyNvxAlm4Bwaf BerHk9pFazn8mU1Fid6v/eon+5gsBL6LcG/4kF8t80L9O0FggxzedqGMdfbGx6IQW0QQ bxUwh45h6nPlrP9hELH/54+VwL5lOuRS6pgiL1LYSPch9/3ole9/8Es9SoGAepMbEukB DWoDRwjbsiuvfVpGOddOFWd5TbG5zZVXT2JNCYLhDWW0iPLqZ6v53be24OAK7HvouKcF ehtw== 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:mime-version :content-transfer-encoding; bh=LXNDP1d9e/Spvjv0YNom5+WCwotXMmLuv8+jEd6zJYM=; b=O0GbTc7hsHXQqAjvRzzZDscgyHw2gBC2Rmzdb7ftzmeZh+wDr9IEHthK0pRvBOuuYp Fgm1IxeKuNSMn1Piuv7+95tkp9Gluc0BOKAUWd6IxPUjkXB1W7WWcIEmdKApG7QsnBJl Vz8o/oa4UbtFi4AUWpfr4cd59arbaH+vnudct/kaZjiDGu+oGNISWrC+Viqw1IFt3Iqi gTKuIxznkF1R4Fi/hALq+FL1xMSyAN0knQ2hcIAQb/eg8A49WioBG72rfeLRPzQuEFZE hXe2facJeX3PoQeb5w1xT2dIBk5T/TIYaZpFmCxnXD0QUQkPYTDoR2ZA09QVnRo+RoeX OeXw== X-Gm-Message-State: APjAAAV26hCzF/EmBv+EnsFJGEOYK5fTI8SLjfUfB80O6E4pp+Yx9uNt xR1UNJFxKaspMaMhdSJODvmkBQ== X-Google-Smtp-Source: APXvYqxie3jk76MvojEhpGyEirY0OVm0HHG26AoU47sqOCEI52Jf55wga2ofp5XHdc6RraZ0QsVTZQ== X-Received: by 2002:a5d:6b46:: with SMTP id x6mr17486102wrw.313.1557152279841; Mon, 06 May 2019 07:17:59 -0700 (PDT) Received: from localhost.localdomain (aputeaux-684-1-23-204.w90-86.abo.wanadoo.fr. [90.86.248.204]) by smtp.gmail.com with ESMTPSA id c9sm7965428wrv.62.2019.05.06.07.17.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 May 2019 07:17:59 -0700 (PDT) From: Fabien Parent To: albert.u.boot@aribaud.net, ryder.lee@mediatek.com, weijie.gao@mediatek.com Date: Mon, 6 May 2019 16:17:56 +0200 Message-Id: <20190506141756.16228-1-fparent@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] ARM: mediatek: mt8516: use PSCI to reset the SoC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Instead of using the watchdog, let's use PSCI to perform the reset of the SoC. Signed-off-by: Fabien Parent --- arch/arm/mach-mediatek/mt8516/init.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c index 26a215a8b1..186f6c048a 100644 --- a/arch/arm/mach-mediatek/mt8516/init.c +++ b/arch/arm/mach-mediatek/mt8516/init.c @@ -14,14 +14,10 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; -#define WDOG_SWRST 0x10007014 -#define WDOG_SWRST_KEY 0x1209 - int dram_init(void) { int ret; @@ -87,10 +83,7 @@ int mtk_soc_early_init(void) void reset_cpu(ulong addr) { - while (1) { - writel(WDOG_SWRST_KEY, WDOG_SWRST); - mdelay(5); - } + psci_system_reset(); } int print_cpuinfo(void)