kconfig: add CONFIG_SYS_{ARCH, CPU, ...} type def to arch/Kconfig

This commit adds the type definitions (+ help messages) of
CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} to arch/Kconfig,
which would save lots of type defs for taget boards.
(See also the next commit.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cover-letter:
Refactoring the type defs in Kconfig and move CONFIG_ARM64 to Kconfig

This series can be applied onto commit 114cc429.
END
kconfig: remove redundant "string" type in arch and board Kconfigs

Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME}
are specified in arch/Kconfig.

We can delete the ones in arch and board Kconfig files.

This commit can be easily reproduced by the following command:

find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e '
/config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ {
    N
    s/\n[[:space:]]*string//
}
'

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-version: 2
Series-changes: 2
  - Regenerate based on commit 114cc429
vexpress64: kconfig: consolidate CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI

We do not have to distinguish CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI
from CONFIG_TARGET_VEXPRESS_AEMV8A.  Rename the former to the latter.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Steve Rae <srae@broadcom.com>
Cc: David Feng <fenghua@phytium.com.cn>
Patch-cc: Steve Rae <srae@broadcom.com>
Series-changes: 2
  - Rebase again!
kconfig: armv8: move CONFIG_ARM64 to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-changes: 2
  - Rebase again!
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 blank Kconfig files

This would be useful to start moving various config options.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Series-version: 2
Cover-letter:
Move some CONFIGs to Kconfig

Now we have the basic Kconfig infrastructure and we are ready
to move CONFIG options from header files to Kconfig.

We do not have to rush to do it at once.
We can do it little by little when we find some time.

(Of course, this task is too tedious to do by hand.
I wrote a script to do it automatically for me.)

I also did build-test over all the boards
to confirm this series does not change the outputs.

END
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED
kconfig: move CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED to Kconfig

If this option is enabled, the objects under lib/ directory
are compiled with speed optimization, not size optimization.
(Currently, only used by some Blackfin boards.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
bootm

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

CONFIG_CMD_BOOTM is defined in config_cmd_defaults.h
which is forcebly included from each board.
So, the default value of "config CMD_BOOTM" should be "y".

For some boards undefining it (bf506f-ezkit, controlcenterd_TRAILBLA,
controlcenterd_TRAILBLAZER_DEVELOP, controlcenterd_TRAILBLAZER),
"# CONFIG_CMD_BOOTM is not set" should be added to their defconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-changes: 2
  - fix a type; boom => bootm
  - add a help message
crc32
kconfig: move CONFIG_CMD_CRC32 to Kconfig

Since CONFIG_CMD_CRC32 is defined in config_cmd_defaults.h,
it is enabled for all the boards except the ones undefining it
explicitly:
  kwb
  tseries_mmc
  tseries_nand
  tseries_spi
  vct_platinum_onenand_small
  vct_platinum_small
  vct_platinumavc_onenand_small
  vct_platinumavc_small
  vct_premium_onenand_small
  vct_premium_small

The default value of this config option should be "y" and
"# CONFIG_CMD_CRC32 is not set" should be added for those exceptions.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Series-changes: 2
  - Add a help doc
env export
kconfig: move CONFIG_CMD_EXPORTENV to Kconfig

Since CONFIG_CMD_EXPORTENV is defined in config_cmd_defaults.h,
it should be enabled for all the boards except bf506f-ezkit
that undefs it explicitely.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Series-changes: 2
  - Add a help doc
go
kconfig: move CONFIG_CMD_GO to Kconfig

Since CONFIG_CMD_GO is defined in config_cmd_defaults.h
(and no board undefs it its own header), it can be moved to
Kconfig with the default value "y".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Series-changes: 2
  - Add a help doc