MIPS: bootm: refactor preparation of Linux kernel command line

Move preparation of Linux kernel command line in a separate
function and mark it as legacy. Add a Kconfig option to make
that legacy mode configurable.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: bootm: refactor preparation of Linux kernel environment

Move preparation of Linux kernel environment in a separate
function and mark it as legacy. Add a Kconfig option to make
that legacy mode configurable.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: bootm: add mem, rd_start and rd_size to kernel command line

If the user wants to boot a kernel without legacy environment,
information like memory size, initrd address and size should be
handed over to the kernel in the command line.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: bootm: prepare a flattened device tree for the kernel

Add the initial code to prepare a flattened device tree for
the kernel like relocating the FDT blob and fixing up the
/chosen and /memory nodes.

The final hand over to the kernel is not yet implemented. After
the community agreed on the MIPS boot interface for device trees,
the corresponding code will be added.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: bootm: add bootstage reporting

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

Series-to: u-boot
Series-cc: Paul Burton <paul.burton@imgtec.com>
Series-cc: Gabor Juhos <juhosg@openwrt.org>

Cover-letter:
MIPS: bootm fixes and initial device tree support

This patch series fixes and prepares bootm to initially support
the hand over of flattened device trees to the kernel.

The first patch fixes the missing initramfs relocation if bootm
is used without subcommands.

Patches 3 and 4 make the legacy boot interface configurable.

Patch 5 adds mem, rd_start and rd_size to kernel command line
for targets those do not use the legacy Linux env.

Patch 6 adds the required code to prepare a flattened device tree
for the kernel. The final hand over to the kernel is not yet
implemented. After the community agreed on the official MIPS boot
interface for device trees, the corresponding code will be added.
END
MIPS: kconfig: add option for MIPS_L1_CACHE_SHIFT

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: kconfig: add option for CPU_HAS_SYNC

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: kconfig: add option for CONFIG_SWAP_IO_SPACE

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: malta: do not pull arch-specific header files in config.h

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: malta: fix IO accessor call

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: vct: fix I/O accessor calls

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: sync header files with linux-3.18-rc2

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Merge branch 'mips_include_update_v1' of git://git.denx.de/u-boot-mips into mips-next

* 'mips_include_update_v1' of git://git.denx.de/u-boot-mips:
  MIPS: sync header files with linux-3.18-rc2
  MIPS: vct: fix I/O accessor calls
  MIPS: malta: fix IO accessor call
  MIPS: malta: do not pull arch-specific header files in config.h
  MIPS: kconfig: add option for CONFIG_SWAP_IO_SPACE
  MIPS: kconfig: add option for CPU_HAS_SYNC
  MIPS: kconfig: add option for MIPS_L1_CACHE_SHIFT
  MIPS: bootm: add bootstage reporting
  MIPS: bootm: prepare a flattened device tree for the kernel
  MIPS: bootm: add mem, rd_start and rd_size to kernel command line
  MIPS: bootm: refactor preparation of Linux kernel environment
  MIPS: bootm: refactor preparation of Linux kernel command line