kbuild: bug fixes and cleanups of Makefile.host

This commit imports updates of scripts/Makefile.host
from Linux 3.18-rc1.

Imported commits are:

[1] commit d8d9efe22709 by Masahiro Yamada
  kbuild: fix a typo in scripts/Makefile.host

[2] commit edb950c17de0 by Masahiro Yamada
  kbuild: fix a bug of C++ host program handling

[3] commit 62e2210798ed by Masahiro Yamada
  kbuild: drop shared library support from Makefile.host

[4] commit 663935593915 by Masahiro Yamada
  kbuild: clean up scripts/Makefile.host

[5] commit 1791ff7179f6 by Masahiro Yamada
  kbuild: clean-up and bug fix of scripts/Makefile.host

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cover-letter:
kbuild, kconfig: sync with Linux 3.18-rc1

END
kbuild: improve multi-objs dependency and cleanups

Since Linux 3.18-rc1, Kbuild is able to handle multi-objs
dependency correctly, which also allows us futher cleanups
of some makefiles.

This commit imports those commits:

[1] commit c8589d1e9e01 by Masahiro Yamada
kbuild: handle multi-objs dependency appropriately

[2] commit 97e3226e6e98 by Masahiro Yamada
kbuild: handle the dependency of multi-objs hostprogs appropriately

[3] commit 022af62d0190 by Masahiro Yamada
kbuild: refactor script/kconfig/Makefile

[4] commit 221ecca6cafe by Masahiro Yamada
kbuild: remove redundant clean-files from scripts/kconfig/Makefile

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: sync top Makefile with Linux 3.18-rc1

Since Linux 3.15, relative path feature and related fixes,
cleanups have been merged to the top Makefile.

The relative path feature looks stable enough, so let's import it
to U-Boot along with various cleanups.

Commits imported from Linux (some need adjustment) are:

[1] commit 7e1c04779efd by Michal Marek
  kbuild: Use relative path for $(objtree)

[2] commit 890676c65d69 by Michal Marek
  kbuild: Use relative path when building in the source tree

[3] commit 9da0763bdd82 by Michal Marek
  kbuild: Use relative path when building in a subdir of the source tree

[4] commit c2e28dc975ea by Michal Marek
  kbuild: Print the name of the build directory

[5] commit 066b7ed95580 by Michal Marek
  kbuild: Do not print the build directory with make -s

[6] commit 3f1d9a6cec01 by Michal Marek
  kbuild: make -s should be used with kernelrelease/kernelversion/image_name

[7] commit 7ff525712acf by Masahiro Yamada
  kbuild: fake the "Entering directory ..." message more simply

[8] commit 745a254322c8 by Masahiro Yamada
  kbuild: use $(Q) for sub-make target

[9] commit aa55c8e2f7a3 by Masahiro Yamada
  kbuild: handle C=... and M=... after entering into build directory

[10] commit ab7474ea5361 by Borislav Petkov
  Kbuild: Ignore GREP_OPTIONS env variable

To use relative path feature, tools/Makefile and scripts/Makefile.autoconf
must be tweaked.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kconfig: sync kconfig files with Linux 3.18-rc1

This commit imports Kconfig updates from Linux 3.18-rc1.

'kvmconfig' and 'tinyconfig' help message have been commented out
since they are unavailable at least now;  in the future perhaps
we can implement 'tinyconfig' to disable most of CONFIG_CMD_* to
create a very small U-Boot image.

[1] commit 3aaefce10351 by Josh Triplett
x86, platform, kconfig: move kvmconfig functionality to a helper

[2] commit 0da1d4a0b951 by Josh Triplett
x86: Add "make tinyconfig" to configure the tiniest possible kernel

[3] commit c40724d3f381 by Brian Norris
  kconfig: lxdialog: fix spelling

[4] commit 7285996aa000 by Brian Norris
  kconfig: nconfig: fix multi-byte UTF handling

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: sync misc scripts with Linux 3.18-rc1

This commit imports some updates in misc scripts from Linux 3.18-rc1.

[1] commit cbb4d3e6510b99522719c5ef0 by Horia Geanta
scripts/kernel-doc: handle object-like macros

[2] commit 164f0d2efaaef83 by Michal Marek
kbuild: Fix handling of backslashes in *.cmd files

[3] commit 270a00963cd367214e by Randy Dunlap
scripts/kernel-doc: recognize __meminit

[4] commit a4954fd7724c0f55361eb5 by Masahiro Yamada
  kbuild: remove obj-n and lib-n handling

[5] commit 5b2389b45d1a9c12b9f by Masahiro Yamada
kbuild: simplify build, clean, modbuiltin shorthands

Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: Make scripts executable

The Makefiles call the respective interpreter explicitly, but this makes
it easier to use the scripts manually.

(This commit follows commit 06ed5c2bfaca of Linux Kernel)

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: remove "clobber" target

Now we stick to Linux Kernel's build system, so squash
"clobber" to "clean" target.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
MAINTAINERS: orphan SPEAr boards

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
arm: debug: import debug files from Linux 3.16

U-Boot does not have arch/arm/kernel, include/uapi directories,
This commit copies files as follows:

  Location in Linux               -> Location in U-Boot

  arch/arm/kernel/debug.S         -> arch/arm/lib/debug.S
  arch/arm/include/debug/8250.S   -> arch/arm/include/debug/8250.S
  include/uapi/linux/serial_reg.h -> include/linux/serial_reg.h

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
arm: debug: replace license blocks with SPDX

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
arm: debug: add Kconfig entries for lowlevel debug

We have not had a good method to debug the early boot stage such as
lowlevel_init function.  I guess developers generally use dedicated
debuggers for that, but it is difficult in some cases.
(For example, my debugger cannot connect to the ARM processor when
it is in the secure state.  It sometimes happens when I need to
debug the early boot stage on ARM SoCs with secure extension.)

The low level debug feature in Linux would be also helpful for U-boot
when we are stucking in nasty problems where the console is not
available yet.

You have to enable CONFIG_DEBUG_LL to use this feature.
For now, only 8250-compatible UART devices are supported.
You can add a header file under arch/arm/include/debug/ directory
to support your UART device if necessary.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-version: 3
Series-cc: Stefan Roese <sr@denx.de>
Series-cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cover-letter:
Introduce low-level debug for ARM architecture

I have been in trouble for a while to debug some nasty problem
where neighter a debugger nor printf() function is available.

I found the lowlevel debug feature in ARM Linux can be used as is
in U-Boot too.

I tested this series on our SoCs (32bit ARM, specificly Coretex-A9).
Because I was not sure about aarch64, I have this feature
depend on "! ARM64".

1/6 and 2/6 refactor a bit and move CONFIG_ARM64 to Kconfig.

3/6 imports some source files from Linux 3.16 and
5/6 adds the Kconfig menu.

END
arm: debug: adjust for U-Boot

Because CONFIG_MMU is never defined in U-Boot,
the non-MMU code in debug.S is always used.

Unfortunately, the number of arguments of the addruart macro
in Linux is different between MMU and non-MMU.
This causes a build error when importing some debug macros
using the third argument. (For ex. arch/arm/include/debug/exynos.S)
Pass the third argument to the non-MMU addruart to avoid such a problem.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Series-changes: 2
  - Newly added
sunxi: move "select CPU_V7" to ARCH_SUNXI

CPU_V7 is select'ed by all the MACH_SUN*I.

While we are here, let's delete the redundant "string" typedef
of SYS_CONFIG_NAME.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kconfig: arm: select CPU_V7 for some new boards

This commit adds "select CPU_V7" for some new boards that were not
covered by commit 2e07c249a67e
(kconfig: arm: introduce symbol for ARM CPUs).

Redundant "SYS_CPU" defines and "string" directives should be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Georges Savoundararadj <savoundg@gmail.com>
Series-cc: Georges Savoundararadj <savoundg@gmail.com>
Series-cc: aaribaud
Series-cc: trini
Series-cc: marex
Series-version: 2
Series-changes: 2
  - Rebase on commit 11ada9225a16ed2d8ddbf0715a2416245a777cbc
  - Fix Kosagi Novena board

Cover-letter:
Follow-up patches for commit 2e07c249a67e (kconfig: arm: introduce symbol for ARM CPUs)
END
kconfig: arm: move "armv8" define to arch/arm/Kconfig

Commit 2e07c249a67e (kconfig: arm: introduce symbol for ARM CPUs)
collected the default values of CONFIG_SYS_CPU into arch/arm/Kconfig.

This commit moves "armv8" to there for consistency.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Georges Savoundararadj <savoundg@gmail.com>
Sync defconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kconfig: move some FIT configurations to kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kconfig: add CONFIG_HUSH_PARSER

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
add more command

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
ARM: UniPhier: move configs to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>