]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/log
glsdk/glsdk-u-boot.git
11 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 4 Apr 2013 09:49:32 +0000 (11:49 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

11 years agospi: mxc_spi: Fix ECSPI reset handling
Dirk Behme [Wed, 20 Mar 2013 22:03:44 +0000 (22:03 +0000)]
spi: mxc_spi: Fix ECSPI reset handling

Reviewing the ECSPI reset handling shows two issues:

1. For the enable/reset bit (MXC_CSPICTRL_EN) in the control reg
   (ECSPIx_CONGREG) the i.MX6 technical reference manual states:

   -- cut --
   ECSPIx_CONREG[0]: EN: Writing zero to this bit disables the block
   and resets the internal logic with the exception of the ECSPI_CONREG.
   -- cut --

   Note the exception mentioned: The CONREG itself isn't reset.

   Fix this by manually writing the reset value 0 to the whole register.
   This sets the EN bit to zero, too (i.e. includes the old
   ~MXC_CSPICTRL_EN).

2. We want to reset the whole SPI block here. So it makes no sense
   to first read the old value of the CONREG and write it back, later.
   This will give us the old (historic/random) value of the CONREG back.
   And doesn't reset the CONREG.

   To get a clean CONREG after the reset of the block, too, don't use
   the old (historic/random) value of the CONREG while doing the reset.
   And read the clean CONREG after the reset.

This was found while working on a SPI boot device where the i.MX6 boot
ROM has already initialized the SPI block. The initialization by the
boot ROM might be different to what the U-Boot driver wants to configure.
I.e. we need a clean reset of SPI block, including the CONREG.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoARM: bcm2835: fix get_timer() to return ms
Stephen Warren [Wed, 27 Mar 2013 18:43:23 +0000 (18:43 +0000)]
ARM: bcm2835: fix get_timer() to return ms

Apparently, CONFIG_SYS_HZ must be 1000. Change this, and fix the timer
driver to conform to this.

Have the timer implementation export a custom API get_timer_us() for use
by the BCM2835 MMC API, which needs us resolution for a HW workaround.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agoi.MX6: mx6qsabrelite: README: don't pass chip-select to sf probe command
Javier Martinez Canillas [Tue, 2 Apr 2013 23:57:23 +0000 (23:57 +0000)]
i.MX6: mx6qsabrelite: README: don't pass chip-select to sf probe command

board/freescale/mx6qsabrelite/README explain a procedure to
update the SPI-NOR on the SabreLite board without Freescale
manufacturing tool but following this procedure leads to both
"sf erase" and "sf write" failing on a mx6qsabrelite board:

MX6QSABRELITE U-Boot > sf probe 1
MX6QSABRELITE U-Boot > sf erase 0 0x40000
SPI flash erase failed
MX6QSABRELITE U-Boot > sf write 0x10800000 0 0x40000
SPI flash write failed

This is because the chip-select 1 is wrong and the correct
value is 0x7300.

Since commit c1173bd0 ("sf command: allow default bus and chip selects")
the chip-select and bus arguments for the sf probe command are optional
so let's just remove it and use "sf probe" instead.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
11 years agowandboard: Remove CONFIG_SYS_FSL_USDHC_NUM
Fabio Estevam [Mon, 1 Apr 2013 16:03:38 +0000 (16:03 +0000)]
wandboard: Remove CONFIG_SYS_FSL_USDHC_NUM

CONFIG_SYS_FSL_USDHC_NUM is not used for wandboard.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6qsabrelite: Remove duplicate 'mmc dev'
Fabio Estevam [Mon, 1 Apr 2013 16:03:37 +0000 (16:03 +0000)]
mx6qsabrelite: Remove duplicate 'mmc dev'

No need to call 'mmc dev' twice.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Remove duplicate 'mmc dev'
Fabio Estevam [Mon, 1 Apr 2013 16:03:36 +0000 (16:03 +0000)]
wandboard: Remove duplicate 'mmc dev'

No need to call 'mmc dev' twice.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6: Fix get_board_rev() for the mx6 solo case
Fabio Estevam [Wed, 27 Mar 2013 07:36:55 +0000 (07:36 +0000)]
mx6: Fix get_board_rev() for the mx6 solo case

When booting a Freescale kernel 3.0.35 on a Wandboard solo, the get_board_rev()
returns 0x62xxx, which is not a value understood by the VPU
(Video Processing Unit) library in the kernel and causes the video playback to
fail.

The expected values for get_board_rev are:
0x63xxx: For mx6quad/dual
0x61xxx: For mx6dual-lite/solo

So adjust get_board_rev() accordingly and make it as weak function, so that we
do not need to define it in every mx6 board file.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
11 years agomx23_olinuxino: Fix netboot console
Alexandre Pereira da Silva [Mon, 25 Mar 2013 18:23:45 +0000 (18:23 +0000)]
mx23_olinuxino: Fix netboot console

The netargs variable was referencing the non-existing variable
console_mainline. Change that to console variable instead.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agommc: i.MX6: fsl_esdhc: Define maximum bus width supported by a board
Abbas Raza [Mon, 25 Mar 2013 09:13:34 +0000 (09:13 +0000)]
mmc: i.MX6: fsl_esdhc: Define maximum bus width supported by a board

Maximum bus width supported by some i.MX6 boards is not 8bit like
others. In case where both host controller and card support 8bit transfers,
they agree to communicate on 8bit interface while some boards support only 4bit interface.
Due to this reason the mmc 8bit default mode fails on these boards. To rectify this,
define maximum bus width supported by these boards (4bit). If max_bus_width is not
defined, it is 0 by default and 8bit width support will be enabled in host
capabilities otherwise host capabilities are modified accordingly.

It is tested with a MMCplus card.

Signed-off-by: Abbas Raza <Abbas_Raza@mentor.com>
cc: stefano Babic <sbabic@denx.de>
cc: Andy Fleming <afleming@gmail.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
11 years agomx23_olinuxino: Change definitions to use spaces instead of tabs
Otavio Salvador [Sun, 24 Mar 2013 16:17:33 +0000 (16:17 +0000)]
mx23_olinuxino: Change definitions to use spaces instead of tabs

Change all "#define/ifdef<TAB>" sequences into "#define/ifdef<SPACE>".

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx25pdk: Enable imxdi RTC
Benoît Thébaudeau [Fri, 22 Mar 2013 09:30:29 +0000 (09:30 +0000)]
mx25pdk: Enable imxdi RTC

The mx25pdk board supports the i.MX25 DryIce RTC (imxdi), so enable it. This
allows to compile-test the imxdi driver in the mainline tree.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx6qsabrelite: README: No need to pass 'u-boot.imx'
Fabio Estevam [Wed, 20 Mar 2013 04:07:58 +0000 (04:07 +0000)]
mx6qsabrelite: README: No need to pass 'u-boot.imx'

The u-boot.imx binary is generated by default, so no need to pass it in the
'make' line.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx28evk: Introduce a new target for saving env vars to NAND
Fabio Estevam [Thu, 7 Mar 2013 11:28:19 +0000 (11:28 +0000)]
mx28evk: Introduce a new target for saving env vars to NAND

Introduce 'mx28evk_nand' target for saving environment variables into NAND.

The mx28evk board does not come with a NAND flash populated from the
factory. It comes with an empty slot (U23), which allows the insertion of a
48-pin TSOP flash device.

Tested with a K9LBG08U0D.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6qsabre{sd,auto}: Add boot mode select
Otavio Salvador [Sat, 16 Mar 2013 08:05:07 +0000 (08:05 +0000)]
mx6qsabre{sd,auto}: Add boot mode select

Adds support for 'bmode' command which let user to choose where to
boot from; this allows U-Boot to load system from another storage
without messing with jumpers.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6qsabresd: Fix card detection for invalid card id case
Otavio Salvador [Sat, 16 Mar 2013 08:05:06 +0000 (08:05 +0000)]
mx6qsabresd: Fix card detection for invalid card id case

This changes the code so in case an unkown value is passed it will
return as invalid.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6qsabresd: Document the mapping of USDHC[2-4]
Otavio Salvador [Sat, 16 Mar 2013 08:05:05 +0000 (08:05 +0000)]
mx6qsabresd: Document the mapping of USDHC[2-4]

This documents the SD card identifier so it is easier for user to spot
which card number will be used, if need.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agoMerge branch 'u-boot/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 28 Mar 2013 17:50:01 +0000 (18:50 +0100)]
Merge branch 'u-boot/master' into 'u-boot-arm/master'

Conflicts:
drivers/spi/tegra20_sflash.c
include/fdtdec.h
lib/fdtdec.c

11 years agoarmv7: do not relocate _start twice
Vincent Stehlé [Fri, 15 Mar 2013 06:54:00 +0000 (06:54 +0000)]
armv7: do not relocate _start twice

The _start symbol is already relocated, so do not add the relocation the second
time in c_runtime_cpu_setup.

This fixes e.g. the abort exception handling path, which ended in double fault
due to bad address in VBAR.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Reported-by: Lubomir Popov <lpopov@mm-sol.com>
11 years agoARM: mmu: Set domain permissions to client access
R Sricharan [Mon, 4 Mar 2013 20:04:45 +0000 (20:04 +0000)]
ARM: mmu: Set domain permissions to client access

 The 'XN' execute never bit is set in the pagetables. This will
 prevent speculative prefetches to non executable regions. But the
 domain permissions are set as master in the DACR register.
 So the pagetable attribute for 'XN' is not effective. Change the
 permissions to client.

 This fixes lot of speculative prefetch aborts seen on OMAP5
 secure devices.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Tested-by: Vincent Stehle <v-stehle@ti.com>
Cc: Vincent Stehle <v-stehle@ti.com>
Cc: Tom Rini <trini@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agoARM: mmu: Introduce weak dram_bank_setup function
R Sricharan [Mon, 4 Mar 2013 20:04:44 +0000 (20:04 +0000)]
ARM: mmu: Introduce weak dram_bank_setup function

Introduce a weak version of dram_bank_setup function
to allow a platform specific function.

This is used in the subsequent patch to setup dram region
without 'XN' attribute in order to enable the region
under client permissions.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Cc: Vincent Stehle <v-stehle@ti.com>
Cc: Tom Rini <trini@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agoARM: cache: declare set_section_dcache
Vincent Stehlé [Mon, 4 Mar 2013 20:04:43 +0000 (20:04 +0000)]
ARM: cache: declare set_section_dcache

We declare the set_section_dcache function globally in the cache header, for
later use by e.g. machine specific code.

Signed-off-by: Vincent Stehlé <v-stehle <at> ti.com>
Cc: Tom Rini <trini <at> ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agoapx4devkit: change maintainer
Veli-Pekka Peltola [Wed, 20 Mar 2013 09:08:10 +0000 (09:08 +0000)]
apx4devkit: change maintainer

As I am no longer working for Bluegiga I will pass apx4devkit maintenance
to Lauri.

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@iki.fi>
Acked-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
11 years agoimage: Add support for Plan 9
Steven Stallion [Wed, 20 Mar 2013 06:31:35 +0000 (06:31 +0000)]
image: Add support for Plan 9

Signed-off-by: Steven Stallion <sstallion@gmail.com>
Cc: Tom Rini <trini@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agocmd_ext4: BREAK and correct ext4write parameter order
Tom Rini [Wed, 20 Mar 2013 04:21:38 +0000 (04:21 +0000)]
cmd_ext4: BREAK and correct ext4write parameter order

The ext4write command was taking the in-memory address and filename path
in reverse order from the rest of the filesystem read and write
commands.  This corrects the order to be the same as fatload, etc.

Signed-off-by: Tom Rini <trini@ti.com>
11 years ago.checkpatch.conf: ignore udelay->usleep_range warnings
Matt Porter [Fri, 15 Mar 2013 10:43:48 +0000 (10:43 +0000)]
.checkpatch.conf: ignore udelay->usleep_range warnings

usleep_range() is a Linux facility, ignore it when udelay()
is encountered.

Signed-off-by: Matt Porter <mporter@ti.com>
11 years agocheckpatch.pl: Add 'debug' to the list of logFunctions
Tom Rini [Thu, 14 Mar 2013 05:36:13 +0000 (05:36 +0000)]
checkpatch.pl: Add 'debug' to the list of logFunctions

While the kernel mainly uses pr_debug(...), etc, for debug messages, we
use debug(...).  Add this to the list of logFunctions so that they are
correctly checked (and not warned against) for long string literals.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoenv_callback: Mark find_env_callback as static
Tom Rini [Tue, 12 Mar 2013 06:16:50 +0000 (06:16 +0000)]
env_callback: Mark find_env_callback as static

This is not called outside of env_callback.c so mark static, remove from
<env_callback.h>

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoMAKEALL: allow regex matches for -s option
Stephen Warren [Tue, 5 Mar 2013 11:15:01 +0000 (11:15 +0000)]
MAKEALL: allow regex matches for -s option

This allows:

MAKEALL -s tegra

to replace:

MAKEALL -s tegra20 -s tegra30 -s tegra114

The following also works:

MAKEALL -s tegra -s omap

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoMerge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 26 Mar 2013 09:40:13 +0000 (10:40 +0100)]
Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'

11 years agoMerge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 26 Mar 2013 08:51:09 +0000 (09:51 +0100)]
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'

11 years agoTegra114: MMC: Enable DT MMC driver support for Tegra114 Dalmore boards
Tom Warren [Mon, 18 Mar 2013 21:52:26 +0000 (14:52 -0700)]
Tegra114: MMC: Enable DT MMC driver support for Tegra114 Dalmore boards

Tested on my Dalmore E1611 board, eMMC and SD-Card work fine, can load
a kernel off of an SD card OK, card detect works, and the env is now
stored in eMMC (end of the 2nd 'boot' sector, same as Tegra20/30).

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: MMC: Add SD bus power-rail init routine
Tom Warren [Mon, 18 Mar 2013 21:51:20 +0000 (14:51 -0700)]
Tegra114: MMC: Add SD bus power-rail init routine

T114 requires SD bus power-rail bringup for the SDIO card on SDMMC3.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: Dalmore: Add SDIO3 pad config to pinctrl_config table
Tom Warren [Mon, 18 Mar 2013 21:47:55 +0000 (14:47 -0700)]
Tegra114: Dalmore: Add SDIO3 pad config to pinctrl_config table

SDIO1 (the SD-card slot on Dalmore) needs to have its pads setup
before the MMC driver is added.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: fdt: Add SDMMC (sdhci) nodes for T114 boards (Dalmore for now)
Tom Warren [Mon, 18 Mar 2013 21:46:46 +0000 (14:46 -0700)]
Tegra114: fdt: Add SDMMC (sdhci) nodes for T114 boards (Dalmore for now)

Took these values directly from the kernel dts files.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra114: dalmore: config: enable SPI
Allen Martin [Sat, 16 Mar 2013 18:58:14 +0000 (18:58 +0000)]
tegra114: dalmore: config: enable SPI

Turn on SPI in dalmore config file

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra114: add SPI driver
Allen Martin [Sat, 16 Mar 2013 18:58:13 +0000 (18:58 +0000)]
tegra114: add SPI driver

Add driver for tegra114 SPI controller.  This controller is not
compatible with either the tegra20 or tegra30 controllers, so it
requires a new driver.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra114: dalmore: fdt: enable dalmore SPI controller
Allen Martin [Sat, 16 Mar 2013 18:58:12 +0000 (18:58 +0000)]
tegra114: dalmore: fdt: enable dalmore SPI controller

Dalmore has a SPI flash part attached to controller 4, so enable
controller 4 and set to 25MHz.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra114: fdt: add SPI blocks
Allen Martin [Sat, 16 Mar 2013 18:58:11 +0000 (18:58 +0000)]
tegra114: fdt: add SPI blocks

Add nodes for t114 SPI controller hardware

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra114: fdt: add apbdma block
Allen Martin [Sat, 16 Mar 2013 18:58:10 +0000 (18:58 +0000)]
tegra114: fdt: add apbdma block

Add node for apbdma controller hardware.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra114: fdt: add compatible string for tegra114 SPI ctrl
Allen Martin [Sat, 16 Mar 2013 18:58:09 +0000 (18:58 +0000)]
tegra114: fdt: add compatible string for tegra114 SPI ctrl

Add "nvidia,tegra114-spi" to represent t114 SPI controller hardware.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agosf: winbond: add W25Q32DW
Allen Martin [Sat, 16 Mar 2013 18:58:08 +0000 (18:58 +0000)]
sf: winbond: add W25Q32DW

Add support for Winbond W25Q32DW 32Mbit part

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agospi: add common fdt SPI driver interface
Allen Martin [Sat, 16 Mar 2013 18:58:07 +0000 (18:58 +0000)]
spi: add common fdt SPI driver interface

Add a common interface to fdt based SPI drivers.  Each driver is
represented by a table entry in fdt_spi_drivers[].  If there are
multiple SPI drivers in the table, the first driver to return success
from spi_init() will be registered as the SPI driver.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra20: spi: move fdt probe to spi_init
Allen Martin [Sat, 16 Mar 2013 18:58:06 +0000 (18:58 +0000)]
tegra20: spi: move fdt probe to spi_init

Make the tegra20 SPI driver similar to the tegra30 (and soon to be
tegra114) SPI drivers in preparation of common fdt SPI driver front
end.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra: spi: pull register structs out of headers
Allen Martin [Sat, 16 Mar 2013 18:58:05 +0000 (18:58 +0000)]
tegra: spi: pull register structs out of headers

Move register structs from headers into .c files and use common name.
This is in preparation of making common fdt front end for SPI
drivers.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra: spi: remove non fdt support
Allen Martin [Sat, 16 Mar 2013 18:58:04 +0000 (18:58 +0000)]
tegra: spi: remove non fdt support

Remove non fdt support from tegra20 and tegra30 SPI drivers in
preparation of new common fdt based SPI driver front end.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra: spi: rename tegra SPI drivers
Allen Martin [Sat, 16 Mar 2013 18:58:03 +0000 (18:58 +0000)]
tegra: spi: rename tegra SPI drivers

Rename tegra SPI drivers to tegra20_flash and tegra20_slink in
preparation for commonization and addition of tegra114_spi.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agotegra: remove support for UART SPI switch
Allen Martin [Sat, 16 Mar 2013 18:58:02 +0000 (18:58 +0000)]
tegra: remove support for UART SPI switch

This feature was only used for tegra20 seaboard that had a pinmux
conflict on the SPI pins.  These boards were never manufactured, so
remove this support to clean up SPI driver.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sun, 24 Mar 2013 16:52:22 +0000 (17:52 +0100)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

11 years agommc: omap_hsmmc.c: only register getcd/getwp callbacks if gpio could be used
Peter Korsgaard [Thu, 21 Mar 2013 04:00:04 +0000 (04:00 +0000)]
mmc: omap_hsmmc.c: only register getcd/getwp callbacks if gpio could be used

Gets rid of warnings from omap_gpio:
ERROR : check_gpio: invalid GPIO -1

(and undefined behaviour as the -1 error code is interpreted as gpio value)

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agommc: mmc_getcd/getwp: use sensible defaults
Peter Korsgaard [Thu, 21 Mar 2013 04:00:03 +0000 (04:00 +0000)]
mmc: mmc_getcd/getwp: use sensible defaults

Let mmc_getcd() return true and mmc_getwp() false if mmc driver doesn't
provide handlers for them.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
[trini: Add braces around first if test in each case to fix warning]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoarm: Correct CONFIG_STANDALONE_LOAD_ADDR for AM33XX/OMAP* platforms
Tom Rini [Thu, 14 Mar 2013 06:49:04 +0000 (06:49 +0000)]
arm: Correct CONFIG_STANDALONE_LOAD_ADDR for AM33XX/OMAP* platforms

All of these platforms have memory starting at 0x80000000, so this is
the correct CONFIG_STANDALONE_LOAD_ADDR for all of them.

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Add better timings for the new BeagleBoard DDR3 part
Tom Rini [Thu, 21 Mar 2013 04:30:02 +0000 (04:30 +0000)]
am335x_evm: Add better timings for the new BeagleBoard DDR3 part

Tested-by: Rao Bodapati <rao@circuitco.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoti814x_evm: add ti814x evm board support
Matt Porter [Fri, 15 Mar 2013 10:07:10 +0000 (10:07 +0000)]
ti814x_evm: add ti814x evm board support

Add TI814X EVM board directory, config file, and MAINTAINERS
entry. Enable build.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
[trini: Adapt to recent omap_hsmmc requirements, Matt re-tested]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agons16550: enable quirks for ti814x
Matt Porter [Fri, 15 Mar 2013 10:07:09 +0000 (10:07 +0000)]
ns16550: enable quirks for ti814x

TI814X requires the same quirks as AM33XX to be enabled.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: support ti814x mmc reference clock
Matt Porter [Fri, 15 Mar 2013 10:07:08 +0000 (10:07 +0000)]
am33xx: support ti814x mmc reference clock

TI814x has a 192MHz hsmmc reference clock. Select that clock rate
when building for TI814x.

Signed-off-by: Matt Porter <mporter@ti.com>
11 years agoam33xx: add dmm support to emif4 library
Matt Porter [Fri, 15 Mar 2013 10:07:07 +0000 (10:07 +0000)]
am33xx: add dmm support to emif4 library

Adds a config_dmm() routine to support TI814X DMM configuration.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: add ti814x specific register definitions
Matt Porter [Fri, 15 Mar 2013 10:07:06 +0000 (10:07 +0000)]
am33xx: add ti814x specific register definitions

Support the ti814x specific register definitions within
arch-am33xx.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: refactor am33xx mux support and add ti814x support
Matt Porter [Fri, 15 Mar 2013 10:07:05 +0000 (10:07 +0000)]
am33xx: refactor am33xx mux support and add ti814x support

AM33XX and TI814X have a similar mux though the pinmux register
layout and address space differ. Add a separate ti814x mux include
to support the TI814X-specific differences.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoam33xx: refactor am33xx clocks and add ti814x support
Matt Porter [Fri, 15 Mar 2013 10:07:04 +0000 (10:07 +0000)]
am33xx: refactor am33xx clocks and add ti814x support

Split clock.c for am335x and ti814x and add ti814x specific
clock support.

Signed-off-by: Matt Porter <mporter@ti.com>
11 years agoam33xx: refactor emif4/ddr to support multiple EMIF instances
Matt Porter [Fri, 15 Mar 2013 10:07:03 +0000 (10:07 +0000)]
am33xx: refactor emif4/ddr to support multiple EMIF instances

The AM33xx emif4/ddr support closely matches what is need to support
TI814x except that TI814x has two EMIF instances. Refactor all the
emif4 helper calls and the config_ddr() init function to use an
additional instance number argument.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: convert defines from am33xx-specific to generic names
Matt Porter [Fri, 15 Mar 2013 10:07:02 +0000 (10:07 +0000)]
am33xx: convert defines from am33xx-specific to generic names

Eliminate AM33xx specific names to prepare for TI814x support
within AM33xx-land.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: Add required includes to some omap/am33xx code
Tom Rini [Thu, 14 Mar 2013 11:15:25 +0000 (11:15 +0000)]
am33xx: Add required includes to some omap/am33xx code

- In arch/arm/cpu/armv7/omap-common/timer.c,
  drivers/mtd/nand/omap_gpmc.c and drivers/net/cpsw.c add #include files
  that the driver needs but had been relying on <config.h> to bring in.
- In arch/arm/cpu/armv7/omap-common/lowlevel_init.S add <config.h>
- In am335x_evm.h and pcm051.h don't globally include
  <asm/arch/hardware.h> and <asm/arch/cpu.h> but just <asm/arch/omap.h>
  as that is the only include which defines things the config uses.

Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoigep00x0: Enable CONFIG_CMD_BOOTZ
Enric Balletbo i Serra [Fri, 15 Mar 2013 02:32:35 +0000 (02:32 +0000)]
igep00x0: Enable CONFIG_CMD_BOOTZ

With v3.9 and later of the Linux Kernel defaulting to multi-platform
images with omap2plus_defconfig, uImage isn't builtable anymore by
default.  Add CONFIG_CMD_BOOTZ so that we can still boot something the
kernel spits out.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
11 years agoARM: AM33XX: Fix typo that causes an AM duplication in CPU name.
Enric Balletbo i Serra [Fri, 15 Mar 2013 01:35:37 +0000 (01:35 +0000)]
ARM: AM33XX: Fix typo that causes an AM duplication in CPU name.

Just fix a typo displaying the CPU info. With CONFIG_DISPLAY_INFO we see
something like AMAM335X-GP rev 0 instead of AM335X-GP rev 0.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
11 years agoam335x: Enable DDR PHY dynamic power down bit for DDR3 boards
Vaibhav Hiremath [Thu, 14 Mar 2013 21:11:16 +0000 (21:11 +0000)]
am335x: Enable DDR PHY dynamic power down bit for DDR3 boards

Enable DDR PHY dynamic power down bit, which enables
powering down the IO receiver when not performing read.

This also helps in reducing overall power consumption in
low power states (suspend/standby).

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Satyanarayana, Sandhya <sandhya.satyanarayana@ti.com>
Cc: Tom Rini <trini@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoARM: tegra: enable workaround for ARM erratum 716044
Stephen Warren [Mon, 4 Mar 2013 13:29:41 +0000 (13:29 +0000)]
ARM: tegra: enable workaround for ARM erratum 716044

Tegra20 requires the workaround for this erratum. Enable it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: implement erratum 716044 workaround
Stephen Warren [Mon, 4 Mar 2013 13:29:40 +0000 (13:29 +0000)]
ARM: implement erratum 716044 workaround

Add common code to enable the workaround for ARM erratum 716044. This
will be enabled for Tegra.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoam33xx:ddr:Fix config_sdram to work for all DDR
Steve Kipisz [Fri, 8 Mar 2013 07:40:58 +0000 (07:40 +0000)]
am33xx:ddr:Fix config_sdram to work for all DDR

The original write to sdram_config is correct for DDR3 but incorrect
for DDR2 so SPL was hanging. For DDR2, the write to sdram_config
should be after the writes to ref_ctrl. This was working for DDR3
because there was a write of 0x2800 to ref_ctrl before a write
to sdram_config.

Tested on: GP EVM 1.1A (DDR2), GP EVM 1.5A (DDR3),
           Beaglebone A6 (DDR2), Beagleone Blacd A4A (DDR3)

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
11 years agoam335x_evm: Add more variables and switch to DT booting.
Koen Kooi [Thu, 14 Mar 2013 05:55:21 +0000 (05:55 +0000)]
am335x_evm: Add more variables and switch to DT booting.

Make bootcmd run findfdt so that we know what dtb file to load.  Add a
loadfdt command to load this file in.  Make mmcboot pass in ${fdtaddr}
and make the mmc section of bootcmd run loadfdt.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoam335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env
Koen Kooi [Thu, 14 Mar 2013 05:55:20 +0000 (05:55 +0000)]
am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env

The kernel is loaded from some form of ext[234] or FAT, depending on the
distribution used.  We add a bootpart variable to the environment so
that we can load from the correct mmc partition as well.  We leave
CONFIG_CMD_EXT2 for existing scripts that use ext2load.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoam335x_evm: add support for BeagleBone Black DT name
Koen Kooi [Thu, 14 Mar 2013 05:55:19 +0000 (05:55 +0000)]
am335x_evm: add support for BeagleBone Black DT name

Cc: Matt Porter <mporter@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Matt Porter <mporter@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Nishanth Menon <nm@ti.com>
11 years agoInitialise correct GPMC WAITx irq for AM33xx
Mark Jackson [Thu, 21 Feb 2013 02:49:38 +0000 (02:49 +0000)]
Initialise correct GPMC WAITx irq for AM33xx

Currently WAIT0 irq is reset and then WAIT1 irq is enabled.
Fix it such that WAIT0 irq is enabled instead.

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoAllow AM335x MPU core clock speed to be specified in the board config file
Mark Jackson [Mon, 4 Mar 2013 01:27:20 +0000 (01:27 +0000)]
Allow AM335x MPU core clock speed to be specified in the board config file

Allow AM335x MPU core clock speed to be specified in the board config file.
To use, add the following to the board's config file:-

#define CONFIG_SYS_MPUCLK <desired clock freq in MHz>

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agocm-t35: add support for loading splash image from NAND
Nikita Kiryanov [Sat, 22 Dec 2012 21:03:48 +0000 (21:03 +0000)]
cm-t35: add support for loading splash image from NAND

Add support for loading splash image from NAND

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
11 years agoMerge branch 'spi' of git://git.denx.de/u-boot-x86
Tom Rini [Wed, 20 Mar 2013 18:55:10 +0000 (14:55 -0400)]
Merge branch 'spi' of git://git.denx.de/u-boot-x86

11 years agoARM: rpi_b: enable SD controller, add related env/cmds
Stephen Warren [Tue, 29 Jan 2013 16:37:42 +0000 (16:37 +0000)]
ARM: rpi_b: enable SD controller, add related env/cmds

Enable the SD controller driver for the Raspberry Pi. Enable a number
of useful MMC, partition, and filesystem-related commands. Set up the
environment to provide standard locations for loading a kernel, DTB,
etc. Provide a boot command that loads and executes boot.scr.uimg from
the SD card; this is written considering future extensibilty to USB
storage.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agommc: add bcm2835 driver
Stephen Warren [Tue, 29 Jan 2013 16:37:41 +0000 (16:37 +0000)]
mmc: add bcm2835 driver

This adds a simple driver for the BCM2835's SD controller.

Workarounds are implemented for:
* Register writes can't be too close to each-other in time, or they will
  be lost.
* Register accesses must all be 32-bit, so implement custom accessors.

This code was extracted from:
git://github.com/gonzoua/u-boot-pi.git master
which was created by Oleksandr Tymoshenko.

Portions of the code there were obviously based on the Linux kernel at:
git://github.com/raspberrypi/linux.git rpi-3.6.y
commit f5b930b "Main bcm2708 linux port" signed-off-by Dom Cobley.

swarren changed the following for upstream:
* Removed hack udelay()s in bcm2835_sdhci_raw_writel(); setting
  SDHCI_QUIRK_WAIT_SEND_CMD appears to solve the issues.
* Remove register logging from read*/write* functions.
* Sort out confusion with min/max_freq values passed to add_sdhci().
* Use more descriptive variable names and calculations in IO accessors.
* Simplified and commented twoticks_delay calculation.
* checkpatch fixes.

Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Oleksandr Tymoshenko <gonzo@bluezbox.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Andy Fleming <afleming@gmail.com>
11 years agovideo: add a driver for the bcm2835
Stephen Warren [Tue, 29 Jan 2013 16:37:40 +0000 (16:37 +0000)]
video: add a driver for the bcm2835

The firmware running on the bcm2835 SoC's VideoCore CPU manages the
display controller. Add a simple "LCD" driver that communicates with the
firmware using the property mailbox protocol. This configures the
display and frame-buffer to match whatever physical resolution the
firmware chosen when booting, which is typically the native resolution
of the attached display device, presumably unless otherwise specified
in config.txt on the boot media.

Enable this driver in the Raspberry Pi board configuration.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
11 years agoARM: rpi_b: disable rpi_b dcache explicitly
Stephen Warren [Tue, 29 Jan 2013 16:37:39 +0000 (16:37 +0000)]
ARM: rpi_b: disable rpi_b dcache explicitly

There appears to be no implementation of flush_dcache_range() for
ARM1176, so explicitly disable dcache support to avoid references to
that function from the LCD core in the next patch. This was presumably
not noticed before simply because no drivers for the rpi_b were
attempting DMA.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agolcd: calculate line_length after lcd_ctrl_init()
Stephen Warren [Tue, 29 Jan 2013 16:37:38 +0000 (16:37 +0000)]
lcd: calculate line_length after lcd_ctrl_init()

When an LCD driver is actually driving a regular external display, e.g.
an HDMI monitor, the display resolution might not be known until the
display controller has initialized, i.e. during lcd_ctrl_init(). However,
lcd.c calculates lcd_line_length before calling this function, thus
relying on a hard-coded resolution in struct panel_info.

Instead, defer this calculation until after lcd_ctrl_init() has had the
chance to dynamically determine the resolution. This needs to happen
before lcd_clear(), since the value is used there.

grep indicates that no code outside lcd.c uses this lcd_line_length; in
particular, no lcd_ctrl_init() implementations read it.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
11 years agoARM: rpi_b: use bcm2835 mbox driver to get memory size
Stephen Warren [Tue, 29 Jan 2013 16:37:37 +0000 (16:37 +0000)]
ARM: rpi_b: use bcm2835 mbox driver to get memory size

The firmware running on the bcm2835 SoC's VideoCore CPU determines how
much of the system RAM is available for use by the ARM CPU. Previously,
U-Boot assumed that only 128MB was available, since this was the
smallest value configured by any public firmware. However, we can now
query the actual value at run-time from the firmware using the mbox
property protocol.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agoARM: bcm2835: add mailbox driver
Stephen Warren [Tue, 29 Jan 2013 16:37:36 +0000 (16:37 +0000)]
ARM: bcm2835: add mailbox driver

The BCM2835 SoC contains (at least) two CPUs; the VideoCore (a/k/a "GPU")
and the ARM CPU. The ARM CPU is often thought of as the main CPU.
However, the VideoCore actually controls the initial SoC boot, and hides
much of the hardware behind a protocol. This protocol is transported
using the SoC's mailbox hardware module.

Here, we add a very simplistic driver for the mailbox module, and define
a few structures for the property messages.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agoAdd initial support for Wandboard dual lite and solo.
Fabio Estevam [Fri, 15 Mar 2013 10:43:48 +0000 (10:43 +0000)]
Add initial support for Wandboard dual lite and solo.

Wandboard is a development board that has two variants: one version based
on mx6 dual lite and another one based on mx6 solo.

For more details about Wandboard, please refer to: http://www.wandboard.org/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoi.MX6: mx6qsabrelite: discard override of CONFIG_ARP_TIMEOUT
Eric Nelson [Sat, 9 Mar 2013 13:26:32 +0000 (13:26 +0000)]
i.MX6: mx6qsabrelite: discard override of CONFIG_ARP_TIMEOUT

Nothing on the SABRE Lite board warrants a shorter than normal
ARP timeout.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
11 years agoi.MX6: Add hdmidet command to detect attached HDMI monitor
Eric Nelson [Sat, 9 Mar 2013 07:06:09 +0000 (07:06 +0000)]
i.MX6: Add hdmidet command to detect attached HDMI monitor

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx28evk: Disable CONFIG_CMD_I2C
Fabio Estevam [Fri, 8 Mar 2013 04:47:10 +0000 (04:47 +0000)]
mx28evk: Disable CONFIG_CMD_I2C

When loading a Freescale 2.6.35 on a mx28evk the following issue is seen:

sgtl5000_hw_read: read reg error : Reg 0x00
Device with ID register 0 is not a SGTL5000

Disabling CONFIG_CMD_I2C makes the sgtl5000 probe to succeed.

Mainline kernel does not show this problem.

Until the real cause is not identified, disable 'CONFIG_CMD_I2C' for the
time being.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoimx-common: timer: fix 32-bit overflow
Knut Wohlrab [Mon, 4 Mar 2013 04:16:02 +0000 (04:16 +0000)]
imx-common: timer: fix 32-bit overflow

The i.MX6 common timer uses the 32-bit variable tbl (time base lower)
to record the overflow of the 32-bit counter. I.e. if the counter
overflows, the variable tbl does overflow, too.

To capture this overflow, use the variable tbu (time base upper), too.
Return the combined value of tbl and tbu.

lastinc is unused then, remove it.

Signed-off-by: Knut Wohlrab <knut.wohlrab@de.bosch.com>
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoconfigs: mx28evk: Use single-line comments
Fabio Estevam [Sun, 27 Jan 2013 05:52:05 +0000 (05:52 +0000)]
configs: mx28evk: Use single-line comments

No need to use multi-line style comments for single-line contents.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomxs: spl_mem_init: Align DDR2 init with FSL bootlets source
Fabio Estevam [Thu, 28 Feb 2013 12:59:19 +0000 (12:59 +0000)]
mxs: spl_mem_init: Align DDR2 init with FSL bootlets source

Currently the following kernel hang happens when loading a 2.6.35 kernel from
Freeescale on a mx28evk board:

RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Bus freq driver module loaded
IMX usb wakeup probe
usb h1 wakeup device is registered
mxs_cpu_init: cpufreq init finished
...

Loading the same kernel using the bootlets from the imx-bootlets-src-10.12.01
package, the hang does not occur.

Comparing the DDR2 initialization from the bootlets code against the U-boot
one, we can notice some mismatches, and after applying the same initialization
into U-boot the 2.6.35 kernel can boot normally.

Also tested with 'mtest' command, which runs succesfully.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Marek Vasut <marex@denx.de>
11 years agosf: Use unsigned type for buffers
Simon Glass [Mon, 11 Mar 2013 06:08:13 +0000 (06:08 +0000)]
sf: Use unsigned type for buffers

The verify code is broken on archs with signed char. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Enable time command for coreboot
Simon Glass [Mon, 11 Mar 2013 06:08:12 +0000 (06:08 +0000)]
x86: Enable time command for coreboot

This command is useful for measuring SPI flash load times and the like.
Enable gettime as well to obtain absolute time tick values.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Enable SPI flash support for coreboot
Simon Glass [Mon, 11 Mar 2013 06:08:11 +0000 (06:08 +0000)]
x86: Enable SPI flash support for coreboot

Turn on SPI flash support and related commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Add FDT SPI node for link
Simon Glass [Mon, 11 Mar 2013 06:08:10 +0000 (06:08 +0000)]
x86: Add FDT SPI node for link

Add a memory-mapped 8GB SPI chip.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Move PCI init before SPI init
Simon Glass [Mon, 11 Mar 2013 06:08:09 +0000 (06:08 +0000)]
x86: Move PCI init before SPI init

It is possible that our PCI bus will provide the SPI controller, so change
the init order to make this work.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosf: Enable FDT-based configuration and memory mapping
Simon Glass [Mon, 11 Mar 2013 06:08:08 +0000 (06:08 +0000)]
sf: Enable FDT-based configuration and memory mapping

Enable device tree control of SPI flash, and use this to implement
memory-mapped SPI flash, which is supported on Intel chips.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: spi: Set maximum write size for ICH
Simon Glass [Mon, 11 Mar 2013 06:08:07 +0000 (06:08 +0000)]
x86: spi: Set maximum write size for ICH

This SPI controller can only write 64 bytes at a time. Add this restriction
in so that 'sf write' works correct for blocks larger than 64 bytes.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosf: Respect maximum SPI write size
Simon Glass [Mon, 11 Mar 2013 06:08:06 +0000 (06:08 +0000)]
sf: Respect maximum SPI write size

Some SPI flash controllers (e.g. Intel ICH) have a limit on the number of
bytes that can be in a write transaction. Support this by breaking the
writes into multiple transactions.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agospi: Add parameter for maximum write size
Simon Glass [Mon, 11 Mar 2013 06:08:05 +0000 (06:08 +0000)]
spi: Add parameter for maximum write size

Some SPI controllers (e.g. Intel ICH) have a limit on the number of SPI
bytes that can be written at a time. Add this as a parameter so that
clients of the SPI interface can respect this value.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: spi: Add Intel ICH driver
Simon Glass [Tue, 19 Mar 2013 04:58:56 +0000 (04:58 +0000)]
x86: spi: Add Intel ICH driver

This supports Intel ICH7/9. The Intel controller is a little unusual in
that it is mostly intended for use with SPI flash, and has some
optimisations and features specifically for that application. In
particular it is not possible to support ongoing transactions that
continue over many calls with SPI_XFER_BEGIN and SPI_XFER_END.

This driver supports writes of up to 64 bytes at a time, the limit
for the controller. Future work will improve this.

Signed-off-by: Bernie Thompson <bhthompson@chromium.org>
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>