linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vitja.makarov@gmail.com (Vitja Makarov)
To: linux-arm-kernel@lists.infradead.org
Subject: [AT91SAM9260] kernel hang in at91sam926x_pit_reset()
Date: Thu, 11 Nov 2010 15:50:12 +0300	[thread overview]
Message-ID: <AANLkTi=ahWs+VidZpjPEBfUs5RZkv18XMDB0jCgrHA_r@mail.gmail.com> (raw)
In-Reply-To: <201011111345.42080.alexander.stein@systec-electronic.com>

2010/11/11 Alexander Stein <alexander.stein@systec-electronic.com>:
> On Thursday 11 November 2010, 12:41:48 Vitja Makarov wrote:
>> 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);
>> }
>
> This won't work as you cannot set PIT_PITEN until the PIT has stopped
> (UserManuel 17.3), read as CPIV is 0. You should check if and why CPIV isn't
> increasing.
>
> Best regards
> Alexander
>

Could it be hardware bug? With revision A it works. Do you have
success on use rev B. CPUs?
May be the problem is in u-boot or initial loader?

  reply	other threads:[~2010-11-11 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-11-11 12:59     ` Alexander Stein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=ahWs+VidZpjPEBfUs5RZkv18XMDB0jCgrHA_r@mail.gmail.com' \
    --to=vitja.makarov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).