kernel/u-boot.git
11 years agosf: Unify spi_flash write code
Jagannadha Sutradharudu Teki [Fri, 21 Jun 2013 13:49:00 +0000 (19:19 +0530)]
sf: Unify spi_flash write code

Move common flash write code into spi_flash_write_common().

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agosf: Add flag status register polling support
Jagannadha Sutradharudu Teki [Fri, 21 Jun 2013 10:26:30 +0000 (15:56 +0530)]
sf: Add flag status register polling support

Flag status register polling is required for micron 512Mb flash
devices onwards, for performing erase/program operations.

Like polling for WIP(Write-In-Progress) bit in read status register,
spi_flash_cmd_wait_ready will poll for PEC(Program-Erase-Control)
bit in flag status register.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agosf: Remove spi_flash_cmd_poll_bit()
Jagannadha Sutradharudu Teki [Sun, 26 May 2013 18:07:11 +0000 (23:37 +0530)]
sf: Remove spi_flash_cmd_poll_bit()

There is no other call other than spi_flash_cmd_wait_ready(),
hence removed spi_flash_cmd_poll_bit and use the poll status code
spi_flash_cmd_wait_ready() itself.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agosf: spansion: Add support for S25FL512S_64K
Jagannadha Sutradharudu Teki [Mon, 10 Jun 2013 18:11:57 +0000 (23:41 +0530)]
sf: spansion: Add support for S25FL512S_64K

Add support for Spansion S25FL512S_64K SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: stmicro: Add support for N25Q1024A
Jagannadha Sutradharudu Teki [Tue, 16 Apr 2013 14:53:48 +0000 (20:23 +0530)]
sf: stmicro: Add support for N25Q1024A

Add support for Numonyx N25Q1024A SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: stmicro: Add support for N25Q1024
Jagannadha Sutradharudu Teki [Tue, 16 Apr 2013 14:52:48 +0000 (20:22 +0530)]
sf: stmicro: Add support for N25Q1024

Add support for Numonyx N25Q1024 SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: stmicro: Add support for N25Q512A
Jagannadha Sutradharudu Teki [Tue, 16 Apr 2013 14:50:12 +0000 (20:20 +0530)]
sf: stmicro: Add support for N25Q512A

Add support for Numonyx N25Q512A SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: stmicro: Add support for N25Q512
Jagannadha Sutradharudu Teki [Tue, 16 Apr 2013 14:48:29 +0000 (20:18 +0530)]
sf: stmicro: Add support for N25Q512

Add support for Numonyx N25Q512 SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: Use spi_flash_addr() in write call
Jagannadha Sutradharudu Teki [Tue, 11 Jun 2013 16:06:20 +0000 (21:36 +0530)]
sf: Use spi_flash_addr() in write call

Use the existing spi_flash_addr() for 3-byte addressing
cmd filling in write call.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agosf: Add bank addr code in CONFIG_SPI_FLASH_BAR
Jagannadha Sutradharudu Teki [Wed, 19 Jun 2013 10:03:58 +0000 (15:33 +0530)]
sf: Add bank addr code in CONFIG_SPI_FLASH_BAR

Defined bank addr code on CONFIG_SPI_FLASH_BAR macro, to reduce the
size for existing boards which has < 16Mbytes SPI flashes.

It's upto user which has provision to use the bank addr code for
flashes which has > 16Mbytes.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agosf: Update sf read to support all sizes of flashes
Jagannadha Sutradharudu Teki [Fri, 31 May 2013 10:30:36 +0000 (16:00 +0530)]
sf: Update sf read to support all sizes of flashes

This patch updated the spi_flash read func to support all
sizes of flashes using bank reg addr facility.

The same support has been added in below patch for erase/write
spi_flash functions:
"sf: Support all sizes of flashes using bank addr reg facility"
(sha1: c956f600cbb0943d0afe1004cdb503f4fcd8f415)

With these new updates on sf framework, the flashes which has < 16MB
are not effected as per as performance is concern and but the
u-boot.bin size incrased ~460 bytes.

sf update(for first 16MBytes), Changes before:
U-Boot> sf update 0x1000000 0x0 0x1000000
- N25Q256
  16777216 bytes written, 0 bytes skipped in 199.72s, speed 86480 B/s
- W25Q128BV
  16777216 bytes written, 0 bytes skipped in 351.739s, speed 48913 B/s
- S25FL256S_64K
  16777216 bytes written, 0 bytes skipped in 65.659s, speed 262144 B/s

sf update(for first 16MBytes), Changes before:
U-Boot> sf update 0x1000000 0x0 0x1000000
- N25Q256
  16777216 bytes written, 0 bytes skipped in 198.953s, speed 86480 B/s
- W25Q128BV
  16777216 bytes written, 0 bytes skipped in 350.90s, speed 49200 B/s
- S25FL256S_64K
  16777216 bytes written, 0 bytes skipped in 66.521s, speed 262144 B/s

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agosf: Update sf to support all sizes of flashes
Jagannadha Sutradharudu Teki [Thu, 30 May 2013 14:54:14 +0000 (20:24 +0530)]
sf: Update sf to support all sizes of flashes

Updated the spi_flash framework to handle all sizes of flashes
using bank/extd addr reg facility

The current implementation in spi_flash supports 3-byte address mode
due to this up to 16Mbytes amount of flash is able to access for those
flashes which has an actual size of > 16MB.

As most of the flashes introduces a bank/extd address registers
for accessing the flashes in 16Mbytes of banks if the flash size
is > 16Mbytes, this new scheme will add the bank selection feature
for performing write/erase operations on all flashes.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agosf: Read flash bank addr register at probe time
Jagannadha Sutradharudu Teki [Wed, 19 Jun 2013 10:07:09 +0000 (15:37 +0530)]
sf: Read flash bank addr register at probe time

Read the flash bank addr register to get the state of bank in
a perticular flash. and also bank write happens only when there is
a change in bank selection from user.

bank read only valid for flashes which has > 16Mbytes those are
opearted in 3-byte addr mode, each bank occupies 16Mytes.

Suppose if the flash has 64Mbytes size consists of 4 banks like
bank0, bank1, bank2 and bank3.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agosf: Discover the bank addr commands
Jagannadha Sutradharudu Teki [Wed, 19 Jun 2013 10:01:23 +0000 (15:31 +0530)]
sf: Discover the bank addr commands

Bank/Extended addr commands are specific to particular
flash vendor so discover them based on the idocode0.

Assign the discovered bank commands to spi_flash members
so-that the bank read/write will use their specific operations.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: Add bank address register writing support
Jagannadha Sutradharudu Teki [Thu, 13 Jun 2013 15:07:19 +0000 (20:37 +0530)]
sf: Add bank address register writing support

This patch provides support to program a flash bank address
register.

extended/bank address register contains an information to access
the 4th byte addressing in 3-byte address mode.

reff' the spec for more details about bank addr register
in Page-63, Table 8.16
http://www.spansion.com/Support/Datasheets/S25FL128S_256S_00.pdf

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agospi: mxc_spi: Use DIV_ROUND_UP at appropriate places
Axel Lin [Fri, 14 Jun 2013 13:13:32 +0000 (21:13 +0800)]
spi: mxc_spi: Use DIV_ROUND_UP at appropriate places

This change slightly improves readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agospi: cf_qspi: Use DIV_ROUND_UP at appropriate place
Axel Lin [Fri, 14 Jun 2013 13:12:19 +0000 (21:12 +0800)]
spi: cf_qspi: Use DIV_ROUND_UP at appropriate place

This change slightly improves readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Richard Retanubun <richardretanubun@ruggedcom.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agosf: winbond: Add support for W25QXXXFV
Jagannadha Sutradharudu Teki [Thu, 30 May 2013 11:04:19 +0000 (16:34 +0530)]
sf: winbond: Add support for W25QXXXFV

Add support for Winbond W25QXXXFV SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: winbond: Add support for W25Q16DW
Jagannadha Sutradharudu Teki [Mon, 27 May 2013 19:25:00 +0000 (00:55 +0530)]
sf: winbond: Add support for W25Q16DW

Add support for Winbond W25Q16DW SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: winbond: Add support for W25Q128FW
Jagannadha Sutradharudu Teki [Mon, 27 May 2013 19:19:26 +0000 (00:49 +0530)]
sf: winbond: Add support for W25Q128FW

Add support for Winbond W25Q128FW SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: winbond: Update the names for W25Q 0x40XX ID's flash parts
Jagannadha Sutradharudu Teki [Mon, 27 May 2013 19:11:58 +0000 (00:41 +0530)]
sf: winbond: Update the names for W25Q 0x40XX ID's flash parts

Use the exact names for W25Q 0x40XX ID's flash parts, as the same
sizes of flashes comes with different ID's. so-that the distinguishes
becomes easy with this change.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: spansion: Correct name of S25FL128S 64K Sector part
Jagannadha Sutradharudu Teki [Fri, 14 Jun 2013 15:33:51 +0000 (21:03 +0530)]
sf: spansion: Correct name of S25FL128S 64K Sector part

Corrected the name of S25FL128S 64K sector part SPI flash,
S25FL128S supported has been added in below commit
"sf: spansion: Add support for S25FL128S"
(sha1: 1bfb9f156aa66cca6bb9c773867a1f02a84b14be)

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agoNET: Fix system hanging if NET device is not installed
Jim Lin [Fri, 17 May 2013 09:41:03 +0000 (17:41 +0800)]
NET: Fix system hanging if NET device is not installed

If we try to boot from NET device, NetInitLoop in net.c will be invoked.
If NET device is not installed, eth_get_dev() function will return
eth_current value, which is NULL.
When NetInitLoop is called, "eth_get_dev->enetaddr" will access
restricted memory area and therefore cause hanging.
This issue is found on Tegra30 Cardhu platform after adding
CONFIG_CMD_NET and CONFIG_CMD_DHCP in config header file.

Signed-off-by: Jim Lin <jilin@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
11 years agoimage: Use ENOENT instead of ENOMEDIUM for better compatibility
Simon Glass [Sun, 16 Jun 2013 14:46:49 +0000 (07:46 -0700)]
image: Use ENOENT instead of ENOMEDIUM for better compatibility

This error may not be defined on some platforms such as MacOS so host
compilation will fail. Use one of the more common errors instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
Tested-by: Lubomir Popov <lpopov@mm-sol.com>
11 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-mmc
Tom Rini [Fri, 14 Jun 2013 20:06:49 +0000 (16:06 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-mmc

11 years agoPrepare v2013.07-rc1 v2013.07-rc1
Tom Rini [Fri, 14 Jun 2013 15:01:39 +0000 (11:01 -0400)]
Prepare v2013.07-rc1

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoARM: tegra: make use of negative ENV_OFFSET on NVIDIA boards
Stephen Warren [Tue, 11 Jun 2013 21:14:03 +0000 (15:14 -0600)]
ARM: tegra: make use of negative ENV_OFFSET on NVIDIA boards

Use a negative value of CONFIG_ENV_OFFSET for all NVIDIA reference boards
that store the U-Boot environment in the 2nd eMMC boot partition. This
makes U-Boot agnostic to the size of the eMMC boot partition, which can
vary depending on which eMMC device was actually stuffed into the board.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agoenv_mmc: allow negative CONFIG_ENV_OFFSET
Stephen Warren [Tue, 11 Jun 2013 21:14:02 +0000 (15:14 -0600)]
env_mmc: allow negative CONFIG_ENV_OFFSET

A negative value of CONFIG_ENV_OFFSET is treated as a backwards offset
from the end of the eMMC device/partition, rather than a forwards offset
from the start.

This is useful when a single board may be stuffed with different eMMC
devices, each of which has a different capacity, and you always want the
environment to be stored at the very end of the device (or eMMC boot
partition for example).

One example of this case is NVIDIA's Ventana reference board.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agommc: report capacity for the selected partition
Stephen Warren [Tue, 11 Jun 2013 21:14:01 +0000 (15:14 -0600)]
mmc: report capacity for the selected partition

Enhance the MMC core to calculate the size of each MMC partition, and
update mmc->capacity whenever a partition is selected. This causes:

mmc dev 0 1 ; mmcinfo

... to report the size of the currently selected partition, rather than
always reporting the size of the user partition.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agoREADME: document CONFIG_ENV_IS_IN_MMC
Stephen Warren [Tue, 11 Jun 2013 21:14:00 +0000 (15:14 -0600)]
README: document CONFIG_ENV_IS_IN_MMC

Describe the meaning of CONFIG_ENV_IS_IN_MMC, and all related defines that
must or can be set when using that option.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agofsl_esdhc: Do not clear interrupt status bits until data processed
Andrew Gabbasov [Tue, 11 Jun 2013 15:34:22 +0000 (10:34 -0500)]
fsl_esdhc: Do not clear interrupt status bits until data processed

After waiting for the command completion event, the interrupt status
bits, that occured to be set by that time, are cleared by writing them
back. It is supposed, that it should be command related bits (command
complete and may be command errors).

However, in some cases the DMA already completes by that time before
the full transaction completes. The corresponding DINT bit gets set
and then cleared before even entering the loop, waiting for data part
completion. That waiting loop never gets this bit set, causing the
operation to hang. This is reported to happen, for example, for write
operation of 1 sector to upper area (block #7400000) of SanDisk Ultra II
8GB card.

The solution could be to explicitly clear only command related interrupt
status bits. However, since subsequent processing does not rely on
any command bits state, it could be easier just to remove clearing
of any bits at that point, leaving them all until all data processing
completes. After that the whole register will be cleared at once.

Also, on occasion, interrupts masking moved to before writing the command,
just for the case there should be no chance of interrupt between the first
command and interrupts masking.

Reported-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agommc: fsl_esdhc: Fix hang after 'save' command
Fabio Estevam [Tue, 28 May 2013 18:09:42 +0000 (15:09 -0300)]
mmc: fsl_esdhc: Fix hang after 'save' command

Since commit 48e0b2bd (powerpc/esdhc: Correct judgement for DATA PIO mode)
we see mx6 systems to hang after doing a 'save' command.

Revert this commit since the original 'ifdef' logic from 7b43db92
(drivers/mmc/fsl_esdhc.c: fix compiler warnings) was the correct one.

Reported-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agommc write bug fix
Ruud Commandeur [Wed, 22 May 2013 11:19:43 +0000 (13:19 +0200)]
mmc write bug fix

This patch fixes a bug related to mmc writes.

When doing fatwrites on an SD-Card, MMC bus problems can occur. Depending
on the size of the file, "MMC0: Bus busy timeout!" is reported, resulting
in an SD-Card that is no longer responding.
It appears to be, that set_cluster can be called with a size being zero.
That can be with a file that has a size being an exact multiple
(including 0) of the clustersize, but also for files that are smaller than
the size of one cluster.
The same problem occurs if the "mmc write" command is given with a block
count being 0.

By adding a check for the block count being zero in mmc_write_blocks
(drivers/mmc.c), this problem is solved.

Signed-off-by: Ruud Commandeur <rcommandeur@clb.nl>
Cc: Tom Rini <trini@ti.com>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Mats Karrman <Mats.Karrman@tritech.se>
Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agommc: sdhci: Enable 8-bit bus width only for 3.0 spec onwards
Jagannadha Sutradharudu Teki [Tue, 21 May 2013 09:31:36 +0000 (15:01 +0530)]
mmc: sdhci: Enable 8-bit bus width only for 3.0 spec onwards

CAP register don't have any information for 8-bit buswidth support
on 2.0 sdhci spec, only from 3.0 onwards bit[18] got this information.

Due to this misassignment in sdhci, mmc is setting 8-bit buswidth using
mmc_set_bus_width even if controller doesn't support.
Below change has code information.
"mmc: Properly determine maximum supported bus width"
(sha1: 7798f6dbd5e1a3030ed81a81da5dfb57c3307cac)

Bug log: <mmc plus and emmc cards)
-------
zynq-uboot> mmcinfo
Error detected in status(0x208100)!
Device: zynq_sdhci
Manufacturer ID: fe
.....

So enable 8-bit support only for 3.0 spec using CAP and for below 3.0
assign mmc->host_caps = MMC_MODE_8BIT on respective platform driver
if host have a support.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agommc: fix env in mmc with redundant compile error
Bo Shen [Wed, 15 May 2013 01:38:16 +0000 (09:38 +0800)]
mmc: fix env in mmc with redundant compile error

The commit d196bd8 (env_mmc: add support for redundant environment)
introduce the following compile error when enable redundant
environment support with MMC
---8<---
env_mmc.c:149: error: 'env_t' has no member named 'flags'
env_mmc.c:248: error: 'env_t' has no member named 'flags'
env_mmc.c:248: error: 'env_t' has no member named 'flags'
env_mmc.c:250: error: 'env_t' has no member named 'flags'
env_mmc.c:250: error: 'env_t' has no member named 'flags'
env_mmc.c:252: error: 'env_t' has no member named 'flags'
env_mmc.c:252: error: 'env_t' has no member named 'flags'
env_mmc.c:254: error: 'env_t' has no member named 'flags'
env_mmc.c:254: error: 'env_t' has no member named 'flags'
env_mmc.c:267: error: 'env_t' has no member named 'flags'
make[1]: *** [env_mmc.o] Error 1
--->8---

Add this patch to fix it

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Michael Heimpold <mhei@heimpold.de>
Signed-off-by: Andy Fleming <afleming@freescale.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Thu, 13 Jun 2013 19:18:35 +0000 (15:18 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Thu, 13 Jun 2013 19:16:15 +0000 (15:16 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

Small conflict over DRA7XX updates and adding SRAM_SCRATCH_SPACE_ADDR

Conflicts:
arch/arm/include/asm/arch-omap5/omap.h

Signed-off-by: Tom Rini <trini@ti.com>
11 years agosf: winbond: Correct the nr_blocks used for W25Q32DW
Jagannadha Sutradharudu Teki [Fri, 24 May 2013 20:43:41 +0000 (02:13 +0530)]
sf: winbond: Correct the nr_blocks used for W25Q32DW

This patch corrected the nr_blocks used for W25Q32DW SPI flash.

nr_blcoks are incorrectly assigned on below patch
"sf: winbond: add W25Q32DW"
(sha1: 772ba15474f73adc942e817cc072b6e9750836cc)

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: winbond: Add support for W25Q80BW
Jagannadha Sutradharudu Teki [Mon, 27 May 2013 07:20:50 +0000 (12:50 +0530)]
sf: winbond: Add support for W25Q80BW

Add support for Winbond W25Q80BW SPI flash.

This patch corrected the flash name, nr_blocks and
also commit message header from below patch.
"sf: winbond: add W25Q32"
(sha1: c969abc47033d6f810d3c9dbdb994ea9d691d038)

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: spansion: Update the name for S25FL256S flash
Jagannadha Sutradharudu Teki [Sat, 25 May 2013 17:33:11 +0000 (23:03 +0530)]
sf: spansion: Update the name for S25FL256S flash

As the per the ID tabl the flash is under Uniform 64-kB sector
architecture, hence updated with proper name.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agospi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
Axel Lin [Thu, 13 Jun 2013 08:21:42 +0000 (16:21 +0800)]
spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave

It's done in spi_alloc_slave(), thus remove the redundant code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agospi: tegra114_spi: Convert to use spi_alloc_slave()
Axel Lin [Thu, 13 Jun 2013 08:17:47 +0000 (16:17 +0800)]
spi: tegra114_spi: Convert to use spi_alloc_slave()

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agospi: armada100_spi: Remove unnecessary NULL test for dout and din
Axel Lin [Tue, 11 Jun 2013 13:57:31 +0000 (21:57 +0800)]
spi: armada100_spi: Remove unnecessary NULL test for dout and din

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 12 Jun 2013 20:33:49 +0000 (16:33 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

11 years agoarm: pxa: config option for PXA270 turbo mode
Sergey Yanovich [Tue, 21 May 2013 19:49:41 +0000 (23:49 +0400)]
arm: pxa: config option for PXA270 turbo mode

PXA270 CPU has turbo mode. The mode is 2.5 times faster than the
default run mode. Activating the mode early significantly speeds
up boot process.

Signed-off-by: Sergey Yanovich <ynvich@gmail.com>
11 years agoarm: pxa: Add support for ICP DAS LP-8x4x
Sergey Yanovich [Mon, 20 May 2013 21:26:00 +0000 (01:26 +0400)]
arm: pxa: Add support for ICP DAS LP-8x4x

LP-8x4x is a programmable automation controller by ICP DAS. It is
shipped with outdated U-Boot v1.3.0

This patch adds enough supports to boot the board:
 - 128M of 128M SDRAM
 - 32M of 48M NOR Flash memory
 - 1 of 4 Serial consoles (PXA FFUART)
 - 2 of 2 Ethernet controllers (DM9000)

Signed-off-by: Sergey Yanovich <ynvich@gmail.com>
Series-to: u-boot
Series-cc: marex

11 years agousb, composite: after unregister gadget driver set composite to NULL
Heiko Schocher [Tue, 4 Jun 2013 09:21:32 +0000 (11:21 +0200)]
usb, composite: after unregister gadget driver set composite to NULL

Without this, second usb_composite_register() call fails always
with -EINVAL.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
11 years agousb: ehci: add missing cache managment
Stephen Warren [Fri, 24 May 2013 21:03:17 +0000 (15:03 -0600)]
usb: ehci: add missing cache managment

Commit 8f62ca6 "usb: ehci: Support interrupt transfers via periodic list"
didn't include any cache management in the new interrupt transfer path.
It also added an extra write to or_asynclistaddr in usb_lowlevel_init(),
without having flushed out the data there.

Add the missing cache management calls, so that the code works again.

This allows the USB keyboard on Tegra's Seaboard/Springbank boards to
work.

Cc: Patrick Georgi <patrick@georgi-clan.de>
Cc: Vincent Palatin <vpalatin@chromium.org>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agousb: gadget: add Faraday FOTG210 USB gadget support
Kuo-Jung Su [Wed, 15 May 2013 07:29:24 +0000 (15:29 +0800)]
usb: gadget: add Faraday FOTG210 USB gadget support

The Faraday FOTG210 is an OTG chip which could operate
as either an EHCI Host or a USB Device at a time.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Marek Vasut <marex@denx.de>
11 years agousb: ehci: add Faraday USB 2.0 EHCI support
Kuo-Jung Su [Wed, 15 May 2013 07:29:23 +0000 (15:29 +0800)]
usb: ehci: add Faraday USB 2.0 EHCI support

This patch adds support to both Faraday FUSBH200 and FOTG210,
the differences between Faraday EHCI and standard EHCI are
listed bellow:

1. The PORTSC starts at 0x30 instead of 0x44.
2. The CONFIGFLAG(0x40) is not only un-implemented, and
   also has its address space removed.
3. Faraday EHCI is a TDI design, but it doesn't
   compatible with the general TDI implementation
   found at both U-Boot and Linux.
4. The ISOC descriptors differ from standard EHCI in
   several ways. But since U-boot doesn't support ISOC,
   we don't have to worry about that.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Marek Vasut <marex@denx.de>
11 years agousb: hub: make minimum power-on delay configurable
Kuo-Jung Su [Wed, 15 May 2013 07:29:22 +0000 (15:29 +0800)]
usb: hub: make minimum power-on delay configurable

This patch makes the minimum power-on delay for USB HUB
become configurable. The original design waits at least
100 msec here, but some EHCI controlers(e.g. Faraday EHCI)
are known to require much longer delay interval.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Marek Vasut <marex@denx.de>
11 years agousb: ehci: add weak-aliased function for PORTSC
Kuo-Jung Su [Wed, 15 May 2013 07:29:21 +0000 (15:29 +0800)]
usb: ehci: add weak-aliased function for PORTSC

There is at least one non-EHCI compliant controller (i.e. Faraday EHCI)
not only leave RESERVED and CONFIGFLAG registers un-implemented
but also has their address spaces removed.

As an result, the PORTSC register of Faraday EHCI always
starts from 0x30 instead of 0x44 in standard EHCI.

So that we'll need a weak-aliased function for abstraction.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Marek Vasut <marex@denx.de>
11 years agousb: ehci: prevent bad PORTSC register access
Kuo-Jung Su [Wed, 15 May 2013 07:29:20 +0000 (15:29 +0800)]
usb: ehci: prevent bad PORTSC register access

1. The 'index' of ehci_submit_root() is not always > 0.

   e.g.
   While it gets invoked from usb_get_descriptor(),
   the 'index' is always a '0'. (See ch.9 of USB2.0)

2. The PORTSC register is not always required, and thus it
   should only report a port error when necessary.
   It would cause a port scan failure if the ehci_submit_root()
   always gets terminated by a port error.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Marek Vasut <marex@denx.de>
11 years agousb: gadget: Use unaligned access for wMaxPacketSize
Vivek Gautam [Mon, 13 May 2013 10:23:38 +0000 (15:53 +0530)]
usb: gadget: Use unaligned access for wMaxPacketSize

Use get_unaligned() while fetching wMaxPacketSize to avoid
voilating any alignment rules.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Dalek <luk0104@gmail.com>
Cc: Marek Vasut <marex@denx.de>
11 years agousb: Use get_unaligned() in usb_endpoint_maxp() for wMaxPacketSize
Vivek Gautam [Mon, 13 May 2013 10:23:37 +0000 (15:53 +0530)]
usb: Use get_unaligned() in usb_endpoint_maxp() for wMaxPacketSize

Use unaligned access to fetch wMaxPacketSize in usb_endpoint_maxp()
api.
In its absence we see following data abort message:
==============================================================
data abort

    MAYBE you should read doc/README.arm-unaligned-accesses

pc : [<bf794e24>]          lr : [<bf794e1c>]
sp : bf37c7b0  ip : 0000002f     fp : 00000000
r10: 00000000  r9 : 00000002     r8 : bf37fecc
r7 : 00000001  r6 : bf7d8931     r5 : bf7d891c  r4 : bf7d8800
r3 : bf7d65b0  r2 : 00000002     r1 : bf7d65b4  r0 : 00000027
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...
==============================================================

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Marek Vasut <marex@denx.de>
11 years agousb: asix: Move software resets to basic_init
Julius Werner [Sat, 11 May 2013 20:35:02 +0000 (13:35 -0700)]
usb: asix: Move software resets to basic_init

The ASIX driver calls a basic_init() function during get_info(), so that
not all initialization tasks need to be redone on every init().
Unfortunately, the most important one is still triggered too often: the
driver does a full port and MII reset on every asix_init(), requiring up
to several seconds to reestablish the link.

This patch confines that software reset into the asix_basic_init()
function so that it will only be executed once. This saves about a
second of boot time on systems using BOOTP.

Note: this patch was previously submitted many moons ago as:

   usb: usbeth: asix: Do a fast init if link already established

That patch seens to have been lost or forgotten, so this is a rebased
version. It is tested on snow with a Asix USB dongle (Cisco).

Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
11 years agousb: Correct CLEAR_FEATURE code in ehci-hcd
Simon Glass [Sat, 11 May 2013 02:49:00 +0000 (19:49 -0700)]
usb: Correct CLEAR_FEATURE code in ehci-hcd

This commit broke USB2 on link (Chromebook Pixel):

  020bbcb usb: hub: Power-cycle on root-hub ports

However the root cause seems to be a missing mask and missing 'break'
in ehci-hcd.c. This patch fixes both.

On link, 'usb start' with a USB keyboard and memory stick inserted now
finds both. The keyboard works as expected. Also ext2ls shows a directory
listing from the memory stick.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb: workaround non-working keyboards.
Vincent Palatin [Sat, 11 May 2013 02:48:59 +0000 (19:48 -0700)]
usb: workaround non-working keyboards.

If the USB keyboard is not answering properly the first request on its
interrupt endpoint, just skip it and try the next one.

This workarounds an issue with a wireless mouse dongle which presents
itself both as a keyboard and a mouse but has a non-functional keyboard
interface.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 012bbf0ce0301be2482857e3f03b481dd15c2340)
Rebased to upstream/master:
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
11 years agousb: properly re-initialize the USB keyboard.
Vincent Palatin [Sat, 11 May 2013 02:48:58 +0000 (19:48 -0700)]
usb: properly re-initialize the USB keyboard.

Allow to reconfigure properly the USB keyboard driver when we enumerate
several times the USB devices and its position in the device tree has
changes.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-74xx-7xx
Tom Rini [Tue, 11 Jun 2013 22:11:47 +0000 (18:11 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-74xx-7xx

11 years agoppc: ppmc7xx: Fix possible out-of-bound access
Marek Vasut [Mon, 20 May 2013 03:01:40 +0000 (05:01 +0200)]
ppc: ppmc7xx: Fix possible out-of-bound access

The flash_info_t->start[] field is limited in size by CONFIG_SYS_MAX_FLASH_SECT
macro, which is set to 19 for this board in the board config file. If we inspect
the board/ppmc7xx/flash.c closely, especially the flash_get_size() function, we
can notice the "switch ((long)flashtest)" at around line 80 having a few results
which will set flash_info_t->sector_count to value higher than 19, for example
"case AMD_ID_LV640U" will set it to 128. Notice that right underneath, iteration
over flash_info_t->start[] happens and the upper bound for the interation is
flash_info_t->sector_count. Now if the sector_count is 128 as it is for the
AMD_ID_LV640U case, but the CONFIG_SYS_MAX_FLASH_SECT limiting the start[] is
only 19, an access past the start[] array much happen. Moreover, during this
iteration, the field is written to, so memory corruption is inevitable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Richard Danter <richard.danter@windriver.com>
11 years agopowerpc: fix 8xx and 82xx type-punning warnings with GCC 4.7
Scott Wood [Sat, 18 May 2013 01:01:54 +0000 (20:01 -0500)]
powerpc: fix 8xx and 82xx type-punning warnings with GCC 4.7

C99's strict aliasing rules are insane to use in low-level code such as a
bootloader, but as Wolfgang has rejected -fno-strict-aliasing in the
past, add a union so that 16-bit accesses can be performed.

Compile-tested only.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Wolfgang Denk <wd@denx.de>
11 years agocosmetic: arm: fix comments in arch/arm/lib/crt0.S
Masahiro Yamada [Wed, 15 May 2013 08:33:16 +0000 (17:33 +0900)]
cosmetic: arm: fix comments in arch/arm/lib/crt0.S

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
11 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 10 Jun 2013 16:28:37 +0000 (18:28 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

11 years agoarm/km: make local functions static
Holger Brunck [Mon, 6 May 2013 13:04:51 +0000 (15:04 +0200)]
arm/km: make local functions static

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agoarm: da830: moved pinmux configurations to the arch tree
Vishwanathrao Badarkhe, Manish [Wed, 29 May 2013 21:55:11 +0000 (21:55 +0000)]
arm: da830: moved pinmux configurations to the arch tree

Move pinmux configurations for the DA830 SoCs from board file
to the arch tree so that it can be used for all da830 based devices.
Also, avoids duplicate pinmuxing in case of NAND.

Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
Acked-by: Christian Riesch <christian.riesch@omicron.at>
11 years agoARM: DRA7: Add Maintainer
Lokesh Vutla [Fri, 7 Jun 2013 00:59:02 +0000 (00:59 +0000)]
ARM: DRA7: Add Maintainer

Adding Maintainer for DRA7xx.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoOMAP5: Enable access to auxclk registers
Lubomir Popov [Wed, 15 May 2013 04:41:01 +0000 (04:41 +0000)]
OMAP5: Enable access to auxclk registers

auxclk0 and auxclk1 are utilized on some OMAP5 boards.
Define the infrastructure needed for accessing them
without using magic numbers.

Also remove unrelated TPS62361 defines from clocks.h

Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
11 years agoARM: OMAP: I2C: New read, write and probe functions
Lubomir Popov [Sat, 1 Jun 2013 06:44:38 +0000 (06:44 +0000)]
ARM: OMAP: I2C: New read, write and probe functions

New i2c_read, i2c_write and i2c_probe functions, tested on OMAP4
(4430/60/70), OMAP5 (5430) and AM335X (3359); should work on older
OMAPs and derivatives as well. The only anticipated exception would
be the OMAP2420, which shall require driver modification.
- Rewritten i2c_read to operate correctly with all types of chips
  (old function could not read consistent data from some I2C slaves).
- Optimised i2c_write.
- New i2c_probe, performs write access vs read. The old probe could
  hang the system under certain conditions (e.g. unconfigured pads).
- The read/write/probe functions try to identify unconfigured bus.
- Status functions now read irqstatus_raw as per TRM guidelines
  (except for OMAP243X and OMAP34XX).
- Driver now supports up to I2C5 (OMAP5).

Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
Tested-by: Heiko Schocher <hs@denx.de>
11 years agoarm: Remove OMAP2420H4 and all omap24xx support
Tom Rini [Tue, 4 Jun 2013 12:02:06 +0000 (12:02 +0000)]
arm: Remove OMAP2420H4 and all omap24xx support

The omap2420H4 was the only mainline omap24xx board.  Prior to being
fixed by Jon Hunter in time for v2013.04 it had been functionally broken
for a very long time.  Remove this board as there's not been interest in
it in U-Boot for quite a long time.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoda830: add MMC support
Vishwanathrao Badarkhe, Manish [Wed, 22 May 2013 03:38:48 +0000 (03:38 +0000)]
da830: add MMC support

Add MMC support for da830 boards in order to perform
mmc operations(read,write and erase).

Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
11 years agoARM: OMAP5: Power: Add more functionality to Palmas driver
Lubomir Popov [Thu, 6 Jun 2013 04:16:40 +0000 (04:16 +0000)]
ARM: OMAP5: Power: Add more functionality to Palmas driver

Add some useful functions, and the corresponding definitions.

Add support for powering on the dra7xx_evm SD/MMC LDO
(courtesy Lokesh Vutla <lokeshvutla@ti.com>).

Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoARM: DRA7xx: EMIF: Change settings required for EVM board
Sricharan R [Thu, 30 May 2013 03:19:39 +0000 (03:19 +0000)]
ARM: DRA7xx: EMIF: Change settings required for EVM board

DRA7 EVM board has the below configuration. Adding the
settings for the same here.

   2Gb_1_35V_DDR3L part * 2 on EMIF1
   2Gb_1_35V_DDR3L part * 4 on EMIF2

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: DRA7xx: clocks: Update PLL values
Lokesh Vutla [Thu, 30 May 2013 03:19:38 +0000 (03:19 +0000)]
ARM: DRA7xx: clocks: Update PLL values

Update PLL values.
SYS_CLKSEL value for 20MHz is changed to 2. In other platforms
SYS_CLKSEL value 2 represents reserved. But in sys_clk array
ind 1 is used for 13Mhz. Since other platforms are not using
13Mhz, reusing index 1 for 20MHz.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
11 years agoARM: DRA7xx: Update pinmux data
Lokesh Vutla [Thu, 30 May 2013 03:19:37 +0000 (03:19 +0000)]
ARM: DRA7xx: Update pinmux data

Updating pinmux data as specified in the latest DM

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
11 years agommc: omap_hsmmc: Update pbias programming
Balaji T K [Thu, 6 Jun 2013 05:04:32 +0000 (05:04 +0000)]
mmc: omap_hsmmc: Update pbias programming

Update pbias programming sequence for OMAP5 ES2.0/DRA7

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: DRA7xx: Correct SRAM END address
Sricharan R [Thu, 30 May 2013 03:19:35 +0000 (03:19 +0000)]
ARM: DRA7xx: Correct SRAM END address

NON SECURE SRAM is 512KB in DRA7xx devices.
So fixing it here.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: DRA7xx: Correct the SYS_CLK to 20MHZ
Sricharan R [Thu, 30 May 2013 03:19:34 +0000 (03:19 +0000)]
ARM: DRA7xx: Correct the SYS_CLK to 20MHZ

The sys_clk on the dra evm board is 20MHZ.
Changing the configuration for the same.
And also moving V_SCLK, V_OSCK defines to
arch/clock.h for OMAP4+ boards.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: DRA7xx: Change the Debug UART to UART1
Sricharan R [Thu, 30 May 2013 03:19:33 +0000 (03:19 +0000)]
ARM: DRA7xx: Change the Debug UART to UART1

Serial UART is connected to UART1. So add the change
for the same.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
11 years agoARM: DRA7xx: Do not enable srcomp for DRA7xx Soc's
Lokesh Vutla [Thu, 30 May 2013 03:19:32 +0000 (03:19 +0000)]
ARM: DRA7xx: Do not enable srcomp for DRA7xx Soc's

Slew rate compensation cells are not present for DRA7xx
Soc's. So return from function srcomp_enable() if soc is not
OMAP54xx.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: OMAP5: DRA7xx: support class 0 optimized voltages
Nishanth Menon [Thu, 30 May 2013 03:19:31 +0000 (03:19 +0000)]
ARM: OMAP5: DRA7xx: support class 0 optimized voltages

DRA752 now uses AVS Class 0 voltages which are voltages in efuse.

This means that we can now use the optimized voltages which are
stored as mV values in efuse and program PMIC accordingly.

This allows us to go with higher OPP as needed in the system without
the need for implementing complex AVS logic.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: DRA7xx: clocks: Fixing i2c_init for PMIC
Lokesh Vutla [Thu, 30 May 2013 03:19:30 +0000 (03:19 +0000)]
ARM: DRA7xx: clocks: Fixing i2c_init for PMIC

In DRA7xx Soc's voltage scaling is done using GPI2C.
So i2c_init should happen before scaling. I2C driver
uses __udelay which needs timer to be initialized.
So moving timer_init just before voltage scaling.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: DRA7xx: power Add support for tps659038 PMIC
Lokesh Vutla [Thu, 30 May 2013 03:19:29 +0000 (03:19 +0000)]
ARM: DRA7xx: power Add support for tps659038 PMIC

TPS659038 is the power IC used in DRA7XX boards.
Adding support for this and also adding pmic data
for DRA7XX boards.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: DRA7xx: Add control id code for DRA7xx
Lokesh Vutla [Thu, 30 May 2013 03:19:28 +0000 (03:19 +0000)]
ARM: DRA7xx: Add control id code for DRA7xx

The registers that are used for device identification
are changed from OMAP5 to DRA7xx.
Using the correct registers for DRA7xx.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: OMAP4+: pmic: Make generic bus init and write functions
Lokesh Vutla [Thu, 30 May 2013 02:54:33 +0000 (02:54 +0000)]
ARM: OMAP4+: pmic: Make generic bus init and write functions

Voltage scaling can be done in two ways:
-> Using SR I2C
-> Using GP I2C
In order to support both, have a function pointer in pmic_data
so that we can call as per our requirement.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: OMAP2+: Rename asm/arch/clocks.h asm/arch/clock.h
Lokesh Vutla [Thu, 30 May 2013 02:54:32 +0000 (02:54 +0000)]
ARM: OMAP2+: Rename asm/arch/clocks.h asm/arch/clock.h

To be consistent with other ARM platforms,
renaming asm/arch-omap*/clocks.h to asm/arch-omap*/clock.h

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: OMAP5: clocks: Do not enable sgx clocks
Sricharan R [Thu, 30 May 2013 02:54:31 +0000 (02:54 +0000)]
ARM: OMAP5: clocks: Do not enable sgx clocks

SGX clocks should be enabled only for OMAP5 ES1.0.
So this can be removed.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoARM: OMAP4+: Cleanup header files
Lokesh Vutla [Thu, 30 May 2013 02:54:30 +0000 (02:54 +0000)]
ARM: OMAP4+: Cleanup header files

After having the u-boot clean up series, there are
many definitions that are unused in header files.
Removing all those unused ones.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
11 years agoOMAP5: Fix bug in omap5_es1_prcm struct
Lubomir Popov [Sun, 26 May 2013 10:03:17 +0000 (10:03 +0000)]
OMAP5: Fix bug in omap5_es1_prcm struct

The newly introduced function setup_warmreset_time(), called
from within prcm_init(), tries to write to the prm_rsttime
OMAP5 register. The struct member holding this register's
address is however initialized for OMAP5 ES2.0 only. On ES1.0
devices this uninitialized value causes a second (warm) reset
at startup.

Add .prm_rsttime address init to the ES1.0 struct.

Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
Acked-by: Tom Rini <trini@ti.com>
11 years agoOMAP5: add ABB setup for MPU voltage domain
Andrii Tseglytskyi [Mon, 20 May 2013 22:42:09 +0000 (22:42 +0000)]
OMAP5: add ABB setup for MPU voltage domain

Patch adds a call of abb_setup() function, and proper registers
definitions needed for ABB setup sequence. ABB is initialized
for MPU voltage domain.

Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
11 years agoOMAP3+: introduce generic ABB support
Andrii Tseglytskyi [Mon, 20 May 2013 22:42:08 +0000 (22:42 +0000)]
OMAP3+: introduce generic ABB support

Adaptive Body Biasing (ABB) modulates transistor bias voltages
dynamically in order to optimize switching speed versus leakage.
Adaptive Body-Bias ldos are present for some voltage domains
starting with OMAP3630. There are three modes of operation:

* Bypass - the default, it just follows the vdd voltage
* Foward Body-Bias - applies voltage bias to increase transistor
  performance at the cost of power.  Used to operate safely at high
  OPPs.
* Reverse Body-Bias - applies voltage bias to decrease leakage and
  save power.  Used to save power at lower OPPs.

Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
11 years agoam33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver
Joel A Fernandes [Tue, 7 May 2013 05:52:55 +0000 (05:52 +0000)]
am33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver

Not doing so breaks cases where CPSW is not required such as for USB RNDIS network boot.

Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
11 years agoMIPS: asm/errno.h: switch to asm-generic/errno.h
Daniel Schwierzeck [Sat, 8 Jun 2013 17:23:12 +0000 (19:23 +0200)]
MIPS: asm/errno.h: switch to asm-generic/errno.h

This fixes several warnings like

In file included from ./u-boot/include/linux/mtd/mtd.h:13:0,
                 from env_onenand.c:37:
./u-boot/build/vct_platinumavc_onenand_small/include2/asm/errno.h:52:0: warning: "ENOMSG" redefined [enabled by default]

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: fix __raw_* IO accessors
Gabor Juhos [Wed, 20 Feb 2013 22:03:01 +0000 (22:03 +0000)]
MIPS: fix __raw_* IO accessors

The purpose of the __raw* IO accessors is to provide
IO access in native-endian order. However in the current
MIPS implementation, the 16 and 32 bit variants of the
__raw accessors are swapping the values on big-endian
systems if the CONFIG_SWAP_IO_SPACE option is enabled.

The patch changes the IO accessor macros to fix this
broken behaviour.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
11 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sat, 8 Jun 2013 12:35:10 +0000 (14:35 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

Conflicts:
drivers/serial/Makefile

11 years agopci: introduce CONFIG_PCI_INDIRECT_BRIDGE option
Gabor Juhos [Thu, 30 May 2013 07:06:12 +0000 (07:06 +0000)]
pci: introduce CONFIG_PCI_INDIRECT_BRIDGE option

The pci_indirect.c file is always compiled when
CONFIG_PCI is defined although the indirect PCI
bridge support is not needed by every board.

Introduce a new CONFIG_PCI_INDIRECT_BRIDGE
config option and only compile indirect PCI
bridge support if this options is enabled.

Also add the new option into the configuration
files of the boards which needs that.

Compile tested for powerpc, x86, arm and nds32.
MAKEALL results:

powerpc:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 641
  Boards with warnings but no errors: 2 ( ELPPC MPC8323ERDB )
  ----------------------------------------------------------
  Note: the warnings for ELPPC and MPC8323ERDB are present even
  without the actual patch.

x86:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 1
  ----------------------------------------------------------

arm:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 311
  ----------------------------------------------------------

nds32:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 3
  ----------------------------------------------------------

Cc: Tom Rini <trini@ti.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
11 years agofdt: remove unaligned access in fdt_fixup_ethernet()
Stephen Warren [Mon, 27 May 2013 18:01:19 +0000 (18:01 +0000)]
fdt: remove unaligned access in fdt_fixup_ethernet()

Some ARM compilers may emit code that makes unaligned accesses when
faced with constructs such as:

char mac[16] = "ethaddr";

Replace this with a strcpy() call instead to avoid this. strcpy() is
used here, rather than replacing all usage of the mac variable with the
string itself, since the loop itself sprintf()s to the variable each
iteration, so strcpy() is doing basically the same thing.

Reported-by: Florian Meier
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agogeneric_board: reduce the redundancy of gd_t struct members
Masahiro Yamada [Mon, 27 May 2013 00:37:30 +0000 (00:37 +0000)]
generic_board: reduce the redundancy of gd_t struct members

This commit refactors common/board_f.c and common/board_r.c
in order to delete the dest_addr and dest_addr_sp from
gd_t struct.

As mentioned as follows in include/asm-generic/global_data.h,

  /* TODO: is this the same as relocaddr, or something else? */
  unsigned long dest_addr;        /* Post-relocation address of U-Boot */

dest_addr is the same as relocaddr.
Likewise, dest_addr_sp is the same as start_addr_sp.

It seemed dest_addr/dest_addr_sp was used only as a scratch variable
to calculate relocaddr/start_addr_sp, respectively.

With a little refactoring, we can delete dest_addr and dest_addr_sp.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
11 years agoam335x: enable falcon boot mode for mmc (raw and fat) and nand
Peter Korsgaard [Mon, 13 May 2013 08:36:30 +0000 (08:36 +0000)]
am335x: enable falcon boot mode for mmc (raw and fat) and nand

Jump into full u-boot mode if a 'c' character is received on the uart.

We need to adjust the spl bss/malloc area to not overlap with the
loadaddr of the kernel (sdram + 32k), so move it past u-boot instead.

For raw mmc, we store the kernel parameter area in the free space after
the MBR (if used). For nand, we use the last sector of the partition
reserved for u-boot.

This also enables the spl command in the full u-boot so the kernel
parameter area snapshot can be created.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agospl_mmc: add Falcon mode support for raw variant
Peter Korsgaard [Mon, 13 May 2013 08:36:29 +0000 (08:36 +0000)]
spl_mmc: add Falcon mode support for raw variant

If Falcon mode support is enabled (and the system isn't directed into
booting u-boot), it will instead try to load kernel from sector
CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR and
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS of kernel argument parameters
starting from sector CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>