]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
12 years agospi: zynq: Use enum members for is_dual status
Jagannadha Sutradharudu Teki [Mon, 20 May 2013 07:48:13 +0000 (13:18 +0530)] 
spi: zynq: Use enum members for is_dual status

Used enum members for is_dual status instead of numericals.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Use proper messages on printf
Jagannadha Sutradharudu Teki [Mon, 13 May 2013 18:10:08 +0000 (23:40 +0530)] 
sf: Use proper messages on printf

Used proper messages on printf() calls

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Remove unnecessary idcode0 arg in spi_flash_cmd_bankaddr_read|write()
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 19:00:13 +0000 (00:30 +0530)] 
sf: Remove unnecessary idcode0 arg in spi_flash_cmd_bankaddr_read|write()

idcode0 is stored in flash->idcode0 at probe time, hence removed
unnecessary idcode0 arg in spi_flash_cmd_bankaddr_read|write()

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Fix the read bank boundary for dual parallel
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 19:14:34 +0000 (00:44 +0530)] 
sf: Fix the read bank boundary for dual parallel

In dual parallel case the read boundary should be twise the
boundary that shoud use on the single/dual stacked case.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Fix address handling in dual parallel connection mode
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 18:53:45 +0000 (00:23 +0530)] 
sf: Fix address handling in dual parallel connection mode

Address in dual parallel mode needs to divide by 2 and then pass
to the controller interms of 3-byte addressing cmds.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Unify the bank handling logic
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 18:33:10 +0000 (00:03 +0530)] 
sf: Unify the bank handling logic

Unified the bank handling logic, placed in spi_flash_bank()

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Use spi_flash_addr() in write call
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 18:12:52 +0000 (23:42 +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>
12 years agosf: Sync the spi_flash_addr() changes w.r.t mainline code
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 17:52:10 +0000 (23:22 +0530)] 
sf: Sync the spi_flash_addr() changes w.r.t mainline code

Change the spi_flash_addr() logic based on the mainline code.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: spansion|stmicro|winbond: Update the dual qspi size logic
Jagannadha Sutradharudu Teki [Tue, 21 May 2013 16:56:04 +0000 (22:26 +0530)] 
sf: spansion|stmicro|winbond: Update the dual qspi size logic

dual parallel:
double the page_size and sector_size
dual_stacked:
double the flash_size

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Add Flag status reg polling support
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 18:06:06 +0000 (23:36 +0530)] 
sf: Add Flag status reg 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 n 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>
12 years agosf: Remove spi_flash_cmd_poll_bit()
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 16:47:20 +0000 (22:17 +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>
12 years agosf: Use spi_flash_read_common() in write status poll
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 16:20:48 +0000 (21:50 +0530)] 
sf: Use spi_flash_read_common() in write status poll

Instead of using spi_xfer for SPI_XFER_BEGIN and SPI_XFER_END
separatley use common read call spi_flash_read_common() which
does the same.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agospi: zynq: Use divide by 8 baud rate for qspi dual stacked connection
Jagannadha Sutradharudu Teki [Fri, 3 May 2013 10:08:33 +0000 (15:38 +0530)] 
spi: zynq: Use divide by 8 baud rate for qspi dual stacked connection

Currently the qspi dual stacked support is available on afx boards,
there is a board hardware bug, that the controller will works on
divide by 8. hence changed the master mode baud rate divisor to /8
incase of dual stacked mode qspi.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Update the qspi dual stacked flash access logic
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 17:38:05 +0000 (23:08 +0530)] 
sf: Update the qspi dual stacked flash access logic

Updated the xilinx qspi dual stacked flash access.
Now the two memories were linearly accessable without
need a user interaction for selecting chip select.

Below are the changes for dual stacked to work:
- mtd layer -> nr_sectors/nr_blocks*2, update the U_PAGE flag
  when memory change happen.
- driver -> on LQSPI_CFG, Enable TWO_MEM[BIT:30] on LQSPI_CFG
  Enable U_PAGE[BIT:28] if U_PAGE flag set - upper memory
  Disable U_PAGE[BIT:28] if U_PAGE flag unset - lower memory

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Update the qspi dual parallel flash access logic
Jagannadha Sutradharudu Teki [Fri, 3 May 2013 09:32:24 +0000 (15:02 +0530)] 
sf: Update the qspi dual parallel flash access logic

Updated the xilinx qspi dual parallel flash access support
to use 3-byte addressing instead of 4-byte addressing used
from the mtd flash layer.

Instead of sending 4-byte addressing from mtd layer and
then the controller will again divide the offset addr by 2 and
convert the 4-byte address into 3-byte address, With this
new logic the mtd will serve the offset as offset by 2 and
send the 3-byte addressing to controller driver, as the
driver is configured as separate bus with two mem the
controller internal hardware algorithm will take care the
dual parallel functionality.

Below are the changes for dual parallel to work:
- mtd layer -> addr/2, page_size*2, nr_sectors/nr_blocks*2
- driver -> enable SEP_BUS[BIT:29],TWO_MEM[BIT:30] on LQSPI_CFG

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agospi: zynq: Use standard numbering for qspi connection topology
Jagannadha Sutradharudu Teki [Fri, 3 May 2013 08:53:21 +0000 (14:23 +0530)] 
spi: zynq: Use standard numbering for qspi connection topology

is_dual, as per hw gui.
0 - single
1 - dual stacked
2 - dual parallel

Follow these number to in-sync with hardware gui flow.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agospi: zynq_qspips: Fix coding style - long line
Michal Simek [Mon, 27 May 2013 06:11:15 +0000 (08:11 +0200)] 
spi: zynq_qspips: Fix coding style - long line

Introduced by petalinux commit:
zynq_qspips:Break infinite loop after 1000 status ...
(sha1: 6a3c44bfb3fda7f1d52938ad4b621293c8b9d2ab)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoMerge branch 'master-next' into petalinux/master-next
Michal Simek [Mon, 27 May 2013 06:09:29 +0000 (08:09 +0200)] 
Merge branch 'master-next' into petalinux/master-next

12 years agozynq_qspips:Break infinite loop after 1000 status read after trying to set qbit
Wendy Liang [Wed, 17 Apr 2013 03:59:18 +0000 (13:59 +1000)] 
zynq_qspips:Break infinite loop after 1000 status read after trying to set qbit

Currently, u-boot end up in infinite loop when the status reg of the SPI flash
is not 0 after it tries to set the quad bit. If quad bit setting fails, u-boot
hangs because of this infinite loop.

We introduce a counter. If the status register value is still not 0 after 1000
runs, it break the loop.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
12 years agopatman: Do not hardcode python path
Michal Simek [Mon, 6 May 2013 04:11:58 +0000 (04:11 +0000)] 
patman: Do not hardcode python path

Patman requires python 2.7.4 to run but it doesn't
need to be placed in /usr/bin/python.
Use env to ensure that the interpreter used is
the first one on environment's $PATH on system
with several versions of Python installed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agofpga: Remove all CONFIG_SYS_* fpga related options
Michal Simek [Wed, 1 May 2013 16:05:56 +0000 (18:05 +0200)] 
fpga: Remove all CONFIG_SYS_* fpga related options

All these macros are completely unused by any code.
CONFIG_FPGA is not a bitfield anymore.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agofpga: Check device name against bitstream name
Michal Simek [Fri, 26 Apr 2013 13:04:48 +0000 (15:04 +0200)] 
fpga: Check device name against bitstream name

Ensure that wrong bitstream won't be loaded
to current device.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agocmd: fpga: Do not include net.h
Michal Simek [Fri, 26 Apr 2013 11:26:50 +0000 (13:26 +0200)] 
cmd: fpga: Do not include net.h

There is no reason to include net.h header in fpga code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agofpga: Change the first parameter in fpga_loadbitstream
Michal Simek [Wed, 1 May 2013 17:02:02 +0000 (19:02 +0200)] 
fpga: Change the first parameter in fpga_loadbitstream

All fpga functions use devnum as int. Only fpga_loadbitstream
is using it as unsinged long dev.
This patch synchronize it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agocmd: fpga: Move fpga_loadbitstream to fpga.c
Michal Simek [Fri, 26 Apr 2013 11:12:07 +0000 (13:12 +0200)] 
cmd: fpga: Move fpga_loadbitstream to fpga.c

In bitstream decoding you can directly check device
which you want to load and in fpga.c are fpga_validate
and fpga_dev_info functions which should be used for it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agocmd: fpga: Clean coding style
Michal Simek [Fri, 26 Apr 2013 11:10:07 +0000 (13:10 +0200)] 
cmd: fpga: Clean coding style

No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agofpga: Fix debug message compilation error
Michal Simek [Fri, 26 Apr 2013 07:38:26 +0000 (09:38 +0200)] 
fpga: Fix debug message compilation error

CONFIG_FPGA in past was a bitfield where bits
were use for vendor identification.

This fix should be the part of this commit:
"Improve configuration of FPGA subsystem"
(sha1: 0133502e39ff89b67c26cb4015e0e7e8d9571184)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agofpga: Clean coding style
Michal Simek [Fri, 26 Apr 2013 06:46:56 +0000 (08:46 +0200)] 
fpga: Clean coding style

No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agopetalinux: Fix gem initialization
Michal Simek [Wed, 15 May 2013 14:08:25 +0000 (16:08 +0200)] 
petalinux: Fix gem initialization

This patch should be the part of this patch:
"zynq: Move macros to hardware.h"
(sha1: 5218ca14d5580e9241305e4abe67f961dca8c00a)

which fix enabling gem driver when baseaddr is specified.
Address of the first gem must be hardcoded because
include hardware.h is not possible because contains
C code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agopetalinux: Fix phy addr initialization
Michal Simek [Wed, 15 May 2013 14:36:33 +0000 (16:36 +0200)] 
petalinux: Fix phy addr initialization

This should be the part of patch:
"net: gem: Pass phy address to init"
(sha1: 6113546bff0eecbe85699bcafcb2e7030a1ae9ca)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: Add missing empty gpio.h
Michal Simek [Wed, 15 May 2013 13:51:01 +0000 (15:51 +0200)] 
zynq: Add missing empty gpio.h

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoRevert "mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support"
Stefan Roese [Fri, 12 Apr 2013 17:04:54 +0000 (19:04 +0200)] 
Revert "mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support"

This reverts commit 239cb9d904cfa8ab50d840a47b3306189d695c75.

Signed-off-by: Stefan Roese <sr@denx.de>
12 years agozynq: Do not enable icache
Michal Simek [Tue, 7 May 2013 13:01:20 +0000 (15:01 +0200)] 
zynq: Do not enable icache

icache is already turned on.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: slcr: Wait 100ms till clk is properly setup
Michal Simek [Wed, 8 May 2013 13:37:28 +0000 (15:37 +0200)] 
zynq: slcr: Wait 100ms till clk is properly setup

If you don't wait you will loose the first sent packet
even all bits in emacps are correctly setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonand: Upgrade header information
Michal Simek [Mon, 6 May 2013 15:22:57 +0000 (17:22 +0200)] 
nand: Upgrade header information

- driver description
- Copyright years

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonand: Rename all xnandps to zynq_nand
Michal Simek [Mon, 6 May 2013 15:18:45 +0000 (17:18 +0200)] 
nand: Rename all xnandps to zynq_nand

Use proper name for the driver before we go to mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonand: Remove ancient nand hack
Michal Simek [Mon, 6 May 2013 15:14:43 +0000 (17:14 +0200)] 
nand: Remove ancient nand hack

xnandps_device_ready

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonand: Use calloc instead of malloc
Michal Simek [Mon, 6 May 2013 14:42:54 +0000 (16:42 +0200)] 
nand: Use calloc instead of malloc

Simplify the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonane: Clean nand coding style
Michal Simek [Fri, 3 May 2013 11:00:58 +0000 (13:00 +0200)] 
nane: Clean nand coding style

Start to work with clean coding style and keep in in that shape.
Do not use uintX_t types - use u8 and u32 types instead.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonand: Clean nand initialization in mainline way
Michal Simek [Wed, 1 May 2013 14:38:28 +0000 (16:38 +0200)] 
nand: Clean nand initialization in mainline way

Move hardcoded values to hardware.h and use it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: spi: Add ZYNQ_QSPI_BASEADDR to hardware.h
Michal Simek [Wed, 1 May 2013 14:06:30 +0000 (16:06 +0200)] 
zynq: spi: Add ZYNQ_QSPI_BASEADDR to hardware.h

And also remove all references to this hardcoded value.
It is next step for synchronization with mainlne
configuration style.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agopetalinux: Remove XILINX_PS7_QSPI_FLASH_BASEADDR assignments
Michal Simek [Wed, 1 May 2013 14:02:32 +0000 (16:02 +0200)] 
petalinux: Remove XILINX_PS7_QSPI_FLASH_BASEADDR assignments

petalinux-arm-auto.h assignment is useless.
Do not assing XILINX_PS7_QSPI_FLASH_BASEADDR to XILINX_SPI_FLASH_BASEADDR
because below it is check by if defined().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agopetalinux: Remove unused CONFIG_XILINX_SPI_BASEADDR
Michal Simek [Wed, 1 May 2013 13:58:58 +0000 (15:58 +0200)] 
petalinux: Remove unused CONFIG_XILINX_SPI_BASEADDR

There is no reference in the u-boot code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoarm: lds: Remove libgcc eabi exception handling tables
Michal Simek [Thu, 9 May 2013 09:11:19 +0000 (11:11 +0200)] 
arm: lds: Remove libgcc eabi exception handling tables

Remove ARM eabi exception handling tables (for frame unwinding).
AFAICT, u-boot stubs away the frame unwiding routines, so the tables will
more or less just consume space. It should be OK to remove them.

Comment from Albert:
By default the *exidx* sections are between rodata and data, so
removing them causes many apparent changes at the binary level.
However, builds of zynq based on ARM master with the patch above vs
master with a patch mapping *exidx* sections after BSS gives identical
binaries. Thus the RFC has no functional effect.

Also, ARM EHABI states that [exception] Tables are not required for ABI
compliance at the C/Assembler level but are required for C++.

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf

So as long as we don't put any C++ code in U-Boot (a prospect that I
don't see happening any time soon), this RFC is safe and either is a
no-op or removes useless bytes from the binary.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agogpio: Add support for microblaze xilinx GPIO
Michal Simek [Wed, 24 Apr 2013 08:01:20 +0000 (10:01 +0200)] 
gpio: Add support for microblaze xilinx GPIO

Microblaze uses gpio which is connected to the system reset.
Currently gpio subsystem wasn't used for it.

Add gpio driver and change Microblaze reset logic to be done
via gpio subsystem.

There are various configurations which Microblaze can have
that's why gpio_alloc/gpio_alloc_dual(for dual channel)
function has been introduced and gpio can be allocated
dynamically.

Adding several gpios IP is also possible and supported.

For listing gpio configuration please use "gpio status" command

This patch also remove one compilation warning:
microblaze-generic.c: In function 'do_reset':
microblaze-generic.c:38:47: warning: operation on '*1073741824u'
 may be undefined [-Wsequence-point]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agomicroblaze: Also check return value from fdt_initrd
Michal Simek [Mon, 6 May 2013 05:55:41 +0000 (07:55 +0200)] 
microblaze: Also check return value from fdt_initrd

If DTS is broken do not start the kernel.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoRevert "sf: Update the qspi dual parallel flash access logic"
Jagannadha Sutradharudu Teki [Fri, 3 May 2013 07:22:52 +0000 (12:52 +0530)] 
Revert "sf: Update the qspi dual parallel flash access logic"

This reverts commit 126774ac78440069441a08907e53f640180a09e6.

This change on dual parallel needs to tune some more extent,
as few of the corner test cases this shows an invalid functionality.

Revert as of now, update this on next comming patch set.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agoRevert "spi: zynq: Set maximum write size as 0"
Jagannadha Sutradharudu Teki [Fri, 3 May 2013 07:18:22 +0000 (12:48 +0530)] 
Revert "spi: zynq: Set maximum write size as 0"

This reverts commit 28103b480eb4185470f03c5b608f0972541357c6.

This commit is not required as max_write_size is initalized to 0
in spi_alloc_slave().

This change is not required as equivalent functionality was
introduced by below commit.
"spi: zynq: Use spi_alloc_slave() in each SPI driver"
(sha1: 00e98f66ab2dd60738b657ff645cbcb9477f2037)

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: spansion: Add support for S25FL512S_256K
Jagannadha Sutradharudu Teki [Thu, 25 Apr 2013 07:01:12 +0000 (12:31 +0530)] 
sf: spansion: Add support for S25FL512S_256K

Add support for Spansion S25FL512S_256K SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: spansion: Update the name for S25FL256S flash
Jagannadha Sutradharudu Teki [Thu, 25 Apr 2013 06:56:32 +0000 (12:26 +0530)] 
sf: spansion: Update the name for S25FL256S flash

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

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

Add support for Winbond W25Q256 SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 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>
12 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>
12 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>
12 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>
12 years agospi: zynq: Use spi_alloc_slave() in each SPI driver
Jagannadha Sutradharudu Teki [Fri, 26 Apr 2013 18:38:49 +0000 (00:08 +0530)] 
spi: zynq: Use spi_alloc_slave() in each SPI driver

This change is in sync with the mainline spi change to use
the common alloc function, spi_alloc_slave().

This change is introduced by this commit:
"spi: Use spi_alloc_slave() in each SPI driver"
(sha1: d3504fee73ec626117427afa08116d1dde21ba9d)

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agospi: zynq_qspips: Fix license header
Michal Simek [Wed, 1 May 2013 13:48:24 +0000 (15:48 +0200)] 
spi: zynq_qspips: Fix license header

Remove old reference non mainline driver.
Add proper years.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agospi: zynq_qspips: Clean coding style
Michal Simek [Wed, 1 May 2013 13:20:55 +0000 (15:20 +0200)] 
spi: zynq_qspips: Clean coding style

Run checkpatch over it to have clean and nice driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agospi: zynq_qspips: Fix all debug messages
Michal Simek [Wed, 1 May 2013 13:11:54 +0000 (15:11 +0200)] 
spi: zynq_qspips: Fix all debug messages

Use the same format for all debug and printf messages.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agomicroblaze: bootm: Add support for loading initrd
Michal Simek [Thu, 2 May 2013 10:49:18 +0000 (12:49 +0200)] 
microblaze: bootm: Add support for loading initrd

fdt_initrd add additional information to DTB about initrd
addresses which are later used by kernel.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agomicroblaze: bootm: Fix coding style issues
Michal Simek [Thu, 2 May 2013 10:51:48 +0000 (12:51 +0200)] 
microblaze: bootm: Fix coding style issues

Prepare place for new patch.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agomicroblaze: Fix coding style for bootb
Michal Simek [Thu, 2 May 2013 10:47:54 +0000 (12:47 +0200)] 
microblaze: Fix coding style for bootb

Fix this weird untested code to be able to do other changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: Remove duplicated code
Michal Simek [Wed, 1 May 2013 14:54:17 +0000 (16:54 +0200)] 
zynq: Remove duplicated code

This patch was cherry-picked from mainline patch
I have sent and I forget to remove this function
declaration from sys_proto.h file.

This should be the part of patch
"mmc: Add support for Xilinx Zynq sdhci controller"
(sha1: 16a0ab0d38acd89d5af33948a9c18ac340f67e05)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agofpga: zynqpl: Fix driver message
Michal Simek [Mon, 22 Apr 2013 13:43:02 +0000 (15:43 +0200)] 
fpga: zynqpl: Fix driver message

Use the same format for all prints in the driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agofpga: zynq: Add support for loading bitstream
Michal Simek [Wed, 1 May 2013 09:31:07 +0000 (11:31 +0200)] 
fpga: zynq: Add support for loading bitstream

Devcfg device requires to load bitstream in binary format.
But u-boot also has an option for loading bitstream in bit
format. Let's handle both cases by zynqpl driver.
Also add suport for loading partial bitstreams.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agospi: zynq: Correct the U_PAGE bit on LQSPI_CFG
Jagannadha Sutradharudu Teki [Thu, 25 Apr 2013 19:12:07 +0000 (00:42 +0530)] 
spi: zynq: Correct the U_PAGE bit on LQSPI_CFG

Corrected the U_PAGE(bit:28) on LQSPI_CFG which is used
on qspi dual stacked connection.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agospi: zynq: Set maximum write size as 0
Jagannadha Sutradharudu Teki [Thu, 25 Apr 2013 14:41:17 +0000 (20:11 +0530)] 
spi: zynq: Set maximum write size as 0

Initialize 0 on max_write_size as zynq controller doesn't have
any restriction on write sizes.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agomicroblaze: Synchronization with mainline
Michal Simek [Thu, 25 Apr 2013 14:51:29 +0000 (16:51 +0200)] 
microblaze: Synchronization with mainline

Based on previous patch which directly point
all petalogix boards to xilinx folder $(BOARD) variable
can be used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agosf: Update the qspi dual parallel flash access logic
Jagannadha Sutradharudu Teki [Wed, 24 Apr 2013 18:54:48 +0000 (00:24 +0530)] 
sf: Update the qspi dual parallel flash access logic

Updated the xilinx qspi dual parallel flash access support
to use 3-byte addressing instead of 4-byte addressing used
from the mtd flash layer.

Instead of sending 4-byte addressing from mtd layer and
then the controller will again divide the offset addr by 2 and
convert the 4-byte address into 3-byte address, With this
new logic the mtd will serve the offset as offset by 2 and
send the 3-byte addressing to controller driver, as the
driver is configured as separate bus with two mem the
controller internal hardware algorithm will take care the
dual parallel functionality.

Below are the changes for dual parallel to work:
- mtd layer -> addr/2, page_size*2, nr_sectors/nr_blocks*2
- driver -> enable SEP_BUS[BIT:29],TWO_MEM[BIT:30] on LQSPI_CFG

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Update spi_flash framework to handle all sizes of flashes
Jagannadha Sutradharudu Teki [Wed, 24 Apr 2013 20:04:00 +0000 (01:34 +0530)] 
sf: Update spi_flash framework to handle all sizes of flashes

Updated the spi_flash framework to handle all sizes of flashes.

As most of the flashes introduces a bank/extended 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 performaing write/read/erase operations on all flashes.

u-boot.bin size:
- before 262192bytes
- after 262080bytes
sf speed(65536 bytes wr):
- before 1.528s, speed 43890 B/s
- after 1.533s, speed 43776 B/s

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agopetalinux: Use directly xilinx platforms
Michal Simek [Thu, 25 Apr 2013 14:14:18 +0000 (16:14 +0200)] 
petalinux: Use directly xilinx platforms

Currently all of these platforms are symlinks to xilinx
boards which is breaking out of tree compilation.
Keep symlinks but setup board files directly to proper
folder solves this problem.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoxilinx: Cleanup .gitignore files
Michal Simek [Thu, 25 Apr 2013 13:55:10 +0000 (15:55 +0200)] 
xilinx: Cleanup .gitignore files

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agowathdog: Clean coding style violation
Michal Simek [Mon, 22 Apr 2013 13:33:32 +0000 (15:33 +0200)] 
wathdog: Clean coding style violation

Found in process to merging these drivers to mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agofpga: Clean coding style violations
Michal Simek [Mon, 22 Apr 2013 13:43:02 +0000 (15:43 +0200)] 
fpga: Clean coding style violations

Synchronization with mainline version.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agospi: spansion: Remove unused variables
Michal Simek [Mon, 22 Apr 2013 15:26:30 +0000 (17:26 +0200)] 
spi: spansion: Remove unused variables

They are not used in this file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoi2c: zynq: Add support for Xilinx Zynq
Michal Simek [Mon, 22 Apr 2013 13:21:33 +0000 (15:21 +0200)] 
i2c: zynq: Add support for Xilinx Zynq

Support Xilinx Zynq i2c controller.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoi2c: Clean coding style violations
Michal Simek [Thu, 25 Apr 2013 11:37:00 +0000 (13:37 +0200)] 
i2c: Clean coding style violations

Synchronization with mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agommc: Add support for Xilinx Zynq sdhci controller
Michal Simek [Mon, 22 Apr 2013 12:56:49 +0000 (14:56 +0200)] 
mmc: Add support for Xilinx Zynq sdhci controller

Add support for SD, MMC and eMMC card on Xilinx Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonet: gem: Preserve clk on emio interface
David Andrey [Fri, 5 Apr 2013 15:24:24 +0000 (17:24 +0200)] 
net: gem: Preserve clk on emio interface

Avoid overwriting GEMx_RCLK_CTRL and GEMx_CLK_CTRL
if the Ethernet interface is connect on EMIO

Do not enable emio for this standard board configuration for now.

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agonet: gem: Pass phy address to init
David Andrey [Thu, 4 Apr 2013 17:13:07 +0000 (19:13 +0200)] 
net: gem: Pass phy address to init

Pass the PHY address to the driver init to
allow parallel use of both interfaces

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: Move macros to hardware.h
Michal Simek [Fri, 12 Apr 2013 14:33:08 +0000 (16:33 +0200)] 
zynq: Move macros to hardware.h

Add all fixed addresses to hardware.h and change petalinux
configuration to support this.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agopetalinux: Remove unused variables
Michal Simek [Fri, 12 Apr 2013 14:22:44 +0000 (16:22 +0200)] 
petalinux: Remove unused variables

Not needed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: Move scutimer baseaddr to hardware.h
Michal Simek [Fri, 12 Apr 2013 14:21:26 +0000 (16:21 +0200)] 
zynq: Move scutimer baseaddr to hardware.h

Move baseaddr to hardware.h to be shared between
configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoarm: zynq: Rename XPSS_ prefix to ZYNQ_ for hardcoded SoC addresses
Michal Simek [Tue, 23 Apr 2013 09:35:18 +0000 (11:35 +0200)] 
arm: zynq: Rename XPSS_ prefix to ZYNQ_ for hardcoded SoC addresses

XPSS prefix was used in past and it is obsolete for quite
some time. Let's use correct SoC name which is Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agopetalinux: Remove duplicated macros
Michal Simek [Fri, 12 Apr 2013 14:19:51 +0000 (16:19 +0200)] 
petalinux: Remove duplicated macros

All these macros are already defined in zynq hardware.h.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agotemplate:/petalinux-auto-board.h: Remove 0x in front of ${filesize}
Jason Wu [Fri, 12 Apr 2013 00:54:45 +0000 (10:54 +1000)] 
template:/petalinux-auto-board.h: Remove 0x in front of ${filesize}

The 0x is not required tread as hex value. However, this is required
for Zynq sd_update_boot because the filesize return by fat load is
in hex size but with 0x prefix. This will cause sf error due to
the file size is 0x0xABCD not 0xABCD.

Signed-off-by: Jason Wu <huanyu@xilinx.com>
12 years agofpga: zynqpl: Buffers must be aligned
Michal Simek [Fri, 19 Apr 2013 12:51:30 +0000 (14:51 +0200)] 
fpga: zynqpl: Buffers must be aligned

Dma requires aligned buffers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoxilinx_spi: Move timeout one time calculation out of the loop
Michal Simek [Wed, 24 Apr 2013 12:11:39 +0000 (14:11 +0200)] 
xilinx_spi: Move timeout one time calculation out of the loop

timeout calculation should be out of the data loop.
This patch increase spi bandwidth for 30%.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoMerge tag 'v2013.04' into master-next
Michal Simek [Thu, 25 Apr 2013 11:51:34 +0000 (13:51 +0200)] 
Merge tag 'v2013.04' into master-next

Prepare v2013.04

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agoPrepare v2013.04 v2013.04
Tom Rini [Fri, 19 Apr 2013 14:25:43 +0000 (10:25 -0400)] 
Prepare v2013.04

Signed-off-by: Tom Rini <trini@ti.com>
12 years agocrc32: Correct endianness of crc32 result
Simon Glass [Thu, 18 Apr 2013 10:25:51 +0000 (10:25 +0000)] 
crc32: Correct endianness of crc32 result

When crc32 is handled by the hash library, it requires the data to be in
big-endian format, since it reads it byte-wise. Thus at present the 'crc32'
command reports incorrect data. For example, previously we might see:

Peach # crc32 40000000 100
CRC32 for 40000000 ... 400000ff ==> 0d968558

but instead with the hash library we see:

Peach # crc32 40000000 100
CRC32 for 40000000 ... 400000ff ==> 5885960d

Correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
12 years agopatman: fix gitutil for decorations
Andreas Bießmann [Mon, 15 Apr 2013 23:52:18 +0000 (23:52 +0000)] 
patman: fix gitutil for decorations

The git config parameter log.decorate is quite useful when working with git.
Patman, however can not handle the decorated output when parsing the commit.
To prevent this use the '--no-decorate' switch for git-log.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm into HEAD
Tom Rini [Thu, 18 Apr 2013 20:16:01 +0000 (16:16 -0400)] 
Merge branch 'master' of git://git.denx.de/u-boot-arm into HEAD

Quick manual fixup to merge the USB boot related defines and TPM related
defines.

Conflicts:
include/configs/exynos5250-dt.h

Signed-off-by: Tom Rini <trini@ti.com>
12 years agofdt: Ensure that libfdt_env.h comes from U-Boot
Simon Glass [Mon, 11 Mar 2013 06:30:27 +0000 (06:30 +0000)] 
fdt: Ensure that libfdt_env.h comes from U-Boot

When building host utilities, we include libfdt.h from the host, not from
U-Boot. This in turn brings in libfdt_env.h from the host, which can mess
up the types and cause a build failure, depending on the host environment.
To fix this, force inclusion of U-Boot's libfdt_env.h so that the types
are correct.

Another way to fix this is to use -nostdinc and -idirafter to ensure that
system includes are included after U-Boot ones. Unfortunately this means
that U-Boot's errno.h gets included instead of the system one. This in
turn requires a hack to errno.h to redirect things, so all in all the
solution in this patch is probably cleaner.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agommc: check the revision for sd3.0
Jaehoon Chung [Tue, 29 Jan 2013 22:58:16 +0000 (22:58 +0000)] 
mmc: check the revision for sd3.0

Support to check whether the SD3.0 or not.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Rommel Custodio <sessyargc@gmail.com>
12 years agommc: support the correct card version for eMMC
Jaehoon Chung [Tue, 29 Jan 2013 19:31:16 +0000 (19:31 +0000)] 
mmc: support the correct card version for eMMC

eMMC vesrion is supported up to v4.5.
But bootloader isn't saw the exact eMMC version.
After applied this patch,
if use the mmcinfo command, then can see the exactly mmc version.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Rommel Custodio <sessyargc@gmail.com>
12 years agoprintenv: Correct out-of-memory condition check.
Maxime Larocque [Fri, 28 Sep 2012 05:00:13 +0000 (05:00 +0000)] 
printenv: Correct out-of-memory condition check.

In common/cmd_nvedit.c, en env_print(), the wrong type is used for len.
hexport_r() returns -1 on error (like OOM), which is converted to
0xffffffff when put in an unsigned. Said value is obviously bigger then
0, and as a result an uninitialized string is then displayed. Other
usages of hexport_r() in the code correctly uses ssize_t to keep its
return value.

Signed-off-by: Maxime Larocque <maxmtl2002@yahoo.ca>
12 years agozynq_qspips:Break infinite loop after 1000 status read after trying to set qbit
Wendy Liang [Wed, 17 Apr 2013 03:59:18 +0000 (13:59 +1000)] 
zynq_qspips:Break infinite loop after 1000 status read after trying to set qbit

Currently, u-boot end up in infinite loop when the status reg of the SPI flash
is not 0 after it tries to set the quad bit. If quad bit setting fails, u-boot
hangs because of this infinite loop.

We introduce a counter. If the status register value is still not 0 after 1000
runs, it break the loop.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
12 years agoexynos: fdt: Add TMU node for snow
Simon Glass [Sat, 13 Apr 2013 04:26:42 +0000 (04:26 +0000)] 
exynos: fdt: Add TMU node for snow

Snow is missing a TMU node, and with TMU support this is not allowed, so it
fails to boot. Add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
12 years agoexynos: Correct use of 64-bit division
Simon Glass [Sat, 13 Apr 2013 04:26:41 +0000 (04:26 +0000)] 
exynos: Correct use of 64-bit division

The current code is causing errors like this on my toolchains:

/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.22/
ld.bfd.real: failed to merge target specific data of file /usr/lib/gcc/
armv7a-cros-linux-gnueabi/4.7.x-google/libgcc.a(_divdi3.o)

Use do_div() to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>