oweals/u-boot.git
11 years agoEXYNOS5: Add device node for USB.
Rajeshwari Shinde [Mon, 7 Jan 2013 23:35:04 +0000 (23:35 +0000)]
EXYNOS5: Add device node for USB.

This patch adds the device node required for USB

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEHCI: Exynos: Add fdt support
Rajeshwari Shinde [Mon, 7 Jan 2013 23:35:03 +0000 (23:35 +0000)]
EHCI: Exynos: Add fdt support

Adding fdt support to ehci-exynos in order to parse
register base addresses from the device node.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoSPI: EXYNOS: Add FDT support to driver.
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:23 +0000 (20:03 +0000)]
SPI: EXYNOS: Add FDT support to driver.

This patch adds FDT support to the SPI driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT: Add SPI device node data
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:22 +0000 (20:03 +0000)]
EXYNOS5: FDT: Add SPI device node data

Add SPI device node data for exynos.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5 : FDT: Add Aliases for SPI device
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:21 +0000 (20:03 +0000)]
EXYNOS5 : FDT: Add Aliases for SPI device

This patch adds aliases for SPI.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT: Add compatible strings for SPI
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:20 +0000 (20:03 +0000)]
EXYNOS5: FDT: Add compatible strings for SPI

Add required compatible information for SPI driver.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoSound: Add FDT support to CMD.
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:19 +0000 (20:03 +0000)]
Sound: Add FDT support to CMD.

This patch adds FDT support to sound init in CMD.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoSound: WM8994: Add FDT support to codec
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:18 +0000 (20:03 +0000)]
Sound: WM8994: Add FDT support to codec

This patch adds FDT support to the codec.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoSound: Add FDT support to driver
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:17 +0000 (20:03 +0000)]
Sound: Add FDT support to driver

This patch adds FDT support to the sound driver.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT: Add compatible strings for sound
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:16 +0000 (20:03 +0000)]
EXYNOS5: FDT: Add compatible strings for sound

Add required compatible information for sound driver.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT: Add sound and codec device node
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:15 +0000 (20:03 +0000)]
EXYNOS5: FDT: Add sound and codec device node

Adds sound and codec device node parameters

Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT: Add sound device node data
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:14 +0000 (20:03 +0000)]
EXYNOS5: FDT: Add sound device node data

Add sound device node data for exynos

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoSMDK5250: Initialise I2C using FDT
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:13 +0000 (20:03 +0000)]
SMDK5250: Initialise I2C using FDT

This patch initialises I2C using FDT.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoI2C: Driver changes for FDT support
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:12 +0000 (20:03 +0000)]
I2C: Driver changes for FDT support

Functions added to get the I2C bus number and reset I2C bus using
FDT node.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT : Decode peripheral id
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:11 +0000 (20:03 +0000)]
EXYNOS5: FDT : Decode peripheral id

Api is added to decode peripheral id based on the interrupt number
of the peripheral.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoFDT: Add compatible string for I2C
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:10 +0000 (20:03 +0000)]
FDT: Add compatible string for I2C

Add required compatible information for I2C driver.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5 : FDT: Add Aliases for I2C device
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:09 +0000 (20:03 +0000)]
EXYNOS5 : FDT: Add Aliases for I2C device

This patch adds aliases for I2C.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT: Add I2C device node data
Rajeshwari Shinde [Wed, 26 Dec 2012 20:03:08 +0000 (20:03 +0000)]
EXYNOS5: FDT: Add I2C device node data

Add I2C device node data for exynos

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoarm:exynos4:pinmux: Modify the gpio function for mmc
Piotr Wilczek [Wed, 2 Jan 2013 21:31:00 +0000 (21:31 +0000)]
arm:exynos4:pinmux: Modify the gpio function for mmc

This patch add pinmux settings for Exynos4 for mmc0 and mmc2

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agospl:falcon:trats Update Trats default board configuration file to support FALCON...
Łukasz Majewski [Wed, 2 Jan 2013 06:06:02 +0000 (06:06 +0000)]
spl:falcon:trats Update Trats default board configuration file to support FALCON MODE

Support for a new command (defined at envs) - spl_export generates
the ATAGS image necessary for fast boot. Afterwards, it is stored
at ext4 partition.

Generated image format:
CRC [4B] SIZE [4B] PAYLOAD(ATAGS/DT) [SIZE]

Remarks:
- CRC is calculated only for PAYLOAD
- SIZE is the size of PAYLOAD

It is important to adjust ${splsize} when large image is generated.
It is defined as hex, since ext4 related commands expect it.

The ${spladdr} environment variable corresponds to
CONFIG_SYS_SPL_ARGS_ADDR

Additionally definitions for DFU have been refactored and support for
EFI has been added as well.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS: EXYNOS4X12: extract Exynos4x12 IPs clock frequency
Chander Kashyap [Sun, 7 Oct 2012 01:43:17 +0000 (01:43 +0000)]
EXYNOS: EXYNOS4X12: extract Exynos4x12 IPs clock frequency

Adds functions to extract clock frequency of Exynos4x12 IPs.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoSMDK5250: config: Add configuration file for SMDK5250 board
Hatim RV [Tue, 11 Dec 2012 00:52:49 +0000 (00:52 +0000)]
SMDK5250: config: Add configuration file for SMDK5250 board

Add the configuration file for exynos5250 based SMDK5250 board.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoexynos5: config: Rename the smdk5250.h to exynos5250-dt.h
Hatim RV [Tue, 11 Dec 2012 00:52:48 +0000 (00:52 +0000)]
exynos5: config: Rename the smdk5250.h to exynos5250-dt.h

Create a common configuration file for all exynos5250 based boards.
Going forward we will be using DT based driver discovery for all the boards
based on Exynos5. The different boards added will have there own config.h files
which internally will include this file and specify their specific DT files.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoexynos5: Add DT based driver for SMC911X ethernet
Hatim RV [Tue, 11 Dec 2012 00:52:47 +0000 (00:52 +0000)]
exynos5: Add DT based driver for SMC911X ethernet

Add device tree based ethernet driver for SMC911X controller on
SMDK5250 boards.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agofdt: exynos5: Add DT node definition for SROM and SMSC9215
Hatim RV [Tue, 11 Dec 2012 00:52:46 +0000 (00:52 +0000)]
fdt: exynos5: Add DT node definition for SROM and SMSC9215

Add the compatibility string and constant for the ethernet driver
so the device tree parsing code can recognize it.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: FDT: add initial dts file for EXYNOS5250, SMDK5250
Hatim RV [Tue, 11 Dec 2012 00:52:45 +0000 (00:52 +0000)]
EXYNOS5: FDT: add initial dts file for EXYNOS5250, SMDK5250

This patch adds initial dts file for EXYNOS5250 SoC. This dts
file currently include only ethernet devices and properties. More
devices to be added in subsequent patches.
Also add the dts file for SMDK5250 board which uses the EXYNOS5250
dts file.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS: EXYNOS4X12: Add gpio structure for EXYNOS4X12
Chander Kashyap [Tue, 25 Dec 2012 20:13:42 +0000 (20:13 +0000)]
EXYNOS: EXYNOS4X12: Add gpio structure for EXYNOS4X12

This patch adds gpio structure for Exynos4x12.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS: EXYNOS4X12: Add clock structure for EXYNOS4X12
Chander Kashyap [Tue, 25 Dec 2012 20:13:40 +0000 (20:13 +0000)]
EXYNOS: EXYNOS4X12: Add clock structure for EXYNOS4X12

This patch adds clock structure for Exynos4x12.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS: EXYNOS4X12: Populate Exynos4x12 register addresses
Chander Kashyap [Tue, 25 Dec 2012 20:13:38 +0000 (20:13 +0000)]
EXYNOS: EXYNOS4X12: Populate Exynos4x12 register addresses

This patch populates base addresses of Exynos4x12 registers.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoMerge samsung, imx, tegra into u-boot-arm/master
Albert ARIBAUD [Sat, 22 Dec 2012 10:59:14 +0000 (11:59 +0100)]
Merge samsung, imx, tegra into u-boot-arm/master

This commit merges branches from samsung, imx and tegra
meant to fix merge issues between u-boot/master and
u-boot-arm/master, as well as a few manual merge fixes.

11 years agoMerge remote-tracking branch 'u-boot/master' into u-boot-arm-merged
Allen Martin [Wed, 19 Dec 2012 21:02:36 +0000 (13:02 -0800)]
Merge remote-tracking branch 'u-boot/master' into u-boot-arm-merged

Conflicts:
README
arch/arm/cpu/armv7/exynos/clock.c
board/samsung/universal_c210/universal.c
drivers/misc/Makefile
drivers/power/power_fsl.c
include/configs/mx35pdk.h
include/configs/mx53loco.h
include/configs/seaboard.h

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Tue, 18 Dec 2012 01:39:50 +0000 (18:39 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-net

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Tom Rini [Tue, 18 Dec 2012 01:39:45 +0000 (18:39 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

11 years agonet: sh_eth: add support for SH7752
Yoshihiro Shimoda [Sun, 4 Nov 2012 15:54:30 +0000 (15:54 +0000)]
net: sh_eth: add support for SH7752

SH7752 has two fast ethernet controllers and two gigabit ethernet
controllers. It is similar to SH7757.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
11 years agonet: Fix endianness bug in link-local
Joe Hershberger [Mon, 5 Nov 2012 06:13:45 +0000 (06:13 +0000)]
net: Fix endianness bug in link-local

The ip is stored in network order, so we can't test it in host order.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Kim Phillips <kim.phillips@freescale.com>
11 years agonet: Add tftp speed indication
Simon Glass [Thu, 11 Oct 2012 13:57:36 +0000 (13:57 +0000)]
net: Add tftp speed indication

This prints a tftp speed indication after the download completes. This
is the 3.6 MiB/s indicator below.

Tegra2 (SeaBoard) # tftp ...
Using asx0 device
TFTP from server 172.22.72.144; our IP address is 172.22.73.81
Filename '/tftpboot/uImage-user-seaboard-1'.
Load address: 0x408000
Loading: #################################################
         3.6 MiB/s
done

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
11 years agopowerpc: remove not used CONFIG_SYS_TFTP_LOADADDR
trem [Sat, 6 Oct 2012 04:25:56 +0000 (04:25 +0000)]
powerpc: remove not used CONFIG_SYS_TFTP_LOADADDR

CONFIG_SYS_TFTP_LOADADDR is defined on severals boards,
but it's never used. So we can safely removed it.

Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
11 years agophy: Add support for Marvell 88E1118R
Michal Simek [Tue, 7 Aug 2012 02:23:07 +0000 (02:23 +0000)]
phy: Add support for Marvell 88E1118R

Marvell 88E1118R has different uid then 88E1118.

Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Andy Fleming <afleming@freescale.com>
CC: Zang Roy-R61911 <tie-fei.zang@freescale.com>
CC: Kumar Gala <galak@kernel.crashing.org>
11 years agoe1000e : Correct Rx Threshold granularity
Ruchika Gupta [Thu, 19 Apr 2012 02:27:11 +0000 (02:27 +0000)]
e1000e : Correct Rx Threshold granularity

In e1000e driver, Rx descriptor queue is used such that hardware can add only
one descriptor at a time. So the WTHRESH granularity in RXDCTL should be set
to single descriptor. This would ensure that every time controller fills a Rx
descriptor, it is flushed to host memory. Earlier this granularity was in
cache line units i.e 2 descriptors. This leads to controller always waiting
for 2 descriptors before flushing them out. But since not more than one Rx BD
is actually available , the accumulation condition never gets hit.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Vakul Garg <vakul@freescale.com>
Acked-by: Roy Zang <tie-fei.zang@freescale.com>
11 years agom28evk/mx28evk: fix nand_update_full
Eric Benard [Tue, 11 Dec 2012 11:36:21 +0000 (11:36 +0000)]
m28evk/mx28evk: fix nand_update_full

- since commit 418396e212b59bf907dbccad997ff50f7eb61b16 nand write.raw
can take the number of page to be written as an argument. nand_update_full
is passing the size (in bytes) to nand write.raw. This value was previously
ignored but now breaks the write.
- this patch updates the default environment of these boards to provide a
pagecount instead of a size to nand write.raw.
- tested on a mx28evk with a 4k page NAND and on a custom board with a
2k page NAND.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agoMerge remote-tracking branch 'origin/master'
Scott Wood [Fri, 14 Dec 2012 22:03:55 +0000 (16:03 -0600)]
Merge remote-tracking branch 'origin/master'

11 years agoPrepare v2013.01-rc2 v2013.01-rc2
Tom Rini [Fri, 14 Dec 2012 21:43:22 +0000 (14:43 -0700)]
Prepare v2013.01-rc2

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoomap3_evm: Let CONFIG_EFI_PARTITION be set for SPL
Tom Rini [Thu, 13 Dec 2012 20:58:27 +0000 (13:58 -0700)]
omap3_evm: Let CONFIG_EFI_PARTITION be set for SPL

The #ifdef here is not enough to stop part_efi.c from being built, only
being unused.  And with recent changes this now leads to warnings.  The
easiest solution here is to just let the garbage collection at link time
do its job.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoenv: Handle write-once ethaddr and serial# generically
Joe Hershberger [Wed, 12 Dec 2012 04:16:37 +0000 (22:16 -0600)]
env: Handle write-once ethaddr and serial# generically

Use the variable access flags to implement the protection for ethaddr
and serial# instead of hard-coding them.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Implement the env delete command
Joe Hershberger [Wed, 12 Dec 2012 04:16:36 +0000 (22:16 -0600)]
env: Implement the env delete command

Implement a way to delete more than one variable at a time.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add setenv force support
Joe Hershberger [Wed, 12 Dec 2012 04:16:35 +0000 (22:16 -0600)]
env: Add setenv force support

Now that we have support for permissions, add a way to override them.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add support for access control to .flags
Joe Hershberger [Wed, 12 Dec 2012 04:16:34 +0000 (22:16 -0600)]
env: Add support for access control to .flags

Add support for read-only, write-once, and change-default.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add a command to display details about env flags
Joe Hershberger [Wed, 12 Dec 2012 04:16:33 +0000 (22:16 -0600)]
env: Add a command to display details about env flags

Similar to the env callback command, this will show details about the
options available, the static list, and the currently active variables.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agotools/env: Add environment variable flags support
Joe Hershberger [Wed, 12 Dec 2012 04:16:32 +0000 (22:16 -0600)]
tools/env: Add environment variable flags support

Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.  Call
env_acl_validate_setenv_params() from setenv() in fw_env.c.

If the entry is not found in the env .flags, then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.

Need to build in _ctype for isdigit for Linux.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add environment variable flags
Joe Hershberger [Wed, 12 Dec 2012 04:16:31 +0000 (22:16 -0600)]
env: Add environment variable flags

Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.

If the entry is not found in the env ".flags", then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add a silent env handler
Joe Hershberger [Wed, 12 Dec 2012 04:16:30 +0000 (22:16 -0600)]
env: Add a silent env handler

The silent variable now updates the global data flag anytime it is
changed as well as after the env relocation (in case its value is
different from the default env in such cases as NAND env)

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add a console env handler
Joe Hershberger [Wed, 12 Dec 2012 04:16:29 +0000 (22:16 -0600)]
env: Add a console env handler

Remove the hard-coded console handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add a loadaddr env handler
Joe Hershberger [Wed, 12 Dec 2012 04:16:28 +0000 (22:16 -0600)]
env: Add a loadaddr env handler

Remove the hard-coded loadaddr handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add a baudrate env handler
Joe Hershberger [Wed, 12 Dec 2012 04:16:27 +0000 (22:16 -0600)]
env: Add a baudrate env handler

Remove the hard-coded baudrate handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add a bootfile env handler
Joe Hershberger [Wed, 12 Dec 2012 04:16:26 +0000 (22:16 -0600)]
env: Add a bootfile env handler

Remove the hard-coded bootfile handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Add a command to view callbacks
Joe Hershberger [Wed, 12 Dec 2012 04:16:25 +0000 (22:16 -0600)]
env: Add a command to view callbacks

The callbacks can be bound, but are otherwise invisible.  Add a command
to show what callbacks are available.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
!!! fix callback command

11 years agoenv: Add support for callbacks to environment vars
Joe Hershberger [Wed, 12 Dec 2012 04:16:24 +0000 (22:16 -0600)]
env: Add support for callbacks to environment vars

Add support for per-variable callbacks to the "hashtable" functions.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
!!!fix comment in callback

11 years agoenv: Hide '.' variables in env print by default
Joe Hershberger [Wed, 12 Dec 2012 04:16:23 +0000 (22:16 -0600)]
env: Hide '.' variables in env print by default

When printing all variables with env print, don't print variables that
begin with '.'.  If env print is called with a '-a' switch, then
include variables that begin with '.' (just like the ls command).

Variables printed explicitly will be printed even without the -a.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Use getenv_yesno() more generally
Joe Hershberger [Wed, 12 Dec 2012 04:16:22 +0000 (22:16 -0600)]
env: Use getenv_yesno() more generally

Move the getenv_yesno() to env_common.c and change most checks for
'y' or 'n' to use this helper.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Refactor apply into change_ok
Joe Hershberger [Wed, 12 Dec 2012 04:16:21 +0000 (22:16 -0600)]
env: Refactor apply into change_ok

Move the read of the old value to inside the check function.  In some
cases it can be avoided all together and at the least the code is only
called from one place.

Also name the function and the callback to more clearly describe what
it does.

Pass the ENTRY instead of just the name for direct access to the whole
data structure.

Pass an enum to the callback that specifies the operation being approved.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Consolidate common code in hsearch_r()
Joe Hershberger [Wed, 12 Dec 2012 04:16:20 +0000 (22:16 -0600)]
env: Consolidate common code in hsearch_r()

The same chunk of code was replicated in two places and the following
changes will make that chunk grow a bit, so combine into a static func.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoenv: Refactor do_apply to a flag
Joe Hershberger [Wed, 12 Dec 2012 04:16:19 +0000 (22:16 -0600)]
env: Refactor do_apply to a flag

Use a flag in hsearch_r for insert mode passed from import to allow the
behavior be different based on use.

Now that "do_check" is called for all imports, ensure console init is
complete before updating the console on relocation import

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoMake linux kernel string funcs available to tools
Joe Hershberger [Wed, 12 Dec 2012 04:16:18 +0000 (22:16 -0600)]
Make linux kernel string funcs available to tools

isspace() and strim() are not in the typical user-mode string.h, so
put them in a separate compilation unit so that they can be built into
tools that need them independent of the other common string functions.

This allows code shared by u-boot and the linux user-mode tools to link.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agogpt: Enable support for GPT partition table restoration at Samsung's Trats
Lukasz Majewski [Tue, 11 Dec 2012 10:09:48 +0000 (11:09 +0100)]
gpt: Enable support for GPT partition table restoration at Samsung's Trats

Enable support for GPT partition table restoration 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>
11 years agogpt: Support for new "gpt" command
Piotr Wilczek [Tue, 11 Dec 2012 10:09:47 +0000 (11:09 +0100)]
gpt: Support for new "gpt" command

New command - "gpt" is supported. It restores the GPT partition table.
It looks into the given environment variable for partitions definition.
It can be enabled at target configuration file with CONFIG_CMD_GPT.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agogpt: Support for GPT (GUID Partition Table) restoration
Lukasz Majewski [Tue, 11 Dec 2012 10:09:46 +0000 (11:09 +0100)]
gpt: Support for GPT (GUID Partition Table) restoration

The restoration of GPT table (both primary and secondary) is now possible.
Function 'gpt_restore' presents example of partition restoration process.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agogpt: The leXX_to_int() calls replaced with ones defined at <compiler.h>
Chang Hyun Park [Tue, 11 Dec 2012 10:09:45 +0000 (11:09 +0100)]
gpt: The leXX_to_int() calls replaced with ones defined at <compiler.h>

Custom definitions of le_XX_to_int functions have been replaced with
standard ones, defined at <compiler.h>

Replacement of several GPT related structures members with ones
indicating its endianness and proper size.

Signed-off-by: Chang Hyun Park <heartinpiece@outlook.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agogpt:doc: GPT (GUID Partition Table) documentation
Lukasz Majewski [Tue, 11 Dec 2012 10:09:44 +0000 (11:09 +0100)]
gpt:doc: GPT (GUID Partition Table) documentation

Documentation of the GPT format.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agopart:efi: Move part_efi.h file to ./include
Lukasz Majewski [Tue, 11 Dec 2012 10:09:43 +0000 (11:09 +0100)]
part:efi: Move part_efi.h file to ./include

This move is necessary to export gpt header and GPT partition entries to be
used with other commands or subsystems.
Additionally the part_efi.h file has been cleaned-up to supress checkpatch's
warnings.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agovsprintf:fix: Change type returned by ustrtoul
Lukasz Majewski [Tue, 11 Dec 2012 10:09:42 +0000 (11:09 +0100)]
vsprintf:fix: Change type returned by ustrtoul

The ustrtoul shall convert string defined size (e.g. 1GiB) to unsigned
long type (as its name implies).

Up till now it had returned int, which might cause problems with large
numbers (GiB range), when interpreted as U2 signed numbers.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agomx25pdk: Allow booting a device tree kernel
Fabio Estevam [Tue, 11 Dec 2012 11:48:46 +0000 (11:48 +0000)]
mx25pdk: Allow booting a device tree kernel

Select CONFIG_OF_LIBFDT so that a device tree kernel can be launched.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx53loco: Fix PMIC name
Fabio Estevam [Tue, 11 Dec 2012 06:36:58 +0000 (06:36 +0000)]
mx53loco: Fix PMIC name

commit c73368150 (pmic: Extend PMIC framework to support multiple instances
of PMIC devices) has incorrectly passed the PMIC name under the FSL PMIC case.

Fix that by passing "FSL_PMIC" as the parameter of pmic_get.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Wed, 12 Dec 2012 13:51:02 +0000 (06:51 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

11 years agomips: serial: Fix busted manual relocation
Joe Hershberger [Tue, 11 Dec 2012 17:52:50 +0000 (17:52 +0000)]
mips: serial: Fix busted manual relocation

serial_initialize() must be called after relocation to adjust the
pointers to putc(), getc(), etc.  This is busted ever since the
serial driver-model-ification series.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: constify mips_io_port_base
Daniel Schwierzeck [Wed, 12 Dec 2012 12:13:48 +0000 (13:13 +0100)]
MIPS: constify mips_io_port_base

mips_io_port_base is exported as 'extern const unsigned long mips_io_port_base;'
in arch/mips/include/asm/io.h. Thus make the variable const too.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agomtd: nand: mxs: reset BCH earlier, too, to avoid NAND startup problems
Wolfram Sang [Wed, 5 Dec 2012 10:48:47 +0000 (10:48 +0000)]
mtd: nand: mxs: reset BCH earlier, too, to avoid NAND startup problems

It could happen (1 out of 100 times) that NAND did not start up correctly after
warm rebooting, so we end up with various failures or DMA timed out due to a
stalled BCH. When resetting BCH together with GPMI, the issue could not be
observed anymore (after 10000+ reboots). We probably need the consistent state
already before sending commands to NAND. This behaviour was observed in barebox
and kernel, so I assume it affects U-Boot as well. I chose to keep the extra
reset for BCH when changing the flash layout to be on the safe side.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Marek Vasut <marex@denx.de>
11 years agocmd:spl:fix: Prevent from a build error on boards, which don't support FDT
Łukasz Majewski [Thu, 6 Dec 2012 05:23:38 +0000 (05:23 +0000)]
cmd:spl:fix: Prevent from a build error on boards, which don't support FDT

Do not compile in FDT related code, when it is not supported.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoexynos: Enable hashing functions and EDID for smdk5250
Simon Glass [Wed, 5 Dec 2012 14:46:45 +0000 (14:46 +0000)]
exynos: Enable hashing functions and EDID for smdk5250

Enable SHA1/SHA256 hashing and the hash command. Also enable EDID
support for reading from an LCD.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agotpm: Add TPM stress test
Luigi Semenzato [Wed, 5 Dec 2012 14:46:44 +0000 (14:46 +0000)]
tpm: Add TPM stress test

Add a simple command to stress-test a TPM (Trusted Platform Module).

Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoconsole: Enable function to display console info
Simon Glass [Wed, 5 Dec 2012 14:46:43 +0000 (14:46 +0000)]
console: Enable function to display console info

The CONFIG_SYS_CONSOLE_INFO_QUIET option should suppress the console
information, but allow boards to display it later if required. Adjust
the code to support this.

This is used to avoid printing the information while the LCD display
is not ready, since it only becomes ready when stdio init is complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd console command to access io space registers
Vadim Bendebury [Wed, 5 Dec 2012 14:46:42 +0000 (14:46 +0000)]
Add console command to access io space registers

Provide u-boot console functions to access IO space registers. A no
thrills implementation, accessing one register at a time.

For example:
    boot > iod 80
    0080: 00000094
    boot > iod.w 80
    0080: 0094
    boot > iod.b 80
    0080: 94
    boot > iow.b 0x80 12
    boot > iod 0x80
    0080: 00000012

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agofdt: edid: Enable fdt_add_edid() function when CONFIG_LCD defined
Tom Wai-Hong Tam [Wed, 5 Dec 2012 14:46:41 +0000 (14:46 +0000)]
fdt: edid: Enable fdt_add_edid() function when CONFIG_LCD defined

This function can be used for LCDs as well as monitors.

Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoedid: Add I2C command for printing the EDID
Tom Wai-Hong Tam [Wed, 5 Dec 2012 14:46:40 +0000 (14:46 +0000)]
edid: Add I2C command for printing the EDID

Add a single command to read the EDID information over I2C.

For example:

SMDK5250 # i2c dev 7
Setting bus to 7
SMDK5250 # i2c edid 50
EDID version: 1.4
Product ID code: 305c
Manufacturer: AUO
Serial number: 00000000
Manufactured in week: 0 year: 2011
Video input definition: digital signal, voltage level 0, blank to black
Monitor is non-RGB
Maximum visible display size: 26 cm x 14 cm
Power management features: no active off, no suspend, no standby
Estabilished timings:
Standard timings:
        1366x768        60 Hz (detailed)
        1366x768        60 Hz (detailed)
Monitor ID: 2VD2K.B116XW

Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoedid: Library of EDID decode and print
Tom Wai-Hong Tam [Wed, 5 Dec 2012 14:46:39 +0000 (14:46 +0000)]
edid: Library of EDID decode and print

This implements a library for accessing EDID data from an LCD panel.
This is used to obtain information about the panel such as its
resolution and type.

This is a tidied-up version of the original code pulled from
https://github.com/ynezz/u-boot-edid.

The changes we made are:
 - removed bit fields in the struct;
 - removed endianness cases in the struct;
 - fixed some wrong definitions;
 - fixed to fit 80 columns;
 - fixed some code styles.

Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd hash command to perform hashing using various algorithms
Simon Glass [Wed, 5 Dec 2012 14:46:38 +0000 (14:46 +0000)]
Add hash command to perform hashing using various algorithms

This new command supports hashing SHA1 and SHA256. It could be extended
to others such as MD5 and the CRC algorithms. The syntax is modeled on
those:

   hash <algorithm> <address> <length> [*<dest_addr> | <dest_envvar>]

to calculate a hash, and:

   hash -v <algorithm> <address> <length> [*<verify_addr> | <verify_envvar>]

to verify a hash.

Use CONFIG_CMD_HASH to enable the command, CONFIG_SHA1 to enable SHA1 and
CONFIG_SHA256 to enable SHA256.

The existing sha1sum command remains.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosha1sum: Use generic hash layer
Simon Glass [Wed, 5 Dec 2012 14:46:37 +0000 (14:46 +0000)]
sha1sum: Use generic hash layer

Update the code to use the hash layer instead of local code.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd generic hash API
Simon Glass [Wed, 5 Dec 2012 14:46:36 +0000 (14:46 +0000)]
Add generic hash API

We have a SHA1 command and want to add a SHA256 command also. Instead of
duplicating the code, create a generic hash API which can process
commands for different algorithms.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd strcasecmp() and strncasecmp()
Simon Glass [Wed, 5 Dec 2012 14:46:35 +0000 (14:46 +0000)]
Add strcasecmp() and strncasecmp()

strncasecmp() is present as strnicmp() but disabled. Make it available
and define strcasecmp() also. There is a only a small performance penalty
to having strcasecmp() call strncasecmp(), so do this instead of a
standalone function, to save code space.

Update the prototype in arch-specific headers as needed to avoid warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosha256: Use const where possible and add watchdog function
Simon Glass [Wed, 5 Dec 2012 14:46:34 +0000 (14:46 +0000)]
sha256: Use const where possible and add watchdog function

In preparation for making the hash function common, we may as well use
const where we can.

Also add a watchdog version of the hashing function.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosha1: Use const where possible, and unsigned for input len
Simon Glass [Wed, 5 Dec 2012 14:46:33 +0000 (14:46 +0000)]
sha1: Use const where possible, and unsigned for input len

In preparation for making the hash function common, we may as well use
const where we can. Also the input length cannot be negative, but may
be very large, so use unsigned.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agostdio: remove useless strncpy
Vincent Palatin [Wed, 5 Dec 2012 14:46:32 +0000 (14:46 +0000)]
stdio: remove useless strncpy

The name is already copied when we memcpy() the whole structure.

This is because struct stdio_dev has this field:

char name[16]; /* Device name */

So the data is inline, rather than being a pointer.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoFix use of conditional LMB
Simon Glass [Wed, 5 Dec 2012 14:46:31 +0000 (14:46 +0000)]
Fix use of conditional LMB

This code was not guarded with CONFIG_LMB so failed to build on x86.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd a command to read raw blocks from a partition
Kenneth Waters [Wed, 5 Dec 2012 14:46:30 +0000 (14:46 +0000)]
Add a command to read raw blocks from a partition

Sometimes data is on a block device and within a partition, but not in a
particular filesystem.

This commands permits reading raw data from a partition.

Signed-off-by: Kenneth Waters <kwaters@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd gettime command
Anton Staaf [Wed, 5 Dec 2012 14:46:29 +0000 (14:46 +0000)]
Add gettime command

Gettime returns the current timer value.  If CONFIG_SYS_HZ is defined
then the timer value is also converted to seconds.

Tegra20 (SeaBoard) # gettime
Timer val: 7754
Seconds : 7
Remainder : 754
sys_hz = 1000

There has been some discussion about whether this is useful enough to
be included in U-Boot. The following boards do not have CONFIG_SYS_HZ
defined:

M52277EVB
M52277EVB_stmicro
M53017EVB
M54418TWR
M54418TWR_nand_mii
M54418TWR_nand_rmii
M54418TWR_nand_rmii_lowfreq
M54418TWR_serial_mii
M54418TWR_serial_rmii

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd new bootstage step for the main loop
Simon Glass [Wed, 5 Dec 2012 14:46:28 +0000 (14:46 +0000)]
Add new bootstage step for the main loop

Mark when we get to the main loop.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agogpio: remove duplicate function signature
Nikita Kiryanov [Mon, 26 Nov 2012 23:06:32 +0000 (23:06 +0000)]
gpio: remove duplicate function signature

gpio_request() appears twice in asm-generic/gpio.h
Remove one of the definitions.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
11 years agodesignware_i2c.h: Define IC_CLK only if not already defined in config file
Armando Visconti [Thu, 6 Dec 2012 00:04:19 +0000 (00:04 +0000)]
designware_i2c.h: Define IC_CLK only if not already defined in config file

Signed-off-by: Armando Visconti <armando.visconti@st.com>
11 years agodesignware_i2c.h: Fixed the correct values for SCL low/high time
Armando Visconti [Thu, 6 Dec 2012 00:04:18 +0000 (00:04 +0000)]
designware_i2c.h: Fixed the correct values for SCL low/high time

Signed-off-by: Armando Visconti <armando.visconti@st.com>
11 years agodesignware_i2c: Fixed the setting of the i2c bus speed
Armando Visconti [Thu, 6 Dec 2012 00:04:17 +0000 (00:04 +0000)]
designware_i2c: Fixed the setting of the i2c bus speed

There are three couple (hcnt/lcnt) of registers for each
speed (SS/FS/HS). The driver needs to set the proper couple
of regs according to what speed we are setting.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
11 years agodesignware_i2c: Added s/w generation of stop bit
Armando Visconti [Thu, 6 Dec 2012 00:04:16 +0000 (00:04 +0000)]
designware_i2c: Added s/w generation of stop bit

In the newer versions of designware i2c IP there is the possibility
of configuring it with IC_EMPTYFIFO_HOLD_MASTER_EN=1, which basically
requires the s/w to generate the stop bit condition directly, as
the h/w will not automatically generate it when TX_FIFO is empty.

To avoid generation of an extra 0x0 byte sent as data, the
IC_STOP command must be sent along with the last IC_CMD.

This patch always writes bit[9] of ic_data_cmd even in the
older versions, assuming that it is a noop there.

Signed-off-by: Armando Visconti <armando.visconti@st.com>