]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Revert "zynq: cfi: Fix nor issue for Zynq"
authorMichal Simek <michal.simek@xilinx.com>
Tue, 17 Aug 2021 14:11:50 +0000 (16:11 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 6 Oct 2021 11:12:31 +0000 (13:12 +0200)
This reverts commit 4bdea3b8b7ec13f6fdb8030b0d069ab7dd147b2b.

The only board which we are testing is zc770-xm012 where this patch is
used. Based on schematics it is M29EW device which is manufactured by
Numonyx 0x89 (Linux kernel is saying Intel).

Device on this board is detected as:
manufacturer is 2
manufacturer id is 0xff
device id is 0xff
device id2 is 0x0
cfi version is 0x3133
size_ratio 1 port 16 bits chip 8 bits

As is visible maufacturer is 2 which is any known one that's why this patch
was forcing max_buf_write_size to 8 likely because of reasons described by
commit c502321c4a1b ("mtd: cfi_flash: Write buffer size adjustment for
M29EW Numonyx devices").

When query data is dump it is visible at offset 0x1a there is already 0x08
which means that max_buf_write_size is correctly setup and this workaround
is not needed anymore.

max_buf_write_size offset 1a /* for offset information */
00 : 51 52 59 02 00 40 00 00 00 00 00 27 36 85 95 05  QRY..@.....'6...
10 : 09 08 0f 03 02 03 03 18 02 00 08 00 01 7f 00 00  ................
20 : 02 00 00 00 00 00 00 00 00 00 00 00 00 b4 f3 3f  ...............?

Just for summary parallel flash on zc770-xm012 is likely incorrectly
detected but max_buf_write_size is setup already to 8 which was the reason
for this patch and there is no need to have this workaround in our tree
because value is setup correctly already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-zynq/Kconfig
configs/xilinx_zynq_virt_defconfig
configs/zynq_cse_nor_defconfig
drivers/mtd/cfi_flash.c

index c76517e3118a96500cbaca0cf6d2c55c80854d3f..e54310383b2965016202203adeff0b0ebb5834f2 100644 (file)
@@ -67,13 +67,6 @@ 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.
-
 config ZYNQ_SDHCI_MAX_FREQ
        default 52000000
 
index c24bae78c9b1f30b185ae797f2d24cfc8154c222..6bcdf9cd3561d92c4ea0c9de589544ed67122c7f 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
 CONFIG_DM_GPIO=y
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
-CONFIG_ZYNQ_M29EW_WB_HACK=y
 CONFIG_CMD_FRU=y
 CONFIG_CMD_ZYNQ_AES=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706"
index 41bbb9ee1580fa7454cf1689303f7a5c192cf657..3e614dfc86f2f10a44a25406fbc84cd5d29fa684 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_ENV_SIZE=0x190
 CONFIG_SYS_MALLOC_LEN=0x1000
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
-CONFIG_ZYNQ_M29EW_WB_HACK=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-cse-nor"
 CONFIG_SYS_CUSTOM_LDSCRIPT=y
 CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
index 28f8226a5423b5e62ec428e881285aa6c81614ba..9e3a652f44513c15bfa5c3b2c091623d361a9e3a 100644 (file)
@@ -2263,9 +2263,6 @@ 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 *