Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2294109imm; Mon, 28 May 2018 05:33:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKx6r6vFNTw7yvGFEm3gpuKolkc35aFR+/Ya43V/ddfUCMhEoiqbglaZNt3f9gfMsQJGrnU X-Received: by 2002:a17:902:bd93:: with SMTP id q19-v6mr4951512pls.342.1527510818216; Mon, 28 May 2018 05:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527510818; cv=none; d=google.com; s=arc-20160816; b=Jcjs9WA2sTRLopoGbKZfvKuBq4D0WxK6/BkolQNv9Yj5kes2SiVqCE7pIq1oD+iuGx vkAjjvrvC7ovFzspZiHWp+sX1Rtw/gfQS0v96l2EjuP/ClRyNfS/YkhWLz8Xj4IhLTY3 AYfODOEb48ZVeXpXZizqQF4ZoU4fNPcXMVWMVD/tJ7NcNk17eu/7CCfjKjVsZ7ifKpl3 9tnLo9Tzfbi04CSECc6cQjRWP7uR4mlj/fjAHv4DlgzTO5uYj0S+CmQJRlhBG14uJQp6 0HwPpVTqooGb0d3Xp8NHB6RrVvVJ0rLuAow52O6etk7+25+kG6TkKMfu27bKs9wycJLq CboQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=2pmEGT5v+MbYN526sMbiC8APM/xjqY7EWEt0ieZ2l2E=; b=LqkkwOU3SAcLeZdU5H/9a4LKU2P14U0OVKNK+LKSOIH5wCnpkJUhZthM5o/0y9Ko20 ZiZb003dYAM3zxjectK7fvDknBsLnssV7bF62iy7TPMvoNdRp5zBAPxbzm7Ec9Mivjt5 wjTvP8U1ovyohGgPGK5NxF+qMhSyCNAw/zR4ycVoXg6TCLuwGHB4L1SPLjwh2lbYdKRH Sm3hbVeJdk9txXT7uj5ghlH4f1Lh1NQksEuFN9hG1zW/WS6wr6SnHHw4Hj4vGvQnQD/g 9Imcg0VVtXMBm8kLYULiEUajTI7Xy2GNW7njF1SxtZsQTohCSIkLem8gTn1gcR8+sU4d 5RoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ag7w5Cjm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3-v6si28884024pff.43.2018.05.28.05.33.23; Mon, 28 May 2018 05:33:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ag7w5Cjm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938927AbeE1Mbk (ORCPT + 99 others); Mon, 28 May 2018 08:31:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164702AbeE1LAI (ORCPT ); Mon, 28 May 2018 07:00:08 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB9892088E; Mon, 28 May 2018 11:00:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505208; bh=/CE320vwFOl3NaT7ILpiAFHXN3g/5HSv0UorlTRxVZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ag7w5Cjm3wPDugYuiiuPO0zyuqwyUyAyPvN8hce89CGbauBSp5meyY3ielJI1Wp2D GiEQeC3pwyu8J+A/VQ5xEH4gXbwH4k+8ahF6bBb3+umS9+BwBNl6K2XalsM15zom8c nWtyn9KaXyuYt278ZrD5y4Y31sIRDqvcpA34U3Fg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Milton Miller , Eddie James , Guenter Roeck , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 4.14 413/496] watchdog: aspeed: Fix translation of reset mode to ctrl register Date: Mon, 28 May 2018 12:03:18 +0200 Message-Id: <20180528100337.156184491@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Milton Miller [ Upstream commit d2fc8db691bf3197d43b2afb553311a9bf257bff ] Assert RESET_SYSTEM bit for any reset and set MODE field from reset type. The watchdog control register has a RESET_SYSTEM bit that is really closer to activate a reset, and RESET_SYSTEM_MODE field that chooses how much to reset. Before this patch, a node without these optional property would do a SOC reset, but a node with properties requesting a cpu or SOC reset would do nothing and a node requesting a system reset would do a SOC reset. Fixes: b7f0b8ad25f3 ("drivers/watchdog: ASPEED reference dev tree properties for config") Signed-off-by: Milton Miller Signed-off-by: Eddie James Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/watchdog/aspeed_wdt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -234,11 +234,14 @@ static int aspeed_wdt_probe(struct platf wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC | WDT_CTRL_RESET_SYSTEM; } else { if (!strcmp(reset_type, "cpu")) - wdt->ctrl |= WDT_CTRL_RESET_MODE_ARM_CPU; + wdt->ctrl |= WDT_CTRL_RESET_MODE_ARM_CPU | + WDT_CTRL_RESET_SYSTEM; else if (!strcmp(reset_type, "soc")) - wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC; + wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC | + WDT_CTRL_RESET_SYSTEM; else if (!strcmp(reset_type, "system")) - wdt->ctrl |= WDT_CTRL_RESET_SYSTEM; + wdt->ctrl |= WDT_CTRL_RESET_MODE_FULL_CHIP | + WDT_CTRL_RESET_SYSTEM; else if (strcmp(reset_type, "none")) return -EINVAL; }