arm: socfpga: stratix10: Fix SPI flash ENV_SECT_SIZE
PATCH 1/1 arm: socfpga: stratix10: Fix SPI flash ENV_SECT_SIZE
Fix SPI flash environment erase size error.
Erase size of flash mt25qu02g on Stratix 10 should be 64KB.
SOCFPGA_STRATIX10 # saveenv
Saving Environment to SPI Flash...
SF: Detected mt25qu02g with page size 256 Bytes, erase size 64 KiB, total 256 MiB Erasing SPI flash...SF: Erase offset/length not multiple of erase size Failed (-22)
--- include/configs/socfpga_stratix10_socdk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/socfpga_stratix10_socdk.h +2 -2
@@ -66,8 +66,8 @@#undef CONFIG_ENV_OFFSET#undef CONFIG_ENV_SIZE#define CONFIG_ENV_OFFSET 0x710000 -#define CONFIG_ENV_SIZE (4 * 1024) -#define CONFIG_ENV_SECT_SIZE (4 * 1024) +#define CONFIG_ENV_SIZE (64 * 1024) +#define CONFIG_ENV_SECT_SIZE (64 * 1024)#endif /* CONFIG_ENV_IS_IN_SPI_FLASH */ #ifndef CONFIG_SPL_BUILD
Signature · 1 line
2.19.0
PATCH 1/1 arm: socfpga: stratix10: Fix SPI flash ENV_SECT_SIZE
Quoted 21 lines · Ley Foon Tan
Fix SPI flash environment erase size error.
Erase size of flash mt25qu02g on Stratix 10 should be 64KB.
SOCFPGA_STRATIX10# saveenv
Saving Environment to SPI Flash...
SF: Detected mt25qu02g with page size 256 Bytes, erase size 64 KiB, total 256 MiB Erasing SPI flash...SF: Erase offset/length not multiple of erase size Failed (-22)Signed-off-by Ley Foon Tan <[email protected]>--- include/configs/socfpga_stratix10_socdk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/configs/socfpga_stratix10_socdk.h +0
-0
include/configs/socfpga_stratix10_socdk.h line 73
Quoted 10 lines
include/configs/socfpga_stratix10_socdk.h +2
-2@@ -66,8 +66,8 @@#undef CONFIG_ENV_OFFSET#undef CONFIG_ENV_SIZE#define CONFIG_ENV_OFFSET 0x710000 -#define CONFIG_ENV_SIZE (4 * 1024) -#define CONFIG_ENV_SECT_SIZE (4 * 1024) +#define CONFIG_ENV_SIZE (64 * 1024) +#define CONFIG_ENV_SECT_SIZE (64 * 1024)#endif /* CONFIG_ENV_IS_IN_SPI_FLASH */ #ifndef CONFIG_SPL_BUILD
Can CONFIG_SPI_FLASH_USE_4K_SECTORS help instead ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 arm: socfpga: stratix10: Fix SPI flash ENV_SECT_SIZE
Quoted 31 lines · Marek Vasut
Quoted 29 lines · Ley Foon Tan
Fix SPI flash environment erase size error.
Erase size of flash mt25qu02g on Stratix 10 should be 64KB.
SOCFPGA_STRATIX10# saveenv
Saving Environment to SPI Flash...
SF: Detected mt25qu02g with page size 256 Bytes, erase size 64 KiB, total 256 MiB Erasing SPI flash...SF: Erase offset/length not multiple of erase size Failed (-22)Signed-off-by Ley Foon Tan <[email protected]>--- include/configs/socfpga_stratix10_socdk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/configs/socfpga_stratix10_socdk.h +2
-2@@ -66,8 +66,8 @@#undef CONFIG_ENV_OFFSET#undef CONFIG_ENV_SIZE#define CONFIG_ENV_OFFSET 0x710000 -#define CONFIG_ENV_SIZE (4 * 1024) -#define CONFIG_ENV_SECT_SIZE (4 * 1024) +#define CONFIG_ENV_SIZE (64 * 1024) +#define CONFIG_ENV_SECT_SIZE (64 * 1024)#endif /* CONFIG_ENV_IS_IN_SPI_FLASH */
Quoted 3 lines
include/configs/socfpga_stratix10_socdk.h line 73
Quoted 2 lines
include/configs/socfpga_stratix10_socdk.h +0
-0#ifndef CONFIG_SPL_BUILD Can
CONFIG_SPI_FLASH_USE_4K_SECTORShelp instead ?
You are right, CONFIG_SPI_FLASH_USE_4K_SECTORS can fix this error too. Will drop this patch and send another patch to enable CONFIG_SPI_FLASH_USE_4K_SECTORS.
Thanks.
Regards
Ley Foon
PATCH 1/1 arm: socfpga: stratix10: Fix SPI flash ENV_SECT_SIZE
Quoted 32 lines · Ley Foon Tan
Quoted 31 lines · Marek Vasut
Quoted 29 lines · Ley Foon Tan
Fix SPI flash environment erase size error.
Erase size of flash mt25qu02g on Stratix 10 should be 64KB.
SOCFPGA_STRATIX10# saveenv
Saving Environment to SPI Flash...
SF: Detected mt25qu02g with page size 256 Bytes, erase size 64 KiB, total 256 MiB Erasing SPI flash...SF: Erase offset/length not multiple of erase size Failed (-22)Signed-off-by Ley Foon Tan <[email protected]>--- include/configs/socfpga_stratix10_socdk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/configs/socfpga_stratix10_socdk.h +2
-2@@ -66,8 +66,8 @@#undef CONFIG_ENV_OFFSET#undef CONFIG_ENV_SIZE#define CONFIG_ENV_OFFSET 0x710000 -#define CONFIG_ENV_SIZE (4 * 1024) -#define CONFIG_ENV_SECT_SIZE (4 * 1024) +#define CONFIG_ENV_SIZE (64 * 1024) +#define CONFIG_ENV_SECT_SIZE (64 * 1024)#endif /* CONFIG_ENV_IS_IN_SPI_FLASH */
Quoted 6 lines
Quoted 3 lines
include/configs/socfpga_stratix10_socdk.h line 73
Quoted 2 lines
include/configs/socfpga_stratix10_socdk.h +0
-0#ifndef CONFIG_SPL_BUILD Can
CONFIG_SPI_FLASH_USE_4K_SECTORShelp instead ?You are right,
CONFIG_SPI_FLASH_USE_4K_SECTORScan fix this error too. Will drop this patch and send another patch to enableCONFIG_SPI_FLASH_USE_4K_SECTORS.
:)
Signature · 2 lines
Best regards, Marek Vasut