From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [PATCH v2 2/2] watchdog: aspeed: Add support for AST2600 Date: Tue, 20 Aug 2019 08:50:10 -0700 Message-ID: <20190820155010.GA20408@roeck-us.net> References: <20190819051738.17370-1-joel@jms.id.au> <20190819051738.17370-3-joel@jms.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20190819051738.17370-3-joel@jms.id.au> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Joel Stanley Cc: devicetree@vger.kernel.org, Ryan Chen , linux-watchdog@vger.kernel.org, linux-aspeed@lists.ozlabs.org, Andrew Jeffery , Rob Herring , Wim Van Sebroeck , linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org On Mon, Aug 19, 2019 at 02:47:38PM +0930, Joel Stanley wrote: > 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 Reviewed-by: Guenter Roeck > --- > v2: > Reuse ast2500 config structure > --- > drivers/watchdog/aspeed_wdt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c > index cc71861e033a..5b64bc2e8788 100644 > --- a/drivers/watchdog/aspeed_wdt.c > +++ b/drivers/watchdog/aspeed_wdt.c > @@ -34,6 +34,7 @@ static const struct aspeed_wdt_config ast2500_config = { > 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 = &ast2500_config }, > { }, > }; > MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table); > @@ -259,7 +260,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;