oweals/u-boot.git
12 years agompc8308rdb: add support for eSDHC MMC controller
Ira W. Snyder [Wed, 12 Sep 2012 21:17:35 +0000 (14:17 -0700)]
mpc8308rdb: add support for eSDHC MMC controller

Add support for the onboard eSDHC MMC controller. The hardware on the
MPC8308RDB has the following errata:

- ESDHC111: manual asynchronous CMD12 is broken
- DMA is broken (PIO works)

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
[added include fsl_esdhc header to prevent implicit declarations of
fsl_esdhc_mmc_init() and fdt_fixup_esdhc()]

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
12 years agompc8308rdb: add support for FIT images
Ira W. Snyder [Wed, 12 Sep 2012 21:17:34 +0000 (14:17 -0700)]
mpc8308rdb: add support for FIT images

This is very useful on a modern system.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
12 years agompc8308rdb: add support for Spansion SPI flash on header J8
Ira W. Snyder [Wed, 12 Sep 2012 21:17:32 +0000 (14:17 -0700)]
mpc8308rdb: add support for Spansion SPI flash on header J8

The SPI pins are routed to header J8 for testing SPI functionality. A
Spansion flash has been wired up and tested on this header.

This patch breaks support for the second TSEC interface, since the GPIO
pin used as a chip select is pinmuxed with some of the TSEC pins.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
12 years agompc8xxx_spi: fix SPI support on MPC8308RDB
Ira W. Snyder [Wed, 12 Sep 2012 21:17:31 +0000 (14:17 -0700)]
mpc8xxx_spi: fix SPI support on MPC8308RDB

The MPC8308RDB Reference Manual states that no bits in the SPMODE
register are allowed to change while the enable (EN) bit is set.

This driver changes the character length bits (LEN) while the enable
(EN) bit is set. Clearing the EN bit while changing the LEN bits makes
the driver work correctly on MPC8308RDB.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 17 Sep 2012 18:39:03 +0000 (11:39 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Tom Rini [Mon, 17 Sep 2012 18:34:08 +0000 (11:34 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

12 years agoi2c:soft:multi: Enable soft I2C multibus at Trats development board
Łukasz Majewski [Tue, 4 Sep 2012 23:15:21 +0000 (23:15 +0000)]
i2c:soft:multi: Enable soft I2C multibus at Trats development board

This commit enables multibus handling at Samsung's Trats development board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Heiko Schocher <hs@denx.de>
12 years agoi2c:soft:multi: Support for multiple soft I2C buses at Samsung boards
Łukasz Majewski [Tue, 4 Sep 2012 23:15:20 +0000 (23:15 +0000)]
i2c:soft:multi: Support for multiple soft I2C buses at Samsung boards

Support for multiple soft I2C buses.

Multibus I2C support is achieved by defining get_multi_{sda|scl}_pin
functions to switch between multiple "soft" I2C buses.

Common definition of I2C_X I2C buses is provided at <i2c.h>.

TEST HW:
     Samsung's Exynos4210 evt.0.1 - Trats development board

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Heiko Schocher <hs@denx.de>
12 years agofdt: Check if the FDT address is configured
Marek Vasut [Wed, 5 Sep 2012 06:34:44 +0000 (08:34 +0200)]
fdt: Check if the FDT address is configured

In case the "fdt addr" command wasn't ran yet and any other "fdt"
subcommand was issued, the system crashed due to NULL pointer being
used.

This is caused by "fdt addr" command setting up a pointer to the
FDT memory location. Prior issuing "fdt addr", the pointer is NULL
so calling any other subcommands crashed the u-boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Fri, 14 Sep 2012 14:15:48 +0000 (07:15 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Tom Rini [Thu, 13 Sep 2012 17:34:24 +0000 (10:34 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

12 years agoavr32: add atngw100mkii board
Andreas Bießmann [Tue, 4 Sep 2012 11:33:29 +0000 (11:33 +0000)]
avr32: add atngw100mkii board

This patch is derived from an older patch provided by atmel in its
buildroot-avr32-v3.0.0.tar.bz2

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
12 years agoFix strict-aliasing warning in dlmalloc
Simon Glass [Tue, 4 Sep 2012 11:31:07 +0000 (11:31 +0000)]
Fix strict-aliasing warning in dlmalloc

This fixes the following warnings in dlmalloc seen with my gcc 4.6.

dlmalloc.c: In function 'malloc_bin_reloc':
dlmalloc.c:1493: warning: dereferencing pointer 'p' does break strict-aliasing rules
dlmalloc.c:1493: warning: dereferencing pointer 'p' does break strict-aliasing rules
dlmalloc.c:1490: note: initialized from here
dlmalloc.c:1493: note: initialized from here

This version is tested on avr32 arch boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-ubi
Tom Rini [Wed, 12 Sep 2012 17:26:48 +0000 (10:26 -0700)]
Merge branch 'master' of git://denx.de/git/u-boot-ubi

12 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-mmc
Tom Rini [Wed, 12 Sep 2012 17:26:06 +0000 (10:26 -0700)]
Merge branch 'master' of git://denx.de/git/u-boot-mmc

12 years agomicroblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASE
Michal Simek [Tue, 10 Jul 2012 08:21:25 +0000 (10:21 +0200)]
microblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASE

Prepare for device-tree driven configuration.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
12 years agomicroblaze: Clean microblaze initialization
Michal Simek [Wed, 4 Jul 2012 11:12:37 +0000 (13:12 +0200)]
microblaze: Clean microblaze initialization

Move board specific function to board_init function in board/ folder
Remove externs from generic board.c
Use board_init_f function in board.c file.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
12 years agomicroblaze: timer: Prepare for device-tree initialization
Michal Simek [Fri, 29 Jun 2012 11:46:54 +0000 (13:46 +0200)]
microblaze: timer: Prepare for device-tree initialization

Fix CONFIG_SYS_HZ usage in board config.

Do not use hardcoded value. Use CONFIG_SYS_HZ instead.
Separate static configuration to single block.

Signed-off-by: Michal Simek <monstr@monstr.eu>
12 years agomicroblaze: intc: Coding style cleanup
Michal Simek [Fri, 29 Jun 2012 11:27:28 +0000 (13:27 +0200)]
microblaze: intc: Coding style cleanup

Just coding style cleanup.
Remove unneeded externs.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephan Linz <linz@li-pro.net>
12 years agomicroblaze: intc: Registering interrupt should return value
Michal Simek [Fri, 29 Jun 2012 12:21:52 +0000 (14:21 +0200)]
microblaze: intc: Registering interrupt should return value

Return value to find out if un/registration was succesful.

Signed-off-by: Michal Simek <monstr@monstr.eu>
12 years agomicroblaze: board: Remove compilation warning
Michal Simek [Fri, 29 Jun 2012 08:29:46 +0000 (10:29 +0200)]
microblaze: board: Remove compilation warning

Variable is used when CONFIG_SYS_FLASH_CHECKSUM is used.

Warning log:
board.c: In function 'board_init':
board.c:101: warning: unused variable 's'

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
12 years agomicroblaze: Add support for device tree driven board configuration
Michal Simek [Thu, 28 Jun 2012 12:34:32 +0000 (14:34 +0200)]
microblaze: Add support for device tree driven board configuration

This is minimum code required to be able to use device-tree
for u-boot initialization.
Currently only for device driver initialization.

Linker script change ensures DTB to be aligned
for both options CONFIG_OF_EMBED and CONFIG_OF_SEPARATE.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
CC: Simon Glass <sjg@chromium.org>
12 years agospi: xilinx: Remove unused variable
Stephan Linz [Tue, 7 Aug 2012 21:29:39 +0000 (23:29 +0200)]
spi: xilinx: Remove unused variable

Warning is:

xilinx_spi.c: In function 'spi_setup_slave':
xilinx_spi.c:81: warning: unused variable 'regs'

Signed-off-by: Stephan Linz <linz@li-pro.net>
CC: Michal Simek <monstr@monstr.eu>
12 years agoserial: uartlite: Init all uartlites for serial multi
Michal Simek [Mon, 2 Jul 2012 08:32:18 +0000 (10:32 +0200)]
serial: uartlite: Init all uartlites for serial multi

Initialize all possible uartlites and return the first
initialized port. For static configuration is initialization
done in userial_ports array.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
12 years agoserial: Support serial multi for Microblaze
Michal Simek [Mon, 2 Jul 2012 10:38:14 +0000 (12:38 +0200)]
serial: Support serial multi for Microblaze

enable serial multi for Microblaze.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
12 years agoblock: systemace: Simplify base and width initialization
Michal Simek [Wed, 4 Jul 2012 10:09:45 +0000 (12:09 +0200)]
block: systemace: Simplify base and width initialization

Use CONFIG parameters only at one location to simplify
the code. Also create ace_readw/writew functions.

Signed-off-by: Michal Simek <monstr@monstr.eu>
12 years agoubifs: Fix ubifsload when using ZLIB
Veli-Pekka Peltola [Wed, 5 Sep 2012 15:05:14 +0000 (18:05 +0300)]
ubifs: Fix ubifsload when using ZLIB

Using ZLIB compression with UBIFS fails if last data node is not a size of
UBIFS_BLOCK_SIZE (4096 bytes).

Easiest way to test this is trying to read a file smaller than 4k:
=> ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
UBIFS error (pid 0): read_block: bad data node (block 0, inode 2506)
UBIFS error (pid 0): do_readpage: cannot read page 0 of inode 2506, error -22
Error reading file '/etc/fstab'
/etc/fstab not found!
exit not allowed from main input shell.
=>

With this patch:

=> ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
Done
=>

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Cc: kmpark@infradead.org
Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
12 years agommc: Remove incorrect cmd->flags usage
Andy Fleming [Thu, 6 Sep 2012 20:23:13 +0000 (15:23 -0500)]
mmc: Remove incorrect cmd->flags usage

There were a couple of drivers that were actually using the flags
field of the cmd structure, despite the fact that no one ever
*set* that field. When we removed the field, those drivers failed
to compile. Replaced the references with the correct usage of
resp_type.

Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agoomap4 i2c: add support for i2c bus 4
Koen Kooi [Wed, 8 Aug 2012 00:57:35 +0000 (00:57 +0000)]
omap4 i2c: add support for i2c bus 4

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
12 years agommc: s5p_sdhci: add the set_mmc_clk for cmu control
Jaehoon Chung [Thu, 30 Aug 2012 16:24:11 +0000 (16:24 +0000)]
mmc: s5p_sdhci: add the set_mmc_clk for cmu control

Samsung SoC use the cmu control to set clock.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: s5p_sdhci: fixed wrong function argument
Jaehoon Chung [Thu, 30 Aug 2012 16:24:10 +0000 (16:24 +0000)]
mmc: s5p_sdhci: fixed wrong function argument

Useless code is removed, and get buswidth value.
buswidth value will be used to choice the 4bit or 8bit.
(Now used 4bit mode in sdhci.c by default)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungin.park@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: s5p_sdhci: set the SDHCI_QUIRK_BROKEN_R1B
Jaehoon Chung [Thu, 30 Aug 2012 16:24:08 +0000 (16:24 +0000)]
mmc: s5p_sdhci: set the SDHCI_QUIRK_BROKEN_R1B

Samsung SoC is broken busy waiting for R1b type.
And clk delay control value is modified the previosuly value.
(that value used at the s5p_mmc.c)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: Add a SDHCI quirk for boards that have no CD
Joe Hershberger [Fri, 17 Aug 2012 10:18:55 +0000 (10:18 +0000)]
mmc: Add a SDHCI quirk for boards that have no CD

Some boards have no Card Detect wired.  In that case, set the CD test
bits in the standard interface.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: Fix version check for clock API in sdhci driver
Joe Hershberger [Fri, 17 Aug 2012 10:18:54 +0000 (10:18 +0000)]
mmc: Fix version check for clock API in sdhci driver

When setting up the clocks in the sdhci driver, the "spec version"
must be masked off.  Otherwise any time the vendor version is not 0,
the check will allways assume the interface is version 3.  This breaks
when the interface is actually version 1 or 2.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommcinfo: Fix help message
Benoît Thébaudeau [Fri, 10 Aug 2012 09:07:38 +0000 (09:07 +0000)]
mmcinfo: Fix help message

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc_get_dev: Return error if mmc_init fails
Benoît Thébaudeau [Fri, 10 Aug 2012 08:59:12 +0000 (08:59 +0000)]
mmc_get_dev: Return error if mmc_init fails

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agotegra: put eMMC environment into the boot sectors
Stephen Warren [Mon, 30 Jul 2012 10:55:45 +0000 (10:55 +0000)]
tegra: put eMMC environment into the boot sectors

When I set up Tegra's config files to put the environment into eMMC, I
assumed that CONFIG_ENV_OFFSET was a linearized address relative to the
start of the eMMC device, and spanning HW partitions boot0, boot1,
general* and the user area in order. However, it turns out that the
offset is actually relative to the beginning of the user area. Hence,
the environment block ended up in a different location to expected and
documented.

Set CONFIG_SYS_MMC_ENV_PART=2 (boot1) to solve this, and adjust
CONFIG_ENV_OFFSET to be relative to the start of boot1, not the entire
eMMC.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agoenv_mmc: allow environment to be in an eMMC partition
Stephen Warren [Mon, 30 Jul 2012 10:55:44 +0000 (10:55 +0000)]
env_mmc: allow environment to be in an eMMC partition

eMMC devices may have hardware-level partitions: 2 boot partitions,
up to 4 general partitions, plus the user area. This change introduces
optional config variable CONFIG_SYS_MMC_ENV_PART to indicate which
partition the environment should be stored in: 0=user, 1=boot0, 2=boot1,
4..7=general0..3. This allows the environment to be kept out of the user
area, which simplifies the management of OS-/user-level (MBR/GPT)
partitions within the user area.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: detect boot sectors using EXT_CSD_BOOT_MULT too
Stephen Warren [Mon, 30 Jul 2012 10:55:43 +0000 (10:55 +0000)]
mmc: detect boot sectors using EXT_CSD_BOOT_MULT too

Some eMMC devices contain boot partitions, but do not set the PART_SUPPORT
bit in EXT_CSD_PARTITIONING_SUPPORT. Allow partition selection on such
devices, by enabling partition switching when EXT_CSD_BOOT_MULT is set.

Note that the Linux kernel enables access to boot partitions solely based
on the value of EXT_CSD_BOOT_MULT; EXT_CSD_PARTITIONING_SUPPORT only
influences access to "general" partitions.

eMMC devices affected by this issue exist on various NVIDIA Tegra
platforms (and presumably many others too), such as Harmony (plug-in eMMC),
Seaboard, Springbank, and Whistler (plug-in eMMC).

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agoMMC: u-boot-spl may be compiled without partition support
Mikhail Kshevetskiy [Mon, 9 Jul 2012 08:53:38 +0000 (08:53 +0000)]
MMC: u-boot-spl may be compiled without partition support

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: fix capacity calculation when EXT_CSD_SEC_CNT is used
Yoshihiro Shimoda [Thu, 7 Jun 2012 19:09:11 +0000 (19:09 +0000)]
mmc: fix capacity calculation when EXT_CSD_SEC_CNT is used

Since the type of "ext_csd" was array of char, the following
calculation might fail when the value of ext_csd[EXT_CSD_SEC_CNT]
was minus.

capacity = ext_csd[EXT_CSD_SEC_CNT] << 0
| ext_csd[EXT_CSD_SEC_CNT + 1] << 8
| ext_csd[EXT_CSD_SEC_CNT + 2] << 16
| ext_csd[EXT_CSD_SEC_CNT + 3] << 24;

So, this patch changes the type of "ext_csd" to array of u8.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: sh_mmcif: enable MMC_MODE_HC
Yoshihiro Shimoda [Thu, 7 Jun 2012 16:39:52 +0000 (16:39 +0000)]
mmc: sh_mmcif: enable MMC_MODE_HC

The controller can control high capacity cards. So, the patch adds
the flag. If the flag is not set, "mmcinfo" will fail when a high
capacity card is used.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: fix wrong timeout check in mmc_send_status()
Jongman Heo [Sun, 3 Jun 2012 21:32:13 +0000 (21:32 +0000)]
mmc: fix wrong timeout check in mmc_send_status()

(!timeout) condition check in mmc_send_status() can never be met,
because do-while loop ends up with negative timeout value, -1.

Fix the check to handle TIMEOUT case correctly.

Signed-off-by: Jongman Heo <jongman.heo@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Wolfgang Denk [Tue, 4 Sep 2012 07:17:27 +0000 (09:17 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

* 'master' of git://git.denx.de/u-boot-avr32:
  net:macb: add line break
  avr32:portmux: fix setup for macb1
  avr32: Remove redundant LDSCRIPT definition

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agonet:macb: add line break
Andreas Bießmann [Thu, 16 Aug 2012 01:50:04 +0000 (01:50 +0000)]
net:macb: add line break

Without this patch we see annoying output like this:

---8<---
U-Boot> dhcp
macb1: PHY not foundmacb0: PHY present at 1
macb0: Starting autonegotiation...
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Joe Hershberger <joe.hershberger@gmail.com>

12 years agoavr32:portmux: fix setup for macb1
Andreas Bießmann [Thu, 16 Aug 2012 02:19:19 +0000 (02:19 +0000)]
avr32:portmux: fix setup for macb1

Use portd_mask instead of portc_mask to setup the pins for port D.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Wolfgang Denk [Mon, 3 Sep 2012 19:24:49 +0000 (21:24 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

* 'master' of git://git.denx.de/u-boot-ubi:
  ubifs: Fix memory leak in ubifs_finddir

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-cfi-flash
Wolfgang Denk [Mon, 3 Sep 2012 19:22:12 +0000 (21:22 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

* 'master' of git://git.denx.de/u-boot-cfi-flash:
  cfi: Make the flash erase and write operations abortable
  cfi: Check for blank before erase

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Mon, 3 Sep 2012 19:22:02 +0000 (21:22 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

* 'master' of git://git.denx.de/u-boot-ppc4xx:
  ppc4xx: Canyonlands/Glacier: Squeeze NAND image a bit to fit again

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoubifs: Fix memory leak in ubifs_finddir
Stefan Roese [Tue, 28 Aug 2012 12:00:24 +0000 (14:00 +0200)]
ubifs: Fix memory leak in ubifs_finddir

This patch fixes a memory leak in ubifs_finddir().

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: dev.ma.dma@gmail.com
12 years agoppc4xx: Canyonlands/Glacier: Squeeze NAND image a bit to fit again
Stefan Roese [Mon, 27 Aug 2012 13:39:45 +0000 (15:39 +0200)]
ppc4xx: Canyonlands/Glacier: Squeeze NAND image a bit to fit again

This patch removes some superfluous SDRAM init calls to fit the
NAND_SPL image into 4k again.

Signed-off-by: Stefan Roese <sr@denx.de>
12 years agocfi: Make the flash erase and write operations abortable
Joe Hershberger [Fri, 17 Aug 2012 20:36:41 +0000 (15:36 -0500)]
cfi: Make the flash erase and write operations abortable

Check for ctrlc() in operations that take time and loop over the flash
addresses.

In netconsole, tstc() is expensive.  Only check once in a while to not
slow down the operation significantly.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
12 years agocfi: Check for blank before erase
Joe Hershberger [Fri, 17 Aug 2012 20:36:40 +0000 (15:36 -0500)]
cfi: Check for blank before erase

Added an optional check in the CFI driver to evaluate if the sector is
already blank before issuing an erase command.  Improves erase time by
over a factor of 10 if already blank.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
12 years agopowerpc: re-add bi_ip_addr to bd_t struct
Anatolij Gustschin [Sun, 2 Sep 2012 09:09:00 +0000 (09:09 +0000)]
powerpc: re-add bi_ip_addr to bd_t struct

Since commit 50a47d0523e8efebe912bef539a77ffd42116451
(net: punt bd->bi_ip_addr) booting old 2.4.x ppc kernels
is broken due to changed offsets of the fields in struct bd_t.
Offsets of the fields after removed bi_ip_addr are wrong,
causing wrong bus clocks and console baudrate configurations
and various other issues. Re-add the bi_ip_addr field to preserve
backward compatibility with older ppc kernels. Setting bi_ip_addr
in board.c is not really needed, grepping in the 2.4 linux tree
shows that bi_ip_addr is not accessed there. Adding bi_ip_addr
to struct bd_t for other arches isn't needed it seems. bd_t is
not used by other arches in the 2.4 linux tree.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
12 years agohush: Don't parse the contents of a dereferenced var
Joe Hershberger [Fri, 17 Aug 2012 10:26:30 +0000 (10:26 +0000)]
hush: Don't parse the contents of a dereferenced var

When a variable which contains a user-supplied value is dereferenced
(e.g. to be echo'ed), make sure that the value is not further parsed
by hush.

Set the hush local variable "HUSH_NO_EVAL=1" to enable this behavior.

Without this patch, a sequence like this occurs:

Panda # env set my_user_string Bob\'s favorite device
Panda # print my_user_string
my_user_string=Bob's favorite device
Panda # echo $my_user_string
syntax error hush.c:3007

With this patch, it looks like this:

Panda # HUSH_NO_EVAL=1
Panda # env set my_user_string Bob\'s favorite device
Panda # print my_user_string
my_user_string=Bob's favorite device
Panda # echo $my_user_string
Bob's favorite device

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
12 years agohush: Add default value substitution support
Joe Hershberger [Fri, 17 Aug 2012 10:26:29 +0000 (10:26 +0000)]
hush: Add default value substitution support

Use standard sh syntax:
${VAR:-default}
Use default value: if VAR is set and non-null, expands to $VAR.
Otherwise, expands to default.
${VAR:=default}
Set default value: if VAR is set and non-null, expands to $VAR.
Otherwise, sets hush VAR to default and expands to default.
${VAR:+default}
If VAR is set and non-null, expands to the empty string.
Otherwise, expands to default.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
12 years agoREADME: Cleanup description of supported partitions.
Karl O. Pinc [Thu, 16 Aug 2012 06:20:15 +0000 (06:20 +0000)]
README: Cleanup description of supported partitions.

README: Cleanup description of supported partitions.

Signed-off-by: Karl O. Pinc <kop@meme.com>
12 years agoREADME.SPL: Move the 'Estimating stack usage' from omap3 to here
Tom Rini [Wed, 15 Aug 2012 07:23:21 +0000 (07:23 +0000)]
README.SPL: Move the 'Estimating stack usage' from omap3 to here

The instructions are generic, so move to the generic doc.

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoREADME.SPL: Add a small Debugging section
Tom Rini [Wed, 15 Aug 2012 07:23:20 +0000 (07:23 +0000)]
README.SPL: Add a small Debugging section

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoREADME: Update ver env var description
Benoît Thébaudeau [Mon, 13 Aug 2012 13:01:14 +0000 (15:01 +0200)]
README: Update ver env var description

Commit 155cb01 replaced the read-only property of the ver env var
with an auto-restoring behavior. Update the README file accordingly.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agodm: Add twserial device document
Tomáš Hlaváček [Wed, 8 Aug 2012 11:42:30 +0000 (13:42 +0200)]
dm: Add twserial device document

Signed-off-by: Tomas Hlavacek<tmshlvck@gmail.com>
12 years agodm: RTC subsystem analysis added.
Tomas Hlavacek [Wed, 8 Aug 2012 01:42:29 +0000 (01:42 +0000)]
dm: RTC subsystem analysis added.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
12 years agodm: Add pcmcia design document
Viktor Krivak [Wed, 8 Aug 2012 01:42:28 +0000 (01:42 +0000)]
dm: Add pcmcia design document

Signed-off-by: Viktor Krivak <viktor.krivak@gmail.com>
12 years agodm: add PCI design document
Pavel Herrmann [Wed, 8 Aug 2012 01:42:27 +0000 (01:42 +0000)]
dm: add PCI design document

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
12 years agodm: Driver model analysis document for Watchdog subsystem has been added.
Tomas Hlavacek [Wed, 8 Aug 2012 01:42:26 +0000 (01:42 +0000)]
dm: Driver model analysis document for Watchdog subsystem has been added.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
12 years agodm: Hwmon UDM subsystem analysis added.
Tomas Hlavacek [Wed, 8 Aug 2012 01:42:25 +0000 (01:42 +0000)]
dm: Hwmon UDM subsystem analysis added.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
12 years agodm: Add POWER API transition document
Viktor Krivak [Wed, 8 Aug 2012 01:42:24 +0000 (01:42 +0000)]
dm: Add POWER API transition document

Signed-off-by: Viktor Krivak <viktor.krivak@gmail.com>
12 years agodm: Add block device document
Pavel Herrmann [Wed, 8 Aug 2012 01:42:23 +0000 (01:42 +0000)]
dm: Add block device document

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
12 years agodm: Add SPI API transition document
Viktor Krivak [Wed, 8 Aug 2012 01:42:22 +0000 (01:42 +0000)]
dm: Add SPI API transition document

Signed-off-by: Viktor Krivak <viktor.krivak@gmail.com>
12 years agodm: Add networking subsystem analysis
Marek Vasut [Wed, 8 Aug 2012 01:42:21 +0000 (01:42 +0000)]
dm: Add networking subsystem analysis

Signed-off-by: Marek Vasut <marex@denx.de>
12 years agodm: Add MMC subsystem analysis
Marek Vasut [Wed, 8 Aug 2012 01:42:20 +0000 (01:42 +0000)]
dm: Add MMC subsystem analysis

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
12 years agodm: Add GPIO API transition document
Viktor Křivák [Wed, 8 Aug 2012 11:42:19 +0000 (13:42 +0200)]
dm: Add GPIO API transition document

Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
12 years agodm: Add Driver cores design document
Pavel Herrmann [Wed, 8 Aug 2012 01:42:18 +0000 (01:42 +0000)]
dm: Add Driver cores design document

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
12 years agodm: Initial import of design documents
Marek Vasut [Wed, 8 Aug 2012 01:42:17 +0000 (01:42 +0000)]
dm: Initial import of design documents

This patch contains UDM-design.txt, which is document containing
general description of the driver model. The remaining files contains
descriptions of conversion process of particular subsystems.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
12 years agoinput: key_matrix: fix header inclusion
Stephan Linz [Thu, 2 Aug 2012 10:49:24 +0000 (10:49 +0000)]
input: key_matrix: fix header inclusion

On Microblaze with device tree support enabled we run into
the error below.

I'm not sure, but I think that all source code should include
at least the common.h and just this fix the problem on
Microblaz architecture.

The error is:

In file included from key_matrix.c:29:
include/malloc.h:364: error: conflicting types for 'memset'
include/linux/string.h:71: error: previous declaration of 'memset' was here
include/malloc.h:365: error: conflicting types for 'memcpy'
include/linux/string.h:74: error: previous declaration of 'memcpy' was here

Signed-off-by: Stephan Linz <linz@li-pro.net>
CC: Bernie Thompson <bhthompson@chromium.org>
CC: Simon Glass <sjg@chromium.org>
CC: Tom Warren <twarren@nvidia.com>
CC: Michal Simek <monstr@monstr.eu>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <monstr@monstr.eu>
12 years agofix out of tree building with kallsyms
Mike Frysinger [Mon, 30 Jul 2012 22:44:53 +0000 (22:44 +0000)]
fix out of tree building with kallsyms

The call to SYSTEM_MAP assumes that the u-boot output is in $PWD when
it really should be in $(obj).  This fixes building out of tree.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoenv_nand: align NAND buffers
Stephen Warren [Mon, 30 Jul 2012 07:38:38 +0000 (07:38 +0000)]
env_nand: align NAND buffers

This allows cache flush/invalidate operations to succeed on the buffers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Scott Wood <scottwood@freescale.com>
12 years agoimage/FIT: Add ramdisk load, entry address and OS tag inclusion
Jagannadha Sutradharudu Teki [Fri, 27 Jul 2012 22:02:22 +0000 (22:02 +0000)]
image/FIT: Add ramdisk load, entry address and OS tag inclusion

This patch adds support to include Load, Entry address and OS tag
of ramdisk on to FIT image through mkimage tool.

Signed-off-by: Jagannadha Sutradharudu Teki <402jagan@gmail.com>
12 years agortc: pcf8563: Make century compatible with Linux
Benoît Thébaudeau [Fri, 20 Jul 2012 14:05:36 +0000 (16:05 +0200)]
rtc: pcf8563: Make century compatible with Linux

This driver uses the century bit of this RTC in the opposite way Linux does.
From Linux's rtc-pcf8563.c:
/*
 * The meaning of MO_C bit varies by the chip type.
 * From PCF8563 datasheet: this bit is toggled when the years
 * register overflows from 99 to 00
 *   0 indicates the century is 20xx
 *   1 indicates the century is 19xx
 * From RTC8564 datasheet: this bit indicates change of
 * century. When the year digit data overflows from 99 to 00,
 * this bit is set. By presetting it to 0 while still in the
 * 20th century, it will be set in year 2000, ...
 * There seems no reliable way to know how the system use this
 * bit.  So let's do it heuristically, assuming we are live in
 * 1970...2069.
 */

As U-Boot's PCF8563 driver does not say it is supposed to support the RTC8564,
make this driver compatible with Linux's by giving the opposite meaning to the
century bit.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: Simplify get_contents
Benoît Thébaudeau [Fri, 20 Jul 2012 13:21:37 +0000 (15:21 +0200)]
FAT: Simplify get_contents

One call to get_cluster can be factorized with another, so avoid
duplicating code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: get_cluster: Add buffer bouncing
Benoît Thébaudeau [Fri, 20 Jul 2012 13:21:08 +0000 (15:21 +0200)]
FAT: get_cluster: Add buffer bouncing

Add a buffer bouncing mechanism to get_cluster.  This can be useful
for misaligned applicative buffers passed through get_contents.
This is required for the following patches in the case of data
aligned differently relatively to buffers and clusters.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: Fix redundant sector read
Benoît Thébaudeau [Fri, 20 Jul 2012 13:20:12 +0000 (15:20 +0200)]
FAT: Fix redundant sector read

With the previous code, the remaining prefetched sectors were read
again after each sector.  With this patch, each sector is read only
once, thus making the prefetch useful.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: cosmetic: Remove useless assignment
Benoît Thébaudeau [Fri, 20 Jul 2012 13:19:51 +0000 (15:19 +0200)]
FAT: cosmetic: Remove useless assignment

fatlength is not used after this assignment, so it is useless and can
be removed.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: get_fatent: Fix FAT boundary check
Benoît Thébaudeau [Fri, 20 Jul 2012 13:19:29 +0000 (15:19 +0200)]
FAT: get_fatent: Fix FAT boundary check

startblock must be taken into account in order not to read past the
end of the FAT.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: cosmetic: Remove extra spaces
Benoît Thébaudeau [Fri, 20 Jul 2012 13:18:44 +0000 (15:18 +0200)]
FAT: cosmetic: Remove extra spaces

Remove spaces before opening parentheses in function calls.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoppc: Create a stack frame for wait_ticks()
Joakim Tjernlund [Mon, 16 Jul 2012 21:25:40 +0000 (21:25 +0000)]
ppc: Create a stack frame for wait_ticks()

wait_ticks() calls get_ticks() without building a back chain which
makes gdb unhappy when doing back trace. This can also cause
improper memory accesses.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
12 years agopart_mac: dcache: allocate cacheline-aligned buffers
Benoît Thébaudeau [Fri, 13 Jul 2012 19:31:03 +0000 (21:31 +0200)]
part_mac: dcache: allocate cacheline-aligned buffers

This patch forces the correct alignment for DMA operations of buffers used by
part_mac.c.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agommc: Remove unused item flags in struct mmc_cmd
Kaspter Ju [Thu, 31 May 2012 04:27:50 +0000 (04:27 +0000)]
mmc: Remove unused item flags in struct mmc_cmd

Signed-off-by: Kaspter Ju <nigh0st3018@gmail.com>
12 years agou-boot yaffs2: Fix compilation warnings
Charles Manning [Tue, 14 Aug 2012 18:26:10 +0000 (18:26 +0000)]
u-boot yaffs2: Fix compilation warnings

Also remove yaffs_hweight and use the hweight in u-boot.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Sun, 2 Sep 2012 14:38:48 +0000 (16:38 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

* 'master' of git://git.denx.de/u-boot-usb:
  MUSB driver: Timeout is never detected as the while loop does not end
  usb: fix ulpi_set_vbus prototype
  pxa25x: Add UDC registers definitions
  USB: Fix strict aliasing in ohci-hcd
  usb: Optimize USB storage read/write
  ehci: Optimize qTD allocations
  usb_stor_BBB_transport: Do not delay when not required
  usb_storage: Remove EHCI constraints
  usb_storage: Restore non-EHCI support
  ehci-hcd: Boost transfer speed
  ehci: cosmetic: Define used constants
  ehci: Fail for multi-transaction interrupt transfers
  arm:trats: Enable g_dnl composite USB gadget with embedded DFU function on TRATS
  arm:trats: Support for USB UDC driver at TRATS board.
  dfu:cmd: Support for DFU u-boot command
  dfu: MMC specific routines for DFU operation
  dfu: DFU backend implementation
  dfu:usb: DFU USB function (f_dfu) support for g_dnl composite gadget
  dfu:usb: Support for g_dnl composite download gadget.
  ehci: cosmetic: Define the number of qt_buffers

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agopatman: Do not Cc addresses included in To list
Otavio Salvador [Sat, 18 Aug 2012 07:19:51 +0000 (07:19 +0000)]
patman: Do not Cc addresses included in To list

In case an address is listed in the To list, those will be skipped on
Cc list or user might end with a duplicated message.

This fixes the case when a tag points to same address used as series
destination thus avoiding duplicated sending.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
12 years agopatman: Allow for changelog use in first version of a series
Otavio Salvador [Mon, 13 Aug 2012 10:08:22 +0000 (10:08 +0000)]
patman: Allow for changelog use in first version of a series

When a patchset had a RFC series, a v1 might have a changelog of
changes done since the RFC. The patch changes the range checked for
changelog and allow it to start for version 1.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agopatman: don't mess with signoffs
Ilya Yanok [Mon, 6 Aug 2012 23:46:08 +0000 (23:46 +0000)]
patman: don't mess with signoffs

Currently patman assumes that there should be only one Signoff line
and this is obviously incorrect: we often have to work with patches
containing other people signoffs. Moreover, it's really desirable
to preserve the comments between signoffs.

So until some sophisticated signoff processing will be developed I
suggest just don't mess with signoffs at all and treat them like
plain text lines. The only drawback I've found so far is the case
where you have a patch with someones else signoff but not yours and
also have to patman tags under signoff line. In this case you will
get extra empty line between signoffs.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopatman: don't mess with changelog
Ilya Yanok [Mon, 6 Aug 2012 23:46:07 +0000 (23:46 +0000)]
patman: don't mess with changelog

Don't try to sort and uniq changelog entries as this breaks
multiline entries. It will be better to add some real multi-line
support but for now just preserve the entries as is.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopatman: don't pick changes while processing patches
Ilya Yanok [Mon, 6 Aug 2012 23:46:06 +0000 (23:46 +0000)]
patman: don't pick changes while processing patches

We already got all changes from git log output and the comment
to the ProcessLine function clearly states that 'patch' mode
is not for scanning tags.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopatman: fix end of changes detection
Ilya Yanok [Mon, 6 Aug 2012 23:46:05 +0000 (23:46 +0000)]
patman: fix end of changes detection

Changes may end in '---' line or Signoff line (generated by
git format-patch) in case of Series-changes: lines being
the last ones in commit message. So detect it properly.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopci: add CONFIG_PCI_ENUM_ONLY for platforms that don't need PCI setup done
Andrew Sharp [Wed, 29 Aug 2012 14:16:32 +0000 (14:16 +0000)]
pci: add CONFIG_PCI_ENUM_ONLY for platforms that don't need PCI setup done

Introduce CONFIG_PCI_ENUM_ONLY variable for platforms that just want a
quick enumberation of the PCI devices, but don't need any setup work done.
This is very beneficial on platforms that have u-boot loaded by another
boot loader which does a more sophisticated job of setup of PCI devices
than u-boot.  That way, u-boot can just read what's there and get on
with life.  This is what SeaBIOS does.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agopci: update pci_ids.h with a few new entries
Andrew Sharp [Wed, 29 Aug 2012 14:16:31 +0000 (14:16 +0000)]
pci: update pci_ids.h with a few new entries

Add some recent entries to pci_ids.h for Intel and AMD/ATI devices that
are somewhat relevant to u-boot.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agopci: minor cleanup of CONFIG_PCI_PNP usage
Andrew Sharp [Wed, 29 Aug 2012 14:16:30 +0000 (14:16 +0000)]
pci: minor cleanup of CONFIG_PCI_PNP usage

Refactor the common PCI code just a tiny bit surrounding the PCI_PNP
(pciauto) stuff.  Makes the code a tiny bit easier to read, and also
makes it more obvious that almost no platform needs to setup or use the
pci_config_table stuff.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agopci: clean up some whitespace and formatting
Andrew Sharp [Wed, 29 Aug 2012 14:16:29 +0000 (14:16 +0000)]
pci: clean up some whitespace and formatting

I tried to clean up the white space and formatting offenses and
inconsistencies in the generic PCI code that obviously has been around for
some time.  Emphasis on large increases in readability and maintainability
and consistency.  I omitted the platform/processor specific files in
the drivers/pci directory because I wanted to leave those file to those
that care more about them.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>