generic-board: show model name in board_init_f() too

The common/board_r.c has show_model_r() to display the model name
if the DTB has a "model" property.  It sounds useful to have a similar
function in common/board_f.c too because most of the boards show
their board name before relocation.

Instead of implementing the same function in both common/board_f.c
and common/board_r.c, let's split it up into common/show_board_info.c.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-cc: sjg
powerpc: mpc8xx: remove hermes board support

This board sprinkles #ifdef(CONFIG_HERMES) over various global files
such as include/common.h, common/board_r.c, common/cmd_bdinfo.c.
Let's zap such an ill-behaved board.

It has not been converted to generic board yet and mpc8xx is old
enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
Series-version: 2
Series-changes: 2
  - fix a grammatical mistake the commit description
powerpc: lwmon5: remove redundant CONFIG_SPL_* defines

The CPU directory of this board is arch/powerpc/cpu/ppc4xx.
Without the CONFIG_SPL_START_S_PATH and CONFIG_SPL_LDSCRIPT defines,
the same start.o and u-boot-spl.lds are selected by default.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
Series-cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cover-letter:
Remove redundant CONFIG_SPL_START_S_PATH

Daniel has posted a nice patch to introduce arch/$ARCH/Makefile.
http://patchwork.ozlabs.org/patch/412497/

Because it is touching CONFIG_SPL_START_S_PATH,
I'd like to remove redundant CONFIG_SPL_START_S_PATH beforehand
in order to help to review Daniel's patch.

It turned out all the CONFIG_SPL_START_S_PATH defines on powerpc
boards are totally bogus.
Now it is very clear why Daniel did not add START_S_PATH handling
in arch/powerpc/Makefile.

END
powerpc: a3m071: remove redundant CONFIG_SPL_* defines

The CPU directory of this board is arch/powerpc/cpu/mpc5xxx.
Without the CONFIG_SPL_START_S_PATH and CONFIG_SPL_LDSCRIPT defines,
the same start.o and u-boot-spl.lds are selected by default.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stefan Roese <sr@denx.de>
imx6: remove redudant CONFIG_SPL_START_S_PATH define

The CPU directory of IMX6 is arch/arm/cpu/armv7, so setting
CONFIG_SPL_START_S_PATH to arch/arm/cpu/armv7 is totally redundant.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stefano Babic <sbabic@denx.de>
linux/compat.h: remove redundant macro defines

__user and __iomem are defined in include/linux/compiler.h.
MAX_ERRNO is defined in include/linux/err.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cover-letter:
Remove redundant macro defines

END
blackfin: include <linux/compiler.h> rather than define __iomem

The macro __iomem is defined in include/linux/compiler.h.
Let's include it rather than double __iomem defines.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.adi@gmail.com>
Replace <compiler.h> with <linux/compiler.h>

Including <linux/compiler.h> is enough for general use.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Kbuild: introduce Makefile in arch/$ARCH/

Introduce a Makefile under arch/$ARCH/ and include it in the
top Makefile (similar to Linux kernel). This allows further
refactoringi like moving architecture-specific code out of global
makefiles, deprecating config variables (CPU, CPUDIR, SOC) or
deprecating arch/$ARCH/config.mk.

In contrary to Linux kernel, U-Boot defines the ARCH variable by
Kconfig, thus the arch Makefile can only included conditionally
after the top config.mk.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
fixup for daniel

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
lib: string: move strlcpy() to a common place

Move strlcpy() definition from drivers/usb/gadget/ether.c to
lib/string.c because it is a very useful function.
Let's add the prototype to include/linux/string.h too.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
dm: add a command to list devices in a tree-like format

We are adding more and more drivers to driver model these days.
Compared with the ad-hoc driver system, it seems pretty difficult to
understand how drivers are working on driver model.  For ex.
  - Which devices have been bound?
  - Which devices have been probed?
  - Which is the parent of this device?
etc.

I hope this tool will help us test/review driver model patches.

Just hit "showdev" on the command line and it will list all the bound
devices in a tree-like format with Class and Probed flag.

  => showdev
   Class       Probed   Name
  ----------------------------------------
   root        [ + ]    root_driver
   demo        [   ]    |-- demo_shape_drv
   demo        [   ]    |-- demo_simple_drv
   demo        [   ]    |-- demo_shape_drv
   demo        [   ]    |-- demo_simple_drv
   demo        [   ]    |-- demo_shape_drv
   test        [   ]    |-- test_drv
   test        [   ]    |-- test_drv
   test        [   ]    |-- test_drv
   gpio        [   ]    |-- gpio_sandbox
   serial      [   ]    |-- serial_sandbox
   serial      [ + ]    |-- serial
   demo        [   ]    |-- triangle
   demo        [   ]    |-- square
   demo        [   ]    |-- hexagon
   gpio        [   ]    |-- gpios
   i2c         [ + ]    |-- i2c@0
   i2c_eeprom  [ + ]    |   |-- eeprom@2c
   i2c_emul    [ + ]    |   |   \-- emul
   i2c_generic [ + ]    |   \-- generic_59
   spi         [   ]    |-- spi@0
   spi_emul    [   ]    |   \-- flash@0
   cros_ec     [ + ]    \-- cros-ec@0

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-cc: sjg
Cover-letter:
dm: display devices in a tree-like format for easy debug

When I was reviewing I2C DM series, I found it difficult to
track what is going on.  "When is this node is bound/probe?" etc.

I think this tool is helpful to know which device is bound/probe.

Devices are listed like "tree" command does.

END
sandbox: enable showdev command

Of course, this command can be used on any boards besides sandbox.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
sh: move -m options to arch/sh/config.mk

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
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: collect useful commands into scripts/Makefile.lib
include/configs: Do not use $(BOARDDIR)
patman,buildman: remove redundant readlines() method

In Python, file objects can be used directly in iterators
without readlines() method.

The behavior is the same but it generally saves memory
without readlines().

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