From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Packham Date: Wed, 02 Oct 2013 20:36:14 +1300 Subject: [U-Boot] [PPC] get_timer without CONFIG_INTERRUPTS In-Reply-To: <524934A9.8000309@gmail.com> References: <524934A9.8000309@gmail.com> Message-ID: <524BCCEE.5020907@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.