arm: cubox-i: fixup new boot script

Add back in ext2 support.  Fix loading the dtb from the subdirectories
as well.
arm: cubox-i: Fix boot device selection with SPL on early hummingboards

For an undetermined reason sometimes the boot device is not
properly setup in the registers for the prototype Hummingboards.
Instead of just failing with can't find boot-device fallback to
use the default SDHC port.
spl: Initial DirectBoot commit for MX6

This has some HummingBoard specific configuration options
enabled by default.  This won't go upstream so I am not worried
about it.  They will be removed later in the patch series.
board: cuboxi: break out get_imx_type

Break this out so it can be used by other functions.  Normally
it would get stored in a variable but it needs to be used both
before and after BSS memory is zero'd
board: cubox-i: build .dtb name dynamically

To be able to support DirectBoot on all the boards with the same
SPL binary we need to dynamically generate the .dtb file we
need to load.
board: cubox-i: Add FastBoot support to SPL

This adds three different boot modes to the SPL driver.  We store
the information in a general persistent 32-bit register, so it
will survive POR. The three modes are

RECOVERY BOOT: The default mode that loads the second stage u-boot
loader load a full set of supported drivers and do a normal bootloader
process loading/running boot.scr's, or uEnv.txt.
FAST BOOT: This mode attempts to load the kernel and dtb and jump
directly to them.  Setting up minimal devices by the bootloader.
DEVELOPER BOOT:  The same as recovery as far as functionality.  The
main difference being in how the workflow could work.

FASTBOOT works in this mode.  Userspace or Kernel needs to initiate
it by setting the register appropriately.  SPL sees this and
attempts to directly boot the Linux kernel.  Before it actually
boots the kernel it puts the register back to Recovery mode.  Therefore
if the kernel doesn't boot correctly and reset fastboot the user
won't be stuck in a boot loop.

DEVELOPER BOOT exists as a flag for developers to use to say,
"Never fastboot this kernel"  Mostly useful for tftbooting
kernels while doing development work and saving a few seconds on
boot isn't a big deal.
bootm: Move zImage structures defines to image.h

Move these into a header so SPL can use them.
spl: Add support to handle dtb and zImage files

This adds the ability for the SPL code to handle file formats
other than uImage and Falcon Modes args file format.
spl: mmc: Change the MMC driver to use dynamic configuration

Previously the SPL MMC driver could only use the static definitions
setup at build time.  To be able to allow the same binary to
run on multiple platforms we use runtime configuration that falls
back to the static definitions.
config: imx_spl: Fixup some minor config issues

make the default dtb more generic now that we can dynamically set
this at runtime.

Fix a minor compile error.
board: cubox-i: Set global ram_size on init.

We are setting up the RAM but not reporting back how much there is
supposed to be.  This sets gd->ram_size on SPL init so we know.
board: cubox-i: Patch memory node in dtb for fastboot

borrow code from the fdt utilities and strip it down to patch
the loaded dtb with memory config if we are fastbooting right into
linux.  I need to move this into our code because including libfdt
and fdt_utilities makes the SPL binary too large.
fatfs: Don't announce every time we read a file

If we want to debug this we can.  Normally the calling code notifies
the user what is going on.  We don't need to echo it here.
mmc: fsl_esdhc: The default clk MAX should be SD standard 20Mhz

For SPL this variable is not set yet.  In case it is not set we
should just set the Max to be the SD standard of 20Mhz not 0.
This increases performance when loading a 5MB zImage from 3.5seconds
to 325ms..
board: cubox-i: Enable prefetch and aux3 in SPL

Enabling this gives our boards a nice performance boost.  We enable
this here so Linux doesn't have to worry about it.  It is board
by board so add it to the SPL initialization.
config: mx6: Enable building THUMB2 instructions

After adding device-tree functionality to SPL directboot code
I was pushing the limits of the code that could run in SRAM.
Enabling THUMB2 instructions saved me about 10K (20-25%) and
everything is working fine.  This should be safe to use on all
recent compilers and ARMv7 chipsets.
arm: mx6: PFD locking errata

The original fix for this errata sometime actually caused the
problem, gating and ungating the clocks caused instability in
on of the PFD's.  After further debugging we believe we have
narrowed down the circumstances that we need to cycle the pfd's
to the case where the state of the pfd's don't match.
config: mx6_cubox-i: If we set serverip boot to the net

It is safe to assumet that if serverip is set that we should
jump right to a netboot.  Otherwise the only way to netboot is
to remove all other kernels etc from the boot directory.
config: cubox-i: Fix board detection despite u-boot's stupidity

U-Boot has great config variables like DISPLAY_BOARD_CONFIG, which
says to me, do you want to output the board config.  What it really
means is INITIALIZE_ENV_BOARD_CONFIG.  I guess they feel if you
can't output something to the console you may as well not set
any of the variables.
config: cubox-i: Fix typo that caused network-boot to always be selected

A separate commit slipped into the last one due to my anger with
u-boot's stupidity.  Fix that typo so normal boots aren't broken.