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
spl: consolidate arch/arm/include/asm/arch-*/spl.h

arch/arm/include/asm/spl.h requires all SoCs to have
arch/arm/include/asm/arch-*/spl.h.

But many of them just define BOOT_DEVICE_* macros.

Those macros are used in the "switch (boot_device) { ... }"
statement in common/spl/spl.c.

So they should not be archtecture specific, but described as
a simpile enumeration.

This commit merges most of arch/arm/include/asm/arch-*/spl.h
into arch/arm/include/asm/spl.h.

With a little more effort, arch-zynq/spl.h and arch-socfpga/spl.h
will be merged, while I am not sure about OMAP and Exynos.

Series-to: u-boot
Series-version: 2
Series-changes: 2
  - Add BOOT_DEVICE_SATA (request from Tim Harvey)
  - Add "|| defined(CONFIG_EXYNOS4210)"
    Most exynos boards define CONFIG_EXYNOS4 or CONFIG_EXYNOS5.
    But there is one exception: smdkv310.
    This board defines neither CONFIG_EXYNOS4 nor CONFIG_EXYNOS5.
    For this board, "if defined(CONFIG_EXYNOS4210)" should be checked.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Minkyu Kang <mk7.kang@samsung.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Tested-by: Bo Shen <voice.shen@atmel.com> [on sama5d3xek board for at91 part]
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
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
arm: fix a double-definition error of _start symbol

The symbol "_start" is defined twice in arch/arm/lib/vectors.S:
around line 48 and line 54.

If CONFIG_SYS_DV_NOR_BOOT_CFG is defined (as on calimain board),
build fails:

  arch/arm/lib/vectors.S: Assembler messages:
  arch/arm/lib/vectors.S:54: Error: symbol `_start' is already defined
  make[1]: *** [arch/arm/lib/vectors.o] Error 1
  make: *** [arch/arm/lib] Error 2

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Series-changes: 2
  - No change  (Resend as a series)
sandbox: change local_irq_save() to macro

local_irq_save() should be a macro, not a function
because local_irq_save() saves flag to the given argument.

GCC is silent about this issue, but Clang warns:

In file included from lib/asm-offsets.c:15:
In file included from include/common.h:20:
In file included from include/linux/bitops.h:110:
arch/sandbox/include/asm/bitops.h:59:17:
 warning: variable 'flags' is uninitialized when used here
      [-Wuninitialized]
        local_irq_save(flags);
                       ^~~~~

That change causes another warning:

In file included from include/linux/bitops.h:110:0,
                 from include/common.h:20,
                 from lib/asm-offsets.c:15:
arch/sandbox/include/asm/bitops.h: In function ‘test_and_set_bit’:
arch/sandbox/include/asm/bitops.h:56:16: warning: unused variable ‘flags’ [-Wunused-variable]

So, flags should be set to __always_unused.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Series-to: uboot
Series-version: 2
Series-changes: 2
  - I forgot to "git add arch/sandbox/include/asm/bitops.h" in v1
    Resending.
zynq: disable -Wstrict-prototypes option for ps7_init.c

The files ps7_init.c and ps7_init.h are supposed to be generated by
hw projects such as Vivado, PlanAhead and then to be copied into
board/xilinx/zynq directory.

But some prototypes in them cause annoying warning messages:

  CC      spl/board/xilinx/zynq/ps7_init.o
In file included from board/xilinx/zynq/ps7_init.c:50:0:
board/xilinx/zynq/ps7_init.h:137:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.h:138:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.h:139:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.h:145:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12602:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12723:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12742:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12761:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12854:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]

The prototypes should be

  int ps7_init(void);
  int ps7_post_config(void);
  int ps7_debug(void);

rather than

  int ps7_init();
  int ps7_post_config();
  int ps7_debug();

We do not want to be bothered because of automatically generated files.
But we cannot touch the external projects for now.
What we can do is to disable -Wstrict-prototypes for ps7_init.c

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Series-to: uboot
Series-version: 2
Series-changes: 2
   No change in code. Some changes in git-log
  - Fix a typo:  s/causes/cause/
  - Add Tested-by credit
mpc8xx: remove qs850, qs860t board support

These boards are old enough and have no maintainers.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-to: uboot
Series-cc: wd
Cover-letter:
powerpc: Remove mpc8xx boards without maintainers

Various global changes are happening to U-boot:
Generic board, driver model, Kconfig, ...

The more boards we have, the more efforts we need
for those future changes.

This series removes MPC8xx boards which have no maintainers.
I guess they are old enough and almost dead.

I built all the other boards and
I confirmed this series has no impact on them.

END
mpc8xx: remove RPXlite_dw, quantum board support

These boards are old enough and have no maintainers.
mpc8xx: remove rbc823 board support

This board is old enough and has no maintainer.
mpc8xx: remove netta, netta2, netphone board support

These boards are old enough and have no maintainers.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
mpc8xx: remove fads board support

These boards are old enough and have no maintainers.
mpc8xx: remove v37 board support

This board is old enough and has no maintainer.
mpc8xx: remove spc1920 board support

This board is old enough and has no maintainer.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
sparc: merge LEON3 linker scripts

The linker scripts of LEON3

 - board/gaisler/grsim/u-boot.lds
 - board/gaisler/gr_cpci_ax2000/u-boot.lds
 - board/gaisler/gr_ep2s60/u-boot.lds
 - board/gaisler/gr_xc3s_1500/u-boot.lds

are the same (except cosmetic differences such as indentation).

This commit merges them into arch/sparc/cpu/leon3/u-boot.lds.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Series-to: uboot
Series-cc: Daniel Hellstrom <daniel@gaisler.com>
Cover-letter:
Merge all SPARC linker scripts into a single file

In the other architecutres, the default linker scripts are placed at
arch/${ARCH}/cpu/u-boot.lds or arch/${ARCH}/cpu/${CPU}/u-boot.lds.

On the other hand, SPARC does not have arch-default linker script
but has almost the same linker scripts under each board directory.

They can be easily merged.

I built all SPARC boards and compared MD5SUM.
The same binaries are produced before/after this series.
So I am sure this clean-up is correct.

END