* [U-Boot] Boot reason in SPL for OMAP4
@ 2014-09-30 17:26 Gregoire Gentil
2014-10-01 17:34 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Gregoire Gentil @ 2014-09-30 17:26 UTC (permalink / raw)
To: u-boot
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?
Gr?goire
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Boot reason in SPL for OMAP4
2014-09-30 17:26 [U-Boot] Boot reason in SPL for OMAP4 Gregoire Gentil
@ 2014-10-01 17:34 ` Tom Rini
2014-10-01 19:13 ` Gregoire Gentil
2014-10-01 19:16 ` [U-Boot] u-boot compilation broken for OMAP4 if no USB_HOST_ETHER Gregoire Gentil
0 siblings, 2 replies; 5+ messages in thread
From: Tom Rini @ 2014-10-01 17:34 UTC (permalink / raw)
To: u-boot
On Tue, Sep 30, 2014 at 10:26:08AM -0700, Gregoire Gentil wrote:
> 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().
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Boot reason in SPL for OMAP4
2014-10-01 17:34 ` Tom Rini
@ 2014-10-01 19:13 ` Gregoire Gentil
2014-10-02 13:53 ` Tom Rini
2014-10-01 19:16 ` [U-Boot] u-boot compilation broken for OMAP4 if no USB_HOST_ETHER Gregoire Gentil
1 sibling, 1 reply; 5+ messages in thread
From: Gregoire Gentil @ 2014-10-01 19:13 UTC (permalink / raw)
To: u-boot
On 10/01/2014 10:34 AM, Tom Rini wrote:
> On Tue, Sep 30, 2014 at 10:26:08AM -0700, Gregoire Gentil wrote:
>
>> 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().
>
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] u-boot compilation broken for OMAP4 if no USB_HOST_ETHER
2014-10-01 17:34 ` Tom Rini
2014-10-01 19:13 ` Gregoire Gentil
@ 2014-10-01 19:16 ` Gregoire Gentil
1 sibling, 0 replies; 5+ messages in thread
From: Gregoire Gentil @ 2014-10-01 19:16 UTC (permalink / raw)
To: u-boot
Hello,
If you try to compile u-boot head for OMAP4 without
CONFIG_USB_HOST_ETHER, it's failing.
--- a/arch/arm/cpu/armv7/omap-common/utils.c
+++ b/arch/arm/cpu/armv7/omap-common/utils.c
@@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Boot reason in SPL for OMAP4
2014-10-01 19:13 ` Gregoire Gentil
@ 2014-10-02 13:53 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2014-10-02 13:53 UTC (permalink / raw)
To: u-boot
On Wed, Oct 01, 2014 at 12:13:50PM -0700, Gregoire Gentil wrote:
>
>
> On 10/01/2014 10:34 AM, Tom Rini wrote:
> >On Tue, Sep 30, 2014 at 10:26:08AM -0700, Gregoire Gentil wrote:
> >
> >>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().
> >
> 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.
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-02 13:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 17:26 [U-Boot] Boot reason in SPL for OMAP4 Gregoire Gentil
2014-10-01 17:34 ` Tom Rini
2014-10-01 19:13 ` Gregoire Gentil
2014-10-02 13:53 ` Tom Rini
2014-10-01 19:16 ` [U-Boot] u-boot compilation broken for OMAP4 if no USB_HOST_ETHER Gregoire Gentil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox