diff options
-rw-r--r-- | zephyr/Kconfig | 3 | ||||
-rw-r--r-- | zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx7 | 4 | ||||
-rw-r--r-- | zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx9 | 3 | ||||
-rw-r--r-- | zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig | 1 | ||||
-rw-r--r-- | zephyr/drivers/cros_flash/Kconfig | 5 | ||||
-rw-r--r-- | zephyr/projects/it8xxx2_evb/prj.conf | 1 | ||||
-rw-r--r-- | zephyr/zmake/zmake/output_packers.py | 11 |
7 files changed, 10 insertions, 18 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index ce250f0a32..59cb47cc4d 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -367,8 +367,7 @@ config PLATFORM_EC_EXTPOWER_GPIO extpower_interrupt configured as the handler in gpio_map.h. config PLATFORM_EC_FLASH_CROS - bool "Enable flash support" - default y if FLASH_SIZE > 0 + bool help Enables access to the device's flash through a simple API. With this is it possible for the EC to update its flash while running, diff --git a/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx7 b/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx7 index 3c59d5405e..37561f4dad 100644 --- a/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx7 +++ b/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx7 @@ -28,10 +28,6 @@ config CROS_EC_DATA_RAM_SIZE config CROS_EC_RAM_SIZE default 0x0000f800 -config FLASH_SIZE - default 1024 if SOC_NPCX7M6FB - default 512 if SOC_NPCX7M6FC || SOC_NPCX7M7FC - config CROS_EC_RO_MEM_OFF default 0x0 diff --git a/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx9 b/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx9 index 5fd1fbd308..72a01b38d3 100644 --- a/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx9 +++ b/zephyr/app/ec/chip/arm/nuvoton_npcx/Kconfig.npcx9 @@ -27,9 +27,6 @@ config CROS_EC_DATA_RAM_SIZE config CROS_EC_RAM_SIZE default 0x0000f800 -config FLASH_SIZE - default 512 - config CROS_EC_RO_MEM_OFF default 0x0 diff --git a/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig b/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig index b51ecf28ba..2786cfe81a 100644 --- a/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig +++ b/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig @@ -36,7 +36,6 @@ CONFIG_CROS_EC_HOOK_TICK_INTERVAL=500000 # Flash CONFIG_PLATFORM_EC_CONSOLE_CMD_FLASH=y -CONFIG_PLATFORM_EC_FLASH_CROS=y CONFIG_SOC_FLASH_ITE_IT8XXX2=y # I2C diff --git a/zephyr/drivers/cros_flash/Kconfig b/zephyr/drivers/cros_flash/Kconfig index 5c73e0c3b9..68ed451f27 100644 --- a/zephyr/drivers/cros_flash/Kconfig +++ b/zephyr/drivers/cros_flash/Kconfig @@ -5,7 +5,8 @@ menuconfig CROS_FLASH_NPCX bool "Nuvoton NPCX flash driver for the Zephyr shim" depends on SOC_FAMILY_NPCX - default y if FLASH_SIZE > 0 + default y + select PLATFORM_EC_FLASH_CROS help This option enables a flash unit interface (FIU) driver for the NPCX chip. This is used instead of the flash memory interface so we can @@ -29,6 +30,7 @@ config CROS_FLASH_IT8XXX2 bool "ITE IT81202 flash driver for the Zephyr shim" depends on SOC_FAMILY_RISCV_ITE default y + select PLATFORM_EC_FLASH_CROS help This option enables the flash driver for the it8xxx2 chip. We can access the flash by read, write and erase. The it8xxx2 flash size @@ -38,6 +40,7 @@ config CROS_FLASH_XEC bool "Microchip XEC flash driver for the Zephyr shim" depends on SOC_FAMILY_MEC default y + select PLATFORM_EC_FLASH_CROS help This option enables the flash driver for the MEC172x chips. Flash access is via the QSPI driver to one of three ports: internal 512KB diff --git a/zephyr/projects/it8xxx2_evb/prj.conf b/zephyr/projects/it8xxx2_evb/prj.conf index ffc59fb420..8acc437c0d 100644 --- a/zephyr/projects/it8xxx2_evb/prj.conf +++ b/zephyr/projects/it8xxx2_evb/prj.conf @@ -20,7 +20,6 @@ CONFIG_PLATFORM_EC_I2C=y CONFIG_PLATFORM_EC_FAN=y # Flash -CONFIG_PLATFORM_EC_FLASH_CROS=y CONFIG_PLATFORM_EC_CONSOLE_CMD_FLASH=y # Lid switch diff --git a/zephyr/zmake/zmake/output_packers.py b/zephyr/zmake/zmake/output_packers.py index 1ba38cf96c..eae7358157 100644 --- a/zephyr/zmake/zmake/output_packers.py +++ b/zephyr/zmake/zmake/output_packers.py @@ -187,17 +187,16 @@ class NpcxPacker(BinmanPacker): ro_file = "zephyr.npcx.bin" npcx_monitor = "npcx_monitor.bin" - # TODO(b/192401039): CONFIG_FLASH_SIZE is nuvoton-only. Since - # binman already checks sizes, perhaps we can just remove this - # code? def _get_max_image_bytes(self, ro, rw): ro_size = util.read_kconfig_autoconf_value( - ro / "zephyr" / "include" / "generated", "CONFIG_FLASH_SIZE" + ro / "zephyr" / "include" / "generated", + "CONFIG_PLATFORM_EC_FLASH_SIZE_BYTES", ) rw_size = util.read_kconfig_autoconf_value( - ro / "zephyr" / "include" / "generated", "CONFIG_FLASH_SIZE" + ro / "zephyr" / "include" / "generated", + "CONFIG_PLATFORM_EC_FLASH_SIZE_BYTES", ) - return max(int(ro_size, 0), int(rw_size, 0)) * 1024 + return max(int(ro_size, 0), int(rw_size, 0)) # This can probably be removed too and just rely on binman to # check the sizes... see the comment above. |