Commit Graph

17404 Commits

Author SHA1 Message Date
Ira W. Snyder
db1fc7d28e 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>
2012-09-18 16:16:45 -05:00
Ira W. Snyder
40775e9676 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>
2012-09-18 16:16:44 -05:00
Ira W. Snyder
ea1ea54e35 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>
2012-09-18 16:16:44 -05:00
Ira W. Snyder
f138ca1373 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>
2012-09-18 16:16:44 -05:00
Tom Rini
037e9d33db Merge branch 'master' of git://git.denx.de/u-boot-i2c 2012-09-17 11:39:03 -07:00
Tom Rini
cd40a66c19 Merge branch 'master' of git://git.denx.de/u-boot-fdt 2012-09-17 11:34:08 -07:00
Łukasz Majewski
fd8dca83ed 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>
2012-09-17 09:40:18 +02:00
Łukasz Majewski
7ca8f73a0a 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>
2012-09-17 09:39:50 +02:00
Marek Vasut
e02c945874 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>
2012-09-15 09:16:08 -04:00
Tom Rini
8f082d78fa Merge branch 'master' of git://git.denx.de/u-boot-mips 2012-09-14 07:15:48 -07:00
Tom Rini
f71d5cd56b Merge branch 'master' of git://git.denx.de/u-boot-avr32 2012-09-13 10:34:24 -07:00
Andreas Bießmann
a420dfe2b0 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>
2012-09-13 13:33:11 +02:00
Simon Glass
93691842e8 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>
2012-09-13 13:32:41 +02:00
Tom Rini
b89598a148 Merge branch 'master' of git://www.denx.de/git/u-boot-ubi 2012-09-12 10:26:48 -07:00
Tom Rini
a9ae14fce3 Merge branch 'master' of git://www.denx.de/git/u-boot-mmc 2012-09-12 10:26:06 -07:00
Michal Simek
c60a57912a 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>
2012-09-11 09:24:58 +02:00
Michal Simek
2380b8f529 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>
2012-09-11 09:24:58 +02:00
Michal Simek
bcbb046bd5 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>
2012-09-11 09:24:58 +02:00
Michal Simek
26e6da854e 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>
2012-09-11 09:24:57 +02:00
Michal Simek
8706908a25 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>
2012-09-11 09:24:57 +02:00
Michal Simek
e35c05baa1 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>
2012-09-11 09:24:57 +02:00
Michal Simek
b710d9d6c2 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>
2012-09-11 09:24:56 +02:00
Stephan Linz
03afad2fc9 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>
2012-09-11 09:24:56 +02:00
Michal Simek
25239e12d9 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>
2012-09-11 09:24:56 +02:00
Michal Simek
7636ebe1d2 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>
2012-09-11 09:24:53 +02:00
Michal Simek
5340a7f1d7 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>
2012-09-11 09:24:16 +02:00
Veli-Pekka Peltola
8044c1387f 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>
2012-09-10 11:37:42 +02:00
Andy Fleming
95b01c47ed 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>
2012-09-06 15:23:13 -05:00
Koen Kooi
a532278074 omap4 i2c: add support for i2c bus 4
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2012-09-06 06:01:09 +02:00
Jaehoon Chung
b09ed6e4fe 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>
2012-09-05 17:33:26 -05:00
Jaehoon Chung
8458e0283f 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>
2012-09-05 17:33:26 -05:00
Jaehoon Chung
b268660ced 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>
2012-09-05 17:33:26 -05:00
Joe Hershberger
470dcc7511 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>
2012-09-05 17:33:25 -05:00
Joe Hershberger
073cfd1c04 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>
2012-09-05 17:33:25 -05:00
Benoît Thébaudeau
d1424ee544 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>
2012-09-05 17:32:42 -05:00
Benoît Thébaudeau
6bb4b4bc35 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>
2012-09-05 17:32:42 -05:00
Stephen Warren
1c1ec3c0b5 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>
2012-09-05 17:32:42 -05:00
Stephen Warren
9404a5fc7c 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>
2012-09-05 17:32:41 -05:00
Stephen Warren
8948ea8302 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>
2012-09-05 17:32:41 -05:00
Mikhail Kshevetskiy
122efd4389 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>
2012-09-05 17:32:41 -05:00
Yoshihiro Shimoda
cdfd1ac6df 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>
2012-09-05 17:32:41 -05:00
Yoshihiro Shimoda
97a7b9928a 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>
2012-09-05 17:32:41 -05:00
Jongman Heo
5b0c942f89 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>
2012-09-05 17:32:41 -05:00
Wolfgang Denk
a6f0c4faa4 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>
2012-09-04 09:17:27 +02:00
Andreas Bießmann
6ed0e94071 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>
2012-09-03 23:39:11 +02:00
Andreas Bießmann
6314c84df1 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>
2012-09-03 23:37:16 +02:00
Wolfgang Denk
48efe65829 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>
2012-09-03 21:24:49 +02:00
Wolfgang Denk
f499131867 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>
2012-09-03 21:22:12 +02:00
Wolfgang Denk
6c43d11f3d 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>
2012-09-03 21:22:02 +02:00
Stefan Roese
be73913b91 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
2012-09-03 11:37:50 +02:00