Received: by 10.223.185.111 with SMTP id b44csp796079wrg; Fri, 9 Mar 2018 13:59:44 -0800 (PST) X-Google-Smtp-Source: AG47ELsnngZR4MMjWTfzvGXEEVrP1btZX/Vvm6CnEVO5semxtn3Xjf+VNelyYLd2voco/kNQc8JY X-Received: by 10.99.149.87 with SMTP id t23mr25470506pgn.411.1520632784015; Fri, 09 Mar 2018 13:59:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520632783; cv=none; d=google.com; s=arc-20160816; b=Y3vbRuz3LGLBLnzro6tiPu2bcpMPf+PSjMVjagYbsWDc+17pnHt6OLrlvulgxWX9ZB jD3zbzD0OEu6ege99dyIR4cUoBss4BxF0Ihb3FaxvYG7MsUOUJV8KOXzHfycSi8gumU2 VppAzugZOl5l+Svw1+S4T50TjSFHUolXme6TKxPrireH1YGWhY6Z4y/SGT1DXzmjHY6k 5ZrDsXdB4ZeQGjH9zfYy0UjiWuuAQzvt90RxMMh5/O0HvStm95KW7zTWckM+nSMxxU1C rAR9ed/7S+I+NxgYi7l8oPXORl/ta+I+yc6F3aPGm3p88bgcBuYPVqUN7LpFxhO1qrMt 1x5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=61LbNi9uZTphejlqjqYNU46aqxo6xKVUB1cA+GXkJ4A=; b=EJxJOn5VMSjH9FMYmNT/vXk62RAp5PRIAQaTyrnIPodzphnOYqu+0dt/08lm3Oityp /Sr9GNqArNciMXPJVBO+9vexGDxpYmbavoKenzuWbzr6T7enY2R/5XkmgdM+z1kFPAWs J6T3hPqtOc3o0tGGX+uKbciZlVzO4pcINq7FkADfT659e5l8+5aT/Hie2qj7BS8+9MJu 4vM/R9/CB1wjL6CZU7Eeoa0FZ2efayshG+Lot0t2hNzQldVsXu3dhqoNKfThzmuxTqzW W4gbq/Dl3TZxmFn+89ARbfseWlwJ6o65E6hjb5IwINexQYU24O/YGafvhPQHCVbQYb/m fUFw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o63si1534705pfg.347.2018.03.09.13.59.29; Fri, 09 Mar 2018 13:59:43 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932633AbeCIV6e (ORCPT + 99 others); Fri, 9 Mar 2018 16:58:34 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36142 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932108AbeCIV6b (ORCPT ); Fri, 9 Mar 2018 16:58:31 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w29LsWIm074264 for ; Fri, 9 Mar 2018 16:58:31 -0500 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gm0q43xgu-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 09 Mar 2018 16:58:31 -0500 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Mar 2018 16:58:30 -0500 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 9 Mar 2018 16:58:27 -0500 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w29LwQGF46858328; Fri, 9 Mar 2018 21:58:26 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3870E12403D; Fri, 9 Mar 2018 18:00:39 -0500 (EST) Received: from talon7.ibm.com (unknown [9.41.241.240]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id A1888124035; Fri, 9 Mar 2018 18:00:38 -0500 (EST) From: Eddie James To: linux-watchdog@vger.kernel.org Cc: linux-kernel@vger.kernel.org, joel@jms.id.au, wim@linux-watchdog.org, linux@roeck-us.net, Milton Miller , Eddie James Subject: [PATCH 2/2] watchdog: aspeed: Allow configuring for alternate boot Date: Fri, 9 Mar 2018 15:58:20 -0600 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520632700-25800-1-git-send-email-eajames@linux.vnet.ibm.com> References: <1520632700-25800-1-git-send-email-eajames@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18030921-0048-0000-0000-00000247AED3 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008643; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01000701; UDB=6.00509032; IPR=6.00780031; MB=3.00019945; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-09 21:58:28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030921-0049-0000-0000-000044636508 Message-Id: <1520632700-25800-3-git-send-email-eajames@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-09_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803090259 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Milton Miller Allow the device tree to specify a watchdog to fallover to the alternate boot source. The aspeeed watchdog can set a latch directing flash chip select 0 to chip select 1, allowing boot from an alternate media if the watchdog is not reset in time. On the ast2400 bank 1 also goes to flash bank 1, while on the ast2500 the chip selects are swapped. Signed-off-by: Milton Miller Signed-off-by: Eddie James --- drivers/watchdog/aspeed_wdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index d1987d6..f41d246 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -46,6 +46,7 @@ struct aspeed_wdt_config { #define WDT_RELOAD_VALUE 0x04 #define WDT_RESTART 0x08 #define WDT_CTRL 0x0C +#define WDT_CTRL_BOOT_SECONDARY BIT(7) #define WDT_CTRL_RESET_MODE_SOC (0x00 << 5) #define WDT_CTRL_RESET_MODE_FULL_CHIP (0x01 << 5) #define WDT_CTRL_RESET_MODE_ARM_CPU (0x10 << 5) @@ -245,6 +246,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev) } if (of_property_read_bool(np, "aspeed,external-signal")) wdt->ctrl |= WDT_CTRL_WDT_EXT; + if (of_property_read_bool(np, "aspeed,alt-boot")) + wdt->ctrl |= WDT_CTRL_BOOT_SECONDARY; if (readl(wdt->base + WDT_CTRL) & WDT_CTRL_ENABLE) { /* -- 1.8.3.1