summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* | serial: bcm283x_mu: Detect disabled serial deviceAlexander Graf2016-09-06-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the raspberry pi, you can disable the serial port to gain dynamic frequency scaling which can get handy at times. However, in such a configuration the serial controller gets its rx queue filled up with zero bytes which then happily get transmitted on to whoever calls getc() today. This patch adds detection logic for that case by checking whether the RX pin is mapped to GPIO15 and disables the mini uart if it is not mapped properly. That way we can leave the driver enabled in the tree and can determine during runtime whether serial is usable or not, having a single binary that allows for uart and non-uart operation. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | bcm2835_gpio: Implement GPIOF_FUNCAlexander Graf2016-09-06-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | So far we could only tell the gpio framework that a GPIO was mapped as input or output, not as alternative function. This patch adds support for determining whether a function is mapped as alternative. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* | Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2016-09-06-56/+547
|\ \
| * | sunxi: fix 64-bit compiler warning for SPL header parsingAndre Przywara2016-09-06-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Casting "int"s to pointers is only valid for 32-bit systems. Add the appropriate pointer type cast to avoid a compiler warning when compiling for AArch64. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Kconfig: rename non-existent SUN50I_A64 config symbolAndre Przywara2016-09-06-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no "CONFIG_MACH_SUN50I_A64" in upstream U-Boot, so fix the name to prevent the option to be enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | Revert "sunxi: Move the SPL stack top to 0x1A000 on Allwinner A64/A80"Andre Przywara2016-09-06-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moved the SPL stack into SRAM C, which worked when the SPL set the AHB1 clock down to 100 MHz to cope with the flaky SRAM C access from the CPU. However booting with boot0 (and thus not using SPL at all) we still run with a 200 MHz AHB1, so any access to SRAM C is prone to fail. Since this commit does _not_ only affect the SPL code, but also the U-Boot proper, we fail when booting with boot0. As the introduction of tiny-printf reduced the size of the SPL, we can afford to have the SPL stack in SRAM A1. This reverts commit 1a83fb4a17d959d7b037999ab7ed7e62429abe34 and fixes booting the Pine64 when using boot0. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Add defconfig and dts file for the Orange Pi Plus2E SBCHans de Goede2016-09-03-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Orange Pi Plus2E is an extended version of the Orange Pi Pc Plus, with 2G RAM and an external gbit ethernet phy. The dts file is identical to the one submitted to the upstream kernel, except that it has the pending patch to enable the ethernet controller squashed in, as u-boot already has sun8i-emac support. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Enable emac on H3 orangepi boardsHans de Goede2016-09-03-1/+3
| | | | | | | | | | | | | | | | | | | | | The Orange Pi 2 and Orange Pi Plus also come with ethernet, enable support for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Sync h3-orangepi dts files with kernelHans de Goede2016-09-03-47/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an emac node to the orangepi-2 dts (not yet merged upstream, but in u-boot we already have emac support); fixes the alphetically sorting of nodes in sun8i-h3-orangepi-plus.dts and disables some usb controllers in sun8i-h3-orangepi-plus.dts which are only used on the plus2e, as upstream has decided to do a separate dts files for the plus2e. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Fix H3 EMAC syscon register addressChen-Yu Tsai2016-09-03-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sun8i-emac driver follows an old version of the proposed DT bindings, where the EMAC clock and EPHY control register range is listed directly, rather than through a syscon phandle. Add back the syscon register range to avoid an invalid data access. We should fix the driver once the Linux kernel bindings have been finalized. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Add support for A33-OLinuXino boardStefan Mavrodiev2016-09-03-0/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A33-OLinuXino is A33 development board designed by Olimex LTD. It has AXP223 PMU, 1GB DRAM, a micro SD card, one USB-OTG connector, headphone and mic jacks, connector for LiPo battery and optional 4GB NAND Flash. It has two 40-pin headers. One for LCD panel, and one for additional modules. Also there is CSI/DSI connector. The dts files are identical to the ones submitted to the upstream kernel. Signed-off-by: Stefan Mavrodiev <stefan.mavrodiev@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Add iNet D978 rev2 defconfigIcenowy Zheng2016-09-03-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iNet D978 rev2 is a tablet board designed by iNet, which is intended to use on 10" tablets with a appearance like Apple iPad. It has A33 SoC, 1GB RAM, 8GB/16GB NAND, SDIO Wi-Fi, a MicroUSB port and a MicroSD slot. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: add proper device tree for iNet D978 rev2 boardsIcenowy Zheng2016-09-03-0/+89
| |/ | | | | | | | | | | | | | | Add a proper dts for the iNet D978 rev2 based A33 tablets. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* | Merge git://git.denx.de/u-boot-nand-flashTom Rini2016-09-06-7/+8
|\ \
| * | nand: Fix some more NULL name testsScott Wood2016-09-01-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that nand_info[] is an array of pointers we need to test the pointer itself rather than using name as a proxy for NULLness. Fixes: b616d9b0a708eb9 ("nand: Embed mtd_info in struct nand_chip") Signed-off-by: Scott Wood <oss@buserror.net> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Tony Lindgren <tony@atomide.com>
| * | nand: Fix nand info for no deviceTony Lindgren2016-09-01-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like we have few more places where we're testing for nand_info[i]->name. We can now use just test for nand_info[i] instead. This fixes a data abort on devices with no NAND when doing nand info. Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | mtd: nand: pxa3xx: use nand_set_controller_dataChris Packham2016-09-01-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 17cb4b8f327e ("mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data") the assignment of mtd->priv was removed but was not replaced. This adds the required nand_set_controller_data() call. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* | | ARM: dts: dra72-evm: fix broken ethernetMugunthan V N2016-09-06-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | With commit ceec08f50b6, phy is connected to slave 0, but changing the phy node was missed, fix it by populating the phy node to proper cpsw slave node. Fixes: ceec08f50b6 ("ARM: dts: dra72-evm: Add mode-gpios entry for mac node") Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Cc: Vignesh R <vigneshr@ti.com> Tested-by: Tom Rini <trini@konsulko.com>
* | ARM: tegra: Add support for TK1-SOM board from Colorado EngineeringPeter Chubb2016-09-01-4/+1007
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Colorado TK1 SOM is a small form factor board similar to the Jetson TK1. The main differences lie in the pinmux, and in that the PCIe controller is set to use in 4lanes+1lane, rather than 2+2. The pinmux header here was generated from a spreadsheet provided by Colorado Engineering using the tegra-pinmux scripts. The spreadsheet was converted from v09 to v11 by me. Signed-off-by: Peter Chubb <peter.chubb@data61.csiro.au> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
* | ARM: tegra: use numeric versioning for p2771-0000Stephen Warren2016-08-30-10/+10
|/ | | | | | | | | | | | | | | | | The board ID EEPROM and board ID stickers on p2771-0000 will use a numeric versioning scheme, with version numbers such as 000/100/200/300/400/500. Within NVIDIA, these versions are also known as A00/A01/A02/A03/A04/B00. However, that numbering scheme is not easily visible outside of NVIDIA, and so does not make much sense to use. Convert U-Boot to use the readily visible numeric scheme. Also, it turns out that the current A02 DT actually applies to board versions 000/100/200 (A00..A02). Consequently rename this to 000 not 200 so that all U-Boot builds are named after the first version of the HW they support. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
* x86: qemu: efi: Add two boards for EFI 32-bit and 64-bit payloadBin Meng2016-08-30-0/+99
| | | | | | | | | | | This introduces two board defconfig files for generating EFI 32-bit and 64-bit payloads, to run on QEMU x86 target. With these in place, hopefully buildman will catch any build error with EFI payload support on x86. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* x86: efi: Fix EFI 64-bit payload build warningsBin Meng2016-08-30-16/+20
| | | | | | | | | | | | | | | | | There are lots of warnings when building EFI 64-bit payload. include/asm-generic/bitops/__fls.h:17:2: warning: left shift count >= width of type if (!(word & (~0ul << 32))) { ^ In fact, U-Boot itself as EFI payload is running in 32-bit mode. So BITS_PER_LONG needs to still be 32, but EFI status codes are 64-bit when booting from 64-bit EFI. Introduce EFI_BITS_PER_LONG to bridge those status codes with U-Boot's BITS_PER_LONG. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* x86: efi: payload: Make EFI payload build againBin Meng2016-08-30-4/+4
| | | | | | | | Since commit 73c5c39 "Makefile: Drop unnecessary -dtb suffixes", EFI payload does not build anymore. This fixes the build. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* x86: Add debugging when cpu_common_init() failsSimon Glass2016-08-30-1/+3
| | | | | | | Add a debug() at this point to help figure out what is wrong. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Allow microcode to be collatedSimon Glass2016-08-30-1/+11
| | | | | | | | | | | Generally the microcode is combined into a single block only (and removed from the device tree) when there are multiple blocks. But this is not a requirement. Adjust the ivybridge code to avoid assuming this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: Add debugging when a microcode update failsSimon Glass2016-08-30-1/+3
| | | | | | | | Add a debug() at this point to help figure out what is wrong. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher<hs@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini2016-08-28-80/+123
|\
| * ARM: uniphier: enable CONFIG_CMD_CACHEMasahiro Yamada2016-08-28-0/+6
| | | | | | | | | | | | | | This will be useful, for example, to load firmware to DRAM and make it visible to other agents. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: change UNIPHIER_SERIAL to default y optionMasahiro Yamada2016-08-28-6/+1
| | | | | | | | | | | | | | This is very likely to be necessary for normal use cases. Set its default to 'y' for shorter defconfig files. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: dts: uniphier: add u-boot, dm-pre-reloc to use eMMC boot on sLD3Masahiro Yamada2016-08-28-0/+9
| | | | | | | | | | | | | | The eMMC on sLD3 is assigned with dedicated pins (only multiplexed with GPIO), so it shouldn't hurt to enable eMMC on SPL all the time. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: increase CONFIG_SYS_MALLOC_F_LEN for sLD3Masahiro Yamada2016-08-28-0/+1
| | | | | | | | | | | | | | | | | | | | Commit 76c52ce29fd7 ("ARM: uniphier: increase CONFIG_SYS_MALLOC_F_LEN to bind all nodes") missed to increase this config for sLD3. This change is needed to add "u-boot,dm-pre-reloc" to some nodes; more devices are bound, more malloc memory is needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: display revision of Micro Support Card 3.6.x kindlyMasahiro Yamada2016-08-28-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The revision of the original support card (rev 3.5, rev 3.6) fits in the 8 bit width revision register. When it was extended in a weird way, it was versioned in the format of "3.6.x" (where it should have been "3.7", of course). What is worse, only the sub-level version "6.x" was recorded in the 8 bit width register, completely ignoring the compatibility of the revision register format. This patch saves madly-versioned support cards by assuming the major version "3" when the MSB 4 bit of the register is read as "6". With this, the support card revision that were displayed as "6.10" is now corrected to "3.6.10". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: support system reset functionality for PSCIMasahiro Yamada2016-08-28-2/+18
| | | | | | | | | | | | | | | | | | | | This supports the system reset via PSCI for ARMv7 SoCs. Because the system reset is not supported on PSCI 0.1, let's define CONFIG_ARMV7_PSCI_1_0. (it is supported since PSCI 0.2, but there is no CONFIG to enable it in U-Boot for now.) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * mmc: uniphier-sd: just return if already set to desired clock rateMasahiro Yamada2016-08-28-2/+5
| | | | | | | | | | | | With this, we can save unnecessary udelay(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * mmc: uniphier-sd: return error code if unsupported width is givenMasahiro Yamada2016-08-28-5/+9
| | | | | | | | | | | | | | | | With the CONFIG_DM_MMC_OPS migration, the .set_ios callback can return an integer now. Return an appropriate error value rather than sudden death by BUG(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * mmc: uniphier-sd: move uniphier_sd_init() belowMasahiro Yamada2016-08-28-21/+19
| | | | | | | | | | | | | | | | No more reason to define this function above the ops structure. Move it near the caller. Also, change its return type to void because it never fails. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * mmc: uniphier-sd: migrate to CONFIG_DM_MMC_OPSMasahiro Yamada2016-08-28-47/+51
| | | | | | | | | | | | | | | | | | Catch up with the DM migration. As struct dm_mmc_ops does not have .init callback, call the init function directly from the probe function. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * mmc: uniphier-sd: add static qualifiers to probe and remove callbacksMasahiro Yamada2016-08-28-2/+2
| | | | | | | | | | | | They are both only referenced in this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | Merge git://git.denx.de/u-boot-rockchipTom Rini2016-08-27-0/+6
|\ \
| * | rockchip: rk3399: update MAINTAINER fileKever Yang2016-08-27-0/+6
| |/ | | | | | | | | | | | | | | This patch add maintainer information for rk3399 evb. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
* | Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2016-08-26-2193/+3846
|\ \
| * | sunxi: Tune H3 DRAM PLL to improve lock timeJens Kuske2016-08-26-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The H3 PLL5 used for DRAM barely manages to lock to the required frequency before DRAM controller starts, sometimes leading to wrong delay-line calibration results. This patch changes the PLL tuning parameters to the same values as boot0 used, which speeds up the locking and fixes the problem. Signed-off-by: Jens Kuske <jenskuske@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: display: Use PWM to drive backlight where applicableHans de Goede2016-08-26-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the backlight's pwm input is connected to a pwm output of the SoC, actually use pwm to drive the backlight. The mean reason for doing this is to fix the backlight turning off for aprox. 1 second while the kernel is booting. This is caused by the kernel actually using pwm to drive the backlight, so that it can dim the backlight. First the pwm driver loads and switches the pinmux for the pin driving the backlight's pwm input to the pwm controller. Then about 1s later the actual backlight driver loads and tells the pwm driver to actually update the pwm settings, which have a power-on-reset value of "off". An additional advantage is that this allows us to initatiate the backlight at 80%, which is the kernel default, avoiding a brightness change while the kernel loads. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed by: Peter Korsgaard <peter@korsgaard.com>
| * | sun5i: Add defconfig and dts file for the Empire Electronix M712 tabletHans de Goede2016-08-26-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a defconfig and dts file for the Empire Electronix M712 tablet, this is a 7" A13 tablet, with micro-usb (otg), headphone and micro-sd slots on the outside. It uses a Goodix gt811 touchscreen controller, a RTL8188CTV wifi chip and a DMART06 (1238a4) accelerometer. The dts file is identical to the one submitted to the upstream kernel. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | sunxi: Sync dts files with upstream kernelHans de Goede2016-08-26-2192/+3384
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync dts files with the current (Aug 18th 2016) state of Maxime's linux/sunxi/for-next repo. Note this commit also updates configs/MSI_Primo81_defconfig, adding: "# CONFIG_REQUIRE_SERIAL_CONSOLE is not set", this is necessary because the tablet does not have a reachable uart so the dts sync drops its serial0 alias. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
| * | sun6i: Add defconfig and dts file for tablets using the inet-q972 PCBHans de Goede2016-08-26-0/+318
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a defconfig and dts file for tablets using the generic inet-q972 PCB. Tablets with this PCB feature a mini-hdmi output, micro-usb usb-host, micro-usb usb-otg, 3.5mm headphone jack, a micro sd slot, (mini) power-barrel and an usb wifi module. This has been tested on a 9.7" 1024x768 qware qw tb9718-qhd tablet. The dts files are identical to the ones submitted to the upstream kernel. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | nand: Fix set_dev checks for no deviceTony Lindgren2016-08-26-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | If we do nand device 0 command in u-boot on a device that has NAND support enabled but no NAND chip, we can get data abort at least on omaps. Fix the issue by replacing the check with nand_info[dev] as suggested by Scott Wood. The check for name existed before because before the array-to-pointer conversion there was no way to directly test nand_info[dev] for emptiness. Signed-off-by: Tony Lindgren <tony@atomide.com>
* | treewide: fix "followings" to "following"Masahiro Yamada2016-08-26-6/+6
| | | | | | | | | | | | Most of them are my mistakes. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | tools: moveconfig: add Xtensa GCC prefix to CROSS_COMPILE listMasahiro Yamada2016-08-26-1/+2
| | | | | | | | | | | | | | | | | | | | This is needed to move CONFIG options for the recently-added xtfpga_defconfig. The tarball of the pre-built toolchain can be downloaded from: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/ Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | arm: cache: always flush cache line size for page tableStefan Agner2016-08-26-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | The page table is maintained by the CPU, hence it is safe to always align cache flush to a whole cache line size. This allows to use mmu_page_table_flush for a single page table, e.g. when configure only small regions through mmu_set_region_dcache_behaviour. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Tested-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>