]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Thu, 23 Oct 2014 18:05:34 +0000 (14:05 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

9 years agomips: enable CONFIG_USE_PRIVATE_LIBGCC by default
Masahiro Yamada [Thu, 23 Oct 2014 16:30:46 +0000 (01:30 +0900)]
mips: enable CONFIG_USE_PRIVATE_LIBGCC by default

Without the private libgcc, we need a full multilib toolchain with
different libgcc or multiple toolchains to build all BE/LE and
hard-float/soft-float variants of MIPS boards.  That is not feasible.

This commit allows us to build all the MIPS boards with a single
kernel.org toolchain:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz

This change sounds reasonable for most users.  If necessary,
you can disable this option via "make menuconfig" or friends.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agokconfig: invoke silentoldconfig if spl, tpl/.config is updated
Masahiro Yamada [Thu, 23 Oct 2014 16:30:45 +0000 (01:30 +0900)]
kconfig: invoke silentoldconfig if spl, tpl/.config is updated

When spl/.config is updated by "make spl/menuconfig" or friends,
spl/include/config/auto.conf, spl/include/generated/autoconf.h
and some other files must be updated by "make silentoldconfig".

There is no hook for SPL in the top Makefile, so this commit
touches .config when spl/.config is updated to invoke silentoldconfig.
Likewise for TPL.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: fix a bug of the u-boot-spl link rule
Masahiro Yamada [Thu, 23 Oct 2014 16:30:44 +0000 (01:30 +0900)]
kbuild: fix a bug of the u-boot-spl link rule

cmd_u-boot-spl includes $(PLATFORM_LIBS) which changes
when CONFIG_USE_PRIVATE_GCC is updated.  The u-boot-spl image
should be re-linked if any prerequisite is newer than it
or the command line has changed.
$(call, if_changed,...) should be used instead of $(call cmd,...).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 16:30:43 +0000 (01:30 +0900)]
kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig

The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
Those architectures should "select" HAVE_PRIVATE_LIBGCC and
CONFIG_USE_PRIVATE_LIBGCC should depend on it.

Currently, this option is enabled on Tegra boards and x86 architecture.
Move the definition from header files to Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
9 years agokbuild: drop CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax
Masahiro Yamada [Thu, 23 Oct 2014 16:30:42 +0000 (01:30 +0900)]
kbuild: drop CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax

Now CONFIG_USE_PRIVATE_LIBGCC is only used as a boolean macro.
Remove CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: set CONFIG_USE_PRIVATE_LIBGCC to y
Masahiro Yamada [Thu, 23 Oct 2014 16:30:41 +0000 (01:30 +0900)]
x86: set CONFIG_USE_PRIVATE_LIBGCC to y

The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC
to a boolean macro so we can move it to Kconfig.

In the current implementation, there are two forms of syntax
for this macro:

  - CONFIG_USE_PRIVATE_LIBGCC=y
  - CONFIG_USE_PRIVATE_LIBGCC=path/to/private/libgcc

The latter is only used by x86 architecture.
With a little bit refactoring, it can be converted to the former.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: move CONFIG_SYS_HZ to lib/Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 16:30:40 +0000 (01:30 +0900)]
kconfig: move CONFIG_SYS_HZ to lib/Kconfig

CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h
(but some boards still have redundant definitions).

This commit moves the definition and the document in README to
Kconfig.  Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000,
the sanity check in lib/time.c should be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoMakefile: Add CONFIG_BUILD_TARGET to automatically build an special image
Stefan Roese [Wed, 22 Oct 2014 10:13:24 +0000 (12:13 +0200)]
Makefile: Add CONFIG_BUILD_TARGET to automatically build an special image

Add target to build it automatically upon "make" / MAKEALL. This can/should
be set by board / cpu specific headers if a special U-Boot image is
required for this SoC / board.

E.g. used by Marvell Armada XP to automatically build the u-boot.kwb
target.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agotools: kwbimage: Add image version 1 support for Armada XP / 370
Stefan Roese [Wed, 22 Oct 2014 10:13:23 +0000 (12:13 +0200)]
tools: kwbimage: Add image version 1 support for Armada XP / 370

This patch integrates the Barebox version of this kwbimage.c file into
U-Boot. As this version supports the image version 1 type for the
Armada XP / 370 SoCs.

It was easier to integrate the existing and known to be working Barebox
source than to update the current U-Boot version to support this
v1 image header format. Now all Marvell MVEBU SoCs are supported:

Image type 0: Kirkwood & Dove
Image type 1: Armada 370 & Armada XP

Please note that the current v1 support has this restuction (same as
has Barebox version):

Not implemented: support for the register headers and secure headers
in v1 images

Tested on Marvell DB-78460-BP eval board.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agotools: Compile kwboot for Marvell Armada XP as those SoCs are now supported
Stefan Roese [Wed, 22 Oct 2014 10:13:22 +0000 (12:13 +0200)]
tools: Compile kwboot for Marvell Armada XP as those SoCs are now supported

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agotools/kwboot: Sync with latest barebox version to support Armada XP
Stefan Roese [Wed, 22 Oct 2014 10:13:21 +0000 (12:13 +0200)]
tools/kwboot: Sync with latest barebox version to support Armada XP

The barebox version of the kwboot tool has evolved a bit. To support
Armada XP and Dove. Additionally a few minor fixes have been applied.
So lets sync with the latest barebox version.

Please note that the main difference between both versions now is, that
the U-Boot version still supports the -p option, to dynamically patch
an image for UART boot mode. I didn't test it now though.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agoarm: kirkwood: Remove some dead code from cpu.c
Stefan Roese [Wed, 22 Oct 2014 10:13:20 +0000 (12:13 +0200)]
arm: kirkwood: Remove some dead code from cpu.c

All those functions removed with this patch are not accessed at all. So lets
remove them.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: armada-xp: Add basic support for the maxBCM board
Stefan Roese [Wed, 22 Oct 2014 10:13:19 +0000 (12:13 +0200)]
arm: armada-xp: Add basic support for the maxBCM board

The maxBCM board is equipped with the Marvell Armada-XP MV78460 SoC. It
integrates an SPI NOR flash and an Marvell 88E6185 switch.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: armada-xp: Add basic support for the Marvell DB-MV784MP-GP board
Stefan Roese [Wed, 22 Oct 2014 10:13:18 +0000 (12:13 +0200)]
arm: armada-xp: Add basic support for the Marvell DB-MV784MP-GP board

This patch adds basic support for the Marvell DB-MV784MP-GP evaulation
board. This is the first board that uses the recently created
Armada XP 78460 SoC support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agoarm: armada-xp: Add basic support for Marvell Armada XP SoC
Stefan Roese [Wed, 22 Oct 2014 10:13:17 +0000 (12:13 +0200)]
arm: armada-xp: Add basic support for Marvell Armada XP SoC

This basic support for the Marvell Armada XP is base on the existing kirkwood
support. Which has been generatized by moving some common files into
common marvell locations.

This is in preparation for the upcoming Armada XP MV78460 support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agoi2c: mvtwsi: Add support for Marvell Armada XP
Stefan Roese [Wed, 22 Oct 2014 10:13:16 +0000 (12:13 +0200)]
i2c: mvtwsi: Add support for Marvell Armada XP

To support the Armada XP SoC, we just need to include the correct header.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agonet: phy.h: Make PHY autonegotiation timeout configurable
Stefan Roese [Wed, 22 Oct 2014 10:13:15 +0000 (12:13 +0200)]
net: phy.h: Make PHY autonegotiation timeout configurable

The Marvell MV78460 eval board DB-78460-BP seems to need a longer
PHY autonegotiation timeout than the "standard" 4 seconds. So lets
make this timeout configurable. If not defined in the board config
header the original 4000ms is used.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
9 years agonet: mvneta.c: Add support for the ethernet controller of the Marvell Armada XP SoC
Stefan Roese [Wed, 22 Oct 2014 10:13:14 +0000 (12:13 +0200)]
net: mvneta.c: Add support for the ethernet controller of the Marvell Armada XP SoC

This patch adds support for the NETA ethernet controller which is integrated
in the Marvell Armada XP SoC's. This port is based on the Linux driver which
has been stripped of the in U-Boot unused portions.

Tested on the Marvell MV78460 eval board db-78460-bp.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agoarm: kirkwood: Change naming of dram functions from km_foo() to mvebu_foo()
Stefan Roese [Wed, 22 Oct 2014 10:13:13 +0000 (12:13 +0200)]
arm: kirkwood: Change naming of dram functions from km_foo() to mvebu_foo()

Additionally the SDRAM address decoding register address is not hard coded
in the C code any more. A define is introduced for this base address.

This makes is possible to use those gpio functions from other MVEBU SoC's
as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agospi: kirkwood_spi.c: Change KW_SPI_BASE to MVEBU_SPI_BASE
Stefan Roese [Wed, 22 Oct 2014 10:13:12 +0000 (12:13 +0200)]
spi: kirkwood_spi.c: Change KW_SPI_BASE to MVEBU_SPI_BASE

This makes is possible to use this SPI driver from other MVEBU SoC's as well.
As the upcoming Armada XP support will do.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agoarm: marvell: Extract kirkwood gpio functions into new common file gpio.c
Stefan Roese [Wed, 22 Oct 2014 10:13:11 +0000 (12:13 +0200)]
arm: marvell: Extract kirkwood gpio functions into new common file gpio.c

This makes is possible to use those gpio functions from other MVEBU SoC's as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agospi: kirkwood_spi.c: Compile MPP (pin-mux) only for kirkwood SoC's
Stefan Roese [Wed, 22 Oct 2014 10:13:10 +0000 (12:13 +0200)]
spi: kirkwood_spi.c: Compile MPP (pin-mux) only for kirkwood SoC's

Compile the pin multiplexing only on Kirkwood platforms. As the
Armada XP doesn't need it.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agoarm: mvebu: Add common mbus functions to use on Marvell SoCs
Stefan Roese [Wed, 22 Oct 2014 10:13:09 +0000 (12:13 +0200)]
arm: mvebu: Add common mbus functions to use on Marvell SoCs

These mbus functions are ported from Barebox. The Barebox version is
ported from Linux. These functions will be first used by the upcoming
Armada XP support. Later other Marvell SoC's will be adopted to use
these functions as well (Kirkwood, Orion).

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
9 years agoarm: marvell: Rework timer.c to make it usable for other MVEBU platforms
Stefan Roese [Wed, 22 Oct 2014 10:13:08 +0000 (12:13 +0200)]
arm: marvell: Rework timer.c to make it usable for other MVEBU platforms

This patch does the following:
- Rename defines and registers to not use kirkwood
- Remove unused defines
- Use clrsetbits() accessor functions
- Coding style cleanup
- Clear 25MHZ bit in timer controller register init for Armada XP

There is no functional change for kirkwood. At least not intentionally.

This will be used by the upcoming Armada XP support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agoarm: marvell: Move arch-kirkwood/spi.h to arch-mvebu/spi.h
Stefan Roese [Wed, 22 Oct 2014 10:13:07 +0000 (12:13 +0200)]
arm: marvell: Move arch-kirkwood/spi.h to arch-mvebu/spi.h

This move makes it possible to use this kirkwood SPI driver from other
MVEBU platforms as well. This will be used by the upcoming Armada XP
support.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agoarm: marvell: Move arch/kirkwood.h to arch/soc.h
Stefan Roese [Wed, 22 Oct 2014 10:13:06 +0000 (12:13 +0200)]
arm: marvell: Move arch/kirkwood.h to arch/soc.h

This move makes is possible to use this header not only from kirkwood
platforms but from all Marvell mvebu platforms.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agoarm: kirkwood: Move some SoC files into new arch/arm/mvebu-common
Stefan Roese [Wed, 22 Oct 2014 10:13:05 +0000 (12:13 +0200)]
arm: kirkwood: Move some SoC files into new arch/arm/mvebu-common

By moving some kirkwood files into a Marvell common directory, those files
can be used by other Marvell platforms as well. The name mvebu is taken
from the Linux kernel source tree. It has been chosen there to represent
the SoC's from the Marvell EBU (Engineering Business Unit). Those SoC's
currently are:

Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x

This will be used by the upcoming Armada XP (MV78460) platform support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
9 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Thu, 23 Oct 2014 10:54:03 +0000 (06:54 -0400)]
Merge git://git.denx.de/u-boot-x86

9 years agoMerge git://git.denx.de/u-boot-fdt
Tom Rini [Thu, 23 Oct 2014 10:51:46 +0000 (06:51 -0400)]
Merge git://git.denx.de/u-boot-fdt

9 years agonet: Display the size when tftpboot finishes
Simon Glass [Fri, 10 Oct 2014 13:30:21 +0000 (07:30 -0600)]
net: Display the size when tftpboot finishes

If we know the file size, display it after loading the file.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Enable FIT, ELF on coreboot
Simon Glass [Fri, 10 Oct 2014 13:30:20 +0000 (07:30 -0600)]
x86: Enable FIT, ELF on coreboot

Enable FIT support and the bootelf command. Also change the default load
address to somewhere other than the normal load address of the kernel,
to allow for decompression without overwriting the original file.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: config: link: Display the board model on the screen
Simon Glass [Fri, 10 Oct 2014 13:30:19 +0000 (07:30 -0600)]
x86: config: link: Display the board model on the screen

To get a display in U-Boot on link you must either build a coreboot that
always sets it up, or use Esc-Refresh-Power to reset the machine.

When we do have a display, it is nice to display the model at the top, so
enable this option.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: link: Tidy up the command lines options
Simon Glass [Fri, 10 Oct 2014 13:30:18 +0000 (07:30 -0600)]
x86: link: Tidy up the command lines options

We may as well use hush. The auto-complete option was incorrect so this was
not enabled. Also expand the command line size a little and go back to the
default prompt since "boot>" doesn't seem any more useful.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodoc: Remove note about auto-complete not working with hush
Simon Glass [Fri, 10 Oct 2014 13:30:17 +0000 (07:30 -0600)]
doc: Remove note about auto-complete not working with hush

It does seem to work (tested on link), so update the docs.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: cros_ec: Enable cros_ec for link
Simon Glass [Fri, 10 Oct 2014 13:30:16 +0000 (07:30 -0600)]
x86: cros_ec: Enable cros_ec for link

Add defines to enable the Chrome OS EC interface and set it up on init.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: cros_ec: Update LPC driver for new cros_ec header
Simon Glass [Fri, 10 Oct 2014 13:30:15 +0000 (07:30 -0600)]
x86: cros_ec: Update LPC driver for new cros_ec header

There was a minor rename of one of the defines, so update the driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: dts: Add device tree compatible string for Intel IPC
Simon Glass [Fri, 10 Oct 2014 13:30:14 +0000 (07:30 -0600)]
x86: dts: Add device tree compatible string for Intel IPC

Add this to the table so that it can be recognised.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add device tree information for Chrome OS EC
Simon Glass [Fri, 10 Oct 2014 13:30:13 +0000 (07:30 -0600)]
x86: Add device tree information for Chrome OS EC

Add the required node describing how to find the EC on link.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: config: Enable dhcp on link
Simon Glass [Fri, 10 Oct 2014 13:30:12 +0000 (07:30 -0600)]
x86: config: Enable dhcp on link

The dhcp option is required to get bootp to work on the Chromebook Pixel,
so enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Add a subnodes iterator macro
Thierry Reding [Tue, 26 Aug 2014 15:33:55 +0000 (17:33 +0200)]
fdt: Add a subnodes iterator macro

The fdt_for_each_subnode() iterator macro provided by this patch can be
used to iterate over a device tree node's subnodes. At each iteration a
loop variable will be set to the next subnode.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agofdt: Add a function to return PCI BDF triplet
Thierry Reding [Tue, 26 Aug 2014 15:33:54 +0000 (17:33 +0200)]
fdt: Add a function to return PCI BDF triplet

The fdtdec_pci_get_bdf() function returns the bus, device, function
triplet of a PCI device by parsing the "reg" property according to the
PCI device tree binding.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agofdt: Add resource parsing functions
Thierry Reding [Tue, 26 Aug 2014 15:33:53 +0000 (17:33 +0200)]
fdt: Add resource parsing functions

Add the fdt_get_resource() and fdt_get_named_resource() functions which
can be used to parse resources (memory regions) from an FDT. A helper to
compute the size of a region is also provided.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Add functions to retrieve strings
Thierry Reding [Tue, 26 Aug 2014 15:33:52 +0000 (17:33 +0200)]
fdt: Add functions to retrieve strings

Given a device tree node, a property name and an index, the new function
fdt_get_string_index() will return in an output argument a pointer to
the index'th string in the property's value.

The fdt_get_string() is a shortcut for the above with the index being 0.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Add a function to get the index of a string
Thierry Reding [Tue, 26 Aug 2014 15:33:51 +0000 (17:33 +0200)]
fdt: Add a function to get the index of a string

Given a device tree node and a property name, the new fdt_find_string()
function will look up a given string in the string list contained in the
property's value and return its index.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Add a function to count strings
Thierry Reding [Tue, 26 Aug 2014 15:33:50 +0000 (17:33 +0200)]
fdt: Add a function to count strings

Given a device tree node and a property name, the fdt_count_strings()
function counts the number of strings found in the property value.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoARM: rpi_b: enable USB/DHCP/PXE in bootcmd
Stephen Warren [Sat, 27 Sep 2014 02:51:40 +0000 (20:51 -0600)]
ARM: rpi_b: enable USB/DHCP/PXE in bootcmd

USB support must be enabled before config_distro_bootcmd.h is included
for bootcmd to include USB-related functionality.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agoARM: rpi_b: query internal MAC address from firmware
Stephen Warren [Sat, 27 Sep 2014 02:51:39 +0000 (20:51 -0600)]
ARM: rpi_b: query internal MAC address from firmware

The built-in SMSC 95xx chip doesn't know its own MAC address. Instead,
we must query it from the VC firmware; it's probably encoded in fuses
on the BCM2835.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agoarm: rpi: Enable USB support on RPi
Marek Vasut [Sun, 21 Sep 2014 08:25:12 +0000 (10:25 +0200)]
arm: rpi: Enable USB support on RPi

Enable DWC2 USB, storage and ethernet support. Tested on RPi B+.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
9 years agousb: dwc2: Add driver for Synopsis DWC2 USB IP block
Oleksandr Tymoshenko [Sun, 2 Feb 2014 04:51:25 +0000 (21:51 -0700)]
usb: dwc2: Add driver for Synopsis DWC2 USB IP block

This is the USB host controller used on the Altera SoCFPGA and Raspbery Pi.

This code has three checkpatch warnings, but to make sure it stays at least
readable and clear, these are not fixed. These bugs are in the USB request
handling combinatorial logic, so any abstracting of those is out of question.

Tested on DENX MCV (Altera SoCFPGA 5CSFXC6C6U23C8N) and RPi B+ (BCM2835).

Signed-off-by: Oleksandr Tymoshenko <gonzo@bluezbox.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Cc: Vince Bridgers <vbridger@altera.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agonet: asix: Add support for AX88772B
Alexandre Courbot [Thu, 9 Oct 2014 03:43:30 +0000 (12:43 +0900)]
net: asix: Add support for AX88772B

This USB device works as-is on this driver.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
9 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Wed, 22 Oct 2014 17:51:45 +0000 (13:51 -0400)]
Merge git://git.denx.de/u-boot-dm

9 years agodm: serial: Support driver model in pl01x driver
Simon Glass [Mon, 22 Sep 2014 23:30:58 +0000 (17:30 -0600)]
dm: serial: Support driver model in pl01x driver

Add driver model support in this driver, using platform data provided by
the board.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agodm: serial: Tidy up the pl01x driver
Simon Glass [Mon, 22 Sep 2014 23:30:57 +0000 (17:30 -0600)]
dm: serial: Tidy up the pl01x driver

Adjust the driver so that leaf functions take a pointer to the serial port
register base. Put all the global configuration in the init function, and
use the same settings from then on.

This makes it much easier to move to driver model without duplicating the
code, since with driver model we use platform data rather than global
settings.

The driver is compiled with either the CONFIG_PL010_SERIAL or
CONFIG_PL011_SERIAL option and this determines the uart type. With driver
model this needs to come in from platform data, so create a new
CONFIG_PL01X_SERIAL config which brings in the driver, and adjust the
driver to support both peripheral variants.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agodm: rpi: Convert GPIO driver to driver model
Simon Glass [Mon, 22 Sep 2014 23:30:56 +0000 (17:30 -0600)]
dm: rpi: Convert GPIO driver to driver model

Convert the BCM2835 GPIO driver to use driver model, and switch over
Raspberry Pi to use this, since it is the only board.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agodm: core: Add support for simple-bus
Simon Glass [Sat, 4 Oct 2014 17:29:37 +0000 (11:29 -0600)]
dm: core: Add support for simple-bus

Add a driver for the simple-bus nodes, which allows devices within these
nodes to be bound.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: imx: Move cm_fx6 to use driver model for serial and GPIO
Simon Glass [Thu, 2 Oct 2014 01:57:28 +0000 (19:57 -0600)]
dm: imx: Move cm_fx6 to use driver model for serial and GPIO

Now that serial and GPIO are available for iMX.6, move cm_fx6 over as an
example.

Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agodm: imx: serial: Support driver model in the MXC serial driver
Simon Glass [Thu, 2 Oct 2014 01:57:27 +0000 (19:57 -0600)]
dm: imx: serial: Support driver model in the MXC serial driver

Add driver model support with this driver. Boards which use this driver
should define platform data in their board files.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: imx: gpio: Support driver model in MXC gpio driver
Simon Glass [Thu, 2 Oct 2014 01:57:26 +0000 (19:57 -0600)]
dm: imx: gpio: Support driver model in MXC gpio driver

Add driver model support with this driver. In this case the platform data
is in the driver. It would be better to put this into an SOC-specific file,
but this is best attempted when more boards are moved over to use driver
model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
9 years agoarm: mx6: cm_fx6: use gpio request
Nikita Kiryanov [Thu, 2 Oct 2014 14:17:24 +0000 (17:17 +0300)]
arm: mx6: cm_fx6: use gpio request

Use gpio_request for all the gpios that are utilized by various
subsystems in cm-fx6, and refactor the relevant init functions
so that all gpios are requested during board_init(), not during
subsystem init, thus avoiding the need to manage gpio ownership
each time a subsystem is initialized.

The new division of labor is:
During board_init() muxes are setup and gpios are requested.
During subsystem init gpios are toggled.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agodm: imx: i2c: Use gpio_request() to request GPIOs
Simon Glass [Thu, 2 Oct 2014 14:17:23 +0000 (17:17 +0300)]
dm: imx: i2c: Use gpio_request() to request GPIOs

GPIOs should be requested before use. Without this, driver model will
not permit the GPIO to be used.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
9 years agoimx: Add error checking to setup_i2c()
Simon Glass [Thu, 2 Oct 2014 01:57:24 +0000 (19:57 -0600)]
imx: Add error checking to setup_i2c()

Since this function can fail, check its return value.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agodm: serial: Put common code into separate functions
Simon Glass [Thu, 2 Oct 2014 01:57:23 +0000 (19:57 -0600)]
dm: serial: Put common code into separate functions

Avoid duplicating the code which deals with getc() and putc(). It is fairly
simple, but may expand later.

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