From patchwork Fri Aug 16 16:03:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 171515 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1065625ily; Fri, 16 Aug 2019 09:04:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDArLZ19+z2aPYwb0LbZtMYfQycGvvZWatyFPJ1hn6MvrJ4AbxhzwhviJ1XWjmiYzQ8CgA X-Received: by 2002:a63:7b4d:: with SMTP id k13mr8254965pgn.182.1565971447088; Fri, 16 Aug 2019 09:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565971447; cv=none; d=google.com; s=arc-20160816; b=h+V/zDhty4FS8PD20l7dHJ9fm253/YrxFYTtfRqkgGLdaZe2ctPlWIZGAYRQEph+SS HGkAJKuks8VmD2gD/iombhPmft3WMB/Zwy+6WJZ1gByvS1OEAc3VU73NJ6MVI/9dsW71 VYQUmFQcf05wf0Lok5xfUsg0YoU4lyABb5KkGm+OzrjFBAAMdFpBmY0N+CGK6NiJ4+QQ kLSA8OF5KeyF/8ni2JhySlsz96XvIFfg1jUmmjl1xnX0RB19nJGBgRlrXk/3AVYCEYr6 0p+quaHUQblDlanipSointOglB5qrZhDUF4RUSrChBpHcA4PNPZv90v1kv3oSgOOZSsE 5gNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BrRMkjc2qGWCZLIX9694c7JW7Gvf0FMcBkwT0dY+kis=; b=IEuyvpjzW91h742gGoKGgsFstmtO5Q+Ynkb9DgjOdvkBGBiy9ylSXGF1Szt5Pz/iUU fNcA9omrvgArcRf8heoSw09WLBqj1fu+AzHD/FGo8OLgUx54mD8Y7A3MMIghM0S4HNCp D9dNb52m0/W9aiTda8BGl4ROhtnkDUf7wKdztDW+pUFE1vnWshjeiR3rP/z/nB7jLkUs DpYRjC+EjFT+UrZqvaR+k5nFSUDJXANx3CofMy2d8gS9PCdRh2Bz4bXVLPuXovkFRhyy LfIH6GOUKkeH/9Fapr06TuRRbbsrqrJZKiqal972G3CsHqXvLxMMAp1sq3XBG8b6ze3l fe8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hcp099JL; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-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 b20si4030319pgl.533.2019.08.16.09.04.07 for ; Fri, 16 Aug 2019 09:04:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hcp099JL; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727480AbfHPQEG (ORCPT ); Fri, 16 Aug 2019 12:04:06 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34558 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727391AbfHPQEG (ORCPT ); Fri, 16 Aug 2019 12:04:06 -0400 Received: by mail-pl1-f193.google.com with SMTP id d3so765588plr.1; Fri, 16 Aug 2019 09:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BrRMkjc2qGWCZLIX9694c7JW7Gvf0FMcBkwT0dY+kis=; b=hcp099JLXcAtr20hVTLWgVQYFXbhVo4XXLQW1gdi3X8wRO/iMDfVRxkZdA5NU7sAQh voXm3CvwWdBYwGJz329n7nQ8rE8+eLKw/vWJpi8Vovk6mb3R8BEURRIiFAo9gYUrP5OU bPQkYgp6sSWijbk+aWW8MqL9P2yCokXbfiOzbpgVJ/T3OaYnbYTg3JrwH0ELewheo8Op ArXIuD2xkn+/ugivUTwZGh4XmqUo89Feh6zy5EIJ6BvpS3OQ80lWi/FFPmDleMc4gu0g jBkFdbXQFne1ffs23n8Yt6XafDq894mNsogG9+FL7rU0hfCNzuDO2ClfSF8v/MYWG5/e AV1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BrRMkjc2qGWCZLIX9694c7JW7Gvf0FMcBkwT0dY+kis=; b=j7yR5AqyJjqtrU5mCyQkQZ980SxNNEUrdfttTZN+q6WmwOQ2pJ7Dv8/SEf9neZuKFX V/vtUpt4KOysdswwcjKdfEMhuEDp+T42ctSeGiGLMRE7vTeQ8dfT/g952qECWRPMjTbZ G+uj+x2QH8bZ3H4HAxRlbcFSqTutnH9ZX8TmjZZ/KuBLiUgjACP6oF61k3BhsItJllpZ JVqBHkfXdUjCUW1G7t1pltt7HyP494U1IYhFlmf1ks1V5XfHcmM87hybdzl/I72i4Xlv 3bHYoRnEgCBh6oUhGWLlC1aGLwXrFMbeUuBu75fWqbARIbiHuYBhVpoIURXks0J28g41 LQ9w== X-Gm-Message-State: APjAAAWFk0cYIeQHJr0vudOJXblbP0beDOVQVZQLTJo5ZG8zkvcsB/h6 ng1rFQTzIY2aYOiHjIcnS38= X-Received: by 2002:a17:902:a01:: with SMTP id 1mr10269948plo.278.1565971445900; Fri, 16 Aug 2019 09:04:05 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.19]) by smtp.gmail.com with ESMTPSA id m20sm7578607pff.79.2019.08.16.09.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2019 09:04:05 -0700 (PDT) From: Joel Stanley To: Wim Van Sebroeck , Guenter Roeck , Rob Herring Cc: Ryan Chen , Andrew Jeffery , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Subject: [PATCH 2/2] watchdog: aspeed: Add support for AST2600 Date: Sat, 17 Aug 2019 01:33:47 +0930 Message-Id: <20190816160347.23393-3-joel@jms.id.au> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190816160347.23393-1-joel@jms.id.au> References: <20190816160347.23393-1-joel@jms.id.au> MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Ryan Chen The ast2600 can be supported by the same code as the ast2500. Signed-off-by: Ryan Chen Signed-off-by: Joel Stanley --- drivers/watchdog/aspeed_wdt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.23.0.rc1 diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index cc71861e033a..94f73796ba9d 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -31,9 +31,14 @@ static const struct aspeed_wdt_config ast2500_config = { .ext_pulse_width_mask = 0xfffff, }; +static const struct aspeed_wdt_config ast2600_config = { + .ext_pulse_width_mask = 0xfffff, +}; + static const struct of_device_id aspeed_wdt_of_table[] = { { .compatible = "aspeed,ast2400-wdt", .data = &ast2400_config }, { .compatible = "aspeed,ast2500-wdt", .data = &ast2500_config }, + { .compatible = "aspeed,ast2600-wdt", .data = &ast2600_config }, { }, }; MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table); @@ -259,7 +264,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev) set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); } - if (of_device_is_compatible(np, "aspeed,ast2500-wdt")) { + if ((of_device_is_compatible(np, "aspeed,ast2500-wdt")) || + (of_device_is_compatible(np, "aspeed,ast2600-wdt"))) { u32 reg = readl(wdt->base + WDT_RESET_WIDTH); reg &= config->ext_pulse_width_mask;