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>
patman: use raw strings for regular expression

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
buildman: Do not parse git aliase file
consolidate undefined macros
common: remove asmlinkage definition
scripts/mailmapper: add overwrite option