linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [AT91SAM9260] kernel hang in at91sam926x_pit_reset()
@ 2010-11-11 11:41 Vitja Makarov
  2010-11-11 12:44 ` Alexander Stein
  0 siblings, 1 reply; 4+ messages in thread
From: Vitja Makarov @ 2010-11-11 11:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi!

I've recently found that our new AT91SAM9260 boards does not work with
linux out of the box.
The only thing changed is CPU revision now it is "Rev. B' (old boards
used "Rev. A" CPUs)


So after uncompressing kernel it writes. "Booting kernel..." that's
all. Kernel hangs.

I found that it hangs in  at91sam926x_time.c:at91sam926x_pit_reset():

Bit in AT91_PIT_PIVR register never clears... so I add timeout for
this loop and kernel boots as expected.

static void at91sam926x_pit_reset(void)
{
<------>/* Disable timer and irqs */
<------>at91_sys_write(AT91_PIT_MR, 0);

<------>/* Clear any pending interrupts, wait for PIT to stop counting */
<------>while (PIT_CPIV(at91_sys_read(AT91_PIT_PIVR)) != 0)
<------><------>cpu_relax();

<------>/* Start PIT but don't enable IRQ */
<------>at91_sys_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN);
}


Thanks,
vitja.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-11 12:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11 11:41 [AT91SAM9260] kernel hang in at91sam926x_pit_reset() Vitja Makarov
2010-11-11 12:44 ` Alexander Stein
2010-11-11 12:50   ` Vitja Makarov
2010-11-11 12:59     ` Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).