exynos: update maintainer of Snow and SMDK5420 board

The email address of Rajeshwari Shinde <rajeshwari.s@samsung.com>
is not working.

This commit gives Akshay the maintainership of Snow and
SMDK5420 boards.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Akshay Saraswat <akshay.s@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Series-version: 2
Series-changes: 2
  - Pass the maintainership of Snow to Akshay
    based on his comment against v1.
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
Sync defconfig

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

CONFIG_SPL should not be enabled for boards that do not have SPL.
CONFIG_SUPPORT_SPL introduced by this commit should be "select"ed
by boards with SPL support and CONFIG_SPL should depend on it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-cc: sjg
Series-cc: trini
Series-version: 2
Cover-letter:
Introduce CONFIG_SUPPORT_SPL/TPL

END
kconfig: add CONFIG_SUPPORT_TPL

CONFIG_TPL should not be enabled for boards that do not have TPL.
CONFIG_SUPPORT_TPL introduced by this commit should be "select"ed
by boards with TPL support and CONFIG_TPL should depend on it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-changes: 2
  - bug fix.  s/HAVE_SPL_SUPPORT/SUPPORT_SPL/
kconfig: fix another bug of "make savedefconfig"

In some cases, the last lines of SPL or TPL are not output to a file.
The entries remaining in the "unmatched" variable must be flushed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Revert "Don't send: mips : workaround a link error"

This reverts commit 2448e4acbff943592ea6e25f80049439855c972b.
kconfig: move CONFIG_SYS_HZ to lib/Kconfig

CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h
(but some boards still have redundant definitions).

This commit moves the definition and the document in README to
Kconfig.  Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000,
the sanity check in lib/time.c should be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-cc: trini
Series-cc: sjg
Cover-letter:
kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes

END
x86: set CONFIG_USE_PRIVATE_LIBGCC to y

The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC
to a boolean macro so we can move it to Kconfig.

In the current implementation, there are two forms of syntax
for this macro:

  - CONFIG_USE_PRIVATE_LIBGCC=y
  - CONFIG_USE_PRIVATE_LIBGCC=<path/to/private/libgcc>

The latter is only used by x86 architecture.
With a little bit refactoring, it can be converted to the former.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
kbuild: drop CONFIG_USE_PRIVATE_LIBGCC=<path/to/libgcc> syntax

Now CONFIG_USE_PRIVATE_LIBGCC is only used as a boolean macro.
Remove CONFIG_USE_PRIVATE_LIBGCC=<path/to/libgcc> syntax.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig

The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
Those architectures should "select" HAVE_PRIVATE_LIBGCC and
CONFIG_USE_PRIVATE_LIBGCC should depend on it.

Currently, this option is enabled on Tegra boards and x86 architecture.
Move the definition from header files to Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
kbuild: fix a bug of the u-boot-spl link rule

cmd_u-boot-spl includes $(PLATFORM_LIBS) which changes
when CONFIG_USE_PRIVATE_GCC is updated.  The u-boot-spl image
should be re-linked if any prerequisite is newer than it
or the command line has changed.
$(call, if_changed,...) should be used instead of $(call cmd,...).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kconfig: invoke silentoldconfig if spl,tpl/.config is updated

When spl/.config is updated by "make spl/menuconfig" or friends,
spl/include/config/auto.conf, spl/include/generated/autoconf.h
and some other files must be updated by "make silentoldconfig".

There is no hook for SPL in the top Makefile, so this commit
touches .config when spl/.config is updated to invoke silentoldconfig.
Likewise for TPL.

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

Without the private libgcc, we need a full multilib toolchain with
different libgcc or multiple toolchains to build all BE/LE and
hard-float/soft-float variants of MIPS boards.  That is not feasible.

This commit allows us to build all the MIPS boards with a single
kernel.org toolchain:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz

This change sounds reasonable for most users.  If necessary,
you can disable this option via "make menuconfig" or friends.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
kbuild: descend into drivers/ for SPL build

This patch allows the SPL build to descend into scripts/
(but no lines in drivers/Makefile are parsed for SPL for now).

This patch actually has no impact.  It is just the preparation
of upcoming refactoring.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kconfig: move CONFIG_BOOTM_LINUX to Kconfig

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

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