]> git.sur5r.net Git - u-boot/log
u-boot
10 years agokbuild: Rename UIMAGE to MKIMAGE
Marek Vasut [Fri, 14 Mar 2014 04:00:14 +0000 (05:00 +0100)]
kbuild: Rename UIMAGE to MKIMAGE

U-Boot uses the 'mkimage' tool to produce various image types,
not only uImage image type. Rename the invocation name from
UIMAGE to MKIMAGE.

The following command was used to do the replacement:
git grep 'quiet_cmd_mkimage.* = UIMAGE' | cut -d : -f 1 | \
 xargs -i sed -i "s@\(quiet_cmd_mkimage\)\(.*\) = UIMAGE @\1\2 = MKIMAGE@" {}

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Tom Rini [Fri, 28 Mar 2014 12:24:01 +0000 (08:24 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Fri, 28 Mar 2014 12:19:05 +0000 (08:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

10 years agoARM: tegra: make all I2C ports open-drain
Stephen Warren [Wed, 12 Mar 2014 19:10:44 +0000 (13:10 -0600)]
ARM: tegra: make all I2C ports open-drain

I2C protocol requires open-drain IOs. Fix the Dalmore and Venice2 pinmux
tables to configure the IOs correctly. Without this, Tegra may actively
drive the lines high while an external device is actively driving the
lines low, which can only lead to bad things.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoMerge branch 'u-boot/master' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 25 Mar 2014 09:25:14 +0000 (10:25 +0100)]
Merge branch 'u-boot/master' into 'u-boot-arm/master'

Trivial merge conflict, needed to manually remove
local_info as per commit 41364f0f.

Conflicts:
board/samsung/common/board.c

10 years agodfu: mmc: Replace calls to u-boot commands with native mmc API
Łukasz Majewski [Fri, 21 Feb 2014 07:23:00 +0000 (08:23 +0100)]
dfu: mmc: Replace calls to u-boot commands with native mmc API

For some time we have been using the run_command() with properly crafted
string. Such approach turned to be unreliable and error prone.

Switch to "native" mmc subsystem API would allow better type checking and
shall improve speed.

Also, it seems that this API is changing less often than u-boot commands.
The approach similar to env operations on the eMMC has been reused.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
10 years agommc: Split mmc struct, rework mmc initialization (v2)
Pantelis Antoniou [Tue, 11 Mar 2014 17:34:20 +0000 (19:34 +0200)]
mmc: Split mmc struct, rework mmc initialization (v2)

The way that struct mmc was implemented was a bit of a mess;
configuration and internal state all jumbled up in a single structure.

On top of that the way initialization is done with mmc_register leads
to a lot of duplicated code in drivers.

Typically the initialization got something like this in every driver.

struct mmc *mmc = malloc(sizeof(struct mmc));
memset(mmc, 0, sizeof(struct mmc);
/* fill in fields of mmc struct */
/* store private data pointer */
mmc_register(mmc);

By using the new mmc_create call one just passes an mmc config struct
and an optional private data pointer like this:

struct mmc = mmc_create(&cfg, priv);

All in tree drivers have been updated to the new form, and expect
mmc_register to go away before long.

Changes since v1:

* Use calloc instead of manually calling memset.
* Mark mmc_register as deprecated.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: Convert mmc struct's name array to a pointer
Pantelis Antoniou [Mon, 10 Mar 2014 18:05:51 +0000 (20:05 +0200)]
mmc: Convert mmc struct's name array to a pointer

Using an array is pointless; even more pointless (and scary) is using
sprintf to fill it without a format string.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: Remove ops from struct mmc and put in mmc_ops
Pantelis Antoniou [Wed, 26 Feb 2014 17:28:45 +0000 (19:28 +0200)]
mmc: Remove ops from struct mmc and put in mmc_ops

Remove the in-structure ops and put them in mmc_ops with
a constant pointer to it.

This makes the mmc structure smaller as well as conserving
code space (in theory).

All in-tree drivers are converted as well; this is done in a
single patch in order to not break git bisect.

Changes since V1:
Fix compilation b0rked issue on omap platforms where OMAP_GPIO was
not set.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agodfu: mmc: Replace calls to u-boot commands with native mmc API
Łukasz Majewski [Fri, 21 Feb 2014 07:23:00 +0000 (08:23 +0100)]
dfu: mmc: Replace calls to u-boot commands with native mmc API

For some time we have been using the run_command() with properly crafted
string. Such approach turned to be unreliable and error prone.

Switch to "native" mmc subsystem API would allow better type checking and
shall improve speed.

Also, it seems that this API is changing less often than u-boot commands.
The approach similar to env operations on the eMMC has been reused.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
10 years agoam335x, dfu: add DFU_MANIFEST_POLL_TIMEOUT to the siemens boards
Heiko Schocher [Tue, 18 Mar 2014 07:09:57 +0000 (08:09 +0100)]
am335x, dfu: add DFU_MANIFEST_POLL_TIMEOUT to the siemens boards

as the siemens boards use dfu for updating a nand ubi partition
add DFU_MANIFEST_POLL_TIMEOUT to them, so dfu host waits after
complete transfer of the new image for DFU_MANIFEST_POLL_TIMEOUT
ms before sending again an usb request. So the board have enough
time to erase rest of the nand sectors.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agousb: dfu: introduce dfuMANIFEST state
Heiko Schocher [Tue, 18 Mar 2014 07:09:56 +0000 (08:09 +0100)]
usb: dfu: introduce dfuMANIFEST state

on nand flash using ubi, after the download of the new image into
the flash, the "rest" of the nand sectors get erased while flushing
the medium. With current u-boot version dfu-util may show:

Starting download: [##################################################] finished!
state(7) = dfuMANIFEST, status(0) = No error condition is present
unable to read DFU status

as get_status is not answered while erasing sectors, if erasing
needs some time.

So do the following changes to prevent this:

- introduce dfuManifest state
  According to dfu specification
  ( http://www.usb.org/developers/devclass_docs/usbdfu10.pdf ) section 7:
  "the device enters the dfuMANIFEST-SYNC state and awaits the solicitation
   of the status report by the host. Upon receipt of the anticipated
   DFU_GETSTATUS, the device enters the dfuMANIFEST state, where it
   completes its reprogramming operations."

- when stepping into dfuManifest state, sending a PollTimeout
  DFU_MANIFEST_POLL_TIMEOUT in ms, to the host, so the host
  (dfu-util) waits the PollTimeout before sending a get_status again.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agousb, dfu: extract flush code into seperate function
Heiko Schocher [Tue, 18 Mar 2014 07:09:55 +0000 (08:09 +0100)]
usb, dfu: extract flush code into seperate function

move the flushing code into an extra function dfu_flush(),
so it can be used from other code.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agopatman: Use Patch-cc: instead of Cc:
Simon Glass [Sun, 16 Feb 2014 15:23:47 +0000 (08:23 -0700)]
patman: Use Patch-cc: instead of Cc:

Add a new Patch-cc: tag which performs the service now provided by
the Cc: tag. The Cc: tag is interpreted by git send-email but
ignored by patman.

So now:

Cc: patman does nothing. (git send-email can cc patches)
  Patch-cc: patman Cc's patch and removes this tag from the patch

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Enable CONFIG_CMD_LZMADEC in sandbox.h
Patrice Bouchand [Sun, 16 Feb 2014 05:19:58 +0000 (22:19 -0700)]
sandbox: Enable CONFIG_CMD_LZMADEC in sandbox.h

As Simon Glass requested it, here's a patch that enables
CONFIG_CMD_LZMADEC in sandbox.

Signed-off-by: Patrice Bouchand <pbfwdlist@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoAdd lzmadec command
Patrice Bouchand [Sun, 16 Feb 2014 05:19:57 +0000 (22:19 -0700)]
Add lzmadec command

I needed to be able to uncompress lzma files. I did this command
based on unzip command and propose it if it could help.

Signed-off-by: Patrice Bouchand <pbfwdlist@gmail.com>
Changed to work with sandbox
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosparc: consolidate CONFIG_{LEON, LEON2, LEON3} definition
Masahiro Yamada [Thu, 13 Mar 2014 10:48:57 +0000 (19:48 +0900)]
sparc: consolidate CONFIG_{LEON, LEON2, LEON3} definition

CONFIG_LEON is already defined in
arch/sparc/cpu/{leon2,leon3}/config.mk.
Remove the redundant definition in board header files.

All leon3 boards define CONFIG_LEON3 in board header files.
Move the definition to arch/sparc/cpu/leon3/config.mk.

CONFIG_LEON2 can be move to arch/sparc/cpu/leon2/config.mk
as well.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
10 years agoenv: Implement support for AES encryption into fw_* tools
Marek Vasut [Wed, 5 Mar 2014 18:59:52 +0000 (19:59 +0100)]
env: Implement support for AES encryption into fw_* tools

Implement support for encrypting/decrypting the environment block
into the tools/env/fw_* tools. The cipher used is AES 128 CBC and
the implementation depends solely on components internal to U-Boot.

To allow building against the internal AES library, the library did
need minor adjustments to not include U-Boot's headers which are not
wanted to be included and define missing types.

Signed-off-by: Marek Vasut <marex@denx.de>
10 years agoenv: Implement support for encrypting environment
Marek Vasut [Wed, 5 Mar 2014 18:59:51 +0000 (19:59 +0100)]
env: Implement support for encrypting environment

Add function which allows encrypting the whole environment block with
AES-128-CBC. The key for the environment is retrieved by
env_aes_cbc_get_key() function, which must be implemented on a per-board
basis.

Signed-off-by: Marek Vasut <marex@denx.de>
10 years agoenv: Add env_export() wrapper
Marek Vasut [Wed, 5 Mar 2014 18:59:50 +0000 (19:59 +0100)]
env: Add env_export() wrapper

Implement env_export() wrapper, so that all implementers of saveenv() don't
have to call hexport_r(), crc32() etc. sequence . This trims down a bit of
code duplication.

Signed-off-by: Marek Vasut <marex@denx.de>
10 years agoaes: Add 'aes' command to access AES-128-CBC
Marek Vasut [Wed, 5 Mar 2014 18:58:39 +0000 (19:58 +0100)]
aes: Add 'aes' command to access AES-128-CBC

Add simple 'aes' command, which allows using the AES-128-CBC encryption
and decryption functions from U-Boot command line.

Signed-off-by: Marek Vasut <marex@denx.de>
10 years agoaes: Implement AES-128-CBC decryption function
Marek Vasut [Wed, 5 Mar 2014 18:58:38 +0000 (19:58 +0100)]
aes: Implement AES-128-CBC decryption function

Implement a compatible AES-128-CBC decryption function as a counterpart
of the encryption function pulled from tegra20-common/crypto.c .

Signed-off-by: Marek Vasut <marex@denx.de>
10 years agoaes: Move the AES-128-CBC encryption function to common code
Marek Vasut [Wed, 5 Mar 2014 18:58:37 +0000 (19:58 +0100)]
aes: Move the AES-128-CBC encryption function to common code

Move the AES-128-CBC encryption function implemented in
tegra20-common/crypto.c into lib/aes.c . This is well re-usable common
code. Moreover, clean the code up a bit and fix the kerneldoc-style
annotations.

Signed-off-by: Marek Vasut <marex@denx.de>
10 years agoaes: Fix kerneldoc for aes.h
Marek Vasut [Wed, 5 Mar 2014 18:58:36 +0000 (19:58 +0100)]
aes: Fix kerneldoc for aes.h

Fix the function annotations in aes.h so they're compatible with kerneldoc.

Signed-off-by: Marek Vasut <marex@denx.de>
10 years agotools, fit_check_sign: verify a signed fit image
Heiko Schocher [Mon, 3 Mar 2014 11:19:30 +0000 (12:19 +0100)]
tools, fit_check_sign: verify a signed fit image

add host tool "fit_check_sign" which verifies, if a fit image is
signed correct.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Simon Glass <sjg@chromium.org>
10 years agotools, fit: add fit_info host command
Heiko Schocher [Mon, 3 Mar 2014 11:19:29 +0000 (12:19 +0100)]
tools, fit: add fit_info host command

add fit_info command to the host tools. This command prints
the name, offset and the len from a property from a node in
a fit file. This info can be used to extract a properties
data with linux tools, for example "dd".

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agogen: Add progressive hash API
Hung-ying Tyan [Mon, 3 Mar 2014 11:19:28 +0000 (12:19 +0100)]
gen: Add progressive hash API

Add hash_init(), hash_update() and hash_finish() to the
hash_algo struct. Add hash_lookup_algo() to look up the
struct given an algorithm name.

Signed-off-by: Hung-ying Tyan <tyanh@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agorsa: add sha256,rsa4096 algorithm
Heiko Schocher [Mon, 3 Mar 2014 11:19:27 +0000 (12:19 +0100)]
rsa: add sha256,rsa4096 algorithm

Add support for sha256,rsa4096 signatures in u-boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: andreas@oetken.name
10 years agorsa: add sha256-rsa2048 algorithm
Heiko Schocher [Mon, 3 Mar 2014 11:19:26 +0000 (12:19 +0100)]
rsa: add sha256-rsa2048 algorithm

based on patch from andreas@oetken.name:

http://patchwork.ozlabs.org/patch/294318/
commit message:
I currently need support for rsa-sha256 signatures in u-boot and found out that
the code for signatures is not very generic. Thus adding of different
hash-algorithms for rsa-signatures is not easy to do without copy-pasting the
rsa-code. I attached a patch for how I think it could be better and included
support for rsa-sha256. This is a fast first shot.

aditionally work:
- removed checkpatch warnings
- removed compiler warnings
- rebased against current head

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: andreas@oetken.name
Cc: Simon Glass <sjg@chromium.org>
10 years agofit: add sha256 support
Heiko Schocher [Mon, 3 Mar 2014 11:19:25 +0000 (12:19 +0100)]
fit: add sha256 support

add sha256 support to fit images

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agofdt: add "fdt checksign" command
Heiko Schocher [Mon, 3 Mar 2014 11:19:24 +0000 (12:19 +0100)]
fdt: add "fdt checksign" command

check if a fdt is correct signed
pass an optional addr value. Contains the addr of the key blob

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agotools/image-host: fix sign-images bug
Heiko Schocher [Mon, 3 Mar 2014 11:19:23 +0000 (12:19 +0100)]
tools/image-host: fix sign-images bug

property "sign-images" is never found, fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: config: Enable cros_ec emulation and related items
Simon Glass [Thu, 27 Feb 2014 20:26:25 +0000 (13:26 -0700)]
sandbox: config: Enable cros_ec emulation and related items

Enable the Chrome OS EC emulation for sandbox along with LCD, sound
expanded GPIOs and a few other options to make this work correctly.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add implementation of spi_setup_slave_fdt()
Simon Glass [Thu, 27 Feb 2014 20:26:24 +0000 (13:26 -0700)]
sandbox: Add implementation of spi_setup_slave_fdt()

This function is needed when CONFIG_OF_SPI is defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add options to clean up temporary files
Simon Glass [Thu, 27 Feb 2014 20:26:23 +0000 (13:26 -0700)]
sandbox: Add options to clean up temporary files

When jumping from one sandbox U-Boot to another in sandbox, the RAM buffer
is preserved in the jump by using a temporary file. Add an option to tell
the receiving U-Boot to remove this file when it is no longer needed.

Similarly the old U-Boot image is left behind in this case. We cannot delete
it immediately since gdb cannot then find its debug symbols. Delete it just
before exiting.

Together these changes ensure that temporary files are removed both for
memory and U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Allow Ctrl-C to work in sandbox
Simon Glass [Thu, 27 Feb 2014 20:26:22 +0000 (13:26 -0700)]
sandbox: Allow Ctrl-C to work in sandbox

It is useful for Cltl-C to be handled by U-Boot as it is on other boards.
But it is also useful to be able to terminate U-Boot with Ctrl-C.

Add an option to enable signals while in raw mode, and make this the
default. Add an option to leave the terminal cooked, which is useful for
redirecting output.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Deal with conflicting getenv() for SDL
Simon Glass [Thu, 27 Feb 2014 20:26:21 +0000 (13:26 -0700)]
sandbox: Deal with conflicting getenv() for SDL

Unfortunately SDL requires getenv() to operate, since it wants to figure out
the display type. U-Boot has its own getenv() and they conflict. As a
work-around use #define to resolve the conflict.

A better but more complex solution might be to rename some U-Boot symbols
at link time. SDL audio is not functional at present, likely due to a related
issue.

Note: Vic Yank wrote a script for this, filed in crbug.com/271125.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosound: Move Samsung-specific code into its own file
Simon Glass [Thu, 27 Feb 2014 20:26:20 +0000 (13:26 -0700)]
sound: Move Samsung-specific code into its own file

The i2s code is in fact Samsung-specific, but there might be other
implementation. Move this code into its own file. This makes it slightly
more obviously how to adjust the code to support another SoC, when someone
takes this task on.

Also drop non-FDT support, since it isn't used on Exynos 5.

Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add LCD driver
Simon Glass [Thu, 27 Feb 2014 20:26:19 +0000 (13:26 -0700)]
sandbox: Add LCD driver

Add a simple LCD driver which uses SDL to display the image. We update the
image regularly, while still providing for reasonable performance.

Adjust the common lcd code to support sandbox.

For command-line runs we do not want the LCD to be displayed, so add a
--show_lcd option to enable it.

Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add a simple sound driver
Simon Glass [Thu, 27 Feb 2014 20:26:18 +0000 (13:26 -0700)]
sandbox: Add a simple sound driver

Add a sound driver for sandbox, which uses SDL.

Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add SDL library for LCD, keyboard, audio
Simon Glass [Thu, 27 Feb 2014 20:26:17 +0000 (13:26 -0700)]
sandbox: Add SDL library for LCD, keyboard, audio

SDL (Simple DirectMedia Layer - see www.libsdl.org) is a library which
provides simple graphics and sound features. It works under X11 and also
with a simple frame buffer interface. It is ideally suited to sandbox
U-Boot since it fits nicely with the low-level feature set required by
U-Boot. For example, U-Boot has its own font drawing routines, its own
keyboard processing and just needs raw sound output.

We can use SDL to provide emulation of these basic functions for sandbox.
This significantly expands the testing that is possible with sandbox.

Add a basic SDL library which we will use in future commits.

Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add -j option to indicate a jump from a previous U-Boot
Simon Glass [Thu, 27 Feb 2014 20:26:16 +0000 (13:26 -0700)]
sandbox: Add -j option to indicate a jump from a previous U-Boot

In order to support the 'go' command we allow the jumping U-Boot to pass its
filename to the new U-Boot image. This can then be used to delete that image
if required.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add os_jump_to_image() to run another executable
Simon Glass [Thu, 27 Feb 2014 20:26:15 +0000 (13:26 -0700)]
sandbox: Add os_jump_to_image() to run another executable

For some tests it is useful to be able to run U-Boot again but pass on the
same memory contents. Add a function to achieve this.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Implement I2C pass-through
Simon Glass [Thu, 27 Feb 2014 20:26:14 +0000 (13:26 -0700)]
cros_ec: Implement I2C pass-through

The Chrome EC has a feature where you can access its I2C buses through a
pass-through arrangement. Add a command to support this, and export the
function for it also.

Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Plumb in Chrome OS EC emulation
Simon Glass [Thu, 27 Feb 2014 20:26:13 +0000 (13:26 -0700)]
sandbox: Plumb in Chrome OS EC emulation

Add board code to set up the Chrome OS EC on startup.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: sandbox: Add Chrome OS EC emulation
Simon Glass [Thu, 27 Feb 2014 20:26:12 +0000 (13:26 -0700)]
cros_ec: sandbox: Add Chrome OS EC emulation

Add a simple emulation of the Chrome OS EC for sandbox, so that it can
perform various EC tasks such as keyboard handling.

Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Correct comparison between signed and unsigned numbers
Simon Glass [Thu, 27 Feb 2014 20:26:11 +0000 (13:26 -0700)]
cros_ec: Correct comparison between signed and unsigned numbers

Due to signed/unsigned comparison, '< sizeof(struct)' does not do the right
thing, since if ec_command() returns a -ve number we will consider this be
success.

Adjust all comparisons to avoid this problem.

This error was found with sandbox, which gives a segfault in this case. On
ARM we may instead silently fail.

We should also consider turning on -Wsign-compare to catch this sort of thing
in future.

Reviewed-by: Andrew Chew <achew@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
10 years agocros_ec: spi: Add support for EC protocol version 3
Randall Spangler [Thu, 27 Feb 2014 20:26:10 +0000 (13:26 -0700)]
cros_ec: spi: Add support for EC protocol version 3

Protocol version 3 will be attempted first; if the EC doesn't support
it, u-boot will fall back to the old protocol version (2).

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Add base support for protocol v3
Simon Glass [Thu, 27 Feb 2014 20:26:09 +0000 (13:26 -0700)]
cros_ec: Add base support for protocol v3

Protocol v2 was shipped with snow, link and spring. Protocol v3 is for
pit and is targetted at SPI operation.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Clean up multiple EC protocol support
Randall Spangler [Thu, 27 Feb 2014 20:26:08 +0000 (13:26 -0700)]
cros_ec: Clean up multiple EC protocol support

Version 1 protocols (without command version) were already no longer
supported in cros_ec.c.  This removes some dead code from the
cros_ec_i2c driver.

Version 2 protcols (with command version) are now called
protocol_version=2, instead of cmd_version_is_supported=1.

A subsequent change will introduce protocol version 3 for SPI.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Sync up with latest Chrome OS EC version
Simon Glass [Thu, 27 Feb 2014 20:26:07 +0000 (13:26 -0700)]
cros_ec: Sync up with latest Chrome OS EC version

The EC messages have been expanded and some parts have been renamed.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Move #ifdef to permit flash region access
Simon Glass [Thu, 27 Feb 2014 20:26:06 +0000 (13:26 -0700)]
cros_ec: Move #ifdef to permit flash region access

Flash region access is not tied to having commands, so adjust the #ifdef
to reflect this.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Support systems with no EC interrupt
Simon Glass [Thu, 27 Feb 2014 20:26:05 +0000 (13:26 -0700)]
cros_ec: Support systems with no EC interrupt

Some systems do not have an EC interrupt. Rather than assuming that the
interrupt is always present, and hanging forever waiting for more input,
handle the missing interrupt. This works by reading key scans only until
we get an identical one. This means the EC keyscan FIFO is empty.

Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Drop old EC version support from EC driver
Vadim Bendebury [Thu, 27 Feb 2014 20:26:04 +0000 (13:26 -0700)]
cros_ec: Drop old EC version support from EC driver

There is no need to support old style EC moving forward. Ultimately we
should get rid of the check_version() API. For now just return error
in case the EC does not seem to support the new API.

Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Tested-by: Vadim Bendebury <vbendeb@google.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Add a function for decoding the Chrome OS EC flashmap
Simon Glass [Thu, 27 Feb 2014 20:26:03 +0000 (13:26 -0700)]
cros_ec: Add a function for decoding the Chrome OS EC flashmap

In order to talk to the EC properly we need to be able to understand the
layout of its internal flash memory. This permits emulation of the EC
for sandbox, and also software update in a system with a real EC.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Move EC interface into common library
Vadim Bendebury [Thu, 27 Feb 2014 20:26:02 +0000 (13:26 -0700)]
cros_ec: Move EC interface into common library

Add a common library for obtaining access to the Chrome OS EC. This is
used by boards which need to talk to the EC.

Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Tested-by: Vadim Bendebury <vbendeb@google.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Add a function for reading a flash map entry
Simon Glass [Thu, 27 Feb 2014 20:26:01 +0000 (13:26 -0700)]
cros_ec: Add a function for reading a flash map entry

A flash map describes the layout of flash memory in terms of offsets and
sizes for each region. Add a function to read a flash map entry from the
device tree.

Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agocros_ec: Add an enum for the number of flash regions
Simon Glass [Thu, 27 Feb 2014 20:26:00 +0000 (13:26 -0700)]
cros_ec: Add an enum for the number of flash regions

Add an enum for the number of flash regions so we can keep track of all
the possible regions.

Reviewed-by: Randall Spangler <rspangler@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: dts: Add display and keyboard to sandbox
Simon Glass [Thu, 27 Feb 2014 20:25:59 +0000 (13:25 -0700)]
sandbox: dts: Add display and keyboard to sandbox

Add an LCD display and keyboard to the sandbox device tree so that these
features can be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Use os functions to read host device tree
Simon Glass [Thu, 27 Feb 2014 20:25:58 +0000 (13:25 -0700)]
sandbox: Use os functions to read host device tree

At present we use U-Boot's filesystem layer to read the sandbox device tree,
but this is problematic since it relies on a temporary feauture added
there. Since we plan to implement proper block layer support for sandbox,
change this code to use the os layer functions instead. Also use the new
fdt_create_empty_tree() instead of our own code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Increase memory size to 32MB
Simon Glass [Thu, 27 Feb 2014 20:25:56 +0000 (13:25 -0700)]
sandbox: Increase memory size to 32MB

The current 4MB size is a little small for some tests, so increase it.

Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoUse a const pointer for map_to_sysmem()
Simon Glass [Thu, 27 Feb 2014 20:25:55 +0000 (13:25 -0700)]
Use a const pointer for map_to_sysmem()

This function does not actually change the pointer contents, so use const
so that functions which have a const pointer do not need to cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agomtd: spi: Fix page size for S25FL032P,S25FL064P
Marek Vasut [Fri, 21 Feb 2014 17:13:26 +0000 (18:13 +0100)]
mtd: spi: Fix page size for S25FL032P,S25FL064P

The commit 6af8dc3ebccb3b1e4b2e479315e49545e7f53150 broke support for
S25FL032P and S25FL064P by carelessly removing the code handling special
page size for these two SPI NOR flashes and unifying the code under the
assumption that Extended JEDEC ID of 0x4d00 always implies 512b page size.

Add special case handling for these two SPI NOR flashes.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agospi: atmel_dataflash: Simplify AT91F_SpiEnable implementation
Axel Lin [Fri, 21 Feb 2014 00:55:47 +0000 (08:55 +0800)]
spi: atmel_dataflash: Simplify AT91F_SpiEnable implementation

Refactor the code a bit to make it better in readability.
Remove the comments because now the intention of the code is pretty clear.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: ops: Squash the malloc+memset combo
Jagannadha Sutradharudu Teki [Tue, 4 Feb 2014 16:06:13 +0000 (21:36 +0530)]
sf: ops: Squash the malloc+memset combo

Squash the malloc()+memset() combo in favor of calloc().

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Marek Vasut <marex@denx.de>
10 years agosf: Squash the malloc+memset combo
Marek Vasut [Wed, 15 Jan 2014 14:17:54 +0000 (15:17 +0100)]
sf: Squash the malloc+memset combo

Squash the malloc()+memset() combo in favor of calloc().

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: Add S25FL128S_256K IDs
Marek Vasut [Wed, 15 Jan 2014 14:32:09 +0000 (15:32 +0100)]
sf: Add S25FL128S_256K IDs

Add IDs for this new chip.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: Fix entries for S25FL256S_256K and S25FL512S_256K
Marek Vasut [Wed, 15 Jan 2014 14:29:43 +0000 (15:29 +0100)]
sf: Fix entries for S25FL256S_256K and S25FL512S_256K

Both of these chips have 256kB big sectors, thus the _256K suffix,
compared to their _64K counterparts, which have 64kB sectors. Also,
they have four times less sectors than their _64K counterparts.

Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosh: ecovec: correct romImage address in comment
Baruch Siach [Mon, 10 Mar 2014 13:09:34 +0000 (15:09 +0200)]
sh: ecovec: correct romImage address in comment

romImage is set by CONFIG_ECOVEC_ROMIMAGE_ADDR to 0xA0040000.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agosh: fix PFC registers definition for SH772{2, 3, 4}
Baruch Siach [Mon, 10 Mar 2014 13:05:33 +0000 (15:05 +0200)]
sh: fix PFC registers definition for SH772{2, 3, 4}

Add missing port X data register, and fix the offset of ports Y and Z.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agoMerge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 13 Mar 2014 17:32:26 +0000 (18:32 +0100)]
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'

10 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 13 Mar 2014 16:43:35 +0000 (17:43 +0100)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

10 years agousb: dfu: add static alt num count in dfu_config_entities()
Przemyslaw Marczak [Fri, 28 Feb 2014 17:53:37 +0000 (18:53 +0100)]
usb: dfu: add static alt num count in dfu_config_entities()

Thanks to this multiple call of function dfu_config_entities()
gives continuous dfu alt numbering until call dfu_free_entities().

This allows to store dfu entities in multiple variables.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Łukasz Majewski <l.majewski@samsung.com>
Tested-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoTrats/Trats2: Update Tizen partitions layout and dfu entities
Przemyslaw Marczak [Fri, 28 Feb 2014 17:53:36 +0000 (18:53 +0100)]
Trats/Trats2: Update Tizen partitions layout and dfu entities

Changes:
- update partitions layout
- update dfu entities
to be consistent with Tizen images for trats/trats2

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Łukasz Majewski <l.majewski@samsung.com>
cc: Piotr Wilczek <p.wilczek@samsung.com>
cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoarm: exynos: Squash bogus warnings in pinmux
Marek Vasut [Mon, 10 Mar 2014 19:04:31 +0000 (20:04 +0100)]
arm: exynos: Squash bogus warnings in pinmux

Squash these warnings in pinmux.c found with GCC 4.8:

/arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
  int i, start, count;
                ^
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
  int i, start, count;
         ^
/arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
                   ^
/arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
  struct s5p_gpio_bank *bank;
                        ^
/arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
  int i, start, count;
                ^
/arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for (i = start; i < start + count; i++) {
                            ^
/arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
  int i, start, count;
         ^
/arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used uninitialized in this function [-Wmaybe-uninitialized]
   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
                   ^
/arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
  struct s5p_gpio_bank *bank;
                        ^

Note that the warning is bogus, the function can never be called with invalid
'peripheral' argument. GCC just cannot analyze this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: Akshay Saraswat <akshay.s@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agokbuild: delete *.pyc files by "make distclean"
Masahiro Yamada [Wed, 12 Mar 2014 11:36:45 +0000 (20:36 +0900)]
kbuild: delete *.pyc files by "make distclean"

The tools "buildman" and "patman" are written in Python.
When we run them, "*.pyc" files are created under
tools/buildman, tools/patman directories.

They should be cleaned up by "make distclean".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokbuild: delete SPLTREE and TPLTREE
Masahiro Yamada [Tue, 11 Mar 2014 02:05:22 +0000 (11:05 +0900)]
kbuild: delete SPLTREE and TPLTREE

These variable are no longer used.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: rename OBJTREE to objtree
Masahiro Yamada [Tue, 11 Mar 2014 02:05:21 +0000 (11:05 +0900)]
kbuild: rename OBJTREE to objtree

Prior to Kbuild, $(OBJTREE) was used for pointing to the
top of build directory with absolute path.

In Kbuild style, $(objtree) is used instead.
This commit renames OBJTREE to objtree and delete the
defition of OBJTREE.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: rename SRCTREE to srctree
Masahiro Yamada [Tue, 11 Mar 2014 02:05:20 +0000 (11:05 +0900)]
kbuild: rename SRCTREE to srctree

Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used for instead.
This commit renames SRCTREE to srctree and deletes the
defition of SRCTREE.

Note that SRCTREE in scripts/kernel-doc, scripts/docproc.c,
doc/DocBook/Makefile should be keep.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: rename TOPDIR to stctree
Masahiro Yamada [Tue, 11 Mar 2014 02:05:19 +0000 (11:05 +0900)]
kbuild: rename TOPDIR to stctree

Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used instead.
This commit renames TOPDIR to srctree and delete the
defition of TOPDIR.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use $(KBUILD_SRC) to check out-of-tree build
Masahiro Yamada [Tue, 11 Mar 2014 02:05:18 +0000 (11:05 +0900)]
kbuild: use $(KBUILD_SRC) to check out-of-tree build

Non-empty $(KBUILD_SRC) means out-of-tree build.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokirkwood: kwbimage: refactor CONFIG_SYS_KWD_CONFIG
Masahiro Yamada [Tue, 11 Mar 2014 02:05:17 +0000 (11:05 +0900)]
kirkwood: kwbimage: refactor CONFIG_SYS_KWD_CONFIG

Pull out "$(SRCTREE)/" from CONFIG_SYS_KWD_CONFIG
and push it into the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michael Walle <michael@walle.cc>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Dave Purdy <david.c.purdy@gmail.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Cc: Luka Perkov <luka@openwrt.org>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Jason Cooper <u-boot@lakedaemon.net>
Cc: Siddarth Gore <gores@marvell.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Eric Cooper <ecc@cmu.edu>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
10 years agofreescale: pblimage: refactor CONFIG_SYS_FSL_PBL_{PBI, RCW}
Masahiro Yamada [Tue, 11 Mar 2014 02:05:16 +0000 (11:05 +0900)]
freescale: pblimage: refactor CONFIG_SYS_FSL_PBL_{PBI, RCW}

Pull out "$(SRCTREE)/" from CONFIG_SYS_FSL_PBL_PBI
and CONFIG_SYS_FSL_PBL_RCW and push it into the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agokbuild: delete redundant LDSCRIPT definition
Masahiro Yamada [Tue, 11 Mar 2014 02:05:15 +0000 (11:05 +0900)]
kbuild: delete redundant LDSCRIPT definition

$(SRCTREE)/$(CPUDIR)/u-boot.lds is our default location
of arch-specific linker script.

Remove redundant definitions in
arch/{arc,microblaze,openrisc}/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Acked-by: Michal Simek <monstr@monstr.eu>
10 years agox86: specify CONFIG_USE_PRIVATE_LIBGCC more simply
Masahiro Yamada [Tue, 11 Mar 2014 02:05:14 +0000 (11:05 +0900)]
x86: specify CONFIG_USE_PRIVATE_LIBGCC more simply

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
10 years agokbuild, x86: use a short log for arch/x86/lib/libgcc.a
Masahiro Yamada [Tue, 11 Mar 2014 02:05:13 +0000 (11:05 +0900)]
kbuild, x86: use a short log for arch/x86/lib/libgcc.a

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
10 years agokbuild: use short logs for some board specific make rules
Masahiro Yamada [Tue, 11 Mar 2014 02:05:12 +0000 (11:05 +0900)]
kbuild: use short logs for some board specific make rules

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: David Updegraff <dave@cray.com>
Cc: Andre Schwarz <andre.schwarz@matrix-vision.de>
10 years agokbuild,mxs: use short logs for MXS images
Masahiro Yamada [Tue, 11 Mar 2014 02:05:11 +0000 (11:05 +0900)]
kbuild,mxs: use short logs for MXS images

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Acked-by: Marek Vasut <marex@denx.de>
10 years agousb: net: update README.usb to list all USB ethernet options
Gerhard Sittig [Sat, 8 Mar 2014 18:46:18 +0000 (19:46 +0100)]
usb: net: update README.usb to list all USB ethernet options

- extend the discussion of USB network related config options such that
  all available adapter drivers are listed, and that the 'usb' command
  for the interactive prompt and scripting becomes available
- suggest to *not* put individual IP configuration parameters into the
  exectuable, but instead to put them into external environment or fetch
  them from network

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
10 years agoat91: enable USB ethernet for taskit stamp9g20
Gerhard Sittig [Sat, 8 Mar 2014 18:46:17 +0000 (19:46 +0100)]
at91: enable USB ethernet for taskit stamp9g20

enabling CONFIG_MACB makes other locations in the stamp config file
enable network related commands (actually prevents disabling them)

enable USB ethernet support by activating generic support as well as
Asix and Moschip ethernet adapters

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Andreas Bießman <andreas.devel@googlemail.com>
10 years agotegra: imx: omap: enable Moschip USB ethernet support for several boards
Gerhard Sittig [Sat, 8 Mar 2014 18:46:16 +0000 (19:46 +0100)]
tegra: imx: omap: enable Moschip USB ethernet support for several boards

enable support for the Moschip USB ethernet adapter for those boards
which previously had support for "all other" USB ethernet adapters
(that's Asix _and_ SMSC) enabled -- which applies to harmony, m53evk,
mx53loco, nitrogen6x, omap3_beagle

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
10 years agotegra: omap: alpha-sort USB ethernet items for Asix and SMSC
Gerhard Sittig [Sat, 8 Mar 2014 18:46:15 +0000 (19:46 +0100)]
tegra: omap: alpha-sort USB ethernet items for Asix and SMSC

adjust the harmony and omap3_beagle board configs to make
their CONFIG_USB_ETHER_* items appear in alphabetical order

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
10 years agousb: net: introduce support for Moschip USB ethernet
Gerhard Sittig [Sat, 8 Mar 2014 18:46:14 +0000 (19:46 +0100)]
usb: net: introduce support for Moschip USB ethernet

introduce an 'mcs7830' driver for Moschip MCS7830 based (7730/7830/7832)
USB 2.0 Ethernet Devices

see "MCS7830 -- USB 2.0 to 10/100M Fast Ethernet Controller" at
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=109;74;109

the driver was implemented based on the U-Boot Asix driver with
additional information gathered from the Moschip Linux driver,
development was done on "Delock 61147" and "Logilink UA0025C" dongles

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
10 years agousb: net: don't ifdef routine declarations in usb_ether.h
Gerhard Sittig [Sat, 8 Mar 2014 18:46:13 +0000 (19:46 +0100)]
usb: net: don't ifdef routine declarations in usb_ether.h

while compilation of implemented routines and references from calling
sites may be optional, declarations in header files should not be

unconditionally declare the Asix and SMSC related public USB ethernet
driver routines in the usb_ether.h header file

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
10 years agofw_env: correct writes to devices with small erase blocks
Dustin Byford [Fri, 7 Mar 2014 04:48:23 +0000 (20:48 -0800)]
fw_env: correct writes to devices with small erase blocks

Some NOR flash devices have a small erase block size.  For example, the
Micron N25Q512 can erase in 4K blocks.  These devices expose a bug in
fw_env.c where flash_write_buf() incorrectly calculates bytes written
and attempts to write past the environment sectors.  Luckily, a range
check prevents any real damage, but this does cause fw_setenv to fail
with an error.

This change corrects the write length calculation.

The bug was introduced with commit 56086921 from 2008 and only affects
configurations where the erase block size is smaller than the total
environment data size.

Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com>
10 years agofw_env: calculate default number of env sectors
Dustin Byford [Fri, 7 Mar 2014 04:48:22 +0000 (20:48 -0800)]
fw_env: calculate default number of env sectors

The assumed number of environment sectors (always 1) leads to an
incorrect top_of_range calculation in fw.env.c when a flash device has
an erase block size smaller than the environment data size (number of
environment sectors > 1).

This change updates the default number of environment sectors to at
least cover the size of the environment.

Also corrected a false statement about the number of sectors column in
fw_env.config.

Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com>
10 years agoboard/BuR/kwb: fix usage of 'i2c_set_bus_speed'
Hannes Petermaier [Sat, 8 Mar 2014 18:09:32 +0000 (19:09 +0100)]
board/BuR/kwb: fix usage of 'i2c_set_bus_speed'

- fix: return-value of 'i2c_set_bus_speed' was interpreted wrong

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
10 years agoarm: am335x: DXR2: Move unconditional LAN9303 reset into command
Stefan Roese [Wed, 12 Mar 2014 09:45:41 +0000 (10:45 +0100)]
arm: am335x: DXR2: Move unconditional LAN9303 reset into command

The switch HW reset results in a disconnection of the switch port daisy-
chain for a few seconds. This is not desired in the normal field use
case. So lets remove this switch reset from the normal bootup sequence
and move it into a board specific command. This way it can be executed
in the development environment when really needed.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Lukas Stockmann <lukas.stockmann@siemens.com>
Cc: Tom Rini <trini@ti.com>
10 years agodrivers: net: cpsw: init phy with gigabit features
Ilya Ledvich [Wed, 12 Mar 2014 09:26:30 +0000 (11:26 +0200)]
drivers: net: cpsw: init phy with gigabit features

CPSW ia a gigabit device. Use the PHY_GBIT_FEATURES macro to determine phy
supported features.
Tested on cm_t335.

Signed-off-by: Ilya Ledvich <ilya@compulab.co.il>
10 years agoarm: omap: cm_t35: Fix: Re-add GPMC_NAND_ECC_LP_x8_LAYOUT
Stefan Roese [Tue, 11 Mar 2014 16:04:45 +0000 (17:04 +0100)]
arm: omap: cm_t35: Fix: Re-add GPMC_NAND_ECC_LP_x8_LAYOUT

Patch a7e36fc9 (mtd: nand: omap: remove unused #defines from common
omap_gpmc.h) removed some MTD related defines. Including
GPMC_NAND_ECC_LP_x8_LAYOUT. But this define is also needed for the
memory controller configuration (only the x8 defines are needed,
the x16 defines are the default). Without it the NAND subsystem is
not configured correctly and booting into U-Boot does not work.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Pekon Gupta <pekon@ti.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>