]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agoRevert "Start the deprecation process for generic board"
Tom Rini [Fri, 4 Apr 2014 14:09:19 +0000 (10:09 -0400)]
Revert "Start the deprecation process for generic board"

We've run into a non-trivial conversion to CONFIG_SYS_GENERIC_BOARD so
we'll postpone this notice until right after v2014.04 is out.

This reverts commit 36c4b1d98059244c34ec3327d9cc9f3c552fd01b.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agotrats/trats2: enable CONFIG_RANDOM_UUID
Przemyslaw Marczak [Wed, 2 Apr 2014 08:20:07 +0000 (10:20 +0200)]
trats/trats2: enable CONFIG_RANDOM_UUID

This change enables automatically uuid generation by command gpt.
In case of updating partitions layout user don't need to care about
generate uuid manually.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: trini@ti.com
10 years agocmd:gpt: randomly generate each partition uuid if undefined
Przemyslaw Marczak [Wed, 2 Apr 2014 08:20:06 +0000 (10:20 +0200)]
cmd:gpt: randomly generate each partition uuid if undefined

Changes:
- randomly generate partition uuid if any is undefined and CONFIG_RAND_UUID
  is defined
- print debug info about set/unset/generated uuid
- update doc/README.gpt

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Tom Rini <trini@ti.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
10 years agonew commands: uuid and guid - generate random unique identifier
Przemyslaw Marczak [Wed, 2 Apr 2014 08:20:05 +0000 (10:20 +0200)]
new commands: uuid and guid - generate random unique identifier

Those commands basis on implementation of random UUID generator version 4
which is described in RFC4122. The same algorithm is used for generation
both ids but string representation is different as below.

char:  0        9    14   19   24         36
       xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
UUID:     be     be   be   be       be
GUID:     le     le   le   be       be

Commands usage:
- uuid [<varname>]
- guid [<varname>]

The result is saved in environment as a "varname" variable if argument is given,
if not then it is printed.

New config:
- CONFIG_CMD_UUID

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: trini@ti.com
10 years agolib: uuid: add functions to generate UUID version 4
Przemyslaw Marczak [Wed, 2 Apr 2014 08:20:04 +0000 (10:20 +0200)]
lib: uuid: add functions to generate UUID version 4

This patch adds support to generate UUID (Universally Unique Identifier)
in version 4 based on RFC4122, which is randomly.

Source: https://www.ietf.org/rfc/rfc4122.txt

Changes:
- new configs:
  - CONFIG_LIB_UUID for compile lib/uuid.c
  - CONFIG_RANDOM_UUID for functions gen_rand_uuid() and gen_rand_uuid_str()
- add configs dependency to include/config_fallbacks.h for lib uuid.

lib/uuid.c:
- add gen_rand_uuid() - this function writes 16 bytes len binary representation
  of UUID v4 to the memory at given address.

- add gen_rand_uuid_str() - this function writes 37 bytes len hexadecimal
  ASCII string representation of UUID v4 to the memory at given address.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
[trini: Add CONFIG_EFI_PARTITION to fallbacks]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agolib: uuid: code refactor for proper maintain between uuid bin and string
Przemyslaw Marczak [Wed, 2 Apr 2014 08:20:03 +0000 (10:20 +0200)]
lib: uuid: code refactor for proper maintain between uuid bin and string

Changes in lib/uuid.c to:
- uuid_str_to_bin()
- uuid_bin_to_str()

New parameter is added to specify input/output string format in listed functions
This change allows easy recognize which UUID type is or should be stored in given
string array. Binary data of UUID and GUID is always stored in big endian, only
string representations are different as follows.

String byte: 0                                  36
String char: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
string UUID:    be     be   be   be       be
string GUID:    le     le   le   be       be

This patch also updates functions calls and declarations in a whole code.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: trini@ti.com
10 years agopart_efi: move uuid<->string conversion functions into lib/uuid.c
Przemyslaw Marczak [Wed, 2 Apr 2014 08:20:02 +0000 (10:20 +0200)]
part_efi: move uuid<->string conversion functions into lib/uuid.c

This commit introduces cleanup for uuid library.
Changes:
- move uuid<->string conversion functions into lib/uuid.c so they can be
  used by code outside part_efi.c.
- rename uuid_string() to uuid_bin_to_str() for consistency with existing
  uuid_str_to_bin()
- add an error return code to uuid_str_to_bin()
- update existing code to the new library functions.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: trini@ti.com
10 years agoahci: Fix data abort on multiple scsi resets.
Roger Quadros [Tue, 1 Apr 2014 14:26:40 +0000 (17:26 +0300)]
ahci: Fix data abort on multiple scsi resets.

Commit 2faf5fb82ed6 introduced a regression that causes a data
abort when running scsi init followed by scsi reset.

There are 2 problems with the original commit
1) ALLOC_CACHE_ALIGN_BUFFER() allocates memory on the stack but is
assigned to ataid[port] and used by other functions.
2) The function ata_scsiop_inquiry() tries to free memory which was
never allocated on the heap.

Fix these problems by using tmpid as a temporary cache aligned buffer.
Allocate memory separately for ataid[port] and re-use it if required.

Fixes: 2faf5fb82ed6 (ahci: Fix cache align error messages)
Reported-by: Eli Nidam <elini@marvell.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
10 years agommc:eSDHC: Workaround for data timeout issue on Txxx SoC
Haijun.Zhang [Tue, 18 Mar 2014 09:04:23 +0000 (17:04 +0800)]
mmc:eSDHC: Workaround for data timeout issue on Txxx SoC

1. The Data timeout counter value in eSDHC_SYSCTL register is
not working as it should be, so add quirks to enable this
workaround to fix it to the max value 0xE.

2. Add CONFIG_SYS_FSL_ERRATUM_ESDHC111 to enable its workaround.

* Update of patch for change mmc interface by
Pantelis Antoniou <panto@antoniou-consulting.com>

Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: fsl_esdhc: add controller reset in case of data related errors too
Andrew Gabbasov [Mon, 24 Mar 2014 07:41:06 +0000 (02:41 -0500)]
mmc: fsl_esdhc: add controller reset in case of data related errors too

The controller reset is performed now if command error occurs.
This commit adds the reset for the case of data related errors too.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: fsl_esdhc: fix calculation of timeout for data transactions
Andrew Gabbasov [Mon, 24 Mar 2014 07:40:41 +0000 (02:40 -0500)]
mmc: fsl_esdhc: fix calculation of timeout for data transactions

Calculation of the timeout value should be based on actual clock value,
written to controller registers. Since mmc->tran_speed is either the
maximum allowed speed, or the preliminary value, that is be not yet
set to registers, the actual timeout, taken by the controller, based
on its clock settings, may be much longer than expected, based on
mmc->tran_speed value. In particular it happens at early initialization
stage, when typical value of mmc->tran_speed is 20MHz or 26MHz, while
actual clock setting, configured in the controller, is 400kHz.
It's more correct to use mmc->clock value for timeout calculation instead.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: Add 'mmc rst-function' sub-command
Tom Rini [Fri, 7 Feb 2014 19:15:20 +0000 (14:15 -0500)]
mmc: Add 'mmc rst-function' sub-command

Some eMMC chips may need the RST_n_FUNCTION bit set to a non-zero value
in order for warm reset of the system to work.  Details on this being
required will be part of the eMMC datasheet.  Also add using this
command to the dra7xx README.

* Whitespace fix by panto

Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: sh_mmcif: Fix warning by unused variable
Nobuhiro Iwamatsu [Mon, 31 Mar 2014 05:54:29 +0000 (14:54 +0900)]
mmc: sh_mmcif: Fix warning by unused variable

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: sh_mmcif: Fix compile error
Nobuhiro Iwamatsu [Mon, 31 Mar 2014 05:54:28 +0000 (14:54 +0900)]
mmc: sh_mmcif: Fix compile error

BY commit "mmc: Split mmc struct, rework mmc initialization (v2)",
sh_mmcif has compile error. This fixes compile error.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Pantelis Antoniou <panto@antoniou-consulting.com>
Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoPrepare v2014.04-rc3 v2014.04-rc3
Tom Rini [Mon, 31 Mar 2014 19:24:48 +0000 (15:24 -0400)]
Prepare v2014.04-rc3

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoKbuild: allow building tools without board configuration
Masahiro Yamada [Mon, 31 Mar 2014 08:33:51 +0000 (17:33 +0900)]
Kbuild: allow building tools without board configuration

Prior to Kbuild, U-Boot could build under tools/ directory
withour configuring for a specific board.

That feature was lost when switching to Kbuild.

This patch revives it again by adding a make target "tools-only".

Usage:
  $ make tools-only

Neither board configuration nor cross compiler are required to
build host tools.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
10 years agotegra: fix Makefile to pass per-file CFLAGS
Masahiro Yamada [Mon, 31 Mar 2014 05:23:15 +0000 (14:23 +0900)]
tegra: fix Makefile to pass per-file CFLAGS

Since Kbuild was introduced, warmboot_avp.o has been compiled
without -march=armv4t.

Makefile should be adjusted to pass a per-file option.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Mon, 31 Mar 2014 12:29:35 +0000 (08:29 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

10 years agodrivers: i2c: delete an unused source file
Masahiro Yamada [Mon, 31 Mar 2014 04:03:30 +0000 (13:03 +0900)]
drivers: i2c: delete an unused source file

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Heiko Schocher <hs@denx.de>
10 years agoboard: ecovec: fix USB0 clock enable
Baruch Siach [Mon, 17 Mar 2014 14:14:54 +0000 (16:14 +0200)]
board: ecovec: fix USB0 clock enable

Enable USB0 clock by resetting bit 20 of MSTPCR2. Leave other bits unchanged.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agoboard: ecovec: fix debug LEDs pin direction
Baruch Siach [Mon, 17 Mar 2014 14:14:53 +0000 (16:14 +0200)]
board: ecovec: fix debug LEDs pin direction

All pins should be output.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agoblackfin: mmc: Correct mmc_host_is_spi and bfin_sdh.c
Tom Rini [Fri, 28 Mar 2014 20:55:29 +0000 (16:55 -0400)]
blackfin: mmc: Correct mmc_host_is_spi and bfin_sdh.c

In the recent mmc cleanup, the mmc_host_is_spi macro was broken and
bfin_sdh.c had mmc->bus_width turned into mmc_bus_width(mmc), both of
which were incorrect.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoam335x_evm: Drop CONFIG_SPL_ETH_SUPPORT from default build
Tom Rini [Wed, 26 Mar 2014 19:56:07 +0000 (15:56 -0400)]
am335x_evm: Drop CONFIG_SPL_ETH_SUPPORT from default build

On the boards this target supports this option is either non possible
without hardware mods (Beaglebone White/Black) or not supported due to
board design.  Drop this and regain some space.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoam335x_evm: Clarify when we build board_eth_init
Tom Rini [Wed, 26 Mar 2014 19:53:12 +0000 (15:53 -0400)]
am335x_evm: Clarify when we build board_eth_init

If we build this function in cases where we would be discarding it
anyhow we still end up with maybe unused warnings.  Rather than litter
the function with __maybe_unused, just spell out when to build it.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agokbuild: fix bugs in cleaning targets
Masahiro Yamada [Fri, 28 Mar 2014 05:55:02 +0000 (14:55 +0900)]
kbuild: fix bugs in cleaning targets

"make clean", "make clobber", "make mrproper" and "make distclean"
missed to clean-up some files when they were run with
O=<some_dir> option.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Wolfgang Denk <wd@denx.de>
10 years agokbuild: create a build directory automatically for out-of-tree build
Masahiro Yamada [Mon, 24 Mar 2014 04:55:27 +0000 (13:55 +0900)]
kbuild: create a build directory automatically for out-of-tree build

Prior to Kbuild, the build system created a build directory,
when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild
because many of lines in makefiles were copied from Linux Kernel.
(In Linux Kernel, we have to create a build directory by ourselves
before starting build.)

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
10 years agoStart the deprecation process for generic board
Simon Glass [Sat, 22 Mar 2014 23:14:51 +0000 (17:14 -0600)]
Start the deprecation process for generic board

We should move forward to remove the old board init code. Add a
prominent message to encourage maintainers to get started on this
work.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agotrats/trats2: enable exynos ace sha subsystem and hardware based lib rand
Przemyslaw Marczak [Tue, 25 Mar 2014 09:58:22 +0000 (10:58 +0100)]
trats/trats2: enable exynos ace sha subsystem and hardware based lib rand

This allows to use exynos random number generator by enabling configs:
- CONFIG_EXYNOS_ACE_SHA
- CONFIG_LIB_HW_RAND

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
cc: Piotr Wilczek <p.wilczek@samsung.com>
cc: Minkyu Kang <mk7.kang@samsung.com>

10 years agodrivers: crypto: ace_sha: add implementation of hardware based lib rand
Przemyslaw Marczak [Tue, 25 Mar 2014 09:58:21 +0000 (10:58 +0100)]
drivers: crypto: ace_sha: add implementation of hardware based lib rand

This patch adds implementation of rand library based on hardware random
number generator of security subsystem in Exynos SOC.

This library includes:
- srand()  - used for seed hardware block
- rand()   - returns random number
- rand_r() - the same as above with given seed

which depends on CONFIG_EXYNOS_ACE_SHA and CONFIG_LIB_HW_RAND.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
cc: Akshay Saraswat <akshay.s@samsung.com>
cc: ARUN MANKUZHI <arun.m@samsung.com>
cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Michael Walle <michael@walle.cc>
Cc: Tom Rini <trini@ti.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agocpu: exynos4: add ace sha base address
Przemyslaw Marczak [Tue, 25 Mar 2014 09:58:20 +0000 (10:58 +0100)]
cpu: exynos4: add ace sha base address

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
10 years agolib: rand: introduce new configs: CONFIG_LIB_RAND and CONFIG_LIB_HW_RAND
Przemyslaw Marczak [Tue, 25 Mar 2014 09:58:19 +0000 (10:58 +0100)]
lib: rand: introduce new configs: CONFIG_LIB_RAND and CONFIG_LIB_HW_RAND

New configs:
- CONFIG_LIB_RAND    - to enable implementation of rand library in lib/rand.c
- CONFIG_LIB_HW_RAND - to enable hardware based implementations of lib rand

Other changes:
- add CONFIG_LIB_RAND to boards configs which needs rand()
- put only one rand.o dependency in lib/Makefile

CONFIG_LIB_HW_RAND should be defined for drivers which implements rand library
(declared in include/common.h):
- void srand(unsigned int seed)
- unsigned int rand(void)
- unsigned int rand_r(unsigned int *seedp)

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Michael Walle <michael@walle.cc>
Cc: Tom Rini <trini@ti.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agocommon, env: Fix support for environment in i2c eeprom
Matthias Fuchs [Wed, 19 Mar 2014 09:25:08 +0000 (10:25 +0100)]
common, env: Fix support for environment in i2c eeprom

When using CONFIG_SYS_I2C i2c needs to be initialized by
i2c_init_all(). This is done in some places but not in
eeprom_init().

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
10 years agoaxs101: flush DMA buffer descriptors before DMA transactons starts
Alexey Brodkin [Fri, 21 Mar 2014 12:57:47 +0000 (16:57 +0400)]
axs101: flush DMA buffer descriptors before DMA transactons starts

CPU sets DMA buffer descriptors with data required for inetrnal DMA such as:
 * Ownership of BD
 * Buffer size
 * Pointer to data buffer in memory

Then we need to make sure DMA engine of NAND controller gets proper data.
For this we flush buffer rescriptor.

Then we're  ready for DMA transaction.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Tom Rini <trini@ti.com>
10 years agonet/designware: align DMA buffer descriptors to D$ line
Alexey Brodkin [Fri, 21 Mar 2014 12:16:57 +0000 (16:16 +0400)]
net/designware: align DMA buffer descriptors to D$ line

It's important to have ability to flush/invalidate each DMA buffer descriptor
individually to prevent incoherency of adjacent BDs.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
10 years agoLogo: TIZEN: Change booting logo size to official size.
Jonghwa Lee [Fri, 21 Mar 2014 09:18:02 +0000 (18:18 +0900)]
Logo: TIZEN: Change booting logo size to official size.

Since TIZEN group has been used 450 X 140 bmp logo for lunchbox,
this patch tries to change the logo size from 500 X 150 to official size.
By reducing image size, we also save about 35KB.

To make row aligned 4 bytes, add 2 pixels to row. Therefore the real width
of image size is 452.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Reviewed-by : Przemyslaw Marczak <p.marczak@samsung.com>

10 years agospl: Fix guardian macros in spl.h
Marek Vasut [Wed, 19 Mar 2014 01:02:55 +0000 (02:02 +0100)]
spl: Fix guardian macros in spl.h

Fix the macros guarding the spl.h header for various platforms. Due to
a typo and a propagation of it, the macros went out-of-sync with their
ifdef check, so fix this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
10 years agokbuild: move asm-offsets.c from SoC directory to arch/$(ARCH)/lib
Masahiro Yamada [Tue, 18 Mar 2014 07:38:13 +0000 (16:38 +0900)]
kbuild: move asm-offsets.c from SoC directory to arch/$(ARCH)/lib

U-Boot has supported two kinds of asm-offsets.h.

One is generic for all architectures and its source is located at
./lib/asm-offsets.c.

The other is SoC specific and its source is under SoC directory.
The problem here is that only boards with SoC directory can use
the asm-offsets infrastructure.
Putting asm-offsets.c right under CPU directory does not work.

Now a new demand is coming. PowerPC folks want to use asm-offsets.
But no PowerPC boards have SoC directory.

It seems inconsistent that some boards add asm-offsets.c to SoC
directoreis and some to CPU directories.
It looks more reasonable to put asm-offsets.c under arch/$(ARCH)/lib.

This commit merges asm-offsets.c under SoC directories into
arch/$(ARCH)/lib/asm-offsets.c.

By the way, I doubt the necessity of some entries in asm-offsets.c.
I am leaving refactoring to the board maintainers.
Please check "TODO" in the comment blocks in
arch/{arm,nds32}/lib/asm-offsets.c.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Yuantian Tang <Yuantian.Tang@freescale.com>
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 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 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 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>