Skip to contentSkip to conversation

Boot reason in SPL for OMAP4

U-Boot Gregoire Gentil 2 participants 5 messages Sep 30, 2014 – Oct 2, 2014 Arm (32-bit)

lore
Share & tools
lore
#1 lore raw
Quoted 7 lines · Gregoire Gentil

Hello,

In TI x-loader, the boot reason is copied to a scratchpad 0x4A326000 as shown here:
https://gitorious.org/x-loader/x-loader/source/HEAD:cpu/omap4/start.S#L102

How can I access the boot reason in u-boot or in the SPL?

spl_boot_mode() and spl_boot_device().

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141001/b75e45a2/attachment.pgp>
#2 lore raw
Quoted 4 lines · Tom Rini
Quoted 2 lines · Gregoire Gentil

Hello,

Quoted 8 lines
Quoted 5 lines

In TI x-loader, the boot reason is copied to a scratchpad 0x4A326000 as shown here:
https://gitorious.org/x-loader/x-loader/source/HEAD:cpu/omap4/start.S#L102

How can I access the boot reason in u-boot or in the SPL?

spl_boot_mode() and spl_boot_device().

Thank you. Yes, I found the calls. My point is that I need the boot_device after SPL and it's not transmitted down the chain. Doing the following reestablishes what the legacy x-loader was doing:

*(volatile unsigned int *)(0x4A326000) = spl_boot_device();

I think that it's safe as the SRAM is not used after SPL,

Gr?goire

#4 lore raw

[U-Boot] u-boot compilation broken for OMAP4 if no USB_HOST_ETHER

In reply to Tom Rini

Hello,

If you try to compile u-boot head for OMAP4 without CONFIG_USB_HOST_ETHER, it's failing.

arch/arm/cpu/armv7/omap-common/utils.c +2 -0
@@ -57,6 +57,8 @@ void __weak usb_fake_mac_from_die_id(u32 *id)
                 device_mac[4] = id[0] & 0xff;
                 device_mac[5] = (id[0] >> 8) & 0xff;
 
+#ifdef CONFIG_USB_HOST_ETHER
                 eth_setenv_enetaddr("usbethaddr", device_mac);
+#endif
         }
  }

Gr?goire

#3 lore raw
In reply to Gregoire Gentil
Quoted 15 lines · Gregoire Gentil
Quoted 4 lines · Tom Rini
Quoted 2 lines · Gregoire Gentil

Hello,

Quoted 8 lines
Quoted 5 lines

In TI x-loader, the boot reason is copied to a scratchpad 0x4A326000 as shown here:
https://gitorious.org/x-loader/x-loader/source/HEAD:cpu/omap4/start.S#L102

How can I access the boot reason in u-boot or in the SPL?

spl_boot_mode() and spl_boot_device().

Quoted 7 lines

Thank you. Yes, I found the calls. My point is that I need the boot_device after SPL and it's not transmitted down the chain. Doing the following reestablishes what the legacy x-loader was doing:

*(volatile unsigned int *)(0x4A326000) = spl_boot_device();

I think that it's safe as the SRAM is not used after SPL,

It's possibly good enough for your needs, yes. I had toyed with the idea of passing this down more formally and generically but hadn't gotten far.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141002/9b58addf/attachment.pgp>