x86: Import glibc memcpy implementation

Taken from glibc version 2.14.90

--
Changes for v2:
 - None
x86: Speed up copy-to-RAM and clear BSS operations

The implementations of memcpy and memset are now the optimised versions
from glibc, so use them instead of simple copy loops

--
Changes for v2:
 - Removed unneeded brackets
x86: Remove GDR related magic numbers

--
Changes for v2:
 - Use an enum
 - Add defined for GDT size (previously added in patch 7)
 - Use X86_ namespace (as per Linux headers)
x86: Rework Global Descriptor Table loading

The inline assembler is ugly and uses hard coded magic numbers. Make it more
elegant to allow cleaner implementation of future GDT related patches. The
compiler seems smart enough to generate the same code anyway

--
Changes for v2:
 - Rebased against revised patch #3
 - Use GDT size define instead of magic number
 - Added commit message
x86: Simplify Flash-to-RAM code execution transition

Move the relocation offset calculation out of assembler and into C. This
also paves the way for the upcoming init sequence simplification by adding
the board_init_f_r flash to RAM transitional function

--
Changes for v2:
 - Added commit message
 - Minor adjustment to new stack address comment
x86: Rework relocation calculations

This commit introduces no functional changes - It simply re-arranges the
calculations so that adding to them in future commits will be cleaner

--
Changes for v2:
 - Fixed typo in title
 - Added commit message
x86: Use fs for global data

Use the base address of the 'F' segment as a pointer to the global data
structure. By adding the linear address (i.e. the 'D' segment address) as
the first word of the global data structure, the address of the global data
relative to the 'D' segment can be found simply, for example, by:

	fs movl 0, %eax

This makes the gd 'pointer' writable prior to relocation (by reloading the
Global Desctriptor Table) which brings x86 into line with all other arches

NOTE: Writing to the gd 'pointer' is expensive (but we only do it
twice) but using it to access global data members (read and write) is
still fairly cheap

--
Changes for v2:
 - Rebased against changes made to patch #3
 - Removed extra indent
 - Tweaked commit message
x86: Set GD_FLG_RELOC after entering in-RAM copy of U-Boot

--
Changes for v2:
 - None
x86: Create weak init_cache() and default enable_caches() functions

--
Changes for v2:
 - Tweaked commit title
x86: Allow cache before copy to RAM

--
Changes for v2:
 - None
x86: Tweak IDT and GDT for alignment and readability

--
Changes for v2:
 - Renamed to better reflect nature of changes
CHECKPATCH: arch/x86/lib/*
x86: Move do_go_exec() out of board.c

--
Changes for v2:
 - None
x86: Move setup_pcat_compatibility() out of board.c

This function simply does not belong in board.c

--
Changes for v2:
 - Added commit message
x86: Move relocation code out of board.c
x86: Split init functions out of board.c

This patch moves towards reducing board.c to simply a set of init cores for
the three initialisation phases (Flash, Flash/RAM, and RAM), a set of three
init function arrays and a init function array processing function
x86: Convert board_init_f_r to a processing loop

Create an init function array for board_init_f_r - This finalises the
migration to a purely array based initialisation mechanism

Also tweak a few comments while we are at it so everything is 'correct'

--
Changes for v2:
 - Renamed to a more apt name
 - Fix bug in set_reloc_flag_r
 - Re-instate gd->flags = boot_flags; in board_init_f
 - Added commit message
Merge branch 'staging'
Blackfin: easylogo: add lzma logos

The bf527-ezkit boards are getting too big to fit into their reserved
flash space, so we need to use a lzma compressed logo.

Since the video driver code is very similar, add lzma compressed support
to all of the Blackfin video drivers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
tegra2: Fix conflicting pinmux for UARTA

Tegra appears to boot with function UARTA pre-selected on mux
group SDB. If two mux groups are both set to the same function,
it's unclear which group's pins drive the RX signals into the
HW module. For UARTA, SDB certainly overrides group IRTX in
practice. To solve this, configure some alternative function on
SDB to avoid the conflict. Also, tri-state the group to avoid
driving any signal onto it until we know what's connected.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>