[U-Boot] [PATCH 2/2] watchdog: designware: Convert to DM and DT probing

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Thu Oct 3 18:11:35 UTC 2019


Marek Vasut <marex at denx.de> schrieb am Do., 3. Okt. 2019, 20:09:

> On 10/3/19 8:06 PM, Simon Goldschmidt wrote:
> > Marek Vasut schrieb am Do., 3. Okt. 2019, 09:22:
> >
> >> On 10/3/19 3:57 AM, Ley Foon Tan wrote:
> >>
> >> [...]
> >>
> >>>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> >>>> index 6fd9b0a177..ec34993664 100644
> >>>> --- a/drivers/watchdog/Kconfig
> >>>> +++ b/drivers/watchdog/Kconfig
> >>>> @@ -36,13 +36,6 @@ config ULP_WATCHDOG
> >>>>         help
> >>>>           Say Y here to enable i.MX7ULP watchdog driver.
> >>>>
> >>>> -config DESIGNWARE_WATCHDOG
> >>>> -       bool "Designware watchdog timer support"
> >>>> -       select HW_WATCHDOG
> >>> CONFIG_HW_WATCHDOG is disabled now. Few areas of code in
> >>> arm/mach-socfpga/ still using this CONFIG and call to
> >>> hw_watchdog_init(). They need to remove too.
> >>> Do we need call to uclass_get_device(UCLASS_WDT, 0, &dev) in SPL to
> >>> probe watchdog and call to wdt_start() to start watchdog? Can't find
> >>> place that start watchdog.
> >>
> >> You're right, and the WDT is enabled early on, before the DM structures
> >> are available.
> >>
> >> I wonder whether we should do what we did on iMX -- have a non-DM WDT
> >> driver for SPL and DM-one for U-Boot proper.
> >>
> >
> > Are you aware that DM WDT is enabled in SPL by default for gen5 now? I
> get
> > a message that WDT is not found. I haven't sent a patch to fix that yet,
> > since the message is the only thing that happens, works normally
> otherwise.
> >
> > But if you're working on that, you might check side effects of that
> setting
> > (which is new for this release).
>
> That doesn't sound right, the SoCFPGA core code uses HW_WATCHDOG in some
> places as Ley pointed out, so if DM WDT is enabled in SPL, that code in
> HW_WATCHDOG ifdefs isn't used. And I think that will trigger some weird
> problems. So in the end, enabling DM watchdog in SoCFPGA SPL right now
> is a bug ?
>

Hmm, it probably is. I'm not using  a watchdog right now, so I couldn't
really tell... It'll be a week or so until I'll find the time for u-boot
again :-(

Regards,
Simon


More information about the U-Boot mailing list