]> git.sur5r.net Git - u-boot/log
u-boot
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 agoserial: remove uniphier_serial_initialize() call
Masahiro Yamada [Thu, 23 Oct 2014 13:26:12 +0000 (22:26 +0900)]
serial: remove uniphier_serial_initialize() call

The UniPhier serial driver has been converted to driver model.
Let's remove uniphier_serial_initialize() call from the old
serial driver framework.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoserial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 13:26:11 +0000 (22:26 +0900)]
serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodm: serial: use Driver Model for UniPhier serial driver
Masahiro Yamada [Thu, 23 Oct 2014 13:26:10 +0000 (22:26 +0900)]
dm: serial: use Driver Model for UniPhier serial driver

This commit converts UniPhier on-chip serial driver to driver model.

Since UniPhier SoCs do not have Device Tree support, some board files
should be added under arch/arm/cpu/armv7/uniphier/ph1-*/ directories.
(Device Tree support for UniPhier platform is still under way.)

Now the base address and master clock frequency are passed from
platform data, so CONFIG_SYS_UNIPHIER_SERIAL_BASE* and
CONFIG_SYS_UNIPHIER_UART_CLK should be removed.

Tested on UniPhier PH1-LD4 ref board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodm: add entries to Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 13:26:09 +0000 (22:26 +0900)]
dm: add entries to Kconfig

Create entries of CONFIG_DM, CONFIG_DM_SERIAL, CONFIG_DM_GPIO
and CONFIG_DM_SPI.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodm: serial: consolidate common code more
Masahiro Yamada [Thu, 23 Oct 2014 13:26:08 +0000 (22:26 +0900)]
dm: serial: consolidate common code more

Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() and putc().  This commit does more puts() and tsts().

Also rename locally used functions to _serial_*() for clarification
because we have similar functions names here are there in this file.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodm: serial: remove unnecessary casting
Masahiro Yamada [Thu, 23 Oct 2014 13:26:07 +0000 (22:26 +0900)]
dm: serial: remove unnecessary casting

The type (void *) can be directly passed to a function that
takes a specific pointer type.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodm: serial: fix console putc
Masahiro Yamada [Thu, 23 Oct 2014 13:26:06 +0000 (22:26 +0900)]
dm: serial: fix console putc

Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() correctly, but introduced another bug to putc();
serial_stub_putc() passes sdev->priv to serial_putc_dev(), but
serial_putc_dev() uses cur_dev instead of the given argument.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoserial: add static directive to local functions
Masahiro Yamada [Thu, 23 Oct 2014 13:26:05 +0000 (22:26 +0900)]
serial: add static directive to local functions

The functions _serial_putc, _serial_putc_raw, _serial_puts,
_serial_getc, _serial_tstc, _serial_setbrg are defined and used
locally in each of serial_ns16550.c and serial_s3c24x0.c.

Add static directive to them and remove declarations from
include/common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodm: move platform data headers to include/dm/platform_data
Masahiro Yamada [Fri, 24 Oct 2014 03:41:19 +0000 (12:41 +0900)]
dm: move platform data headers to include/dm/platform_data

The platform_data definitions are generally referenced from both
drivers and board files.  That is why header files defining
platform_data sturectures are placed in "include" directory,
but our top level "include" directory is already too cluttered.

Let's collect platform_data definitions under the directory
"include/dm/platform_data" like Linux gathers ones around under
"include/linux/platform_data".

This commit moves two header files:

  include/serial_mxc.h -> include/dm/platform_data/serial_mxc.h
  include/serial_pl01x.h -> include/dm/platform_data/serial_pl01x.h

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agodm: x86: Convert coreboot serial to use driver model
Simon Glass [Fri, 10 Oct 2014 13:49:20 +0000 (07:49 -0600)]
dm: x86: Convert coreboot serial to use driver model

This makes use of the existing device tree node to use driver model
for the serial console.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: x86: dts: Add additional info to the serial port node
Simon Glass [Fri, 10 Oct 2014 13:49:19 +0000 (07:49 -0600)]
dm: x86: dts: Add additional info to the serial port node

Add more information so that U-Boot can find the address of the serial port.
Also fix the reg-shift value.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: x86: Convert Intel ICH6 GPIO driver to use driver model
Simon Glass [Fri, 10 Oct 2014 13:49:18 +0000 (07:49 -0600)]
dm: x86: Convert Intel ICH6 GPIO driver to use driver model

Convert over this driver, using device tree to pass in the required
information. The peripheral is still probed, just the number of GPIO banks
and their offsets is in the device tree (previously this was a table in
the driver).

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: x86: Add a gpio header for coreboot
Simon Glass [Fri, 10 Oct 2014 13:49:17 +0000 (07:49 -0600)]
dm: x86: Add a gpio header for coreboot

This code doesn't follow the normal approach of having its arch-specific
definitions in an arch-specific directory. Add a new arch-specific file
and make use of it.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: x86: Support pre-reloc malloc()
Simon Glass [Fri, 10 Oct 2014 13:49:16 +0000 (07:49 -0600)]
dm: x86: Support pre-reloc malloc()

Add support for this by reserving a block of memory below global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: x86: Zero global data before board_init_f()
Simon Glass [Fri, 10 Oct 2014 13:49:15 +0000 (07:49 -0600)]
dm: x86: Zero global data before board_init_f()

To permit information to be passed from the early U-Boot code to
board_init_f() we cannot zero the global_data in board_init_f(). Instead
zero it in the start-up code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: x86: Remove ebp assembler warning in zimage.c
Simon Glass [Fri, 10 Oct 2014 13:49:14 +0000 (07:49 -0600)]
dm: x86: Remove ebp assembler warning in zimage.c

This code generates warnings with recent gcc versions. We really don't need
the clobber specification, so just drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: serial: ns16550: Add a cast to the I/O operations
Simon Glass [Fri, 10 Oct 2014 13:49:13 +0000 (07:49 -0600)]
dm: serial: ns16550: Add a cast to the I/O operations

This generates a warning when driver model is enabled, so fix it by adding
a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: Remove unused get_state() uclass method
Simon Glass [Sat, 4 Oct 2014 17:29:57 +0000 (11:29 -0600)]
dm: gpio: Remove unused get_state() uclass method

This is no longer used so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: dts: Move omap device tree includes to correct place
Simon Glass [Thu, 23 Oct 2014 19:15:58 +0000 (13:15 -0600)]
dm: dts: Move omap device tree includes to correct place

These ended up in arch/arm/dts/dt-bindings temporarily, but in fact the
correct place is now include/dt-bindings. Move them to be consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: imx: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:56 +0000 (11:29 -0600)]
dm: gpio: imx: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: exynos: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:55 +0000 (11:29 -0600)]
dm: gpio: exynos: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: rpi_b: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:54 +0000 (11:29 -0600)]
dm: gpio: rpi_b: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: omap3: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:53 +0000 (11:29 -0600)]
dm: gpio: omap3: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: tegra: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:52 +0000 (11:29 -0600)]
dm: gpio: tegra: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agotest: dm: Add additional GPIO tests
Simon Glass [Sat, 4 Oct 2014 17:29:51 +0000 (11:29 -0600)]
test: dm: Add additional GPIO tests

Add tests for gpio_requestf() and for memory leaks.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agotest: dm: Support memory leak checking as a core feature
Simon Glass [Sat, 4 Oct 2014 17:29:50 +0000 (11:29 -0600)]
test: dm: Support memory leak checking as a core feature

Check the state of the malloc() heap before each test is run, so that tests
can verify that all is well at the end. Provide helper functions to mark
the heap and to check that it returns to its initial state.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: Add gpio_requestf() helper for printf() strings
Simon Glass [Sat, 4 Oct 2014 17:29:49 +0000 (11:29 -0600)]
dm: gpio: Add gpio_requestf() helper for printf() strings

Add a helper which permits a printf()-style format string for the requester
string.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agotest: dm: Update GPIO tests for new gpio_request() method
Simon Glass [Sat, 4 Oct 2014 17:29:48 +0000 (11:29 -0600)]
test: dm: Update GPIO tests for new gpio_request() method

Now that gpio_request() is handled by the uclass, updates the tests
accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: sandbox: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:47 +0000 (11:29 -0600)]
dm: gpio: sandbox: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: sandbox: Implement the remove() method
Simon Glass [Sat, 4 Oct 2014 17:29:46 +0000 (11:29 -0600)]
dm: gpio: sandbox: Implement the remove() method

This method frees memory so we must make sure to implement it.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: sandbox: Implement the get_function() method
Simon Glass [Sat, 4 Oct 2014 17:29:45 +0000 (11:29 -0600)]
dm: gpio: sandbox: Implement the get_function() method

Implement this method so that the 'gpio' command can do its job correctly.
For sandbox we only support input and output states for a gpio.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Move the function for getting GPIO status into the uclass
Simon Glass [Sat, 4 Oct 2014 17:29:44 +0000 (11:29 -0600)]
dm: Move the function for getting GPIO status into the uclass

This function can be more easily tested if it is in the uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: Add gpio_get_function() and friends
Simon Glass [Sat, 4 Oct 2014 17:29:43 +0000 (11:29 -0600)]
dm: gpio: Add gpio_get_function() and friends

Add helpers to the uclass to allow finding out the pin function.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: Implement GPIO reservation in the uclass
Simon Glass [Sat, 4 Oct 2014 17:29:42 +0000 (11:29 -0600)]
dm: gpio: Implement GPIO reservation in the uclass

We have several GPIO drivers now and all are doing similar things to record
which GPIOs are reserved.

Move this logic into the uclass to make the drivers similar.

We retain the request()/free() methods since currently one driver does use
these for setting up the pin.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: omap3: Move to driver model for GPIO and serial
Simon Glass [Thu, 23 Oct 2014 03:37:15 +0000 (21:37 -0600)]
dm: omap3: Move to driver model for GPIO and serial

Adjust the configuration for the am33xx boards, including beagleboard,
to use driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
10 years agodm: am33xx: Move to driver model for GPIO and serial
Simon Glass [Thu, 23 Oct 2014 03:37:14 +0000 (21:37 -0600)]
dm: am33xx: Move to driver model for GPIO and serial

Adjust the configuration for the am33xx boards, including beaglebone black
to use driver model.

This can be extended to other OMAP boards once platform data is provided
for them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
10 years agodm: am335x: Remove serial options from CONFIG_SYS_EXTRA_OPTIONS
Simon Glass [Thu, 23 Oct 2014 03:37:13 +0000 (21:37 -0600)]
dm: am335x: Remove serial options from CONFIG_SYS_EXTRA_OPTIONS

With these options in place it is not possible to change the serial port
using 'make menuconfig' or similar. It seems to result in duplicate
defines.

For example:

In file included from include/linux/kconfig.h:4:0,
                 from <command-line>:0:
include/generated/autoconf.h:20:0: note: this is the location of the previous definition
 #define CONFIG_CONS_INDEX 2
 ^

The default option seems to be 1 anyway, in board/ti/am335x/Kconfig.

Remove the options so that we can adjust the serial port if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
10 years agodm: omap: serial: Add driver model support
Simon Glass [Thu, 23 Oct 2014 03:37:12 +0000 (21:37 -0600)]
dm: omap: serial: Add driver model support

Add driver model support to this driver, while retaining support for the
legacy system. Driver model serial support is enabled with CONFIG_DM_SERIAL
as usual.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: am33xx: Provide platform data for serial
Simon Glass [Thu, 23 Oct 2014 03:37:11 +0000 (21:37 -0600)]
dm: am33xx: Provide platform data for serial

Provide suitable platform data for am33xx boards, so that these boards can
use driver model for serial.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: am33xx: Provide platform data for GPIOs
Simon Glass [Thu, 23 Oct 2014 03:37:10 +0000 (21:37 -0600)]
dm: am33xx: Provide platform data for GPIOs

Provide suitable platform data for am33xx boards, so that these boards can
use driver model for GPIO access.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: omap: gpio: Support driver model
Simon Glass [Thu, 23 Oct 2014 03:37:09 +0000 (21:37 -0600)]
dm: omap: gpio: Support driver model

Add driver model support to this driver, while retaining support for the
legacy system. Driver model GPIO support is enabled with CONFIG_DM_GPIO
as usual.

Since gpio_is_valid() no longer exists, we can use the -EINVAL error
returned from gpio_request().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: omap: gpio: Put _get_gpio_value() logic into its own function
Simon Glass [Thu, 23 Oct 2014 03:37:08 +0000 (21:37 -0600)]
dm: omap: gpio: Put _get_gpio_value() logic into its own function

Add a separate internal helper function to get a GPIO value, so that we
will be able to call it with the driver model version and avoid code
duplication.

Also move gpio_get_bank() and check_gpio() down below the helper functions
as these won't be needed with driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: dts: omap: Select correct console for beaglebone
Simon Glass [Thu, 23 Oct 2014 03:37:07 +0000 (21:37 -0600)]
dm: dts: omap: Select correct console for beaglebone

Select serial0 as the console.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
10 years agodm: serial: Support CONFIG_CONS_INDEX if available
Simon Glass [Thu, 23 Oct 2014 03:37:06 +0000 (21:37 -0600)]
dm: serial: Support CONFIG_CONS_INDEX if available

Try to use this option to select the correct uart for the console. This
mimics the behaviour of drivers/serial.c.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: ns16550: Correct the probe logic for platform data
Simon Glass [Thu, 23 Oct 2014 03:37:05 +0000 (21:37 -0600)]
dm: ns16550: Correct the probe logic for platform data

The probe logic sets up the pointer to the platform data in the device
tree decode method. It should be done in the probe() method, and anyway
the device tree decode method can't be used when CONFIG_OF_CONTROL is
not enabled.

Fix these two problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: ns16550: Use an address instead of a pointer for the uart base
Simon Glass [Thu, 23 Oct 2014 03:37:04 +0000 (21:37 -0600)]
dm: ns16550: Use an address instead of a pointer for the uart base

It is inconvenient to have to use casts when specifying platform data. Also
it is not strictly correct, since we should use map_sysmem() to convert an
address to a pointer.

Adjust the platform data to use an address.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: serial: ns16550: Correct logic for checking for character
Simon Glass [Thu, 23 Oct 2014 03:37:03 +0000 (21:37 -0600)]
dm: serial: ns16550: Correct logic for checking for character

There is a bug in the logic which checks for an available character. This
can cause invalid characters to be received - this was noticed on
beaglebone. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: serial: Reset the watchdog while waiting in getc()
Simon Glass [Thu, 23 Oct 2014 03:37:02 +0000 (21:37 -0600)]
dm: serial: Reset the watchdog while waiting in getc()

We have moved the busy-wait loop out of drivers and into the uclass. This
means that we must reset the watchdog when busy-waiting.

Note: some drivers may still have a busy-wait even with driver model, as
a transition mechanism. Driver model will tolerate this, and is can be
cleaned up when all users of the driver use driver model. An example is
ns16550.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agodm: gpio: Support numbered GPIOs
Simon Glass [Thu, 23 Oct 2014 03:37:01 +0000 (21:37 -0600)]
dm: gpio: Support numbered GPIOs

At present banks must be named and it is not possible to refer to GPIOs by
number in driver model. Some boards use numbering - e.g. OMAP. It is fairly
easy to support by detecting the absense of a bank name (which starts with
a letter).

Add support for numbered GPIOs in addition to the existing bank support.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agokbuild: clear VENDOR variable to fix build error on tcsh
Masahiro Yamada [Tue, 21 Oct 2014 04:18:32 +0000 (13:18 +0900)]
kbuild: clear VENDOR variable to fix build error on tcsh

Since the environment "VENDOR" is set in tcsh, it must be cleared in our
makefile.  Otherwise, boards without CONFIG_SYS_VENDOR fail to build:

  > make CROSS_COMPILE=arm-linux-gnueabi- wandboard_quad_defconfig all
    [ snip ]
    AR      arch/arm/lib/lib.a
    CC      arch/arm/lib/eabi_compat.o
  scripts/Makefile.build:55: /home/foo/u-boot/board/unknown/wandboard/ \
  Makefile: No such file or directory
  make[2]: *** No rule to make target `/home/foo/u-boot/board/unknown/ \
  wandboard/Makefile'.  Stop.
  make[1]: *** [board/unknown/wandboard] Error 2
  make: *** [__build_one_by_one] Error 2

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Tom Everett <tom@khubla.com>
Reported-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agomusb: fix warning in include/linux/usb/musb.h
Igor Grinberg [Thu, 23 Oct 2014 11:25:25 +0000 (14:25 +0300)]
musb: fix warning in include/linux/usb/musb.h

Fix the following build warning by including linux/compat.h:
include/linux/usb/musb.h:110: warning: 'struct device' declared inside
parameter list
include/linux/usb/musb.h:110: warning: its scope is only this definition
or declaration, which is probably not what you want

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>