SPL: move CONFIG_SPL_*_LOAD to Kconfig
Get series with b4
b4 am 20161206160111.GO4248@bill-the-catVersions newest first
- v1 Latest0 of 3 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/3] SPL: move CONFIG_SPL_*_LOAD to Kconfig
Quoted 58 lines · Igor Grinberg
Hi Tom,
Quoted 49 lines · Tom Rini
Quoted 14 lines · Fabien Parent
Moving to CONFIG_SPL_*_LOAD options to
Kconfigoffers several advantage:
* simpler config headers
* on some boards we can easily switch to another boot media without needing to modify the config headers.This series fixes an issue in davinci where a wrong option was used in place of a CONFIG_SPL_*_LOAD option, then move the options to
Kconfigoptions, and finally start using theseKconfigoptions for the OMAPL138-LCDK board.Fabien Parent (3):
davinci: spl: use correct macro to select boot device
SPL: createKconfigoptions for CONFIG_SPL_*_LOAD
davinci:omapl138_lcdk: use new CONFIG_SPL_*_LOADKconfigoptionsQuoted 6 lines
arch/arm/mach-davinci/spl.c | 2 +- common/spl/Kconfig | 25 +++++++++++++++++++++++++ configs/omapl138_lcdk_defconfig | 1 + include/configs/omapl138_lcdk.h | 2 -- scripts/config_whitelist.txt | 3 --- 5 files changed, 27 insertions(+), 6 deletions(-)So, I think this shows that some of the SPL framework needs to be revisited for davinci. First, lets make it clear what CONFIG_SPL_{SPI,NAND,MMC}_LOAD is doing.
CONFIG_SPL_MMC_LOADis used to flag that on davinci we're loading U-Boot from MMC. It's not set / used today but I assume it was working when I introduced all of this.
CONFIG_SPL_NAND_LOADis used for two things. First, it is used to flag that on davinci we're loading U-Boot from NAND. Second, it is used to enable the non-SPL_FRAMEWORK NAND driver (drivers/mtd/nand/nand_spl_load.c). This driver is not used on davinci.
CONFIG_SPL_SPI_LOADis used for two things. First, it is used to flag that on davinci we're loading U-Boot from SPI flash. Second, it used globally to enablecommon/spl/spl_spi.c.NAND boot is done here via
CONFIG_SPL_NAND_SIMPLEwhich is the regular SPL framework based NAND driver (drivers/mtd/nand/nand_spl_simple.c). This also means that the patch to updateCONFIG_SYS_NAND_U_BOOT_SIZEwas not needed since we don't use that driver.Now, I think that in retrospect arch/arm/mach-davinci/spl.c::spl_boot_device could be re-worked to key off of
CONFIG_SPL_NAND_SIMPLE/CONFIG_SPL_SPI_SUPPORT/SPL_MMC_SUPPORT.Quoted 5 lines
And a good but possibly complex series would be to consolidate the usage of
SPL_SPI_SUPPORT,SPL_SPI_FLASH_SUPPORTandSPL_SPI_LOADjust in toSPL_SPI_SUPPORT. I'll probably try and do this myself as there's a ton of build testing and size checking to make sure nothing odd breaks here to do.
Quoted 7 lines
Just a thought...
Are you sure you want to combine all three (spi, spi flash, and spi load) under one define?
Won't be there any case for parsing some spi device (say eeprom) in the SPL, but no spi flash to load U-Boot from?
It might be sensible to keep the "spi flash" and the "spi load" together, but I think it might be more beneficial to keep the spi bus support apart.
Ah, good point. I don't know if we have that case today, but that would be one of the gotchas I'd be size-checking for. And another place where the 'imply' keyword Masahiro pointed out earlier would be helpful for too. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161206/832a8996/attachment.sig>