ARM: remove CONFIG_ARMV7

Some of (not all) ARMv7 boards define CONFIG_ARMV7, which is useless.
It is never referenced.

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

CONFIG_ARM1176 is defined but not referenced at all.

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

The Linux-compatible macro DIV_ROUND_CLOSEST is a bit more flexible
and safer than DIV_ROUND.

For example,
  foo = DIR_ROUND(x, y++)
does not work expectedly.  (y is incremented twice.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
include/common.h: remove DIV_ROUND definition

All the references of DIV_ROUND have been replaced with
DIR_ROUND_CLOSEST.  Remove DIV_ROUND.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
include: move various macros to include/linux/kernel.h

U-Boot has imported various utility macros from Linux
scattering them to various places.

Now we are suffering from too cluttered include/common.h.
We have to stop putting everything into it.

This commit moves various macros that originate in
include/linux/kernel.h of Linux to their original position.

Note:
This commit simply moves the macros; the macros roundup,
min, max, min2, max3, ARRAY_SIZE are different
from those of Linux at this point.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
linux/kernel.h: import more macros

These macros seem to be useful for U-Boot too (or at least
harmless).  Imported from Linux 3.18-rc2.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
include: do not include <linux/kernel.h> from include/common.h

The header include/common.h is already horrably fat.
We should stop it and include a header file where it is really
necessary.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
linux/kernel.h: add typechecking to roundup macro

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
linux/kernel.h: sync min, max, min3, max3 macros with Linux

We have never cared about the type when we get max/min of two values,
but Linux Kernel does.  This commit sync min, max, min3, max3 macros
with the kernel introduing type checks.

Existing code must be fixed to suppress warnings.
We have two options:
 - Use min, max, min3, max3 only when arguments have the same time
   (or add casts)
 - Use min_t/max_t instead with the appropriate type for the first
   argument

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

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
sh: use more descriptive prompts for board select menu

This information was taken mostly from arch/sh/boards/*
of Linux Kernel.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
sh: move CONFIG_{SH2,SH2A,SH3,SH4} to Kconfig

This commit moves CONFIG_SH2, CONFIG_SH2A, CONFIG_SH3, CONFIG_SH4
to Kconfig renaming into CONFIG_CPU_SH2, CONFIG_CPU_SH2A,
CONFIG_CPU_SH3, CONFIG_CPU_SH4, respectively because
arch/sh/Kconfig of Linux uses CONFIG_CPU_SH* convention.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
sh: consolidate CONFIG_SYS_CPU defines

Now each board selects one of CONFIG_CPU_SH2, CONFIG_CPU_SH3,
CONFIG_CPU_SH4, so let's move CONFIG_SYS_CPU definiton to
arch/sh/Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
sh: define CONFIG_CPU_SH4A for some boards

Precisely, these boards are SH4A rather than SH4
although CONFIG_CPU_SH4A macro is not referenced at all.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
sh: move -m options to arch/sh/config.mk

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
generic-board: make compile-time noise for non-generic boards

Commit 0f605c1501f6 (Start the deprecation process for generic board)
added a run-time warning message.  Let's be noisier for non-generic
boards to inform the dead line of the conversion.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Series-cc: Vagrant Cascadian <vagrant@debian.org>
Series-version: 2
Series-changes: 2
  - Mention to see doc/README.generic-board
dm: do not check dm_root before searching in uclass_root

The function uclass_find() looks for a uclass in the linked
list of gd->uclass_root; gd->dm_root has nothing to do with
gd->uclass_root.  Remove this confusing code.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
dm: minor coding style fixes
kconfig: add CONFIG_CROSS_COMPILE

Copy from Linux Kernel (with a few adjustments in comments).
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>