[PATCH] powerpc/mpc52xx/wdt: Fix 5200 wdt always being used as gpt

Grant Likely grant.likely at secretlab.ca
Tue Aug 4 03:50:05 EST 2009


On Mon, Aug 3, 2009 at 10:40 AM, Albrecht Dreß<albrecht.dress at arcor.de> wrote:
> In the current code, all MPC5200 timers are registered by the mpc52xx_gpt
> driver, even if gpt0 (the only one with this capability) shall be used as
> hardware watchdog which is indicated by the "fsl,has-wdt" or "has-wdt"
> property in the device tree.  Thus, the watchdog driver does never find any
> watchdog and simply doesn't work.
>
> This trivial patch protects timers with a "(fsl,)?has-wdt" property from
> being probed as gpt's.  The watchdog timer now works just fine.

Blech.  This does solve one problem, but it causes another.  Just
about all mpc5200 device trees have the fsl,has-wdt property on GPT0
even when it isn't used as a watchdog.  The boards using GPT0 as a
GPIO or timer will be broken by this patch.

I know it is a lot more work, but the correct solution is to merge the
GPT watchdog driver into the regular GPT driver so that we don't have
two device drivers trying to bind against the same device.

g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the Linuxppc-dev mailing list