]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
zynq: cfi: Fix nor issue for Zynq
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 18 Jul 2017 07:21:31 +0000 (12:51 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 18 Jul 2017 10:30:47 +0000 (12:30 +0200)
There is a hack needed in cfi_flash.c for zynq
This patch adds back the same through defconfig
to get NOR working on zynq.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-zynq/Kconfig
configs/zynq_zc770_xm012_defconfig
drivers/mtd/cfi_flash.c
scripts/config_whitelist.txt

index 2c4da1869d7e4f58739d78b0e9ea2284d2bf37db..af39dc7af3b0b75bbbdc0f50f4cd403723e327ca 100644 (file)
@@ -60,6 +60,13 @@ config BOOT_INIT_FILE
          Add register writes to boot.bin format (max 256 pairs).
          Expect a table of register-value pairs, e.g. "0x12345678 0x4321"
 
+config ZYNQ_M29EW_WB_HACK
+       bool "Zynq NOR hack"
+       default n
+       help
+         The option provides hack for Zynq NOR driver which is required
+         for NOR operations to work as expected.
+
 # Temporary Kconfig options which needs to be fixed
 config SYS_I2C_MUX_ADDR
        int
index a77e43a2686b6bbf29a695db1543a696c8c3c50b..a8729c59a443026273da089198da0d0420e54751 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
+CONFIG_ZYNQ_M29EW_WB_HACK=y
 # CONFIG_MMC is not set
 CONFIG_SYS_TEXT_BASE=0x4000000
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm012"
index e036b88a6256c5752021af6351da6d0185a383b1..1d2ca787389426f1601fcd2a93ec6be6ebd1ad33 100644 (file)
@@ -2237,6 +2237,9 @@ ulong flash_get_size (phys_addr_t base, int banknum)
                }
 
                info->sector_count = sect_cnt;
+#ifdef CONFIG_ZYNQ_M29EW_WB_HACK
+               qry.max_buf_write_size = 0x8;
+#endif
                info->buffer_size = 1 << le16_to_cpu(qry.max_buf_write_size);
                tmp = 1 << qry.block_erase_timeout_typ;
                info->erase_blk_tout = tmp *
index 7947275e14ea47f84e3791ad3cfc8424c09a7d95..3b787eaf4046ff60f0dd8c4ae1f1aa69ebbecb06 100644 (file)
@@ -8037,6 +8037,7 @@ CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET
 CONFIG_ZYNQ_HISPD_BROKEN
 CONFIG_ZYNQ_I2C0
 CONFIG_ZYNQ_I2C1
+CONFIG_ZYNQ_M29EW_WB_HACK
 CONFIG_ZYNQ_PS_CLK_FREQ
 CONFIG_ZYNQ_SDHCI0
 CONFIG_ZYNQ_SDHCI1