[PATCH 1/4] panda: fix crash when not using barebox as second stage

Anand Gadiyar gadiyar at ti.com
Mon May 21 06:30:10 EDT 2012


If barebox is not used as the MLO, then it crashes during boot
with the below error message:

Board: Texas Instrument's Panda
PandaBoard Revision: 003
omap-hsmmc at mci0: registered as mci0
unable to handle paging request at address 0x4a064010
pc : [<8f01e820>]    lr : [<8f0049a0>]
sp : 8cffff80  ip : 00000016  fp : 00100103
r10: 00000000  r9 : 00000ae7  r8 : 4030b76c
r7 : 40300200  r6 : e28f8028  r5 : 0000003e  r4 : 00000000
r3 : 4a064000  r2 : 00000014  r1 : 00000001  r0 : 00000001
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
[<8f01e820>] (panda_devices_init+0x17c/0x1e0) from [<8f006300>] (start_barebox+0x18/0x10c)
[<8f006300>] (start_barebox+0x18/0x10c) from [<8200006c>] (0x8200006c)

[<8f021248>] (unwind_backtrace+0x0/0x98) from [<8f011a00>] (panic+0x28/0x3c)
[<8f011a00>] (panic+0x28/0x3c) from [<8f02171c>] (do_exception+0x10/0x14)
[<8f02171c>] (do_exception+0x10/0x14) from [<8f021784>] (do_data_abort+0x2c/0x38)
[<8f021784>] (do_data_abort+0x2c/0x38) from [<8f021470>] (data_abort+0x50/0x60)

This is because the USBHOST module is not enabled. The module enable
is is normally done in mach-omap/xload.c which never gets called.

Since we're configuring the USBHOST CLKCTRL register in the board file
anyway, we might as well explicitly enable the module in the same place.

Signed-off-by: Anand Gadiyar <gadiyar at ti.com>
---
Steps to reproduce:
Download and build usbboot from here:
git://git.omapzoom.org/repo/omapboot.git

Check out and build the p-master branch.
  make ARCH=omap4 BOARD=panda

Then you can do a USB boot using
usbboot barebox.bin

 arch/arm/boards/panda/board.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index 628d3f1..26d365c 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -78,6 +78,7 @@ static void panda_ehci_init(void)
 	gpio_set_value(hub_nreset, 1);
 	val = readl(0x4a009358);
 	val |= (1 << 24);
+	val |= 0x2;
 	writel(val, 0x4a009358);
 	writel(0x7, 0x4a008180);
 	mdelay(10);
-- 
1.7.1




More information about the barebox mailing list