From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/17] ARM: SPL: Move the omap SPL framework to arch/arm/lib
Date: Thu, 16 Aug 2012 07:38:16 -0700 [thread overview]
Message-ID: <502D05D8.10600@ti.com> (raw)
In-Reply-To: <502CA535.3090700@denx.de>
On 08/16/2012 12:45 AM, Stefano Babic wrote:
> On 15/08/2012 23:30, Tom Rini wrote:
>> Add a new flag, CONFIG_SPL_FRAMEWORK to opt into the arch/arm/lib SPL
>> framework, enable on all of the previously using boards.
>>
>> Signed-off-by: Tom Rini <trini@ti.com>
>> ---
>
> Hi Tom,
>
>> README | 5 +
>> arch/arm/cpu/armv7/omap-common/Makefile | 13 --
>> arch/arm/cpu/armv7/omap-common/spl.c | 225 ---------------------------
>> arch/arm/cpu/armv7/omap-common/spl_mmc.c | 154 ------------------
>> arch/arm/cpu/armv7/omap-common/spl_nand.c | 111 -------------
>> arch/arm/cpu/armv7/omap-common/spl_ymodem.c | 76 ---------
>> arch/arm/lib/Makefile | 9 +-
>> arch/arm/lib/spl.c | 225 +++++++++++++++++++++++++++
>> arch/arm/lib/spl_mmc.c | 154 ++++++++++++++++++
>> arch/arm/lib/spl_nand.c | 111 +++++++++++++
>> arch/arm/lib/spl_ymodem.c | 76 +++++++++
>> include/configs/am335x_evm.h | 1 +
>> include/configs/am3517_crane.h | 1 +
>> include/configs/am3517_evm.h | 1 +
>> include/configs/devkit8000.h | 1 +
>> include/configs/mcx.h | 1 +
>> include/configs/omap3_beagle.h | 1 +
>> include/configs/omap3_evm_common.h | 1 +
>> include/configs/omap3_overo.h | 1 +
>> include/configs/omap4_common.h | 1 +
>> include/configs/omap5_evm.h | 1 +
>> include/configs/tam3517-common.h | 1 +
>> include/configs/tricorder.h | 1 +
>> 23 files changed, 591 insertions(+), 580 deletions(-)
>> delete mode 100644 arch/arm/cpu/armv7/omap-common/spl.c
>> delete mode 100644 arch/arm/cpu/armv7/omap-common/spl_mmc.c
>> delete mode 100644 arch/arm/cpu/armv7/omap-common/spl_nand.c
>> delete mode 100644 arch/arm/cpu/armv7/omap-common/spl_ymodem.c
>> create mode 100644 arch/arm/lib/spl.c
>> create mode 100644 arch/arm/lib/spl_mmc.c
>> create mode 100644 arch/arm/lib/spl_nand.c
>> create mode 100644 arch/arm/lib/spl_ymodem.c
>>
>
> In my attempt I moved files from arch/arm/cpu/armv7/omap-common/ to
> common. This is because to make it available to all SOCs, not only
> armv7. What do you think about ? I would like to add an example with an
> arm1136 (MX35).
Second request so yes, for v2 I'll move things to common/
[snip]
>> +#include <asm/omap_common.h>
>
> This is a conflict I got. This file should be generic code, and should
> not have reference to a specific SOC or SOC family, as omap here. So I
> have added a include/spl.h with only the SPL relevant part, dropping
> other OMAP specific from this file (I see you did the same with
> omap_boot_device and omap_boot_mode).
>
>
>> +#include <asm/arch/mmc_host_def.h>
>
> As far as I have understood, this is only for MMCSD_SECTOR_SIZE, that
> can be moved into another header file. Not all SOCs have
> asm/arch/mmc_host_def.h
Yes, mandating what the asm/ mmc header file names should be is
something I've thought about but not had to step on, yet.
>> +#include <common.h>
>> +#include <asm/u-boot.h>
>> +#include <asm/utils.h>
>> +#include <asm/arch/sys_proto.h>
>> +#include <mmc.h>
>> +#include <fat.h>
>> +#include <version.h>
>> +#include <asm/omap_common.h>
>> +#include <asm/arch/mmc_host_def.h>
>
> Both files are OMAP specific
>
>> +
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>> +#ifdef CONFIG_GENERIC_MMC
>> +int board_mmc_init(bd_t *bis)
>> +{
>> + switch (omap_boot_device()) {
>
> And this is also omap specific. Replaced by soc_boot_device ?
My goal with this series, and part of why I added CONFIG_SPL_FRAMEWORK
was that indeed, there's a lot of omap-isms in the code at the start. I
believe by the end of the series they're all removed and the code is
common. If it's a concern I can re-work things so that the move is one
of the last steps.
--
Tom
next prev parent reply other threads:[~2012-08-16 14:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 21:30 [U-Boot] [PATCH 00/17]: ARM: SPL: Make more generic, merge DaVinci and OMAP Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 01/17] spl_mmc: Make FAT checks / calls guarded with CONFIG_SPL_FAT_SUPPORT Tom Rini
2012-08-16 7:52 ` Stefano Babic
2012-08-15 21:30 ` [U-Boot] [PATCH 02/17] omap-common: SPL: Add CONFIG_SPL_DISPLAY_PRINT / spl_display_print() Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 03/17] ARM: SPL: Move the omap SPL framework to arch/arm/lib Tom Rini
2012-08-16 7:45 ` Stefano Babic
2012-08-16 14:38 ` Tom Rini [this message]
2012-08-17 8:25 ` Stefano Babic
2012-08-15 21:30 ` [U-Boot] [PATCH 04/17] Makefile: Move SPL files to clobber, remove from clean Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 05/17] ARM: SPL: Rename omap_boot_device to spl_boot_device Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 06/17] ARM: SPL: Rename omap_boot_mode to spl_boot_mode() Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 07/17] omap-common: Fix typo in lowlevel_init.S::save_boot_params Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 08/17] ARM: SPL: Remove NAND_MODE_HW_ECC from spl_nand.c Tom Rini
2012-08-16 7:59 ` Stefano Babic
2012-08-15 21:30 ` [U-Boot] [PATCH 09/17] ARM: SPL: Only call mem_malloc_init if configured Tom Rini
2012-08-16 8:01 ` Stefano Babic
2012-08-16 14:40 ` Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 10/17] ARM: SPL: Add <asm/spl.h> and <asm/arch/spl.h> Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 11/17] ARM: SPL: Make spl_mmc.c more generic Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 12/17] ARM: SPL: Clean up spl.c / spl_nand.c slightly Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 13/17] ARM: SPL: Start hooking in the current SPI SPL support Tom Rini
2012-08-15 21:30 ` [U-Boot] [PATCH 14/17] ARM: SPL: Move gpmc_init() to spl_board_init() Tom Rini
2012-08-16 8:05 ` Stefano Babic
2012-08-15 21:30 ` [U-Boot] [PATCH 15/17] ARM: SPL: Convert davinci to CONFIG_SPL_FRAMEWORK Tom Rini
2012-08-20 10:08 ` Christian Riesch
2012-08-15 21:30 ` [U-Boot] [PATCH 16/17] SPL: Enhance drivers/mtd/nand/nand_spl_load.c Tom Rini
2012-08-24 20:35 ` Scott Wood
2012-08-15 21:30 ` [U-Boot] [PATCH 17/17] ARM: SPL: Enhance spi_spl_load to match the other load functions Tom Rini
2012-08-16 6:30 ` [U-Boot] [PATCH 00/17]: ARM: SPL: Make more generic, merge DaVinci and OMAP Stefan Roese
2012-08-16 14:30 ` Tom Rini
2012-08-16 14:50 ` Stefan Roese
2012-08-16 7:32 ` Stefano Babic
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=502D05D8.10600@ti.com \
--to=trini@ti.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