From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/3] SPL: move CONFIG_SPL_*_LOAD to Kconfig
Date: Tue, 6 Dec 2016 09:32:11 -0500 [thread overview]
Message-ID: <20161206143211.GL4248@bill-the-cat> (raw)
In-Reply-To: <20161206134830.22130-1-fparent@baylibre.com>
On Tue, Dec 06, 2016 at 02:48:27PM +0100, Fabien Parent wrote:
> Moving to CONFIG_SPL_*_LOAD options to Kconfig offers 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 Kconfig options, and
> finally start using these Kconfig options for the OMAPL138-LCDK board.
>
> Fabien Parent (3):
> davinci: spl: use correct macro to select boot device
> SPL: create Kconfig options for CONFIG_SPL_*_LOAD
> davinci: omapl138_lcdk: use new CONFIG_SPL_*_LOAD Kconfig options
>
> 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_LOAD is 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_LOAD is 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_LOAD is 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 enable common/spl/spl_spi.c.
NAND boot is done here via CONFIG_SPL_NAND_SIMPLE which is the regular
SPL framework based NAND driver (drivers/mtd/nand/nand_spl_simple.c).
This also means that the patch to update CONFIG_SYS_NAND_U_BOOT_SIZE was
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.
And a good but possibly complex series would be to consolidate the usage
of SPL_SPI_SUPPORT, SPL_SPI_FLASH_SUPPORT and SPL_SPI_LOAD just in to
SPL_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.
--
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/50ed017b/attachment.sig>
next prev parent reply other threads:[~2016-12-06 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 13:48 [U-Boot] [PATCH 0/3] SPL: move CONFIG_SPL_*_LOAD to Kconfig Fabien Parent
2016-12-06 13:48 ` [U-Boot] [PATCH 1/3] davinci: spl: use correct macro to select boot device Fabien Parent
2016-12-06 13:48 ` [U-Boot] [PATCH 2/3] SPL: create Kconfig options for CONFIG_SPL_*_LOAD Fabien Parent
2016-12-06 13:48 ` [U-Boot] [PATCH 3/3] davinci: omapl138_lcdk: use new CONFIG_SPL_*_LOAD Kconfig options Fabien Parent
2016-12-06 14:32 ` Tom Rini [this message]
2016-12-06 15:57 ` [U-Boot] [PATCH 0/3] SPL: move CONFIG_SPL_*_LOAD to Kconfig Igor Grinberg
2016-12-06 16:01 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161206143211.GL4248@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox