[PATCH v4] ARM: ep93xx: use more reliable CPLD watchdog for reset on ts72xx
Mika Westerberg
mika.westerberg at iki.fi
Sun Jun 5 14:18:57 EDT 2011
On Sun, Jun 05, 2011 at 06:07:34PM +0200, Petr Štetiar wrote:
> Mika Westerberg <mika.westerberg at iki.fi> [2011-06-05 12:54:50]:
>
> > > + if (board_is_ts7200() || board_is_ts7250() || board_is_ts7260() ||
> > > + board_is_ts7300() || board_is_ts7400()) {
> > > + /* We use more reliable CPLD watchdog to perform the reset */
> > > + __raw_writeb(0x5, TS72XX_WDT_FEED_PHYS_BASE);
> > > + __raw_writeb(0x1, TS72XX_WDT_CONTROL_PHYS_BASE);
> >
> > I just noticed that you are accessing the registers via *physical* address. It
> > currently works because arm_machine_restart() sets up 1:1 mappings in place of
> > userspace before arch_reset() gets called.
>
> Setups the 1:1 mappings, clean+invalidate cache, turns off caching and flush
> the cache.
>
> > This might cause some problems as the register accesses are cached, or does it
> > make a difference in ARM920?
>
> Caching is disabled by the caller, isn't it?
Yes.
I'm just wondering whether this should be done via valid mapping? Note also
that __raw_writeb() takes void __iomem * which is different that the value you
are passing.
Anyway, I tried the patch on my TS-7260 and I'm still able to reset the board
so you can add my
Tested-by: Mika Westerberg <mika.westerberg at iki.fi>
if you like.
More information about the linux-arm-kernel
mailing list