public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PPC] get_timer without CONFIG_INTERRUPTS
@ 2013-09-30  8:22 Chris Packham
  2013-10-02  7:36 ` Chris Packham
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Packham @ 2013-09-30  8:22 UTC (permalink / raw)
  To: u-boot

Hi,

Has anyone looked at a way of implementing get_timer for PowerPC without
using interrupts.

We appear to be having a problem with common/usb_hub.c where
occasionally (1 in ~150 reboots) we seem to get stuck in the do/while
loop in usb_hub_configure. It looks like this should timeout but because
we don't define CONFIG_INTERRUPTS get_timer() will only ever return 0.

I'm being a little paranoid (perhaps too paranoid) about turning on
CONFIG_INTERRUPTS. Looking at the code I can't see too much that would
cause problems but I want to avoid a rogue LBC or PCI-e interrupt
locking up the CPU.

Thanks,
Chris

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

* [U-Boot] [PPC] get_timer without CONFIG_INTERRUPTS
  2013-09-30  8:22 [U-Boot] [PPC] get_timer without CONFIG_INTERRUPTS Chris Packham
@ 2013-10-02  7:36 ` Chris Packham
  2013-10-02  9:01   ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Packham @ 2013-10-02  7:36 UTC (permalink / raw)
  To: u-boot

On 30/09/13 21:22, Chris Packham wrote:
> Hi,
> 
> Has anyone looked at a way of implementing get_timer for PowerPC without
> using interrupts.
> 
> We appear to be having a problem with common/usb_hub.c where
> occasionally (1 in ~150 reboots) we seem to get stuck in the do/while
> loop in usb_hub_configure. It looks like this should timeout but because
> we don't define CONFIG_INTERRUPTS get_timer() will only ever return 0.
> 
> I'm being a little paranoid (perhaps too paranoid) about turning on
> CONFIG_INTERRUPTS. Looking at the code I can't see too much that would
> cause problems but I want to avoid a rogue LBC or PCI-e interrupt
> locking up the CPU.
> 
> Thanks,
> Chris
> 

To answer my own question you do not need CONFIG_INTERRUPTS for
get_timer to work. You do however have to have called interrupts_init.
Our mistake was to add a call to usb_start in our boards misc_init_r.

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

* [U-Boot] [PPC] get_timer without CONFIG_INTERRUPTS
  2013-10-02  7:36 ` Chris Packham
@ 2013-10-02  9:01   ` Wolfgang Denk
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2013-10-02  9:01 UTC (permalink / raw)
  To: u-boot

Dear Chris,

In message <524BCCEE.5020907@gmail.com> you wrote:
>
> Our mistake was to add a call to usb_start in our boards misc_init_r.

You never want to run this automatically.  And if you do, you
absolutely must make sure to shut down the USB controller after use /
before booting Linux, otherwise you will experience rare and almost
impossible to debug memory corruption errors in Linux.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
We are Microsoft. Unix is irrelevant. Openness is futile.  Prepare to
be assimilated.

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

end of thread, other threads:[~2013-10-02  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-30  8:22 [U-Boot] [PPC] get_timer without CONFIG_INTERRUPTS Chris Packham
2013-10-02  7:36 ` Chris Packham
2013-10-02  9:01   ` Wolfgang Denk

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