am335x_evm / gumstix pepper: Correct DDR settings

As noted by clang, we have been shifting certain values out of 32bit
range when setting some DDR registers.  Upon further inspection these
had been touching reserved fields (and having no impact).  These came in
from historical bring-up code and can be discarded.  Similarly, we had
been declaring some fields as 0 when they will be initialized that way.
Tested on Beaglebone White.

Reported-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Ash Charles <ash@gumstix.com>
Signed-off-by: Tom Rini <trini@ti.com>
ARM:asm:io.h use static inline

When compiling u-boot with W=1 the extern inline void for
read* is likely causing the most noise. gcc / clang will
warn there is never a actual declaration for these functions.
Instead of declaring these extern make them static inline so
it is actually declared.

cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common: commands: make commands static

Since most commands are not public, make them static. This
prevents warnings that no common prototype is available.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
lib: div64: add missing include

Include the function its prototype to prevent the warning
that it has no prototype.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
dm: add missing includes

lists.c / root.c do not include their own header and they
could potentially implement a different function. Therefore
actually include the headers.

cc: sjg@chromium.org
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common: board_f: cosmetic use __weak for leds

First of all this looks a lot better, but it also
prevents a gcc warning (W=1), that the weak function
has no previous prototype.

cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

---
This likely causes some merge issues, but is so uggly it
deserves it.
lib:lmb: use __weak

This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common: main.c: make show_boot_progress __weak

This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common:splash: use __weak

This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).

cc: agust@denx.de
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
mtd: cfi_flash: fix clang warning

clang warns this check is silly; it is since s is
a local variable.

u-boot/drivers/mtd/cfi_flash.c:2363:13: warning: comparison of
  array 's' not equal to a null pointer is always true
  else if ((s != NULL) && (strcmp(s, "yes") == 0)) {

cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
video: ipu_disp: squash clang warning

Since rgb2ycbcr_coeff and friends are declared const, but assigned
to a void pointer, clang will warn that the const is implicity casted
away. If the pointer is changed to void const * gcc will warn when it
is implicitly casted to a const int array. Just add a correctly
typed pointer instead to prevent these casts and hence the warnings.

Cc: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

---
changes since v1:
  Do actually fix the warning. As pointed out by Troy Kisky
  the patch was doing something different then the commit
  message said.
ubifs: don't self assign values

It seems the code tries to trick the compiler the argument
is actually used. However compilers became too smart too
fool them so easily an now warn. Checking gcc and clang
does not seem to emit a warning. If so it should be decorated
with unused / (void).

cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
lib:sha1: remove unused constant

This prevents a clang warning.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
lib/sha1.c:392:19: warning: unused variable '_sha1_src' [-Wunused-const-variable]
static const char _sha1_src[] = "_sha1_src";
                  ^
env_callback.h: spl: mark callback as maybe_unused

When static inline is used in a header file the function
should preferably be inlined and if not possible made a
static function. When declared inside a c file there is a
static function, which might be inlined. Since SPL uses a
define to declare the static inline it becomes part of the
c file although it is declared in a header and clang will
warn that you have introduced unused static functions. Add
maybe_unused to prevent such warnings.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
fixes warnings for clang like:

drivers/serial/serial.c:96:1: warning: unused function '_u_boot_env_noop_baudrate' [-Wunused-function]
U_BOOT_ENV_CALLBACK(baudrate, on_baudrate);
^
include/env_callback.h:63:21: note: expanded from macro 'U_BOOT_ENV_CALLBACK'
        static inline void _u_boot_env_noop_##name(void) \
                           ^
<scratch space>:63:1: note: expanded from here
_u_boot_env_noop_baudrate
^

common/console.c:59:1: warning: unused function '_u_boot_env_noop_console' [-Wunused-function]
U_BOOT_ENV_CALLBACK(console, on_console);
^
include/env_callback.h:63:21: note: expanded from macro 'U_BOOT_ENV_CALLBACK'
        static inline void _u_boot_env_noop_##name(void) \
                           ^
<scratch space>:91:1: note: expanded from here
_u_boot_env_noop_console
^
lcd: remove unused lcd_puts_xy

prevents a clang warning that the function is
never used.

cc: agust@denx.de
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
lib:vsprintf: reduce scope of pack_hex_byte

pack_hex_byte is only used when CONFIG_CMD_NET is
defined so limit it to that scope. This prevents
a clang warning.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
drivers: mmc: use __weak

use weak instead of alias to prevent some clang warnings.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common: bootm_os: make arch_preboot_os __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
prevents a clang warning:

common/bootm_os.c:440:13: warning: unused function '__arch_preboot_os' [-Wunused-function]
static void __arch_preboot_os(void)
            ^
common: env_common: make env_get_char_spec __weak

---
yup another clang warning:

common/env_common.c:30:14: warning: unused function '__env_get_char_spec' [-Wunused-function]
static uchar __env_get_char_spec(int index)
             ^
Merge branch 'v2014.10_patch_wrn_W1_arm_read' into v2014.10_warnings_merged