public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Don't get any interrupts once I boot into Linux
@ 2012-09-14 15:04 Greg Topmiller
  2012-09-14 15:15 ` Fabio Estevam
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Topmiller @ 2012-09-14 15:04 UTC (permalink / raw)
  To: u-boot

I downloaded the V2012.07 version of u-boot from the git.denx.de repository and built it for our target.  U-boot boots up properly and I can use the commands but now when I boot into Linux I don't seem to be getting interrupts.  The Linux kernel hangs in the calculate_delay function waiting for ticks != jiffies.  I do not get the interrupt for the timer.  I have verified that our previous u-boot that is based on the 2009.12 version with Freescale patches does work.  The timer interrupt occurs and jiffies is incremented allowing the loop to exit.  Any help would be appreciated.

Thanks,

Greg

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

* [U-Boot] Don't get any interrupts once I boot into Linux
  2012-09-14 15:04 Greg Topmiller
@ 2012-09-14 15:15 ` Fabio Estevam
  2012-09-14 16:06   ` Benoît Thébaudeau
  0 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2012-09-14 15:15 UTC (permalink / raw)
  To: u-boot

On Fri, Sep 14, 2012 at 12:04 PM, Greg Topmiller
<Greg.Topmiller@jdsu.com> wrote:
> I downloaded the V2012.07 version of u-boot from the git.denx.de repository and built it for our target.  U-boot boots up properly and I can use the commands but now when I boot into Linux I don't seem to be getting interrupts.  The Linux kernel hangs in the calculate_delay function waiting for ticks != jiffies.  I do not get the interrupt for the timer.  I have verified that our previous u-boot that is based on the 2009.12 version with Freescale patches does work.  The timer interrupt occurs and jiffies is incremented allowing the loop to exit.  Any help would be appreciated.
>

Which board are you using?

Regards,

Fabio Estevam

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

* [U-Boot] Don't get any interrupts once I boot into Linux
  2012-09-14 15:15 ` Fabio Estevam
@ 2012-09-14 16:06   ` Benoît Thébaudeau
  2012-09-14 16:13     ` Benoît Thébaudeau
  0 siblings, 1 reply; 10+ messages in thread
From: Benoît Thébaudeau @ 2012-09-14 16:06 UTC (permalink / raw)
  To: u-boot

Hi Fabio, Greg,

On Friday, September 14, 2012 5:15:17 PM, Fabio Estevam wrote:
> On Fri, Sep 14, 2012 at 12:04 PM, Greg Topmiller
> <Greg.Topmiller@jdsu.com> wrote:
> > I downloaded the V2012.07 version of u-boot from the git.denx.de
> > repository and built it for our target.  U-boot boots up properly
> > and I can use the commands but now when I boot into Linux I don't
> > seem to be getting interrupts.  The Linux kernel hangs in the
> > calculate_delay function waiting for ticks != jiffies.  I do not
> > get the interrupt for the timer.  I have verified that our
> > previous u-boot that is based on the 2009.12 version with
> > Freescale patches does work.  The timer interrupt occurs and
> > jiffies is incremented allowing the loop to exit.  Any help would
> > be appreciated.
> >
> 
> Which board are you using?

Same here with a custom i.MX51-based board and a FSL-based Linux. It works fine
with the FSL-based U-Boot (2009.12).

Some debugging has shown that:
 - The Linux timer is based on GPT.
 - The GPT counter runs fine at 8 Mincrements/s as expected.
 - The interrupt handler is never called.
 - The interrupt is based on output compare, but forcing the OC value a little
   bit after the counter value does not trigger the interrupt handler.
 - Resetting the GPT and clearing its registers prior to Linux timer init does
   not help.
 - There does not seem to be any wait or sleep modes involved.
 - In this loop, CPSR shows supervisor mode with FIQ disabled and IRQ enabled
   (same for both U-Boot versions).
 - This version of Linux does not set VBAR. Neither does the older U-Boot
   contrary to the latest, but setting VBAR to 0 like with the older U-Boot does
   not help.

The differences in system registers between these U-Boots are really small and
seem insignificant. The GPT clock source used by these versions is different,
but that should not be an issue with proper reinitialization in Linux.

The i.MX51 errata don't mention any issue like that, at least for GPT.
ENGcm09114 is similar, but in a very different context.

The next step is to dig into the interrupt controller settings and vectors to
check that Linux sets up everything properly. This issue is very likely caused
by this FSL Linux that unduly relies on the bootloader to initialize something.

Best regards,
Beno?t

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

* [U-Boot] Don't get any interrupts once I boot into Linux
  2012-09-14 16:06   ` Benoît Thébaudeau
@ 2012-09-14 16:13     ` Benoît Thébaudeau
  2012-09-16  9:28       ` Stefano Babic
  0 siblings, 1 reply; 10+ messages in thread
From: Benoît Thébaudeau @ 2012-09-14 16:13 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On Friday, September 14, 2012 6:06:16 PM, Beno?t Th?baudeau wrote:
> Hi Fabio, Greg,
> 
> On Friday, September 14, 2012 5:15:17 PM, Fabio Estevam wrote:
> > On Fri, Sep 14, 2012 at 12:04 PM, Greg Topmiller
> > <Greg.Topmiller@jdsu.com> wrote:
> > > I downloaded the V2012.07 version of u-boot from the git.denx.de
> > > repository and built it for our target.  U-boot boots up properly
> > > and I can use the commands but now when I boot into Linux I don't
> > > seem to be getting interrupts.  The Linux kernel hangs in the
> > > calculate_delay function waiting for ticks != jiffies.  I do not
> > > get the interrupt for the timer.  I have verified that our
> > > previous u-boot that is based on the 2009.12 version with
> > > Freescale patches does work.  The timer interrupt occurs and
> > > jiffies is incremented allowing the loop to exit.  Any help would
> > > be appreciated.
> > >
> > 
> > Which board are you using?
> 
> Same here with a custom i.MX51-based board and a FSL-based Linux. It
> works fine
> with the FSL-based U-Boot (2009.12).
> 
> Some debugging has shown that:
>  - The Linux timer is based on GPT.
>  - The GPT counter runs fine at 8 Mincrements/s as expected.
>  - The interrupt handler is never called.
>  - The interrupt is based on output compare, but forcing the OC value
>  a little
>    bit after the counter value does not trigger the interrupt
>    handler.
>  - Resetting the GPT and clearing its registers prior to Linux timer
>  init does
>    not help.
>  - There does not seem to be any wait or sleep modes involved.
>  - In this loop, CPSR shows supervisor mode with FIQ disabled and IRQ
>  enabled
>    (same for both U-Boot versions).
>  - This version of Linux does not set VBAR. Neither does the older
>  U-Boot
>    contrary to the latest, but setting VBAR to 0 like with the older
>    U-Boot does
>    not help.
> 
> The differences in system registers between these U-Boots are really
> small and
> seem insignificant. The GPT clock source used by these versions is
> different,
> but that should not be an issue with proper reinitialization in
> Linux.
> 
> The i.MX51 errata don't mention any issue like that, at least for
> GPT.
> ENGcm09114 is similar, but in a very different context.
> 
> The next step is to dig into the interrupt controller settings and
> vectors to
> check that Linux sets up everything properly. This issue is very
> likely caused
> by this FSL Linux that unduly relies on the bootloader to initialize
> something.

As the maintainer of mx51evk, have you tested that it works fine with U-Boot
2012.07 with both mainline Linux and FSL's Linux?

Best regards,
Beno?t

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

* [U-Boot] Don't get any interrupts once I boot into Linux
       [not found] <CEF1C43EC1BF464090308EB428E1360001B708@AMEXMB02.ds.jdsu.net>
@ 2012-09-14 16:37 ` Benoît Thébaudeau
  0 siblings, 0 replies; 10+ messages in thread
From: Benoît Thébaudeau @ 2012-09-14 16:37 UTC (permalink / raw)
  To: u-boot

On Friday, September 14, 2012 6:08:15 PM, Greg Topmiller wrote:
> Thanks Benoit,
> 
> I also tried changing the uboot V2012.07, file arm/cpu/armv7/timer.c
>  to use  the IPG clock rather than the 32Khz but no difference.

OK, as expected.

> It looks like the FSL interrupt initialization is in
> arch/arm/plat-mxc/tzic.c file.  I don't see anything obvious.  It's
> not real big.  I have a Lauterbach debugger that I have been using
> to step thru the Linux code.  The mxc_timer_interrupt never occurs.

We'll look into the interrupt controller next week. Please keep us informed if
you find anything. We'll do the same.

Will you please answer the following questions?
 - Which SoC are you using? i.MX51?
 - Which board? mx51evk?
 - Which Linux version? Mainline or FSL's?

Best regards,
Beno?t

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

* [U-Boot] Don't get any interrupts once I boot into Linux
       [not found] <CEF1C43EC1BF464090308EB428E1360001B736@AMEXMB02.ds.jdsu.net>
@ 2012-09-14 17:32 ` Benoît Thébaudeau
  0 siblings, 0 replies; 10+ messages in thread
From: Benoît Thébaudeau @ 2012-09-14 17:32 UTC (permalink / raw)
  To: u-boot

On Friday, September 14, 2012 7:04:14 PM, Greg Topmiller wrote:
> SoC: i.MX51
> Board: mx51evk and our own board that is based on the mx51evk.
> Linux: FSL version.

Perfect, so we are in exactly the same test conditions, except for mx51evk.

Can you try mx51evk with U-Boot 2012.07 and mainline Linux 3.5.3, using the
default configs and unpatched code?

My debug plan for the next steps is:
 - Find out if FSL's U-Boot 2009.12 touches TZIC in some way.
 - Using a JTAG probe in the calibrate_delay() loop, dump TZIC registers to
   check GPT interrupt security, priority, pending status, FIQ vs. IRQ vs. CPSR
   and wakeup stuff.
 - If not pending, then the issue probably comes from the GPT; otherwise, from
   interrupt propagation.
 - Use the TZIC registers to trigger the GPT interrupt to see if the handler
   gets called.

Best regards,
Beno?t

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

* [U-Boot] Don't get any interrupts once I boot into Linux
       [not found] <CEF1C43EC1BF464090308EB428E1360001B790@AMEXMB02.ds.jdsu.net>
@ 2012-09-14 19:53 ` Benoît Thébaudeau
  2012-09-14 21:28   ` Fabio Estevam
  0 siblings, 1 reply; 10+ messages in thread
From: Benoît Thébaudeau @ 2012-09-14 19:53 UTC (permalink / raw)
  To: u-boot

Greg,

On Friday, September 14, 2012 9:35:28 PM, Greg Topmiller wrote:
> I've made some progress.  Yes, the TZIC is not being set up properly.
>  This is because the system and rev information is not being put
> into the ATAG that is passed to the Linux kernel.  What is added is
> " #define CONFIG_REVISION_TAG 1" in the config file but then
> "get_board_rev" needs to be implemented.  I am going to take what is
> in FSL u-boot for that.  I have to get going now but hope to finish
> this on Monday.

Good news! This function can easily be added locally to your board init file. I
don't think that mainline U-Boot should be changed for that since it is an issue
in FSL's Linux that relies on the revision tag instead of extracting itself the
revision information from the hardware.

Best regards,
Beno?t

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

* [U-Boot] Don't get any interrupts once I boot into Linux
  2012-09-14 19:53 ` [U-Boot] Don't get any interrupts once I boot into Linux Benoît Thébaudeau
@ 2012-09-14 21:28   ` Fabio Estevam
  2012-09-14 21:38     ` Benoît Thébaudeau
  0 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2012-09-14 21:28 UTC (permalink / raw)
  To: u-boot

Hi Beno?t,

On Fri, Sep 14, 2012 at 4:53 PM, Beno?t Th?baudeau
<benoit.thebaudeau@advansee.com> wrote:

> Good news! This function can easily be added locally to your board init file. I
> don't think that mainline U-Boot should be changed for that since it is an issue
> in FSL's Linux that relies on the revision tag instead of extracting itself the

I think we should change U-boot mainline for mx51evk in this case.

We do pass get_board_rev() on mx53loco and mx6qsabrelite boards in
order to allow booting a FSL kernel too.

By doing this we allow people that use the old kernel to run a mainline U-boot.

Thanks,

Fabio Estevam

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

* [U-Boot] Don't get any interrupts once I boot into Linux
  2012-09-14 21:28   ` Fabio Estevam
@ 2012-09-14 21:38     ` Benoît Thébaudeau
  0 siblings, 0 replies; 10+ messages in thread
From: Benoît Thébaudeau @ 2012-09-14 21:38 UTC (permalink / raw)
  To: u-boot

On Friday, September 14, 2012 11:28:48 PM, Fabio Estevam wrote:
> Hi Beno?t,
> 
> On Fri, Sep 14, 2012 at 4:53 PM, Beno?t Th?baudeau
> <benoit.thebaudeau@advansee.com> wrote:
> 
> > Good news! This function can easily be added locally to your board
> > init file. I
> > don't think that mainline U-Boot should be changed for that since
> > it is an issue
> > in FSL's Linux that relies on the revision tag instead of
> > extracting itself the
> 
> I think we should change U-boot mainline for mx51evk in this case.
> 
> We do pass get_board_rev() on mx53loco and mx6qsabrelite boards in
> order to allow booting a FSL kernel too.
> 
> By doing this we allow people that use the old kernel to run a
> mainline U-boot.

OK, then Greg, please make this patch after your Monday's tests.

Best regards,
Beno?t

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

* [U-Boot] Don't get any interrupts once I boot into Linux
  2012-09-14 16:13     ` Benoît Thébaudeau
@ 2012-09-16  9:28       ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2012-09-16  9:28 UTC (permalink / raw)
  To: u-boot

On 14/09/2012 18:13, Beno?t Th?baudeau wrote:
> Hi Stefano,
> 

Hi Beno?t,

> On Friday, September 14, 2012 6:06:16 PM, Beno?t Th?baudeau wrote:
>> Hi Fabio, Greg,
>>
>> On Friday, September 14, 2012 5:15:17 PM, Fabio Estevam wrote:
>>> On Fri, Sep 14, 2012 at 12:04 PM, Greg Topmiller
>>> <Greg.Topmiller@jdsu.com> wrote:
>>>> I downloaded the V2012.07 version of u-boot from the git.denx.de
>>>> repository and built it for our target.  U-boot boots up properly
>>>> and I can use the commands but now when I boot into Linux I don't
>>>> seem to be getting interrupts.  The Linux kernel hangs in the
>>>> calculate_delay function waiting for ticks != jiffies.  I do not
>>>> get the interrupt for the timer.  I have verified that our
>>>> previous u-boot that is based on the 2009.12 version with
>>>> Freescale patches does work.  The timer interrupt occurs and
>>>> jiffies is incremented allowing the loop to exit.  Any help would
>>>> be appreciated.
>>>>
>>>
>>> Which board are you using?
>>
>> Same here with a custom i.MX51-based board and a FSL-based Linux. It
>> works fine
>> with the FSL-based U-Boot (2009.12).
>>
>> Some debugging has shown that:
>>  - The Linux timer is based on GPT.
>>  - The GPT counter runs fine at 8 Mincrements/s as expected.
>>  - The interrupt handler is never called.
>>  - The interrupt is based on output compare, but forcing the OC value
>>  a little
>>    bit after the counter value does not trigger the interrupt
>>    handler.
>>  - Resetting the GPT and clearing its registers prior to Linux timer
>>  init does
>>    not help.
>>  - There does not seem to be any wait or sleep modes involved.
>>  - In this loop, CPSR shows supervisor mode with FIQ disabled and IRQ
>>  enabled
>>    (same for both U-Boot versions).
>>  - This version of Linux does not set VBAR. Neither does the older
>>  U-Boot
>>    contrary to the latest, but setting VBAR to 0 like with the older
>>    U-Boot does
>>    not help.
>>
>> The differences in system registers between these U-Boots are really
>> small and
>> seem insignificant. The GPT clock source used by these versions is
>> different,
>> but that should not be an issue with proper reinitialization in
>> Linux.
>>
>> The i.MX51 errata don't mention any issue like that, at least for
>> GPT.
>> ENGcm09114 is similar, but in a very different context.
>>
>> The next step is to dig into the interrupt controller settings and
>> vectors to
>> check that Linux sets up everything properly. This issue is very
>> likely caused
>> by this FSL Linux that unduly relies on the bootloader to initialize
>> something.
> 
> As the maintainer of mx51evk, have you tested that it works fine with U-Boot
> 2012.07 with both mainline Linux and FSL's Linux?

I do not test with FSL Linux, sorry. Users should test themselves and
report if they have problems - FSL's kernel is an ancient version
respect kernel.org.

We discussed also in the past if u-boot should anyway support very old
versions of the kernel. My simply position was that if patches do not
hurt the current development, they can be integrated.

This issue was already seen for MX53 in the past, see the following
Fabio's commit:

commit 54cd1dee8f9537c2e3d5bfe2029bf31b2b1cf2f3
Author: Fabio Estevam <fabio.estevam@freescale.com>
Date:   Tue May 8 03:40:49 2012 +0000

    mx53loco: Add CONFIG_REVISION_TAG

    FSL 2.6.35 kernel assumes that the bootloader passes the
CONFIG_REVISION_TAG information.

    The kernel uses this data to distinguish between Dialog versus
mc34708 based boards,
    and also to distinguish between revA and revB of the mc34708 based
boards.

    Suggested-by: Yu Li <yk@magniel.com>
    Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
    Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

end of thread, other threads:[~2012-09-16  9:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CEF1C43EC1BF464090308EB428E1360001B790@AMEXMB02.ds.jdsu.net>
2012-09-14 19:53 ` [U-Boot] Don't get any interrupts once I boot into Linux Benoît Thébaudeau
2012-09-14 21:28   ` Fabio Estevam
2012-09-14 21:38     ` Benoît Thébaudeau
     [not found] <CEF1C43EC1BF464090308EB428E1360001B736@AMEXMB02.ds.jdsu.net>
2012-09-14 17:32 ` Benoît Thébaudeau
     [not found] <CEF1C43EC1BF464090308EB428E1360001B708@AMEXMB02.ds.jdsu.net>
2012-09-14 16:37 ` Benoît Thébaudeau
2012-09-14 15:04 Greg Topmiller
2012-09-14 15:15 ` Fabio Estevam
2012-09-14 16:06   ` Benoît Thébaudeau
2012-09-14 16:13     ` Benoît Thébaudeau
2012-09-16  9:28       ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox