[U-Boot] [PATCH 2/2] OMAP3: Add SPL support to Beagleboard
Tom Rini
tom.rini at gmail.com
Fri Nov 4 17:50:14 CET 2011
On Thu, Oct 27, 2011 at 4:22 PM, Scott Wood <scottwood at freescale.com> wrote:
> On 10/27/2011 06:13 PM, Tom Rini wrote:
>> On 10/27/2011 04:10 PM, Igor Grinberg wrote:
>>> On 10/27/2011 11:29 PM, Tom Rini wrote:
>>>> On 10/27/2011 02:18 PM, Igor Grinberg wrote:
>>>>> On 10/26/2011 11:13 PM, Tom Rini wrote:
>> [snip]
>>>>>> +/* nand_command: Send a flash command to the flash chip */
>>>>>> +static void nand_command(unsigned char command)
>>>>>> +{
>>>>>> + WRITE_NAND_COMMAND(command, NAND_ADDR);
>>>>>> +
>>>>>> + if (command == NAND_CMD_RESET) {
>>>>>> + unsigned char ret_val;
>>>>>> + nand_command(NAND_CMD_STATUS);
>>>>>> + do {
>>>>>> + ret_val = READ_NAND(NAND_ADDR);/* wait till ready */
>>>>>> + } while ((ret_val & 0x40) != 0x40);
>>>>> You should be using some kind of timeout, so you will not stuck in here
>>>>> without being noticed.
>>>> OK. I've been wondering if we shouldn't somehow make a
>>>> not-tied-to-full-mtd nand_command more available since I suspect a few
>>>> other boards will be in a similar situation, for probing early on.
>>>
>>> That would be much better solution.
>>
>> (Background if you've otherwise ignored the thread, on some omap3 boards
>> we need to take a whack at NAND to see what DDR we have)
>>
>> OK, so, Scott, where would you suggest we put a very trivial set of nand
>> infrastructure we need outside of the scope of loading u-boot itself
>> from NAND ?
>
> Can the SPL code be used (not an actual SPL build, just the NAND code
> associated with it)?
So, as I start down this path, nand_command needs nand_init() done and
that means we need the chip driver so at this point I'm wondering if
it's not better to just say that boards that need to poke NAND to
determine memory just need CONFIG_SPL_NAND_SIMPLE set and un-static
nand_command that we've got already (and make boards call nand_init()
before nand_command()), comments?
--
Tom
More information about the U-Boot
mailing list