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>
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>
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.
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.
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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.
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>
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>
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.
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.
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.
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.
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.
Marek Vasut [Fri, 30 Nov 2012 18:17:07 +0000 (18:17 +0000)]
mxs: i2c: Implement algorithm to set up arbitrary i2c speed
This algorithm computes the values of TIMING{0,1,2} registers for the
MX28 I2C block. This algorithm was derived by using a scope, but the
result seems correct.
The resulting values programmed into the registers do not correlate
with the contents in datasheet. When using the values from the datasheet,
the I2C clock were completely wrong.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Wolfgang Denk <wd@denx.de>
Marek Vasut [Fri, 30 Nov 2012 18:17:06 +0000 (18:17 +0000)]
mxs: i2c: Restore speed setting after block reset
The I2C block reset configures the I2C bus speed to strange value.
Read the I2C speed from the block before reseting the block and
restore it afterwards, so the I2C operates correctly. This issue
can be replicated by doing unsuccessful I2C transfer, after such
transfer finishes, the I2C block clock speed is misconfigured.
Marek Vasut [Mon, 12 Nov 2012 14:34:31 +0000 (14:34 +0000)]
i2c: mxs: Fix TIMING2 register value
According to FSL, the value in the TIMING2 register shall be 0x00300030
instead of what's written in the datasheet. This new value correlates
with older STMP36xx datasheet. Issues were detected in Linux when this
register was misconfigured, so write this correct value.
Marek Vasut [Mon, 12 Nov 2012 14:34:28 +0000 (14:34 +0000)]
i2c: mxs: Abstract out the MXS I2C speed setup
This patch pulls out the I2C speed setup from the i2c_init() call
and implements the bus configuration lookup table with register
values that needs to be programmed into the I2C IP to run at
particular speed.
This patch is a first step towards implementing run-time I2C bus
speed configuration for the MXS I2C IP.
Marek Vasut [Mon, 12 Nov 2012 14:34:25 +0000 (14:34 +0000)]
i2c: Use __weak instead of __attribute__((weak, alias))
Use __weak from linux/compiler.h instead of __attribute__((weak, alias))
to define overridable function. This patch is intended as a cleanup patch
to bring some consistency into the code.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de>