From: Siva Durga Prasad Paladugu Date: Tue, 18 Jul 2017 07:21:31 +0000 (+0530) Subject: zynq: cfi: Fix nor issue for Zynq X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4bdea3b8b7ec13f6fdb8030b0d069ab7dd147b2b;p=thirdparty%2Fu-boot.git zynq: cfi: Fix nor issue for Zynq 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 Signed-off-by: Michal Simek State: not-upstreamable --- diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index e54310383b2..c76517e3118 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig @@ -67,6 +67,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. + config ZYNQ_SDHCI_MAX_FREQ default 52000000 diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig index 552f1b4dfb9..73e07adc761 100644 --- a/configs/xilinx_zynq_virt_defconfig +++ b/configs/xilinx_zynq_virt_defconfig @@ -8,6 +8,7 @@ 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" diff --git a/configs/zynq_cse_nor_defconfig b/configs/zynq_cse_nor_defconfig index 3e614dfc86f..41bbb9ee158 100644 --- a/configs/zynq_cse_nor_defconfig +++ b/configs/zynq_cse_nor_defconfig @@ -8,6 +8,7 @@ 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" diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 9e3a652f445..28f8226a542 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -2263,6 +2263,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 *