[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <HK0PR06MB2786179F8469AFB8C0337009B2739@HK0PR06MB2786.apcprd06.prod.outlook.com>
Date: Wed, 24 Aug 2022 01:56:24 +0000
From: Chin-Ting Kuo <chin-ting_kuo@...eedtech.com>
To: Joel Stanley <joel@....id.au>
CC: "wim@...ux-watchdog.org" <wim@...ux-watchdog.org>,
"linux@...ck-us.net" <linux@...ck-us.net>,
"andrew@...id.au" <andrew@...id.au>,
BMC-SW <BMC-SW@...eedtech.com>,
"linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
"linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"openbmc@...ts.ozlabs.org" <openbmc@...ts.ozlabs.org>,
"Bonnie_Lo@...ynn.com" <Bonnie_Lo@...ynn.com>
Subject: RE: [PATCH] watchdog: aspeed_wdt: Reorder output signal register
configuration
Hi Joel,
Thanks for the review.
> -----Original Message-----
> From: Joel Stanley <joel@....id.au>
> Sent: Wednesday, August 24, 2022 8:46 AM
> To: Chin-Ting Kuo <chin-ting_kuo@...eedtech.com>
> Subject: Re: [PATCH] watchdog: aspeed_wdt: Reorder output signal register
> configuration
>
> On Fri, 19 Aug 2022 at 09:49, Chin-Ting Kuo <chin-ting_kuo@...eedtech.com>
> wrote:
> >
> > If the output driving type is push-pull mode, the output polarity
> > should be selected in advance. Otherwise, an unexpected value will be
> > output at the moment of changing to push-pull mode.
> > Thus, output polarity, WDT18[31], must be configured before changing
> > driving type, WDT18[30].
> >
> > Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@...eedtech.com>
>
> Thanks Chin-Ting.
>
> Fixes: 012c04601f9d ("watchdog: aspeed: Support configuration of external
> signal properties")
> Reviewed-by: Joel Stanley <joel@....id.au>
>
> I wonder if any of these machines hit the bug:
>
Unexpected output pin value may not always appear at the moment of changing driving type.
It depends on the output status of that pin at that time.
But, with this patch, the output pin value can be confirmed.
Chin-Ting
> $ git grep -l aspeed,ext-push-pull arch/arm/boot/dts/
> arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts
> arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
> arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts
> arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
> arch/arm/boot/dts/aspeed-bmc-opp-mowgli.dts
> arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
> arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
> arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
>
>
> > ---
> > drivers/watchdog/aspeed_wdt.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/watchdog/aspeed_wdt.c
> > b/drivers/watchdog/aspeed_wdt.c index 436571b6fc79..a03e4ff812a2
> > 100644
> > --- a/drivers/watchdog/aspeed_wdt.c
> > +++ b/drivers/watchdog/aspeed_wdt.c
> > @@ -325,18 +325,18 @@ static int aspeed_wdt_probe(struct
> platform_device *pdev)
> > u32 reg = readl(wdt->base + WDT_RESET_WIDTH);
> >
> > reg &= config->ext_pulse_width_mask;
> > - if (of_property_read_bool(np, "aspeed,ext-push-pull"))
> > - reg |= WDT_PUSH_PULL_MAGIC;
> > + if (of_property_read_bool(np, "aspeed,ext-active-high"))
> > + reg |= WDT_ACTIVE_HIGH_MAGIC;
> > else
> > - reg |= WDT_OPEN_DRAIN_MAGIC;
> > + reg |= WDT_ACTIVE_LOW_MAGIC;
> >
> > writel(reg, wdt->base + WDT_RESET_WIDTH);
> >
> > reg &= config->ext_pulse_width_mask;
> > - if (of_property_read_bool(np, "aspeed,ext-active-high"))
> > - reg |= WDT_ACTIVE_HIGH_MAGIC;
> > + if (of_property_read_bool(np, "aspeed,ext-push-pull"))
> > + reg |= WDT_PUSH_PULL_MAGIC;
> > else
> > - reg |= WDT_ACTIVE_LOW_MAGIC;
> > + reg |= WDT_OPEN_DRAIN_MAGIC;
> >
> > writel(reg, wdt->base + WDT_RESET_WIDTH);
> > }
> > --
> > 2.25.1
> >
Powered by blists - more mailing lists