]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Xilinx: ARM: MTD: m25p80: fix dual qspi bug in flash
authorJohn Linn <john.linn@xilinx.com>
Wed, 19 Sep 2012 20:55:57 +0000 (13:55 -0700)
committerJohn Linn <john.linn@xilinx.com>
Wed, 19 Sep 2012 22:18:42 +0000 (15:18 -0700)
The last change that was done to make the dual QSPI
work from device tree only without a kernel config
change had a bug which was preventing the 2nd 16 MB
of flash from working on the ZC706.

Signed-off-by: John Linn <john.linn@xilinx.com>
drivers/mtd/devices/m25p80.c

index cb8dfd9e550f86a760c87b2aec76a6e9cbe54b7b..9d11fdeb375bb097ec2eb13497a1e67ad8babbb8 100644 (file)
@@ -913,8 +913,10 @@ static int __devinit m25p_probe(struct spi_device *spi)
                np = of_get_next_parent(spi->dev.of_node);
                prop = of_get_property(np, "is-dual", NULL);
                if (prop) {
-                       if (be32_to_cpup(prop)) 
-                               flash->mtd.size *= 2;   
+                       if (be32_to_cpup(prop)) {
+                               info->sector_size *= 2; 
+                               flash->mtd.size *= 2;
+                       }       
                }
        }
 #endif