From mboxrd@z Thu Jan 1 00:00:00 1970 From: Javier Martinez Canillas Date: Tue, 17 Jul 2012 01:41:25 +0200 Subject: [U-Boot] [PATCH u-boot-arm/next 1/2] OMAP3: igep00x0: Add config option to choose flash storage memory In-Reply-To: <50045636.8090802@ti.com> References: <1342208490-24761-1-git-send-email-javier@dowhile0.org> <50045636.8090802@ti.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 On Mon, Jul 16, 2012 at 7:58 PM, Tom Rini wrote: > On 07/16/2012 12:43 AM, Enric Balletb? i Serra wrote: > > [snip] >> I would like to investigateif we can do this using runtime detection >> instead of a separate config option. Give me some days. The runtime >> detection can be done reading the sysboot configuration for example. I >> think it's possible, do you think would be possible ? > > Until we have the device model and the ability to see at run-time if we > have say NAND or OneNAND (or neither!) we can't because we have to > build-time define where the environment will be found. > > -- > Tom Hi Enric, Runtime detection is possible reading the sysboot as you said (in fact this is how we do it in the kernel) but as Tom said I didn't find a common way to do this. I guess you can manually detect the NAND type and configure the GPMC registers on the board code but I didn't see other OMAP boards doing this. Instead I found other examples of boards using compile options to choose between memory types. Of course I will be more than glad if you have a better approach to solve this :-) Thanks a lot and best regards, Javier