of: add ranges address translation for default bus

This patch adds address translation for default bus types. It has been
shamelessly ported from Linux device tree address translation with the
following exceptions:
- only default bus map and translate are supported
- of_bus has not been ported
- check for #size-cells > 0 has been removed

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arm: mvebu: add common functions

This patch adds a source file for common functions for Marvell MVEBU
SoCs. The first common function is to parse the device tree node and
find the internal register base address, to allow to remap it before
device tree address are accessed.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arm: mvebu: introduce common readl/writel routines

Internal registers can be remapped but we need to know it at any time
of the init code, e.g. debug putc will be called before and after remap.
This patch introduces a regbase pointer that will be initialized with
the default bootup register base. Also readl/writel wrappers are provided.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
of: interpret empty ranges as one-to-one mapping

Linux default behavior is to treat empty ranges properties as 1:1
mapping. Although barebox does not yet support boolean properties,
we already add that behavior to DT address translation.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arm: mvebu: convert debug_ll to regbase pointer

This patch convert lowlevel debug to make use of the internal register
base pointer.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arm: mvebu: convert Dove to regbase pointer

This patch converts Dove init code to make use of the regbase pointer.
Also register remap address is probed during SoC init and internal
registers are remapped accordingly. Some clean-ups are also performed.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arm: mvebu: convert Armada 370/XP to regbase pointer

This patch converts Armada 370/XP init code to make use of the regbase
pointer. Also register remap address is probed during SoC init, but no
remap code has been implemented yet. Register definition are split into
a mach include. Some clean-ups are also performed.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Revert "arm: mvebu: fixup DT addresses for Armada 370/XP and Dove"

This reverts commit f29289aadf1c7ffdf04b56eb0e0d05cf4ce8d42b.
arm: mvebu: fixup empty ranges for Armada 370/XP

barebox does not handle boolean properties correctly, modify the
empty ranges property of internal registers to provide a full 1:1
mapping instead.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arm: mvebu: remove address from soc node name

To allow to find soc node easily, this removes the @address from soc
device tree node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>