diff --git a/common/spi_flash_reg.c b/common/spi_flash_reg.c index 6eab99f1cc..9ee814bbe3 100644 --- a/common/spi_flash_reg.c +++ b/common/spi_flash_reg.c @@ -37,7 +37,7 @@ struct protect_range { * none or half of the ROM. The table is searched sequentially, so ordering * according to likely configurations improves performance slightly. */ -#ifdef CONFIG_SPI_FLASH_W25X40 +#if defined(CONFIG_SPI_FLASH_W25X40) || defined(CONFIG_SPI_FLASH_GD25Q41B) static const struct protect_range spi_flash_protect_ranges[] = { { X, X, X, { 0, 0, 0 }, 0, 0 }, /* No protection */ { X, X, 1, { 0, 1, 1 }, 0, 0x40000 }, /* Lower 1/2 */ diff --git a/include/config.h b/include/config.h index e6d4409a5f..c14af4bf7d 100644 --- a/include/config.h +++ b/include/config.h @@ -1427,6 +1427,9 @@ /* Support W25X40 SPI flash */ #undef CONFIG_SPI_FLASH_W25X40 +/* Support GD25Q41B SPI flash */ +#undef CONFIG_SPI_FLASH_GD25Q41B + /* SPI flash part supports SR2 register */ #undef CONFIG_SPI_FLASH_HAS_SR2 diff --git a/include/spi_flash_reg.h b/include/spi_flash_reg.h index e8d9144a6f..e42d9baa99 100644 --- a/include/spi_flash_reg.h +++ b/include/spi_flash_reg.h @@ -34,7 +34,7 @@ /* SR2 register existence based upon chip */ #ifdef CONFIG_SPI_FLASH_W25X40 #undef CONFIG_SPI_FLASH_HAS_SR2 -#elif defined(CONFIG_SPI_FLASH_W25Q64) +#elif defined(CONFIG_SPI_FLASH_W25Q64) || defined(CONFIG_SPI_FLASH_GD25Q41B) #define CONFIG_SPI_FLASH_HAS_SR2 #endif