]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
12 years agosf: Correct typo mistake on bank_boun in dual parallel
Jagannadha Sutradharudu Teki [Thu, 4 Jul 2013 09:04:17 +0000 (14:34 +0530)] 
sf: Correct typo mistake on bank_boun in dual parallel

bank_boun in dual parallel should be 32Mb, Corrected the typo
mistake by using left shift << instead of right shift >> to 16Mb value.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: ddrc: Change memory size when 16bit mode is used
Michal Simek [Tue, 18 Jun 2013 07:07:02 +0000 (09:07 +0200)] 
zynq: ddrc: Change memory size when 16bit mode is used

When 16bit mode is enable u-boot should also report
only half of memory.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agofpga: zynqpl: Add support for zc7100 device.
Michal Simek [Mon, 17 Jun 2013 11:54:07 +0000 (13:54 +0200)] 
fpga: zynqpl: Add support for zc7100 device.

- Add support for zc7100 device.
- FPGA programming on few of the SOC(zc7100) takes more
  than 1sec, hence increased the program time by 4sec to
  sync' all soc's.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: Add new ddrc driver for ECC support
Michal Simek [Mon, 17 Jun 2013 12:37:01 +0000 (14:37 +0200)] 
zynq: Add new ddrc driver for ECC support

The first 1MB is not initialized by first stage bootloader.
Check if memory is setup to 16bit mode and ECC is enabled.
If it is, clear the first 1MB.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agofpga: zynqpl: Clear loopback mode during device init
Soren Brinkmann [Sat, 15 Jun 2013 00:43:24 +0000 (17:43 -0700)] 
fpga: zynqpl: Clear loopback mode during device init

Some versions of the Zynq first stage boot loader enable PCAP loopback
during boot regardless of whether or not the boot image includes PL
configuration. This behavior only appears in certain boot modes (notably
QSPI boot). Attempting to configure the PL with the loopback bit set
will result in timeouts and will prevent successful configuration.

In order to avoid this problem, and to avoid dependency on the version
of the FSBL used to boot the system, ensure that the loopback enable bit
is cleared when loading the driver.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agosf: Compute the dual parallel write chunk_len based on offset
Jagannadha Sutradharudu Teki [Fri, 14 Jun 2013 08:52:16 +0000 (14:22 +0530)] 
sf: Compute the dual parallel write chunk_len based on offset

chunk_len in should be interms of page_size, as page_size
is double in dual parallel chunk_len must be computed based
on the offset not with write_addr.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agozynq: Remove zynq_cseflash board config
Jagannadha Sutradharudu Teki [Fri, 14 Jun 2013 08:51:51 +0000 (14:21 +0530)] 
zynq: Remove zynq_cseflash board config

There is no updates on this config since from last
couple of releases, hence removed it.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agosf: Use read|erase|write_addr instead of offset
Jagannadha Sutradharudu Teki [Wed, 12 Jun 2013 13:26:51 +0000 (18:56 +0530)] 
sf: Use read|erase|write_addr instead of offset

Used read|erase|write_addr instead of offset in respective
flash read/erase/write operations to make sure that all
qspi modes are sync with the updated sf framework.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agosf: Use spi_xfer in spi_flash_cmd_wait_ready
Jagannadha Sutradharudu Teki [Mon, 10 Jun 2013 09:56:03 +0000 (15:26 +0530)] 
sf: Use spi_xfer in spi_flash_cmd_wait_ready

Use spi_xfer instead of spi_flash_read_common() in spi_flash_cmd_wait_ready
to make sure that the read|flag_status poll happen on loop and
SPI_XFER_BEGIN and SPI_XFER_END will done in outof loop.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agozynq_common: Use cp.b instead of cp in nor autoboot
Jagannadha Sutradharudu Teki [Wed, 12 Jun 2013 08:29:57 +0000 (13:59 +0530)] 
zynq_common: Use cp.b instead of cp in nor autoboot

Used cp.b instead of cp in nor autoboot, cp had an issue
while using in autoboot as per the latest test.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agocfi_flash: Add write buffer hack for M29EW flash
Jagannadha Sutradharudu Teki [Wed, 12 Jun 2013 06:56:35 +0000 (12:26 +0530)] 
cfi_flash: Add write buffer hack for M29EW flash

Added CONFIG_ZYNQ_M29EW_WB_HACK.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agocmd_mem: fix cp command
Masahiro Yamada [Mon, 20 May 2013 21:08:08 +0000 (21:08 +0000)] 
cmd_mem: fix cp command

The "cp" command has not worked since
commit 0628ab8ec59834f98ede267edd21ddb8ba0bb57b,
because of the following lines, which set the destination
and the source to the same address.

buf = map_sysmem(addr, bytes);
src = map_sysmem(addr, bytes);

Tested-by: Tom Rini <trini@ti.com>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
12 years agommc: sdhci: Enable 8-bit bus width only for 3.0 spec onwards
Jagannadha Sutradharudu Teki [Mon, 20 May 2013 23:31:36 +0000 (23:31 +0000)] 
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>
12 years agosf: Fix dual stacked mode upper qspi read
Jagannadha Sutradharudu Teki [Tue, 28 May 2013 10:29:57 +0000 (15:59 +0530)] 
sf: Fix dual stacked mode upper qspi read

For reading upper qspi in dual stacked mode, the remain_len logic
should have a bank_sel based on the total size of the flash, not
with half of total size.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Remove bank access unify logic code
Jagannadha Sutradharudu Teki [Tue, 28 May 2013 10:15:01 +0000 (15:45 +0530)] 
sf: Remove bank access unify logic code

Removed spi_flash_bank() unify logic code, and place into
to a respective flash ops routines. So-that it makes some
more clearity on the code logic in early support.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agozynq: nand: do not wait on erase completion in cmd_func
Jagannadha Sutradharudu Teki [Fri, 24 May 2013 09:54:00 +0000 (15:24 +0530)] 
zynq: nand: do not wait on erase completion in cmd_func

The chip command function dont have to wait on ERASE completion
as the dev_ready chip function is defined and use of the default
nand_erase is made.

This fixes the "Timeout!" error while doing "nand erase" and
also the very low NAND erase performace.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agozynq: nand: Fix proper return value for zynq_nand_write_oob
Jagannadha Sutradharudu Teki [Fri, 24 May 2013 09:32:59 +0000 (15:02 +0530)] 
zynq: nand: Fix proper return value for zynq_nand_write_oob

status for waitfunc should verify with NAND_STATUS_FAIL
and return the write_oob value -EIO or 0.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agozynq: nand: Enable NAND_USE_FLASH_BBT for 16-bit buswidth flash.
Jagannadha Sutradharudu Teki [Mon, 20 May 2013 10:33:21 +0000 (16:03 +0530)] 
zynq: nand: Enable NAND_USE_FLASH_BBT for 16-bit buswidth flash.

Missing BBT option for 16-bit buswidth flash, hence enabled.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agozynq: qspi: Update driver description
Jagannadha Sutradharudu Teki [Mon, 20 May 2013 09:40:51 +0000 (15:10 +0530)] 
zynq: qspi: Update driver description

Updated the driver description on header.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agozynq: qspi: Rename few names
Jagannadha Sutradharudu Teki [Mon, 20 May 2013 09:32:05 +0000 (15:02 +0530)] 
zynq: qspi: Rename few names

Use proper name for the driver before we go to mainline.
- XQSPIPS -> ZYNQ_QSPI
- NORM_READ -> NR
- FAST_READ -> FR
- DUAL_READ -> DR
- QUAD_READ -> QR
- ERASE_SUS -> ES
- ERASE_RES -> ER
- xqspips -> zynq_qspi
- zynq_spi_slave -> zynq_qspi_slave

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agozynq: qspi: Rename zynq_qspips.c to zynq_qspi.c
Jagannadha Sutradharudu Teki [Mon, 20 May 2013 08:57:51 +0000 (14:27 +0530)] 
zynq: qspi: Rename zynq_qspips.c to zynq_qspi.c

Remove ps suffix, which is not a mandatory and use simple
filename before pushing mainline.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
12 years agosf: Define is_dual variable in erase/program/read
Jagannadha Sutradharudu Teki [Wed, 15 May 2013 19:24:23 +0000 (00:54 +0530)] 
sf: Define is_dual variable in erase/program/read

Use is_dual variable and assign flash->spi->is_dual value
instead of deferring the structure every time.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
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>