arm: spl: fix include guard

cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
arm:board:h2200: Add CONFIG_SYS_GENERIC_BOARD

Enable 'generic board init' for H2200 palmtop.

Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
arm: Fix armv8 compilation error

Fix following compilation error when CONFIG_ARM64 is defined

Error: unknown or missing system register name at operand 2
-- `mrs x0,daifmsr daifset,#3'

Signed-off-by: Shaibal.Dutta <shaibal.dutta@broadcom.com>
Signed-off-by: Darwin Rambo <drambo@broadcom.com>
Reviewed-by: Darwin Rambo <drambo@broadcom.com>
arm, calimain: Add CONFIG_SYS_GENERIC_BOARD

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
ARM: rpi_b: enable GENERIC_BOARD

Serial port, SD card, and LCD all work.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
integrator: switch to generic board

Turn on generic board for the integrators, as per the request in
the startup message. Everything just works, tested on the
Integrator/AP and Integrator/CP.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Simon Glass <sjg@chromium.org>
socfpga: Relocate arch common functions away from board

To move the arch common function away from board folder to
arch/arm/cpu/armv7/socfpga folder. Its to avoid code duplication
for other non Altera dev kit which is using socfpga device.

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Cc: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Detlev Zundel <dzu@denx.de>
Don't send: MAKEALL: Display MD5SUM

 === Do not send to ML, Do not merge into the mailline ===

 What is this ?
 --------------

When you change some makefiles and you want to confirm
your changes are harmless, this patch will be helpful.

With this patch, MAKEALL will display md5sum of
 -  ./u-boot.bin
 -  spl/u-boot-spl.bin (if it exists)
 -  tpl/u-boot-tpl.bin (if it exists)
 -  examples/standalone/hello_world.bin (if it exists)

If the same md5sum is displayed, it means your commits
still generate the same outputs.

Timestamp and version information must be disabled,
otherwise MAKEALL will show the different md5sum at every build.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
microblaze: workaround for build error
bfin: workaround
m68k: work around warnings
Don't send: tools: Add remove_redundant_config
Don't send: tools: add find_unused_source
Don't send: tools: Add find_unused_header
Don't send: tools: run_sed
Don't send: tools: check_config

Check if specified CONFIG is defined or not.
Don't send: tools: insert_config
arm: include config.h in arch/arm/lib/vectors.S

Commit 41623c91 moved exception handling to arch/arm/lib/vectors.S,
but it missed to include <config.h>.

This mistake causes two problems.

[1]
"enbw_cmc", "da850evm_direct_nor", "calimain" boards are broken.

They expect CONFIG_SYS_DV_NOR_BOOT_CFG (= 0x00000011) at the beginning
of the boot image.

But it is missing since commit 41623c91 because
CONFIG_SYS_DV_NOR_BOOT_CFG is never defined in arch/arm/lib/vectors.S.

[2]
Boards with CONFIG_USE_IRQ fail with undefined reference error
of "IRQ_STACK_START" and "FIQ_STACK_START".

This is _potential_ problem because currently there is no board
enabling CONFIG_USE_IRQ.
But we cannot deny the possibility some board may enable it in future.

(If we are not willing to support interrupt feature, all references
to CONFIG_USE_IRQ should be dropped immediately.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Series-to: uboot
Series-version: 2
Series-changes: 2
  - Rephrase commit subject and description. (No change in code-diff)

Cover-letter:
ARM: bug fixes of commit 41623c91 (arch/arm/lib/vectors.S)

END
kconfig: import Kconfig files from Linux 3.16-rc2

Import
  - scripts/kconfig/*
  - include/linux/kconfig.h
from Linux 3.16-rc2.

Series-to: u-boot@lists.denx.de
Series-cc: Simon Glass <sjg@chromium.org>
Series-cc: Tom Rini <trini@ti.com>
Series-cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Series-cc: Wolfgang Denk <wd@denx.de>
Series-version: 3
Series-changes: 3
 - Fetch source files from the latest Linux tag
Series-changes: 2
 - Fetch source files from the latest Linux tag

Cover-letter:
Kconfig for U-Boot
This series introduces Kconfig.

Besides Linux Kernel, Kconfig is used in some projects,
such as, BusyBox, Buildroot.

But our situation is a little more complicated.
For one board, we need to generate 3 images at most:
Normal image, SPL and TPL.

Each image needs its own configuration input.

 How does Kconfig in U-Boot work?
 --------------------------------

For boards without SPL support, it works as in Linux Kernel.
"make <board>_defconfig" creates .config for you.
You can use "make config", "make menuconfig" etc. to create a new .config
from scratch or update the existing one.

"make silentoldconfig", if it is necessary, is automatically invoked,
creating or updating include/config/auto.conf and
include/generated/autoconf.h.

For boards with SPL/TPL support, another .config file is created
under spl/tpl directory.

To sum up, the location of Kconfig-related files is as follows:

  [1] Normal U-boot
    - configs/<board>_defconfig        (default configuration)
    - .config                          (saved config list)
    - include/config/auto.conf         (for use in makefiles)
    - include/generated/autoconf.h     (for use in C sources)
    - include/config/*                 (for if_changed_dep)

  [2] SPL
    - configs/<board>_spl_defconfig    (default configuration)
    - spl/.config                      (saved config list)
    - spl/include/config/auto.conf     (for use in makefiles)
    - spl/include/generated/autoconf.h (for use in C sources)
    - spl/include/config/*             (for if_changed_dep)

  [3] TPL
    - configs/<board>_tpl_defconfig    (default configuration)
    - tpl/.config                      (saved config list)
    - tpl/include/config/auto.conf     (for use in makefiles)
    - tpl/include/generated/autoconf.h (for use in C sources)
    - tpl/include/config/*             (for if_changed_dep)

 How to configure and build?
 ---------------------------

For board configuration, "make <board>_defconfig" is used instead of
"make <board>_config". The other things are the same as before.

 Coexistence of Kconfig and board header
 ---------------------------------------

For a long time, we have used C header files to define the set of CONFIGs.

It would take really long term (one year? two year? I don't know)
to migrate from board headers to Kconfig.

So, two different infractructure must coexist in the interim.

CONFIG macros defined in C headers are collected into
include/autoconf.mk, spl/include/autoconf.mk, tpl/include/autoconf.mk
for use in makefiles.

 Differences between v2 and v3
 -----------------------------

We want to drop SPL/TPL from special cases in future.
Instead we want to introduce generic sub-image infrastructure.

I added CONFIG_SUBIMAGES in this version. This option takes the form:
"img1_output_dir:img1_defconfig,img2_output_dir:img2_defconfig"

If .config has CONFIG_SUBIMAGES, make defconfig is callued mutlipule
times to create .config under img1_output_dir based on img1_defconfig.

For now, img1_output_dir/img2_output_dir2 is always spl/tpl.

For example, configs/zynq_zc70x_defconfig should have
CONFIG_SUBIMAGES="spl:zynq_zc70x_spl_defconfig"

We are still depending on SPL/TPL framework, but
I want to refactor code and delete CONFIG_SPL, CONFIG_TPL,
CONFIG_SPL_BUILD, CONFIG_TPL_BUILD.

 Build Test
 ----------

I built all boards excepts some already broken ones.
I also checked MD5SUM of output binaries for all of them.

I believe this series should not break any boards.
But if you notice something got broken, please let me know.

Besides, I confirmed out-of-tree build, parallel build (-j make option)
works correctly.

 How to apply this series
 ------------------------

I confirmed this series can be applied on commit 39b6d07d.

 Known Problems
 --------------

[1] MAKEALL and buildman have not been not adjusted yet

boards.cfg is not necessary for Kconfig. I want to delete it.

But before that, we must rework MAKEALL and buildman to search defconfig
files instead of boards.cfg.

[2] Many targets in one choice

Especially in ARM and PowerPC, there are too many target boards
in one choice.

This should be refactored in follow-up patches
by increasing the hierarchy and grouping the similar boards family.

END
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Do not apply: tools: add genkconfig

 ========================================
 Do not apply this patch to the main line
 ========================================

 What is this tool?
 ------------------

This tool converts boards.cfg to defconfig and Kconfig files.

It automatically generates
 - arch/${ARCH}/Kconfig
 - board/${VENDOR}/${BOARD}/Kconfig
 - board/${BOARD}/Kconfig
 - configs/${TARGET_BOARD}_defconfig

 How to use?
 -----------

Open tools/print_allconfigs with an editor.

Adjust cross compilers part for your environment.

  # Specify your favoriate cross tools
  CROSS_COMPILE_ARC=arc-linux-
  CROSS_COMPILE_AARCH64=aarch64-linux-gnu-
  CROSS_COMPILE_ARM=arm-unknown-linux-gnueabi-
   [snip]
  CROSS_COMPILE_X86=i386-linux-

And then, run "tools/genkconfig".

 Why is this patch here?
 -----------------------

The file boards.cfg is touched very frequently.
All the time, new/old boards are being added/removed.

The next commit was generated based on the u-boot/master at the time
I posted it.
It will become out-dated soon.

You can update it with this tool.

Series-changes: 4
 - Remove debug code

Series-changes: 3
 - Create SPL defconfig into configs/<board>_spl_defconfig
   instead of conigs/spl/<board>_defconfig. Like the same for TPL.
   Because I want to handle Falcon boot more genericlly.
   If you build only configs/<board>_spl_defconfig, it is Falcon boot.
 - Create board select menu based on the 8th field of boards.cfg.
   It is common that many entries (= 7th field) share the same
   config header. So this change help to reduce the code redandancy.

Series-changes: 2
 - Do not output CONFIG_BOARD_MAINTAINERS and CONFIG_BOARD_STATUS
 - Delete board/Kconfig and move "source board/*/*/Kconfig"
   statements to arch/*/Kconfig.