[U-Boot] [PATCH 2/5] nand: sunxi: Add support for booting from internal NAND memory

Hans de Goede hdegoede at redhat.com
Sat May 9 16:33:54 CEST 2015


Hi,

On 09-05-15 15:53, Ian Campbell wrote:
> On Tue, 2015-05-05 at 11:19 +0200, Daniel Kochmański wrote:
>> (sorry for resending, used wrong mail here - not sure how mailing list
>> will handle that).
>>
>> Ian Campbell writes:
>>
>>> On Wed, 2015-04-29 at 17:02 +0200, Daniel Kochmański wrote:
>>>> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
>>>> index 88e3358..1a30684 100644
>>>> --- a/board/sunxi/Kconfig
>>>> +++ b/board/sunxi/Kconfig
>>>> @@ -239,6 +239,18 @@ config MMC_SUNXI_SLOT_EXTRA
>>>>   	slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable
>>>>   	support for this.
>>>>
>>>> +config SPL_NAND_SUPPORT
>>>> +	bool "SPL/NAND mode support"
>>>> +	depends on SPL
>>>> +	default n
>>>> +	---help---
>>>> +	  This enables support for booting from NAND internal
>>>> +	  memory. U-Boot SPL doesn't detect where is it load from,
>>>> +	  therefore this option is needed to properly load image from
>>>> +	  flash. Option also disables MMC functionality on U-Boot due to
>>>> +	  initialization errors encountered, when both controllers are
>>>> +	  enabled.
>>>
>>> Is this last bit a bug in the s/w or a hardware thing? Does this mean
>>> that MMC is not available in the main u-boot image too when NAND support
>>> is enabled?
>>>
>>
>> I'm not sure what is a reason, but controller can't initialize MMC when
>> SPL is loaded. MMC works in main u-boot allowing to boot from it and
>> perform any other option (rescan, part, info, etc.). It is only SPL
>> relevant.
>
> How strange! Hans, do you have any ideas about why this might be the
> case? Is there some overlap between MMC and NAND? I can't think what...

Nope, I've no clue, things should work with both build-in, first thing
which comes to mind is that we're running out of stack space / internal
sram.

Second thing is, how did you test the SPL code with both build-in ? Did you
boot from MMC or from NAND? It could be that the MMC code relies on some
MMC setup done by the BROM, so that it will not work when booting from NAND.

Regards,

Hans


More information about the U-Boot mailing list