[U-Boot] [PATCH v6 0/29] ARM: SPL: Make more generic, merge DaVinci and OMAP

Tom Rini trini at ti.com
Fri Aug 31 20:02:47 CEST 2012


Hey all,

The following patch series merges the davinci and omap-common SPL
frameworks into a single framework, CONFIG_SPL_FRAMEWORK along with a
few small cleanups to the code to make it a little smaller and more
flexible.  The end result is that davinci can now opt in on
SPL-boots-Linux by just setting the right defines and other platforms
would just need to adapt to this framework.  In my testing, davinci
gains between 300 and 700 bytes for this (not enabling the SPL OS
feature) and omap4/5/etc lose just a little bit (from the printf->puts
changes).  I've tested this on omap3_beagle (xM and classic) and
omap4_panda.  I don't have any davinci platforms that were previously
using SPL so I can't boot-test those changes but since everyone sets
CONFIG_SPL_MAX_SIZE, we're OK in that department.

To make this series easier to test I've placed it on
http://github.com/trini/u-boot WIP/spl-improvements

I've looked a little into re-reducing the size and the biggest problem I
see is that SPI a lot of informational prints that we don't need,
strictly speaking, but are nice in a normal U-Boot context.  I'm unsure
of the best way to quiet these as I don't like the idea of sprinkling
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303 and I'm sending
another email to discuss that.

v6 is tested on:
- AM335x EVM, Beaglebone, Beagleboard rev C (NAND and MMC), Beagleboard
  xM, OMAP3EVM (MMC) Devkit8000 (MMC + SPL OS goto U-Boot instead, no
  kernel so no SPL Linux test), Pandaboard, Pandaboard ES, LogicPD
  AM1808 EVM

'reset' and cold power-on tested in various combinations.

--
Tom

Changes in v2:
- Add CONFIG_SYS_SPL_MALLOC_START / SIZE defines from Christian Riesch
- Add README.da850_am18xxevm
- Add arch/arm/cpu/arm926ejs/davinci/config.mk to build u-boot.ais
- Fix checkpatch warning (u32* boot_params_ptr -> u32 *boot_params_ptr)
- Place files into common/spl (due to gcc bug #54303) and include/spl.h
- Reorder all of the patches that used to follow this to precede.

Changes in v3:
- Fix checkpatch.pl warning
- Fix thinko, Nand -> SPI (spotted by Prabhakar Lad)
- Make u-boot.ais use u-boot.img not u-boot.bin, now that it uses
  CONFIG_SPL_FRAMEWORK
- Make use of board_init_f being a weak function now so that we can perform
  early init.  Fixes the cannot reset problem.
- Rename to README.da850, add more direct recovery method (Christian
  Riesch)

Changes in v4:
- Adapt davinci to new board_init_f requirements
- Add Stefano's patch for CONFIG_SYS_MONITOR_LEN
- Based on PowerPC, use memset to clear BSS rather than relocate_code
- Document what board_init_f must do
- Further re-word README.da850 based on feedback from Christian Riesch
- Leave nand_spl_load.c alone, move the new load into nand_spl_simple.c
- Make board_init_f setup the global data pointer, after clearing BSS.
- Move board_init_f / jump_to_image_linux to arch/arm/lib/spl.c

Changes in v5:
- Add Stefan's patch for NOR loading in SPL
- Add Stefan's patch to use image_get_xxx() functions
- After seeing Stefan's PowerPC series, move gdata to arch/arm/lib/spl.c
- Drop <asm/utils.h> from spl.c (noticed by Stefan)
- Drop mpc5xxx-specific memcpy changes, these should be handled by the
  Makefile logic (noticed by Daniel Schwierzeck, changed by me)
- Move the file to common/spl/ rather than integrate with another file,
  after talking with Scott Wood
- Update davinci conversion for NAND change

Changes in v6:
- Add Pavel's spl_ram_load_image for when we've already got next image
  residing in DDR.
- Add Pavel's whitespace fix to omap-common/u-boot-spl.lds
- Add Stefan's patch for custom U-Boot entry point
- Add Sughosh's patch to update hawkboard
- Document that preloader_console_init requires the gd pointer to be setup.
- Fix multiline comment in spl_ram_load_image.
- Fix typo (L137 -> L138) noticed by Christian Riesch
- Have omap*/am33xx set gd prior to calling preloader_console_init
- Make common/spl/spl_nand.o build for CONFIG_SPL_NAND_SUPPORT (noticed by
  Scott Wood)
- Move __bss* extern's to <asm/spl.h>

Pavel Machek (2):
  omap-common: SPL: Fix whitespace in omap-common/u-boot-spl.lds.
  SPL: Add support for loading image from ram in SPL.

Stefan Roese (4):
  SPL: Use image_get_xxx() functions to access header values
  SPL: Add NOR flash booting support
  SPL: Add option to skip copying of the mkimage header
  SPL: Enable use of custom defined U-Boot entry point

Stefano Babic (1):
  SPL: do not use fix value for u-boot size

Sughosh Ganu (1):
  hawkboard: Update config file to work with common spl framework

Tom Rini (21):
  Makefile: Move SPL files to clobber, remove from clean
  spl_mmc: Make FAT checks / calls guarded with CONFIG_SPL_FAT_SUPPORT
  omap-common: SPL: Add CONFIG_SPL_DISPLAY_PRINT / spl_display_print()
  omap-common: Fix typo in save_boot_params() in lowlevel_init.S
  ARM: SPL: Rename omap_boot_device to spl_boot_device
  ARM: SPL: Rename omap_boot_mode to spl_boot_mode()
  ARM: SPL: Remove NAND_MODE_HW_ECC from spl_nand.c
  ARM: SPL: Only call mem_malloc_init if configured
  ARM: SPL: Add <asm/spl.h> and <asm/arch/spl.h>
  ARM: SPL: Make spl_mmc.c more generic
  ARM: SPL: Clean up spl.c / spl_nand.c slightly
  ARM: SPL: Start hooking in the current SPI SPL support
  ARM: SPL: Move gpmc_init() to spl_board_init()
  SPL: Move the omap SPL framework to common/spl
  SPL: Create arch/arm/lib/spl.c for board_init_f and
    jump_to_image_linux
  SPL: NAND: Move arch/arm/cpu/armv7/omap-common/spl_nand.c to
    common/spl
  ARM: SPL: Convert davinci to CONFIG_SPL_FRAMEWORK
  da850: Add README.da850
  SPL: SPI: Enhance spi_spl_load to match the other load functions
  SPL: Make un-supported boot device puts a debug instead
  SPL: Rework how we inform about un-headered images

 Makefile                                           |   16 +-
 README                                             |   12 ++
 arch/arm/cpu/arm926ejs/davinci/Makefile            |    2 +-
 arch/arm/cpu/arm926ejs/davinci/config.mk           |   16 ++
 arch/arm/cpu/arm926ejs/davinci/spl.c               |   60 ++++----
 arch/arm/cpu/arm926ejs/start.S                     |   20 +--
 arch/arm/cpu/armv7/am33xx/board.c                  |    4 +-
 arch/arm/cpu/armv7/omap-common/Makefile            |   13 --
 arch/arm/cpu/armv7/omap-common/boot-common.c       |   27 +++-
 arch/arm/cpu/armv7/omap-common/hwinit-common.c     |   10 +-
 arch/arm/cpu/armv7/omap-common/lowlevel_init.S     |    6 +-
 arch/arm/cpu/armv7/omap-common/u-boot-spl.lds      |    6 +-
 arch/arm/cpu/armv7/omap3/board.c                   |   32 +++-
 arch/arm/cpu/armv7/start.S                         |   13 +-
 arch/arm/include/asm/arch-am33xx/spl.h             |   31 ++++
 arch/arm/include/asm/arch-davinci/spl.h            |   28 ++++
 arch/arm/include/asm/arch-omap3/spl.h              |   34 +++++
 arch/arm/include/asm/arch-omap4/spl.h              |   35 +++++
 arch/arm/include/asm/arch-omap4/sys_proto.h        |    1 -
 arch/arm/include/asm/arch-omap5/spl.h              |   35 +++++
 arch/arm/include/asm/arch-omap5/sys_proto.h        |    1 -
 arch/arm/include/asm/omap_common.h                 |   77 ----------
 arch/arm/include/asm/spl.h                         |   34 +++++
 arch/arm/lib/Makefile                              |    2 +
 arch/arm/lib/spl.c                                 |   72 +++++++++
 board/davinci/da8xxevm/README.da850                |   68 +++++++++
 board/overo/overo.c                                |   10 --
 common/spl/Makefile                                |   39 +++++
 .../arm/cpu/armv7/omap-common => common/spl}/spl.c |  157 +++++++++++---------
 .../armv7/omap-common => common/spl}/spl_nand.c    |   25 +---
 common/spl/spl_nor.c                               |   62 ++++++++
 .../armv7/omap-common => common/spl}/spl_ymodem.c  |    3 +-
 doc/README.SPL                                     |    1 +
 drivers/mmc/Makefile                               |    5 +
 .../armv7/omap-common => drivers/mmc}/spl_mmc.c    |   24 +--
 drivers/mtd/spi/spi_spl_load.c                     |   23 +--
 include/configs/am335x_evm.h                       |    1 +
 include/configs/am3517_crane.h                     |    2 +
 include/configs/am3517_evm.h                       |    2 +
 include/configs/cam_enc_4xx.h                      |    3 +-
 include/configs/da850evm.h                         |    5 +
 include/configs/devkit8000.h                       |    1 +
 include/configs/hawkboard.h                        |    5 +-
 include/configs/mcx.h                              |    2 +
 include/configs/omap3_beagle.h                     |    1 +
 include/configs/omap3_evm_common.h                 |    1 +
 include/configs/omap3_overo.h                      |    1 +
 include/configs/omap4_common.h                     |    2 +
 include/configs/omap5_evm.h                        |    2 +
 include/configs/tam3517-common.h                   |    2 +
 include/configs/tricorder.h                        |    1 +
 include/spl.h                                      |   77 ++++++++++
 spl/Makefile                                       |    1 +
 53 files changed, 797 insertions(+), 316 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/davinci/config.mk
 create mode 100644 arch/arm/include/asm/arch-am33xx/spl.h
 create mode 100644 arch/arm/include/asm/arch-davinci/spl.h
 create mode 100644 arch/arm/include/asm/arch-omap3/spl.h
 create mode 100644 arch/arm/include/asm/arch-omap4/spl.h
 create mode 100644 arch/arm/include/asm/arch-omap5/spl.h
 create mode 100644 arch/arm/include/asm/spl.h
 create mode 100644 arch/arm/lib/spl.c
 create mode 100644 board/davinci/da8xxevm/README.da850
 create mode 100644 common/spl/Makefile
 rename {arch/arm/cpu/armv7/omap-common => common/spl}/spl.c (60%)
 rename {arch/arm/cpu/armv7/omap-common => common/spl}/spl_nand.c (86%)
 create mode 100644 common/spl/spl_nor.c
 rename {arch/arm/cpu/armv7/omap-common => common/spl}/spl_ymodem.c (96%)
 rename {arch/arm/cpu/armv7/omap-common => drivers/mmc}/spl_mmc.c (91%)
 create mode 100644 include/spl.h

-- 
1.7.9.5



More information about the U-Boot mailing list