arm: move C runtime setup code in crt0.S

Move all the C runtime setup code from every start.S
in arch/arm into arch/arm/lib/crt0.S. This covers
the code sequence from setting up the initial stack
to calling into board_init_r().

Also, rewrite the C runtime setup and make functions
board_init_*() and relocate_code() behave according to
normal C semantics (no jumping across the C stack any
more, etc).

Some SPL targets had to be touched because they use
start.S explicitly or for some reason; the relevant
maintainers and custodians are cc:ed.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
arm: remove useless code in start.S files

Remove code such as unneeded includes or labels.
These removals have no functional effect.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
mx6qsabresd: Fix booting the kernel from SDHC3

Since commit de7d02aeb (mx6qsabresd: add usdhc2 and usdhc4 support)
SDHC3 device node is no longer 0, which breaks loading a uImage from SDHC3.

Fix it by adapting the default environment to use CONFIG_SYS_MMC_ENV_DEV as the
correct mmc node for loading the kernel from.

While at it, go back to using SDHC3 as the default mmc, since we have Yocto
images that generate an SD card containing U-boot,kernel and rootfs, so it is
more convenient to keep using SDHC3 as it was originally.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx6qsabrelite: Use tabs to environment setting

This rework the environment to use tabs for environment setting as
done in other boards.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx28evk: We shouldn't hardcode a rootfs filesystem type

For a generic environment, we shouldn't have a fixed rootfs filesystem
so we drop it from env.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx28evk: Add support to dynamically choose between fdt use or not

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx53loco: Add support to dynamically choose between fdt use or not

The CONFIG_SYS_CBSIZE has been change to 512 to avoid runtime errors as:

,---[ Runtime error ]
| Hit any key to stop autoboot:  0
| MX53LOCO U-Boot > pri netboot
| netboot=echo Booting from net ...; run netargs; if test ...
| prefetch abort
| pc : [<20747368>]          lr : [<20747365>]
| sp : af566e20  ip : 00000000     fp : 00000000
| r10: 00000002  r9 : af6dfc28     r8 : af566f58
| r7 : af6dfc10  r6 : 00000001     r5 : 00000002  r4 : 74206669
| r3 : 00000000  r2 : 00000060     r1 : 00000020  r0 : 0000018e
| Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
| Resetting CPU ...
|
| resetting ...
`---

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx6qsabrelite: Add support to dynamically choose between fdt use or not

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx6qsabre{auto,sd}: Add support to dynamically choose between fdt use or not

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx53loco: Change default environment to cope with OE changes

OpenEmbedded has change partitioning layout of generated image so it
does not raise warnings during the boot regarding unkown partition
being used for U-Boot.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
mx6qsabrelite: Change default environment to cope with OE changes

OpenEmbedded has change partitioning layout of generated image so it
does not raise warnings during the boot regarding unkown partition
being used for U-Boot.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>