SPL: Move the omap SPL framework to common/spl

Add a new flag, CONFIG_SPL_FRAMEWORK to opt into the common/spl SPL
framework, enable on all of the previously using boards.  We move the
spl_ymodem.c portion to common/ and spl_mmc.c to drivers/mmc/.  We leave
the NAND one in-place as we plan to replace it later in this series.

We use common/spl to avoid linker problems with respect to merging
constant strings in objects.   Otherwise all strings in common/ will be
linked in and kept which grows SPL in size too much.

Series-changes: 3
- Fix checkpatch.pl warning

Series-changes: 2
- Reorder all of the patches that used to follow this to precede.
- Place files into common/spl (due to gcc bug #54303) and include/spl.h

Signed-off-by: Tom Rini <trini@ti.com>
spl: Make CONFIG_SPL_FRAMEWORK board_init_f __weak

Some platforms may need to do more than simply call relocate_code prior
to board_init_r, or perhaps perform more work prior to calling
relocate_code.  Make our default weak to allow for this.  Part of this
requires us to add an extern for 'gdata' so that others can also call
relocate_code.

Signed-off-by: Tom Rini <trini@ti.com>
ARM: SPL: Convert davinci to CONFIG_SPL_FRAMEWORK

- Convert the non-relocation part of board_init_f to spl_board_init,
  turn on CONFIG_SPL_BOARD_INIT in the configs.
- Remove duplicated code.
- Add spl_boot_device() that returns the statically chosen boot device.

Series-changes: 3
- Make use of board_init_f being a weak function now so that we can
  perform early init.  Fixes the cannot reset problem.
- Make u-boot.ais use u-boot.img not u-boot.bin, now that it uses
  CONFIG_SPL_FRAMEWORK

Series-changes: 2
- Add CONFIG_SYS_SPL_MALLOC_START / SIZE defines from Christian Riesch
- Add arch/arm/cpu/arm926ejs/davinci/config.mk to build u-boot.ais

Signed-off-by: Tom Rini <trini@ti.com>
da850: Add README.da850

This file documents when to build for da850evm and when to build for
da850_am18xxevm.  It also documents how to write the u-boot.ais file to
persistent storage (such as SPI), in some cases as well as how to write
a recovery image.

Series-changes: 3
- Fix thinko, Nand -> SPI (spotted by Prabhakar Lad)
- Rename to README.da850, add more direct recovery method (Christian Riesch)

Series-changes: 2
- Add

Signed-off-by: Tom Rini <trini@ti.com>
SPL: Enhance drivers/mtd/nand/nand_spl_load.c

Takes the load function from arch/arm/lib/spl_nand.c instead.  This will
allow for easier integration of SPL-boots-Linux code on other arches.
Kill off CONFIG_SPL_NAND_LOAD as a separate option.

Signed-off-by: Tom Rini <trini@ti.com>
SPL: Enhance spi_spl_load to match the other load functions

Signed-off-by: Tom Rini <trini@ti.com>

Series-to: uboot
Series-cc: criesch, plad, criesch, srajashekhara, mhadli, sganu
Series-version: 3
Cover-letter:
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.

--
Tom
END