target-xtensa: xtfpga: fix FLASH interface width
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 6 Jul 2016 06:31:32 +0000 (09:31 +0300)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 14 Jul 2016 10:59:44 +0000 (13:59 +0300)
FLASH chip on XTFPGA boards is connected with 16-bit-wide interface.
Latest U-Boot can see the difference and does not work correctly with
32-bit-wide interface.
Set FLASH chip 'width' property to 2.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
hw/xtensa/xtfpga.c

index 2d117369affc5230da4b21ef3a27a0d7056bd465..ac759494844934663fdef95c50be3881f904dae1 100644 (file)
@@ -165,7 +165,7 @@ static pflash_t *xtfpga_flash_init(MemoryRegion *address_space,
     qdev_prop_set_uint32(dev, "num-blocks",
                          board->flash_size / board->flash_sector_size);
     qdev_prop_set_uint64(dev, "sector-length", board->flash_sector_size);
-    qdev_prop_set_uint8(dev, "width", 4);
+    qdev_prop_set_uint8(dev, "width", 2);
     qdev_prop_set_bit(dev, "big-endian", be);
     qdev_prop_set_string(dev, "name", "lx60.io.flash");
     qdev_init_nofail(dev);