From: Tom Rini Date: Thu, 2 Oct 2014 09:53:08 -0400 Subject: [U-Boot] Boot reason in SPL for OMAP4 In-Reply-To: <542C526E.2010705@gentil.com> References: <542AE7B0.6000300@gentil.com> <20141001173456.GZ25506@bill-the-cat> <542C526E.2010705@gentil.com> Message-ID: <20141002135308.GB25506@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: