From: Po-Yu Chuang Date: Wed, 8 Apr 2009 15:41:33 +0800 Subject: [U-Boot] udelay/udelay_masked problems In-Reply-To: <3972542e0904070952l28a9c63esfd6555130b22acbe@mail.gmail.com> References: <3972542e0904070952l28a9c63esfd6555130b22acbe@mail.gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi E Robertson, 2009/4/8 E Robertson : > Hi all, > Is their a problem using udelay in board_init functions? > When I do this on my at91, arm926ejs board, it seems to be in an endless loop. > I thought this was a timer issue but I only have this problem with > board init and not in the drivers. > Does anyone have any ideas? I guess the reason is: start_armboot() in lib_arm/board.c invokes board_init() in board/atmel//.c before interrupt_init() in cpu/arm926ejs/interrupts.c which invokes timer_init() in cpu/arm926ejs/at91/timer.c. That means timer_init() is called later than your board_init() > Is timer_init a arch specific call or should it be board specific for arm? I have no idea either. regards, Po-Yu chuang