Skip to contentSkip to conversation

configs: stratix10: Enable CONFIG_SPI_FLASH_USE_4K_SECTORS

PATCH New Ley Foon Tan 2 participants 2 messages May 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: stratix10: Enable CONFIG_SPI_FLASH_USE_4K_SECTORS

Fix SPI flash environment erase size error.

CONFIG_ENV_SECT_SIZE is set to 4KB. Enable CONFIG_SPI_FLASH_USE_4K_SECTORS to allow erase one environment sector.

Fix error below:

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)

---
 configs/socfpga_stratix10_defconfig | 1 -
 1 file changed, 1 deletion(-)
configs/socfpga_stratix10_defconfig +0 -1
index 73a1231d46..4be85d53ab 100644
@@ -41,7 +41,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_MODE=0x2003
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
-# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_DM_ETH=y
Signature · 1 line
2.19.0
Applied
#1 lore raw

PATCH 1/1 configs: stratix10: Enable CONFIG_SPI_FLASH_USE_4K_SECTORS

Quoted 24 lines · Ley Foon Tan

Fix SPI flash environment erase size error.

CONFIG_ENV_SECT_SIZE is set to 4KB. Enable CONFIG_SPI_FLASH_USE_4K_SECTORS to allow erase one environment sector.

Fix error below:

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)

---
 configs/socfpga_stratix10_defconfig | 1 -
 1 file changed, 1 deletion(-)
configs/socfpga_stratix10_defconfig +0 -0
index 73a1231d46..4be85d53ab 100644

configs/socfpga_stratix10_defconfig CONFIG_SPI_FLASH=y · line 46

Quoted 7 lines
configs/socfpga_stratix10_defconfig +0 -1
@@ -41,7 +41,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_MODE=0x2003
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
-# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_DM_ETH=y

Applied, thanks.

Signature · 2 lines
Best regards,
Marek Vasut