oweals/u-boot.git
10 years agoUse uint64_t for time types
Simon Glass [Wed, 15 Oct 2014 10:38:33 +0000 (04:38 -0600)]
Use uint64_t for time types

Unfortunately 'unsigned long long' and 'uint64_t' are not necessarily
compatible on 64-bit machines. Use the correct typedef instead of
writing the supposed type out in full.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoext4: Use inttypes for printf() string
Simon Glass [Wed, 15 Oct 2014 10:38:32 +0000 (04:38 -0600)]
ext4: Use inttypes for printf() string

On 64-bit platforms (like sandbox) 64-bit integers may be 'long' rather
than 'long long'. Use the inttypes header to avoid compiler warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoAdd some standard headers external code might need
Gabe Black [Wed, 15 Oct 2014 10:38:31 +0000 (04:38 -0600)]
Add some standard headers external code might need

inttypes.h defines format specifiers for printf which work with data types of
particular sizes. stdlib.h is currently just a passthrough to malloc.h which
has declarations of the various *alloc functions.

Add the required #define to common.h so that these printf format specifiers
will be made available.

Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
(Replaced with a GPL version from glibc)

10 years agoProvide option to avoid defining a custom version of uintptr_t.
Gabe Black [Wed, 15 Oct 2014 10:38:30 +0000 (04:38 -0600)]
Provide option to avoid defining a custom version of uintptr_t.

There's a definition in stdint.h (provided by gcc) which will be more correct
if available.

Define CONFIG_USE_STDINT to use this feature, or USE_STDINT=1 on the 'make'
commmand.

This adjusts the settings for x86 and sandbox, with both have 64-bit options.

Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@google.com>
Rewritten to be an option, since stdint.h is often available only in glibc.
Changed to preserve a clear boundary between stdint and non-stdint
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoRevert "common, env: Fix support for environment in i2c eeprom"
Valentin Longchamp [Tue, 14 Oct 2014 09:16:33 +0000 (11:16 +0200)]
Revert "common, env: Fix support for environment in i2c eeprom"

Since i2c_init_all always sets the bus back to CONFIG_SYS_SPD_BUS_NUM
for compatibility reasons, it means that any eeprom not located on this
CONFIG_SYS_SPD_BUS_NUM is not accessible with the eeprom commands, even
if you change the bus number with an i2c dev command before.

Furthermore i2c_init_all should disappear and is currently only called
from the early board initialisation sequences, it is not suited for
other usage.

This reverts commit 01a0c64762e902971b34587a8a61b59e9ea51374.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
10 years agodoc: Fix comparison operator
Olaf Mandel [Fri, 10 Oct 2014 22:25:46 +0000 (00:25 +0200)]
doc: Fix comparison operator

Align the documentation with the include/linux/etherdevice.h ,
which is where this example comes from. The return value from
the check was inverted in the documentation.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
10 years agowireless_space: set myself as maintainer
Albert ARIBAUD [Wed, 8 Oct 2014 22:49:06 +0000 (00:49 +0200)]
wireless_space: set myself as maintainer

LaCie Wireless Space has no defined maintainer.
Set myself as maintainer, since I own one of these.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
10 years agocli: hush: Adjust 'run' command to run each line of the env var
Simon Glass [Tue, 7 Oct 2014 19:59:43 +0000 (13:59 -0600)]
cli: hush: Adjust 'run' command to run each line of the env var

The run command treats each argument an an environment variable. It gets the
value of each variable and executes it as a command. If an environment
variable contains a newline and the hush cli is used, it is supposed to
execute each line one after the other.

Normally a newline signals to hush to exit - this is used in normal command
line entry - after a command is entered we want to return to allow the user
to enter the next one. But environment variables obviously need to execute
to completion.

Add a special case for the execution of environment variables which
continues when a newline is seen, and add a few tests to check this
behaviour.

Note: it's not impossible that this may cause regressions in other areas.
I can't think of a case but with any change of behaviour with limited test
coverage there is always a risk. From what I can tell this behaviour has
been around since at least U-Boot 2011.03, although this pre-dates sandbox
and I have not tested it on real hardware.

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc5xxx
Tom Rini [Mon, 27 Oct 2014 15:03:00 +0000 (11:03 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx

10 years agoppc: Zap TQM8272 board
Marek Vasut [Wed, 22 Oct 2014 19:34:52 +0000 (21:34 +0200)]
ppc: Zap TQM8272 board

This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
10 years agoppc: Zap TQM8260 board
Marek Vasut [Wed, 22 Oct 2014 19:34:51 +0000 (21:34 +0200)]
ppc: Zap TQM8260 board

This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
10 years agoppc: Zap IDS8247 board
Marek Vasut [Wed, 22 Oct 2014 19:34:50 +0000 (21:34 +0200)]
ppc: Zap IDS8247 board

This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
10 years agoppc: Zap HWW1U1A board
Marek Vasut [Wed, 22 Oct 2014 19:34:49 +0000 (21:34 +0200)]
ppc: Zap HWW1U1A board

This is the only used of CONFIG_SPI_X macro, just zap this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
10 years agoppc: Zap Hymod board
Marek Vasut [Wed, 22 Oct 2014 19:34:48 +0000 (21:34 +0200)]
ppc: Zap Hymod board

Remove this board as this is the only one last user of eeprom_probe(),
which is pretty non-standard stuff.

This patch also removes all the PHP, SQL and CSS stuff from U-Boot,
which probably makes U-Boot a bit less IoT ;-)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
10 years agoppc: Zap MHPC board
Marek Vasut [Wed, 22 Oct 2014 19:34:47 +0000 (21:34 +0200)]
ppc: Zap MHPC board

This board uses eeprom accessors in an incorrect way. The board
is old and unsupported, just zap it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
10 years agoppc: Zap ICU862 board
Marek Vasut [Wed, 22 Oct 2014 19:34:46 +0000 (21:34 +0200)]
ppc: Zap ICU862 board

This board is the only user of CONFIG_SYS_EEPROM_X40430 , remove
it so the EEPROM command code can be cleansed of the related code
as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
10 years agoPowerPC: drop some 74xx_7xx boards and related code
Wolfgang Denk [Tue, 21 Oct 2014 13:23:32 +0000 (15:23 +0200)]
PowerPC: drop some 74xx_7xx boards and related code

The file  board/Marvell/include/mv_gen_reg.h  is incompatible with
the GPL (see for example the "MARVELL RESERVES THE RIGHT AT ITS SOLE
DISCRETION TO REQUEST THAT THIS CODE BE IMMEDIATELY RETURNED TO
MARVELL" clause).  As this cannot be fixed, we remove the file and all
code that depends on it.  Fortunately this only affects some very old
boards that have long reached EOL:
CPCI750
DB64360
DB64460
p3m750
p3m7448

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
10 years agoREADME.scrapyard: update commit IDs
Wolfgang Denk [Tue, 21 Oct 2014 13:42:01 +0000 (15:42 +0200)]
README.scrapyard: update commit IDs

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agopowerpc: mpc5121ads: update board config info in README
Anatolij Gustschin [Tue, 21 Oct 2014 12:26:45 +0000 (14:26 +0200)]
powerpc: mpc5121ads: update board config info in README

The config targets described in README are not present
any more, update the info to currently used targets.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agopowerpc: digsy_mtc: convert to generic board
Anatolij Gustschin [Tue, 21 Oct 2014 11:47:04 +0000 (13:47 +0200)]
powerpc: digsy_mtc: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agopowerpc: mecp5123: convert to generic board
Anatolij Gustschin [Tue, 21 Oct 2014 11:47:03 +0000 (13:47 +0200)]
powerpc: mecp5123: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
10 years agopowerpc: ac14xx: convert to generic board
Anatolij Gustschin [Tue, 21 Oct 2014 11:47:02 +0000 (13:47 +0200)]
powerpc: ac14xx: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agopowerpc: aria: convert to generic board
Anatolij Gustschin [Tue, 21 Oct 2014 11:47:01 +0000 (13:47 +0200)]
powerpc: aria: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agopowerpc: pdm360ng: convert to generic board
Anatolij Gustschin [Tue, 21 Oct 2014 11:47:00 +0000 (13:47 +0200)]
powerpc: pdm360ng: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agopowerpc: mpc5121ads: convert to generic board
Anatolij Gustschin [Tue, 21 Oct 2014 11:46:59 +0000 (13:46 +0200)]
powerpc: mpc5121ads: convert to generic board

Also enable CONFIG_DISPLAY_BOARDINFO to get checkboard() called.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agopowerpc: mpc512x: fix boot breakage
Anatolij Gustschin [Tue, 21 Oct 2014 11:46:58 +0000 (13:46 +0200)]
powerpc: mpc512x: fix boot breakage

Commit d6b11fd1 (powerpc: remove MBX and MBX860T boards support)
removed mbxbar field in "struct sysconf512x" by mistake and broke
booting on mpc5121 boards. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-imx
Tom Rini [Mon, 27 Oct 2014 13:08:42 +0000 (09:08 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-imx

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-ti
Tom Rini [Mon, 27 Oct 2014 13:05:43 +0000 (09:05 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ti

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Mon, 27 Oct 2014 13:05:20 +0000 (09:05 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

10 years agoarm: socfpga: config: Add USB support example
Marek Vasut [Fri, 24 Oct 2014 21:34:25 +0000 (23:34 +0200)]
arm: socfpga: config: Add USB support example

Add example configuration stub for the DWC2 USB controller.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Pavel Machek <pavel@denx.de>
10 years agotools/socfpgaimage.c: fix build on darwin
Andreas Bießmann [Fri, 24 Oct 2014 21:39:10 +0000 (23:39 +0200)]
tools/socfpgaimage.c: fix build on darwin

socfpgaimage utilizes htole32 and friends, unfortunately these functions are
not available on darwin. Fix it by using the cpu_to_le32 and friends defined
in compiler.h as other parts in mkimage do.

This patch fixes the following error:
---8<---
  HOSTCC  tools/socfpgaimage.o
tools/socfpgaimage.c:77:22: warning: implicit declaration of function 'htole32' is invalid in C99 [-Wimplicit-function-declaration]
        header.validation = htole32(VALIDATION_WORD);
                            ^
tools/socfpgaimage.c:80:22: warning: implicit declaration of function 'htole16' is invalid in C99 [-Wimplicit-function-declaration]
        header.length_u32 = htole16(length_bytes/4);
                            ^
tools/socfpgaimage.c:95:6: warning: implicit declaration of function 'le32toh' is invalid in C99 [-Wimplicit-function-declaration]
        if (le32toh(header.validation) != VALIDATION_WORD)
            ^
tools/socfpgaimage.c:97:6: warning: implicit declaration of function 'le16toh' is invalid in C99 [-Wimplicit-function-declaration]
        if (le16toh(header.checksum) != hdr_checksum(&header))
            ^
4 warnings generated.
...
  HOSTLD  tools/dumpimage
Undefined symbols for architecture x86_64:
  "_htole16", referenced from:
      _socfpgaimage_set_header in socfpgaimage.o
  "_htole32", referenced from:
      _socfpgaimage_set_header in socfpgaimage.o
  "_le16toh", referenced from:
      _verify_buffer in socfpgaimage.o
  "_le32toh", referenced from:
      _verify_buffer in socfpgaimage.o
ld: symbol(s) not found for architecture x86_64
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Pavel Machek <pavel@denx.de>
10 years agoarm: socfpga: Zap CONFIG_EPHY[01]_PHY_ADDR macro
Marek Vasut [Wed, 22 Oct 2014 17:57:42 +0000 (19:57 +0200)]
arm: socfpga: Zap CONFIG_EPHY[01]_PHY_ADDR macro

This is not used anywhere, remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Pavel Machek <pavel@denx.de>
10 years agoarm: socfpga: Zap spl.h and ad-hoc related syms
Marek Vasut [Thu, 16 Oct 2014 10:25:40 +0000 (12:25 +0200)]
arm: socfpga: Zap spl.h and ad-hoc related syms

Switch to the common spl.h file and zap the arch/spl.h . Since the arch/spl.h
contained various ad-hoc symbols, zap those symbols as well and rework the
board configuration a little so it doesn't depend on them.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Pavel Machek <pavel@denx.de>
10 years agoarm: socfpga: Move code from misc_init_r() to arch_early_init_r()
Marek Vasut [Sat, 18 Oct 2014 01:52:36 +0000 (03:52 +0200)]
arm: socfpga: Move code from misc_init_r() to arch_early_init_r()

Move this initialization code to proper place. The misc_init_r()
function is called way too late and the platform initialization
code should be executed much earlier.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Pavel Machek <pavel@denx.de>
10 years agoMerge http://git.denx.de/u-boot-sunxi
Tom Rini [Sun, 26 Oct 2014 18:13:24 +0000 (14:13 -0400)]
Merge http://git.denx.de/u-boot-sunxi

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sun, 26 Oct 2014 18:12:18 +0000 (14:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

10 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Sun, 26 Oct 2014 18:03:08 +0000 (14:03 -0400)]
Merge git://git.denx.de/u-boot-dm

Fix a trivial conflict over adding <dm.h>

Conflicts:
arch/arm/cpu/armv7/omap3/board.c

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoi2c: designware: add an implement i2c protos
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:09 +0000 (22:58 +0200)]
i2c: designware: add an implement i2c protos

Include the i2c header and change the non confirming
functions to do so.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Heiko Schocher <hs@denx.de>
[trini: Fix i2c_get_bus_num prototype]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agotegra: add proto for pin_mux_mmc
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:08 +0000 (22:58 +0200)]
tegra: add proto for pin_mux_mmc

while at it, fix a typo

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agospl: add prototype for jump_to_image_no_args
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:07 +0000 (22:58 +0200)]
spl: add prototype for jump_to_image_no_args

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agommc: add prototype for mmc_get_env_addr
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:05 +0000 (22:58 +0200)]
mmc: add prototype for mmc_get_env_addr

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoide: add missing prototype
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:04 +0000 (22:58 +0200)]
ide: add missing prototype

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agogpio: add protype for name_to_gpio
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:03 +0000 (22:58 +0200)]
gpio: add protype for name_to_gpio

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agofdt_support: add prototypes for __weak functions
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:02 +0000 (22:58 +0200)]
fdt_support: add prototypes for __weak functions

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoelf: add prototype for valid_elf_image
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:01 +0000 (22:58 +0200)]
elf: add prototype for valid_elf_image

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agobootm: add prototype for arch_preboot_os
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:00 +0000 (22:58 +0200)]
bootm: add prototype for arch_preboot_os

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoarm: vectors: provide protypes from vectors.S
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:59 +0000 (22:57 +0200)]
arm: vectors: provide protypes from vectors.S

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
10 years agotwister: add missing includes
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:58 +0000 (22:57 +0200)]
twister: add missing includes

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoomap3: board: add missing include and proto
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:57 +0000 (22:57 +0200)]
omap3: board: add missing include and proto

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agonet: davince: add missing include
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:56 +0000 (22:57 +0200)]
net: davince: add missing include

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agommc: bcm2835_sdhci: add missing include
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:55 +0000 (22:57 +0200)]
mmc: bcm2835_sdhci: add missing include

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agolib: bootm: add missing include
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:54 +0000 (22:57 +0200)]
lib: bootm: add missing include

since the vxworks weaks are reimplement make
sure their prototypes are visible.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoleds: missing include
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:53 +0000 (22:57 +0200)]
leds: missing include

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoimx: add missing includes
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:52 +0000 (22:57 +0200)]
imx: add missing includes

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agocommon/cmd_elf.c: add missing include
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:51 +0000 (22:57 +0200)]
common/cmd_elf.c: add missing include

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[trini: bootm.h must come after common.h]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoarch-mx: add missing include
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:50 +0000 (22:57 +0200)]
arch-mx: add missing include

mxs_wait_mask_set and friends need a declaration
of struct mxs_register_32.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agostring.h: add missing prototypes
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:49 +0000 (22:57 +0200)]
string.h: add missing prototypes

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agocommon:console: add missing include
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:48 +0000 (22:57 +0200)]
common:console: add missing include

search_device is declared in iomux, but console only
had the definition. This prevents a warning.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agomodem.c: Switch to debug() from dbg found in common/console.c
Tom Rini [Sat, 25 Oct 2014 00:26:19 +0000 (20:26 -0400)]
modem.c: Switch to debug() from dbg found in common/console.c

Signed-off-by: Tom Rini <trini@ti.com>
10 years agovideo: ipu: prevent warnings with W=1
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:47 +0000 (22:57 +0200)]
video: ipu: prevent warnings with W=1

- make local functions static
- remove unused is_interlaced function

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agotegra: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:46 +0000 (22:57 +0200)]
tegra: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoserial: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:44 +0000 (22:57 +0200)]
serial: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agosdhci: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:43 +0000 (22:57 +0200)]
sdhci: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoomap_gpmc: fix warnigs with W=1
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:42 +0000 (22:57 +0200)]
omap_gpmc: fix warnigs with W=1

- make omap_spl_dev_ready static
- make omap_reverse_list static, move to under CONFIG_NAND_OMAP_ELM

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoomap3: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:41 +0000 (22:57 +0200)]
omap3: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agonet: fec_mxc: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:40 +0000 (22:57 +0200)]
net: fec_mxc: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agolmb: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:39 +0000 (22:57 +0200)]
lmb: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoimage-fit: make local function static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:38 +0000 (22:57 +0200)]
image-fit: make local function static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agogpio: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:37 +0000 (22:57 +0200)]
gpio: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoeth: make eth_address_set static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:36 +0000 (22:57 +0200)]
eth: make eth_address_set static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoenv_nand: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:35 +0000 (22:57 +0200)]
env_nand: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoehci-hcd.c: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:34 +0000 (22:57 +0200)]
ehci-hcd.c: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agodisk/part.c: make local function static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:33 +0000 (22:57 +0200)]
disk/part.c: make local function static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agocommon: board_r: make local functions static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:32 +0000 (22:57 +0200)]
common: board_r: make local functions static

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agocommon: cmd_elf: make do_bootelf_exec static
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:31 +0000 (22:57 +0200)]
common: cmd_elf: make do_bootelf_exec static

do_bootelf_exec was a weak function without a prototype nor
and strong version. Just make it static.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agovideo: use __weak
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:30 +0000 (22:57 +0200)]
video: use __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agousb: use __weak
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:29 +0000 (22:57 +0200)]
usb: use __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agosamsung: board: use __weak
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:28 +0000 (22:57 +0200)]
samsung: board: use __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agopci: use __weak
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:27 +0000 (22:57 +0200)]
pci: use __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agonet: phy: fix warnings with W=1
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:26 +0000 (22:57 +0200)]
net: phy: fix warnings with W=1

get_phy_id is marked weak but has no protype nor a
strong version, just make it static. Use __weak for
board_phy_config.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agomisc: use __weak
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:25 +0000 (22:57 +0200)]
misc: use __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agocti_flash.c: use __weak when requested for flash_(read|write){8,16,32,64}
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:23 +0000 (22:57 +0200)]
cti_flash.c: use __weak when requested for flash_(read|write){8,16,32,64}

For various reasons (design, errata) boards may need to implement their
own versions of these accessors.  So in the case of
CONFIG_CFI_FLASH_USE_WEAK_ACCESSOR mark the functions as weak.  In the
normal case mark them as static to allow for better optimization.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[trini: Reword commit message]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agocommon: board: use __weak
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:22 +0000 (22:57 +0200)]
common: board: use __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoarm: board: use __weak
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:21 +0000 (22:57 +0200)]
arm: board: use __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
10 years agosunxi: Add CONFIG_OLD_SUNXI_KERNEL_COMPAT Kconfig option
Hans de Goede [Wed, 22 Oct 2014 12:56:36 +0000 (14:56 +0200)]
sunxi: Add CONFIG_OLD_SUNXI_KERNEL_COMPAT Kconfig option

Add a Kconfig option which users can select when they want to boot older
kernels, e.g. the linux-sunxi 3.4 kernels. For now this just forces the pll5
"p" value to 1 (divide by 2) as that is what those kernels are hardcoded too,
in the future this may enable further workarounds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Tom Rini <trini@ti.com>
--
Changes in v2:
-s/CONFIG_OLD_KERNEL_COMPAT/CONFIG_OLD_SUNXI_KERNEL_COMPAT.
-Move the code block setting P(1) for old kernels to where P gets cleared

10 years agosunxi: dram: Use clock_get_pll5p to calculate mbus, rather then hardcoding
Hans de Goede [Wed, 22 Oct 2014 12:48:38 +0000 (14:48 +0200)]
sunxi: dram: Use clock_get_pll5p to calculate mbus, rather then hardcoding

This is a preparation patch for making the pll5 "p" divisor configurable
through Kconfig.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agosunxi: Add clock_get_pll5p() function
Hans de Goede [Wed, 22 Oct 2014 12:42:48 +0000 (14:42 +0200)]
sunxi: Add clock_get_pll5p() function

This is a preparation patch for making the pll5 "p" divisor configurable
through Kconfig.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agosunxi: Increase command line buffer size (CONFIG_SYS_CBSIZE)
Ian Campbell [Tue, 7 Oct 2014 13:20:30 +0000 (14:20 +0100)]
sunxi: Increase command line buffer size (CONFIG_SYS_CBSIZE)

I was running into this limit with a not overly long PXE append line.

Since the PXE code wants to print the resulting command line increase
CONFIG_SYS_PBSIZE too.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
10 years agoARM: sunxi: Add Ippo-q8h-v5 A23 tablet board defconfig
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:48 +0000 (16:47 +0800)]
ARM: sunxi: Add Ippo-q8h-v5 A23 tablet board defconfig

Ippo q8h is a series of A23 tablet boards. This defconfig
is for v5 of these boards, though for u-boot purposes they
are mostly the same.

See: http://linux-sunxi.org/Ippo_q8h

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Add support for using R_UART as console
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:47 +0000 (16:47 +0800)]
ARM: sunxi: Add support for using R_UART as console

The A23 only has UART0 muxed with MMC0. Some of the boards we
encountered expose R_UART as a set of pads.

Add support for R_UART so we can have a console while using mmc.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Allow specifying module in prcm apb0 init function
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:46 +0000 (16:47 +0800)]
ARM: sunxi: Allow specifying module in prcm apb0 init function

The prcm apb0 controls multiple modules. Allow specifying which
modules to enable clocks and de-assert resets so the function
can be reused.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Add support for R_PIO gpio banks
Hans de Goede [Wed, 22 Oct 2014 08:47:45 +0000 (16:47 +0800)]
ARM: sunxi: Add support for R_PIO gpio banks

The A31, A23 and later SoCs have an extra pin controller, called CPUs_PIO
or R_PIO, which handles pin banks L and beyond.

Also add a clear description about SUNXI_GPIO_BANKS, stating it only
counts the number of pin banks in the _main_ pin controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: expanded commit message]
[wens@csie.org: add pin bank M and expand comments]
[wens@csie.org: add comment on SUNXI_GPIO_BANKS macro]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Add basic A23 support
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:44 +0000 (16:47 +0800)]
ARM: sunxi: Add basic A23 support

The basic blocks of the A23 are similar to the A31 (sun6i). Re-use
sun6i code for initial clock, gpio, and uart setup.

There is no SPL support for A23, as we do not have any documentation
or sample code for DRAM initialization.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agommc: sunxi: Add support for sun8i (A23)
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:43 +0000 (16:47 +0800)]
mmc: sunxi: Add support for sun8i (A23)

The Allwinner A23 SoC has reset controls like the A31 (sun6i).
The FIFO address is also the same as sun6i.

Re-use code added for sun6i.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Add support for uart0 on port F (mmc0)
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:42 +0000 (16:47 +0800)]
ARM: sunxi: Add support for uart0 on port F (mmc0)

Allwinner SoCs provide uart0 muxed with mmc0, which can then be used
with a micro SD breakout board. On the A23, this is the only way to
use uart0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Add sun8i (A23) UART0 pin mux support
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:41 +0000 (16:47 +0800)]
ARM: sunxi: Add sun8i (A23) UART0 pin mux support

UART0 pin muxes on the A23 have a different function value.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Fix reset command on sun6i/sun8i
Chen-Yu Tsai [Sat, 4 Oct 2014 12:37:28 +0000 (20:37 +0800)]
ARM: sunxi: Fix reset command on sun6i/sun8i

The watchdog on sun6i/sun8i has a different layout.

Add the new layout and fix up the setup functions so that reset works.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
[ ijc -- removed sun5i workaround from sun6i/sun8i codepath as discussed ]

10 years agoARM: sunxi: Add sun6i/sun8i timer block register definition
Chen-Yu Tsai [Sat, 4 Oct 2014 12:37:27 +0000 (20:37 +0800)]
ARM: sunxi: Add sun6i/sun8i timer block register definition

The RTC hardware has been moved out of the timer block on sun6i/sun8i.
In addition, there are more watchdogs available.

Also note that the timer block definition is not completely accurate
for sun5i/sun7i. Various blocks are missing or have been moved out.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Move watchdog register definitions to separate file
Chen-Yu Tsai [Sat, 4 Oct 2014 12:37:26 +0000 (20:37 +0800)]
ARM: sunxi: Move watchdog register definitions to separate file

On later Allwinner SoCs, the watchdog hardware is by all means a
separate hardware block, with its own address range and interrupt
line.

Move the register definitions to a separate file to facilitate
supporting newer SoCs.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: sunxi: Fix build break when CONFIG_MMC is not defined
Chen-Yu Tsai [Tue, 7 Oct 2014 07:11:49 +0000 (15:11 +0800)]
ARM: sunxi: Fix build break when CONFIG_MMC is not defined

BOOT_TARGET_DEVICES includes MMC unconditionally. This breaks when
CONFIG_CMD_MMC is not defined. Use a secondary macro to conditionally
include it when CONFIG_MMC is enabled, as we do for CONFIG_AHCI.

This is used when we want to use uart0 from port F, which conflicts
with mmc0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>