boards.cfg: keep it sorted filling the board field

The boards.cfg file has allowed to use "-" for the board (= 6th) field
if the board name is the same as the 7th field.

But I notice one problem.
Because tools/reformat.py sorts the lines in the simple alphabetical
order (= the order of character code), some entries for the same board
are not lined up together.

For example, "bf527-ezkit" and "bf527-ezkit-v2" share the same board.
But they are located separately because "bf527-ezkit" fills the board
field with "-" whereas "bf527-ezkit-v2" specifies it explicitely.

The similar things can be seen:
 - between "trizepsive" and "polaris"
 - between "RRvision" and "RRvision_LCD"
 - between "korat" and "korat_perm"
 - between "lwmon5" and "lcd4_lwmon5"

This commit was generated by the following command:

awk '$6 == "-" { $6 = $7 } { print }' boards.cfg \
  | tools/reformat.py -i -d '-' -s 8  > boards0.cfg; \
  mv boards0.cfg boards.cfg

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-to: uboot
Series-cc: trini
Series-version: 2
Series-changes: 2
  - None. (Resend as a series)

Commit-notes:

This patch was generated based on commit bc9a78ac.

END
boards.cfg: change "<none>" in the board field to "-"

In the previous commit, all the board fields were filled.

Now we can use "-" in the board field for a different meaning.

Going forward, "-" stands for no board directory
as in cpu, soc, vendor fields.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
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
powerpc: mpc8xx: remove some of tqm8xx board family without maintainers

Remove NSCU, TK885D, TQM823M, TQM850M, TQM855M, TQM860M,
TQM862L, TQM826M, TQM866M, TQM885D boards support.

These boards are old enough and have no maintainers.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
Series-to: uboot
Commit-notes:

I built all the other boards and compared MD5SUM.

I confirmed this patch has no impact against them.

END
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
sparc: merge LEON2 and LEON3 linker scripts

There is only one line diff between LEON2 and LEON3 linker scripts:

  -             arch/sparc/cpu/leon2/start.o (.text)
  +             arch/sparc/cpu/leon3/start.o (.text)

They can be written in the same way:

                */start.o (.text)

So, board/gaisler/grsim_leon2/u-boot.lds
and arch/sparc/cpu/leon3/u-boot.lds
can be merged into arch/sparc/cpu/u-boot.lds.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
sh: unify sh2/sh3/sh4 linker scripts

The linker scripts of sh2/sh3/sh4 are almost the same.
The difference among them is essentially only one line.

They can be consolidated into a single file, arch/sh/cpu/u-boot.lds
by re-writing the diffrent line as follows:

	KEEP(*/start.o	(.text))

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Series-to: uboot
Commit-notes:

I built all SuperH boards and comprared MD5SUM.
I confirmed the same output binaries are produced with/without
this patch.

END
spl: nand: read only in the size of image_header on the first access

For the same reason as in commit 50c8d66d, all the remaining
CONFIG_SYS_NAND_PAGE_SIZE in common/spl/spl_nand.c can be replaced
with sizeof(*header).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
serial: ns16550: drop CONFIG_OMAP1610 from the special case

If CONFIG_OMAP1610 is defined, the code returning the fixed value (26)
is enabled. But this case is covered by the following code.

(CONFIG_SYS_NS16550_CLK + (gd->baudrate * (MODE_X_DIV / 2))) /
    (MODE_X_DIV * gd->baudrate)
= (48000000 + (115200 * (16 / 2))) / (16 * 115200)
= 48921600 / 1843200
= 26

The "#ifdef CONFIG_OMAP1610" was added by commit 6f21347d more than
ten years ago. In those days, the divide-and-round was not used.
I guess that is why this weird code was added here.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Rishi Bhattacharya <rishi@ti.com>
serial: ns16550: use DIV_ROUND_CLOSEST macro to compute the divisor

The function still returns the same value.

The comment block is no longer necessary because our intention is
clear enough by using DIV_ROUND_CLOSEST() macro.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
serial: ns16550: use a const variable instead of macro

Just for type checking.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Marek Vasut <marex@denx.de>
omap: clean-up CONFIG_OMAP1510 ifdefs

CONFIG_OMAP1510 is not defned anywhere.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
kbuild: move extra gcc checks to scripts/Makefile.extrawarn

This commit was imported from Linux Kernel:
commit a86fe353 written by me.

W=... provides extra gcc checks.

Having such code in scripts/Makefile.build results in the same flags
being added to KBUILD_CFLAGS multiple times becuase
scripts/Makefile.build is invoked every time Kbuild descends into
the subdirectories.

Since the top Makefile is already too cluttered, this commit moves
all of extra gcc check stuff to a new file scripts/Makefile.extrawarn,
which is included from the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-to: uboot
Cover-letter:
Kbuild: sync with Linux 3.16-rc1

The merge window for Linux 3.16 is closed and Linux 3.16-rc1 is out now.

During the merge window, various Kbuild-related updates were merged into
the upstream.

This series imports them to U-Boot.

END
tools/reformat.py: refactor ignore-case option handling

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
reformat.py: natural sort
kbuild: sync mixed targets handling with Linux 3.16-rc1

"make %_config all" was supported for the first time in U-Boot:
  commit 53bca5ab
  kbuild: support simultaneous board configuration and "make all"

Surprisingly it had not been working in Linux Kernel for a long time.

So I sent back the patch to the Linux Kbuild community and it was
accepted with a little code improvement, at commit 9319f453.

Now, you can do "make defconfig all" or "make %_defconfig all"
in Linux too.

This commit updates some scripts to fill the code-diff
between Linux and U-Boot.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
scripts: objdiff: sync with Linux 3.16-rc1

Import scripts/objdiff improvements from Linux v3.16-rc1, which
consists of 7 commits written by me.

  commit 7fa0e6db3cedc9b70d68a4170f1352e2b1aa0f90
  scripts: objdiff: support directories for the augument of record command

  commit 8ac28bee76eec006aac5ba5c418878a607d53a9b
  scripts: objdiff: fix a comment

  commit 8b5d0f20d64f00ffd5685879f8eb3659379f5aaa
  scripts: objdiff: change the extension of disassembly from .o to .dis

  commit 18165efa8203a34d82f60a1831ea290e7304c654
  scripts: objdiff: improve path flexibility for record command

  commit 1ecc8e489abfdaa6d8d1689f7ff62fdf1adda30c
  scripts: objdiff: remove unnecessary code

  commit 5ab370e91af70d5f1b1dbaec78798a2ff236a2d5
  scripts: objdiff: direct error messages to stderr

  commit fd6e12423311697860f30d10398a0f9eb91977d2
  scripts: objdiff: get the path to .tmp_objdiff more simply

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: Use relative path when possible

Import 3 useful commits by Michal Marek <mmarek@suse.cz>
from Linux 3.16-rc1.

  commit 9da0763bdd82572be243fcf5161734f11568960f
  kbuild: Use relative path when building in a subdir of the source tree

  commit 890676c65d699db3ad82e7dddd0cf8fb449031af
  kbuild: Use relative path when building in the source tree

  commit 7e1c04779efd51154baf652e653ceb24ce68939b
  kbuild: Use relative path for $(objtree)

mkconfig and tools/Makefile must be adjusted to use relative path
for srctree.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: collect useful commands into scripts/Makefile.lib
aaaa