microblaze: Fix compilation failure because of missing libdts

Microblaze platform can use CONFIG_OF_EMBED option
but also it is necessary to support boards
which don't want to use this option.
U-Boot doesn't compile dts/libdts.o for #undef CONFIG_OF_EMBED
case that's why it should be guarded by ifdef.

Signed-off-by: Michal Simek <monstr@monstr.eu>
common/command.c: revert changes from commit 199adb60

commit 199adb601ff34bdbbd0667fac80dfe0a87bffc2b "common/misc: sparse
fixes" broke the help command trying to fix the sparse error
"command.c:44:38: error: bad constant expression".

As Henrik points out, the fix was bad because the commit used
CONFIG_SYS_MAXARGS whereas the code intended to use the maximum
number of commands (not arguments to a command).

Revert command.c changes to the original code as asked by Wolfgang.

Reported-by: Henrik Nordström <henrik@henriknordstrom.net>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Merge git://git.denx.de/u-boot
mx6: soc: update get_cpu_rev and get_imx_type for mx6solo/sololite

Previously, the same value was returned for both mx6dl and mx6solo.
Check number of processors to differeniate.
Also, a freescale patch says that sololite has its cpu/rev
stored at 0x280 instead of 0x260.
I don't have a sololite to verify.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
mx6: use CONFIG_MX6 instead of CONFIG_MX6Q

Use CONFIG_MX6 when the particular processor
variant isn't important.

Reserve the use of CONFIG_MX6Q to
specifically test for quad cores variant.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
imx-common: cpu: add imx_ddr_size

Read memory setup registers to determine size
of available ram. This routine works for mx53/mx6x

I need this because when mx6solo called get_ram_size
with a too large maximum size, the system hanged.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
arch-mx6: add mx6dl_pins.h

Only the values used in the sabrelite board are
added currently. Add more as other boards use them.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
arm1136: Fix enable_caches()

enable_caches() did not enable icache if CONFIG_SYS_ICACHE_OFF was not defined
but CONFIG_SYS_DCACHE_OFF was.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
nios2: use builtin functions for control registers access

The commit 51926d5ee0be029fb45f10f42756df97279f8ad3
  COMMON: Use __stringify() instead of rest of implementations
forgot to update the wrctl funtion, and causes compilation error.

But there are builtin functions for control registers access in
nios2 comipiler. It is convenient to use them instead.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Cc: Marek Vasut <marex@denx.de>
nios2: remove asm/status_led.h

The file has a wrong inline keyword of __led_toggle(), which causes
compilation error. And its content is defined in common status_led.h.
So define CONFIG_BOARD_SPECIFIC_LED in board config files and remove
this header file.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
video: atmel: implement lcd_setcolreg function

implement the common api lcd_setcolreg in include/lcd.h

Signed-off-by: Bo Shen <voice.shen@atmel.com>
[agust: fixed commit log and gcc 4.6 -Wparentheses warnings]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
fdt: Add function to get config int from device tree

Add a function to look up a configuration item such as machine id
and return its value.

Note: The code has been taken as is from the Chromium u-boot development
tree and needs Simon Glass' sign-off.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
fdt: Add function to get a config string from device tree

Add a function to look up a configuration string such as board name
and returns its value. We look in the "/config" node for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
fdt: Add fdtdec_decode_region() to decode memory region

A memory region has a start and a size and is often specified in
a node by a 'reg' property. Add a function to decode this information
from the fdt.

Signed-off-by: Simon Glass <sjg@chromium.org>
fdt: Add function for decoding multiple gpios globally available

Samsung's SDHCI bindings require multiple gpios to be parsed and
configured at a time. Export the already available fdtdec_decode_gpios
for this purpose.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
fdt: Export fdtdec_lookup() and fix the name

The name of this function is not consistent, so fix it, and export
the function for external use.

Signed-off-by: Simon Glass <sjg@chromium.org>
fdt: Add function to read boolean property

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
fdt: Add fdtdec_get_uint64 to decode a 64-bit value from a property

It decodes a 64-bit value from a property that is at least 8 bytes long.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>

Signed-off-by: Simon Glass <sjg@chromium.org>
fdt: Add polarity-aware gpio functions to fdtdec

Add get and set gpio functions to fdtdec that take into account the
polarity field in fdtdec_gpio_state.flags.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>