]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spi: zynq: Use standard numbering for qspi connection topology
authorJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Fri, 3 May 2013 08:53:21 +0000 (14:23 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 27 May 2013 11:21:18 +0000 (13:21 +0200)
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>
drivers/mtd/spi/spansion.c
drivers/mtd/spi/stmicro.c
drivers/mtd/spi/winbond.c
drivers/spi/zynq_qspips.c

index d9516859471196b277c1f53571e1788915c6a403..28ecda6936bdf5f953f3fadedbaaf157fd0b9d47 100644 (file)
@@ -145,7 +145,7 @@ struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode)
        flash->sector_size = 256 * params->pages_per_sector;
 
        /* address width is 4 for dual and 3 for single qspi */
-       if (flash->spi->is_dual == 1) {
+       if (flash->spi->is_dual == 2) {
                flash->addr_width = 4;
                flash->size = flash->sector_size * (2 * params->nr_sectors);
        } else {
index 50b8fcbf825cbd932753095dec22612c82d6733f..cf4601b3befe358157219399fa526c36120682aa 100644 (file)
@@ -210,7 +210,7 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode)
        flash->sector_size = 256 * params->pages_per_sector;
 
        /* address width is 4 for dual and 3 for single qspi */
-       if (flash->spi->is_dual == 1) {
+       if (flash->spi->is_dual == 2) {
                flash->addr_width = 4;
                flash->size = flash->sector_size * (2 * params->nr_sectors);
        } else {
index c327612cc293742a60ba0cadf8a11dddeb46a906..3b4be7f69855355af83515e92717aec9d4ba8d49 100644 (file)
@@ -112,7 +112,7 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode)
        flash->sector_size = 4096;
 
        /* address width is 4 for dual and 3 for single qspi */
-       if (flash->spi->is_dual == 1) {
+       if (flash->spi->is_dual == 2) {
                flash->addr_width = 4;
                flash->size = 4096 * 16 * (2 * params->nr_blocks);
        } else {
index f46e06ff5d47878e6cdd54f29a60c4afbf13d4a2..91aa7fcd094387dd4714d35f7cc50f228f5367d7 100644 (file)
@@ -90,8 +90,8 @@
 enum xqspips_con_topology {
        MODE_UNKNOWN = -1,
        MODE_SINGLE,
-       MODE_DUAL_PARALLEL,
        MODE_DUAL_STACKED,
+       MODE_DUAL_PARALLEL,
 };
 
 /* Definitions of the flash commands - Flash opcodes in ascending order */