kernel/u-boot.git
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>
11 years agodesignware_i2c.c: Added the support for MULTI_BUS
Armando Visconti [Thu, 6 Dec 2012 00:04:15 +0000 (00:04 +0000)]
designware_i2c.c: Added the support for MULTI_BUS

This patch adds the capability to switch between 10
different I2C busses (from 0 to 9).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
11 years agodrivers:i2c: Modify I2C driver for Exynos4
Piotr Wilczek [Tue, 20 Nov 2012 02:19:05 +0000 (02:19 +0000)]
drivers:i2c: Modify I2C driver for Exynos4

This patch modifies the S3C i2c driver to support both Exynos4 and Exynos5

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
11 years agoexynos:pinmux: Add pinmux support for i2c
Piotr Wilczek [Tue, 20 Nov 2012 02:19:04 +0000 (02:19 +0000)]
exynos:pinmux: Add pinmux support for i2c

This patch add pinmux for I2C for Exynos4

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
11 years agoexynos:cpu: Add Exynos4 I2C spacing
Piotr Wilczek [Tue, 20 Nov 2012 02:19:03 +0000 (02:19 +0000)]
exynos:cpu: Add Exynos4 I2C spacing

This patch add the spacing for i2c for Exynos4

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
11 years agoexynos:clock: Add i2c clock
Piotr Wilczek [Tue, 20 Nov 2012 02:19:02 +0000 (02:19 +0000)]
exynos:clock: Add i2c clock

This patch adds i2c clock for Exynos4

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
11 years agoomap24xx_i2c: Handle OMAP5 like OMAP2,3,4
Vincent Stehlé [Mon, 3 Dec 2012 06:07:21 +0000 (06:07 +0000)]
omap24xx_i2c: Handle OMAP5 like OMAP2,3,4

OMAP5 has 8b i2c data register field, like OMAP2, 3 and 4. Handle in the same
way. This fixes the following error on OMAP5:

  OMAP5430 EVM # mmc rescan
  timed out in wait_for_bb: I2C_STAT=1410
  twl6035: could not turn on LDO9.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
11 years agomxs: i2c: Implement algorithm to set up arbitrary i2c speed
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>
11 years agomxs: i2c: Restore speed setting after block reset
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.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoi2c: mxs: Fix TIMING2 register value
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.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoi2c: mxs: Use i2c_set_bus_speed() in i2c_init()
Marek Vasut [Mon, 12 Nov 2012 14:34:30 +0000 (14:34 +0000)]
i2c: mxs: Use i2c_set_bus_speed() in i2c_init()

Use i2c_set_bus_speed() in i2c_init() within the mxs i2c driver
to avoid duplication of code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoi2c: mxs: Implement i2c_get/set_bus_speed()
Marek Vasut [Mon, 12 Nov 2012 14:34:29 +0000 (14:34 +0000)]
i2c: mxs: Implement i2c_get/set_bus_speed()

This patch implements the setup and retrieval functions for the I2C
bus speed on the MXS I2C IP.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoi2c: mxs: Abstract out the MXS I2C speed setup
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.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoi2c: kerneldoc: Add kerneldoc annotations to cmd_i2c.c
Marek Vasut [Mon, 12 Nov 2012 14:34:27 +0000 (14:34 +0000)]
i2c: kerneldoc: Add kerneldoc annotations to cmd_i2c.c

Add kerneldoc style documentation into cmd_i2c.c to properly describe
all overridable functions and most of the command interface.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
11 years agoi2c: Staticize local functions in mxc i2c driver
Marek Vasut [Mon, 12 Nov 2012 14:34:26 +0000 (14:34 +0000)]
i2c: Staticize local functions in mxc i2c driver

Some functions in the MXC i2c driver were not static, fix this by
making them so.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoi2c: Use __weak instead of __attribute__((weak, alias))
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>
11 years agosoft_i2c: add necessary includes for AVR32
Andreas Bießmann [Thu, 10 Feb 2011 00:30:04 +0000 (00:30 +0000)]
soft_i2c: add necessary includes for AVR32

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
11 years agowoodburn: Set gpio value in gpio_direction_output()
Fabio Estevam [Tue, 11 Dec 2012 06:19:55 +0000 (06:19 +0000)]
woodburn: Set gpio value in gpio_direction_output()

Set the gpio value in gpio_direction_output() instead of an extra gpio_set_value
call.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx25pdk: Adapt it for the new PMIC framework
Fabio Estevam [Tue, 11 Dec 2012 04:58:02 +0000 (04:58 +0000)]
mx25pdk: Adapt it for the new PMIC framework

Make the necessary adaptions for the new PMIC framework, so that mx25pdk can
be built again.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoCorrect comment to show the parameters as defined in tools/mkimage.h
Lars Rasmusson [Tue, 11 Dec 2012 10:11:52 +0000 (11:11 +0100)]
Correct comment to show the parameters as defined in tools/mkimage.h

Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>
11 years agouniversal_c210: check the NULL pointer when get the PMIC
Minkyu Kang [Mon, 10 Dec 2012 13:43:57 +0000 (22:43 +0900)]
universal_c210: check the NULL pointer when get the PMIC

PMIC 2.0 require to test return pointer from pmic_get()

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
11 years agoSMDK5250: Enable pmic MAX77686
Rajeshwari Shinde [Mon, 10 Dec 2012 01:55:48 +0000 (01:55 +0000)]
SMDK5250: Enable pmic MAX77686

Enabled pmic MAX77686 for SMDK5250.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoPOWER: MAX77686: Modified as per the latest Implementation
Rajeshwari Shinde [Mon, 10 Dec 2012 01:55:47 +0000 (01:55 +0000)]
POWER: MAX77686: Modified as per the latest Implementation

Moved the pmic_max77686.c max77686_pmic.h to drivers/power
and made required changes accordingly

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agocm-t35: enable zero bootdelay check
Nikita Kiryanov [Tue, 4 Dec 2012 23:28:26 +0000 (23:28 +0000)]
cm-t35: enable zero bootdelay check

Enable zero bootdelay check to make it possible to abort autoboot even if
bootdelay == 0

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
11 years agopower: twl6035: complain on LDO9 error
Vincent Stehlé [Mon, 3 Dec 2012 05:23:17 +0000 (05:23 +0000)]
power: twl6035: complain on LDO9 error

We handle i2c_write return code and complain in case of error. We propagate the
error, too, to allow better handling at the upper level in the future.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
11 years agoomap24xx_i2c: Handle wait_for_bb error
Vincent Stehlé [Mon, 3 Dec 2012 05:23:16 +0000 (05:23 +0000)]
omap24xx_i2c: Handle wait_for_bb error

We add a return code to wait_for_bb() to be able to report errors to the
callers properly. We in turn handle this new error code in i2c_read, i2c_write
and i2c_probe.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
11 years agogpio: add gpio_is_valid() to omap_gpio API
Nikita Kiryanov [Tue, 27 Nov 2012 22:40:57 +0000 (22:40 +0000)]
gpio: add gpio_is_valid() to omap_gpio API

Add gpio_is_valid() to omap_gpio API

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
11 years agoOMAP3: Remove unused PHYS_SDRAM_1_SIZE
Thomas Weber [Tue, 27 Nov 2012 10:32:40 +0000 (10:32 +0000)]
OMAP3: Remove unused PHYS_SDRAM_1_SIZE

Remove the unused PHYS_SDRAM_1_SIZE from OMAP3 config files.

Signed-off-by: Thomas Weber <thomas@tomweber.eu>
11 years agoam335x: cpsw: make phy address configurable
Yegor Yefremov [Mon, 26 Nov 2012 04:03:16 +0000 (04:03 +0000)]
am335x: cpsw: make phy address configurable

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
11 years agoam335x: disable internal delay for RGMII mode
Yegor Yefremov [Mon, 26 Nov 2012 03:30:42 +0000 (03:30 +0000)]
am335x: disable internal delay for RGMII mode

According to errata the AM335x device does not support internal delay
mode, so RGMII1_IDMODE and RGMII2_IDMODE must be set to 1.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
11 years agoOMAP3: TAM3517: add macros for reading eeprom
Stefano Babic [Fri, 23 Nov 2012 05:19:25 +0000 (05:19 +0000)]
OMAP3: TAM3517: add macros for reading eeprom

Added macros to read SOM information from the I2C
EEPROM.

Signed-off-by: Stefano Babic <sbabic@denx.de>
11 years agoOMAP3: fix panel timing on the mt_ventoux board
Stefano Babic [Fri, 23 Nov 2012 05:19:24 +0000 (05:19 +0000)]
OMAP3: fix panel timing on the mt_ventoux board

Signed-off-by: Stefano Babic <sbabic@denx.de>
11 years agodavinci: fixed cpu reset
Davide Bonfanti [Wed, 21 Nov 2012 00:45:12 +0000 (00:45 +0000)]
davinci: fixed cpu reset

The reset procedure works on watchdog timer while before it was modifying
TIMER_1 registers.
Tested on DM365.

Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it>
11 years agoOMAP3 SPI : Fixed bugs related to SPI transfer
ajoy [Sat, 17 Nov 2012 21:10:15 +0000 (21:10 +0000)]
OMAP3 SPI : Fixed bugs related to SPI transfer

Added posted writes (read after writes) to effect the
change immediately for channel confiuration and channel
enable register

Disable the channel to purge receieve data in TX_ONLY
mode transfer otherwise rx data will get affected by
the next immediate RX_ONLY mode transfer

Wait for the EOT bit to be set after last byte has been
loaded to TX shift register in the the TX_ONLY mode.This
ensures TX data has been completely shifted out

Disable the channel in RX_ONLY mode before reading the
last data from  RXX register to prevent the SPI slave
to transmit next word

Signed-off-by: Ajoy Kumar Das <akdas75@yahoo.in>
Cc: Tom Rini <trini@ti.com>
Cc: jacopo mondi <j.mondi@voltaelectronics.com>
11 years agoomap: emif: configure emif only when required
Lokesh Vutla [Thu, 15 Nov 2012 21:06:33 +0000 (21:06 +0000)]
omap: emif: configure emif only when required

DMM_LISA_MAP registers program whether memory is mapped
on particular EMIF or not. Irrespective of these registers
EMIF is getting configured. Correcting the same.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoOMAP: Tweak omap-common/Makefile since reset.S -> reset.c
Robert P. J. Day [Thu, 15 Nov 2012 01:21:18 +0000 (01:21 +0000)]
OMAP: Tweak omap-common/Makefile since reset.S -> reset.c

Git commit d417d1db5f9092d125ddea882ced77eaa5f3d236 replaced the
omap-common file reset.S with reset.c, but the Makefile was not
adjusted for that.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agoomap4: Add comments on some "#endif"s for readability.
Robert P. J. Day [Tue, 13 Nov 2012 08:12:08 +0000 (08:12 +0000)]
omap4: Add comments on some "#endif"s for readability.

No functional changes, simply for readability.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agoomap3: Add a few comments to "#endif"s for readability.
Robert P. J. Day [Tue, 13 Nov 2012 07:57:54 +0000 (07:57 +0000)]
omap3: Add a few comments to "#endif"s for readability.

No functional changes, just more comments for readability when a
preprocessor check spans more than a few lines, and for consistency.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agoPass sdrc timing values through board_sdrc_timings structure
Peter Barada [Tue, 13 Nov 2012 07:40:28 +0000 (07:40 +0000)]
Pass sdrc timing values through board_sdrc_timings structure

Instead of passing individual registers by value to board_get_mem_timings,
pass a board_mem_timings structure pointer for the board files to fill in.
Pass same structure pointer to write_sdrc_timings.  This saves about
90 bytes of space in SPL.

Signed-off-by: Peter Barada <peter.barada@logicpd.com>
11 years agoomap3_beagle.h: Fix comment for true/false return value.
Robert P. J. Day [Sun, 11 Nov 2012 23:20:58 +0000 (23:20 +0000)]
omap3_beagle.h: Fix comment for true/false return value.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agoam335x_evm: enable SPL NAND support
Ilya Yanok [Tue, 6 Nov 2012 13:06:35 +0000 (13:06 +0000)]
am335x_evm: enable SPL NAND support

Enable booting from NAND support from AM335x boards as well as
environment in NAND.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoam33xx_spl_bch: simple SPL nand loader for AM33XX
Ilya Yanok [Tue, 6 Nov 2012 13:06:34 +0000 (13:06 +0000)]
am33xx_spl_bch: simple SPL nand loader for AM33XX

AM33XX with BCH8 can't work with nand_spl_simple correctly
because custom read_page implementation is required for proper
syndrome generation.

This simple driver mostly duplicates nand_spl_simple but has
nand_read_page changed to suit our needs.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoomap_gpmc: BCH8 support (ELM based)
Mansoor Ahamed [Tue, 6 Nov 2012 13:06:33 +0000 (13:06 +0000)]
omap_gpmc: BCH8 support (ELM based)

This patch adds support for BCH8 error correction code to omap_gpmc
driver. We use GPMC to generate codes/syndromes but we need ELM to find
error locations from given syndrome.

Signed-off-by: Mansoor Ahamed <mansoor.ahamed@ti.com>
[ilya: merge it with omap_gpmc driver, some fixes and cleanup]
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoam33xx: add ELM support
Mansoor Ahamed [Tue, 6 Nov 2012 13:06:32 +0000 (13:06 +0000)]
am33xx: add ELM support

AM33XX has Error Location Module (ELM) that can be used in conjuction
with GPMC controller to implement BCH codes fully in hardware.
This code is mostly taken from arago tree.

Signed-off-by: Mansoor Ahamed <mansoor.ahamed@ti.com>
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoam335x_evm: enable NAND support
Ilya Yanok [Tue, 6 Nov 2012 13:06:31 +0000 (13:06 +0000)]
am335x_evm: enable NAND support

Enable NAND support for AM335X boards.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoam33xx: NAND support
Ilya Yanok [Tue, 6 Nov 2012 13:06:30 +0000 (13:06 +0000)]
am33xx: NAND support

TI AM33XX has the same GPMC controller as OMAP3 so we could just use the
existing omap_gpmc driver. This patch adds adds required
definitions/intialization.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoam335x_evm: add nand pinmux definition
Ilya Yanok [Tue, 6 Nov 2012 13:06:29 +0000 (13:06 +0000)]
am335x_evm: add nand pinmux definition

Add NAND pins mux settings for AM335X devices. Enable NAND pins
for AM335X EVM board.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoOMAP: include sys_proto.h from boot-common
Ilya Yanok [Tue, 6 Nov 2012 13:06:28 +0000 (13:06 +0000)]
OMAP: include sys_proto.h from boot-common

Include asm/arch/sys_proto.h for gpmc_init prototype.
Without this we get a warning while building for AM335x.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoomap3/mem.c: remove unused defines
Andreas Bießmann [Fri, 2 Nov 2012 00:14:57 +0000 (00:14 +0000)]
omap3/mem.c: remove unused defines

These GPMC_CS defines are a leftover from prior gpmc_init(). Commit 187af954
removed the need for these definitions but missed to remove them.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Tom Rini <trini@ti.com>
11 years agouniversal_c210: fix compiler error and compiler warning
Minkyu Kang [Sun, 9 Dec 2012 20:50:11 +0000 (20:50 +0000)]
universal_c210: fix compiler error and compiler warning

This patch fix following errors

universal.c: In function 'init_pmic_lcd':
universal.c:340: warning: implicit declaration of function 'get_pmic'
universal.c:340: warning: initialization makes pointer from integer without a cast
universal.c: In function 'lcd_power_on':
universal.c:431: warning: initialization makes pointer from integer without a cast
universal.c: At top level:
universal.c:335: warning: 'init_pmic_lcd' defined but not used

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Piotr Wilczek <p.wilczek@samsung.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot into resolve
Minkyu Kang [Mon, 10 Dec 2012 04:44:41 +0000 (13:44 +0900)]
Merge branch 'master' of git://git.denx.de/u-boot into resolve

Conflicts:
README
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 agoMIPS: constify address pointer in test_bit()
Daniel Schwierzeck [Sat, 8 Dec 2012 20:33:44 +0000 (21:33 +0100)]
MIPS: constify address pointer in test_bit()

Fix several warnings when enabling UBIFS on MIPS:

In file included from ubifs.h:2137:0,
                 from ubifs.c:26:
misc.h: In function 'ubifs_zn_dirty':
misc.h:38:2: warning: passing argument 2 of 'test_bit' discards 'const' qualifier from pointer target type [enabled by default]
../include/asm/bitops.h:569:23: note: expected 'volatile void *' but argument is of type 'const long unsigned int *'

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: fix a latent bug on initialize $gp
Zhi-zhou Zhang [Sat, 24 Nov 2012 05:07:12 +0000 (05:07 +0000)]
MIPS: fix a latent bug on initialize $gp

If bal is 8 bytes aligned, the _gp will not be 8 bytes aligned.
then the following ld insntrustion generates a Adel exception.
So here make _gp be always aligned in 8 bytes.

Signed-off-by: Zhi-zhou Zhang <zhizhou.zh@gmail.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot into master
Stefano Babic [Sat, 8 Dec 2012 11:02:45 +0000 (12:02 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot into master

Conflicts:
drivers/power/power_fsl.c
include/configs/mx35pdk.h
include/configs/mx53loco.h
include/configs/woodburn_common.h
board/woodburn/woodburn.c

These boards still use the old old PMIC framework, so they
do not merge properly after the power framework was merged into
mainline.

Fix all conflicts and update woodburn to use Power Framework.

Signed-off-by: Stefano Babic <sbabic@denx.de>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Fri, 7 Dec 2012 13:43:40 +0000 (06:43 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

11 years agofs:ext4:write: Initialize cache aligned filename buffer
Łukasz Majewski [Wed, 5 Dec 2012 08:06:40 +0000 (08:06 +0000)]
fs:ext4:write: Initialize cache aligned filename buffer

The filename buffer is allocated dynamically. It must be cache aligned.
Moreover, it is necessary to erase its content before we use it for
file name operations.

This prevents from corruption of written file names.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agofs:ext4:fix: Code refactoring to suppress compiler warnings
Łukasz Majewski [Wed, 5 Dec 2012 08:06:39 +0000 (08:06 +0000)]
fs:ext4:fix: Code refactoring to suppress compiler warnings

Several fixes to suppress compiler's (eldk-5.[12].x  gcc 4.6)
warning  [-Wunused-but-set-variable]

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agofs:ext4:write: Store block device descriptor in file system structure
Łukasz Majewski [Wed, 5 Dec 2012 08:06:38 +0000 (08:06 +0000)]
fs:ext4:write: Store block device descriptor in file system structure

The device block descriptor (block_dev_desc_t) )shall be stored at
ext4 early code (at ext4fs_set_blk_dev in this case) to be available
for latter use (like put_ext4()).

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agofs:ext4:write: Add lldiv and do_div to perform 64-32 bits division
Łukasz Majewski [Wed, 5 Dec 2012 08:06:37 +0000 (08:06 +0000)]
fs:ext4:write: Add lldiv and do_div to perform 64-32 bits division

The ext4write code has been using direct calls to 64-32 division
(/ and %).

Officially supported u-boot toolchains (eldk-5.[12].x) generate calls
to __aeabi_uldivmod(), which is niether defined in the toolchain libs
nor u-boot source tree.

Due to that, when the ext4write command has been executed, "undefined
instruction" execption was generated (since the __aeabi_uldivmod()
is not provided).

To fix this error, lldiv() for division and do_div() for modulo have
been used.

Those two functions are recommended for performing 64-32 bit number
division in u-boot.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agoChange e-mail address of Luka Perkov
Luka Perkov [Mon, 3 Dec 2012 03:24:15 +0000 (03:24 +0000)]
Change e-mail address of Luka Perkov

Change e-mail address of Luka Perkov.

Signed-off-by: Luka Perkov <luka@openwrt.org>
CC: Luka Perkov <uboot@lukaperkov.net>
11 years agoserial_pl011: Set RTS during initialization
Joshua Housh [Sun, 2 Dec 2012 17:09:26 +0000 (17:09 +0000)]
serial_pl011: Set RTS during initialization

If the pl011 is connected to another device which has hardware
flow-control on, characters are never received by the pl011.
Asserting RTS when flow-control is off will have no effect.

This is in line with how Linux behaves.

Signed-off-by: Joshua Housh <joshua.housh@calxeda.com>
Tested-by: Marek Vasut <marex@denx.de>
11 years agoMAINTAINERS: Add a pointer to the custodians page.
Robert P. J. Day [Sat, 24 Nov 2012 02:24:19 +0000 (02:24 +0000)]
MAINTAINERS: Add a pointer to the custodians page.

Since there's no obvious mention, add a brief reference to the
custodians page at www.denx.de

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agomxs: SPL: Generalize memory initialization
Otavio Salvador [Tue, 4 Dec 2012 03:15:51 +0000 (03:15 +0000)]
mxs: SPL: Generalize memory initialization

Use a generic 'dram_vals[]' array that has the full initialization
sequence and rename the initialization method so it doesn't has a
frequency on its name.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agox86: Fix coreboot config to boot on Chromebook
Simon Glass [Wed, 5 Dec 2012 15:11:27 +0000 (15:11 +0000)]
x86: Fix coreboot config to boot on Chromebook

The config is current broken. It compiles but does not boot because IDE is
enabled. Remove all IDE options, and enable SCSI instead.

Also add a working boot command and Linux bootargs, and enable command
line editing to make it easier to work with.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Turn on support for EFI's GPT in the coreboot config
Gabe Black [Wed, 5 Dec 2012 15:10:58 +0000 (15:10 +0000)]
x86: Turn on support for EFI's GPT in the coreboot config

This allows u-boot to figure out the partitions of a chrome-os install.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: coreboot: Enable video display
Simon Glass [Sat, 3 Nov 2012 11:41:42 +0000 (11:41 +0000)]
x86: coreboot: Enable video display

Enable the display on coreboot, using CFB.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Build vga video code only if CONFIG_VIDEO_VGA is defined
Simon Glass [Mon, 3 Dec 2012 13:59:47 +0000 (13:59 +0000)]
x86: Build vga video code only if CONFIG_VIDEO_VGA is defined

When running from coreboot we don't want this code, so make it
optional.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Remove video_init() prototype from u-boot-x86.h
Simon Glass [Sat, 3 Nov 2012 11:41:41 +0000 (11:41 +0000)]
x86: Remove video_init() prototype from u-boot-x86.h

This function is not intended to be exported from the video drivers, so
remove the prototype. This fixes an error:

cfb_console.c:1793:12: error: static declaration of 'video_init' follows non-static declaration

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agovideo: Check for valid FB pointer before clearing
Duncan Laurie [Sat, 3 Nov 2012 11:41:40 +0000 (11:41 +0000)]
video: Check for valid FB pointer before clearing

This command will start erasing at memory address zero
if there is not a valid framebuffer address that was found
during video_init().

This is a common case with Chrome OS devices in normal mode
when we do not execute the video option rom in coreboot.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: drop unused code in coreboot.c
Stefan Reinauer [Sat, 3 Nov 2012 11:41:39 +0000 (11:41 +0000)]
x86: drop unused code in coreboot.c

The function setup_pcat_compatibility() is weak and implemented as empty
function in board.c hence we don't have to override that with another
empty function.

monitor_flash_len is unused, drop it.

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Remove coreboot_ from file name
Stefan Reinauer [Sat, 3 Nov 2012 11:41:38 +0000 (11:41 +0000)]
x86: Remove coreboot_ from file name

... because that information is already "encoded" in the directory name.

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Provide a way to throttle port80 accesses
Vadim Bendebury [Sat, 3 Nov 2012 11:41:37 +0000 (11:41 +0000)]
x86: Provide a way to throttle port80 accesses

Some systems (like Google Link device) provide the ability to keep a
history of the target CPU port80 accesses, which is extremely handy
for debugging. The problem is that the EC handling port 80 access is
orders of magnitude slower than the AP. This causes random loss of
trace data.

This change allows to throttle port 80 accesses such that in case the
AP is trying to post faster than the EC can handle, a delay is
introduced to make sure that the post rate is throttled. Experiments
have shown that on Link the delay should be at least 350,000 of tsc
clocks.

Throttling is not being enabled by default: to enable it one would
have to set MIN_PORT80_KCLOCKS_DELAY to something like 400 and rebuild
the u-boot image. With upcoming EC code optimizations this number
could be decreased (new new value should be established
experimentally).

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Provide tick counter and frequency reference for Intel core architecture
Vadim Bendebury [Mon, 3 Dec 2012 13:59:20 +0000 (13:59 +0000)]
x86: Provide tick counter and frequency reference for Intel core architecture

Some u-boot modules rely on availability of get_ticks() and
get_tbclk() functions, reporting a free running clock and its
frequency respectively. Traditionally these functions return number
and frequency of timer interrupts.

Intel's core architecture processors however are known to run the
rdtsc instruction at a constant rate of the so called 'Max Non Turbo
ratio' times the external clock frequency which is 100MHz. This is
just as good for the timer tick functions in question.

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>