diff options
-rw-r--r-- | chip/g/config_chip.h | 7 | ||||
-rw-r--r-- | chip/host/config_chip.h | 8 | ||||
-rw-r--r-- | chip/it83xx/config_chip.h | 8 | ||||
-rw-r--r-- | chip/lm4/config_chip.h | 8 | ||||
-rw-r--r-- | chip/nrf51/config_chip.h | 8 | ||||
-rw-r--r-- | chip/stm32/config_chip.h | 8 | ||||
-rw-r--r-- | include/config_std_internal_flash.h | 9 |
7 files changed, 48 insertions, 8 deletions
diff --git a/chip/g/config_chip.h b/chip/g/config_chip.h index 149fea8c34..14d5ead8d6 100644 --- a/chip/g/config_chip.h +++ b/chip/g/config_chip.h @@ -29,6 +29,13 @@ #define CONFIG_FLASH_SIZE (512 * 1024) #define CONFIG_RO_HEAD_ROOM 1024 /* Room for ROM signature. */ +/* Memory-mapped internal flash */ +#define CONFIG_INTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE + +/* Program is run directly from storage */ +#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE + /* Compute the rest of the flash params from these */ #include "config_std_internal_flash.h" diff --git a/chip/host/config_chip.h b/chip/host/config_chip.h index b8d46c47ac..17bd46cf88 100644 --- a/chip/host/config_chip.h +++ b/chip/host/config_chip.h @@ -22,6 +22,14 @@ extern char __host_flash[CONFIG_FLASH_SIZE]; #define CONFIG_FPU +/* Memory-mapped internal flash */ +#define CONFIG_INTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE + +/* Program is run directly from storage */ +#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE + +/* Compute the rest of the flash params from these */ #include "config_std_internal_flash.h" /* Maximum number of deferrable functions */ diff --git a/chip/it83xx/config_chip.h b/chip/it83xx/config_chip.h index 1d88e7df4f..b05fc1d338 100644 --- a/chip/it83xx/config_chip.h +++ b/chip/it83xx/config_chip.h @@ -64,6 +64,14 @@ /****************************************************************************/ /* Define our flash layout. */ +/* Memory-mapped internal flash */ +#define CONFIG_INTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE + +/* Program is run directly from storage */ +#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE + +/* Compute the rest of the flash params from these */ #include "config_std_internal_flash.h" /****************************************************************************/ diff --git a/chip/lm4/config_chip.h b/chip/lm4/config_chip.h index fd7c0cd2c3..bae83e23f7 100644 --- a/chip/lm4/config_chip.h +++ b/chip/lm4/config_chip.h @@ -69,6 +69,14 @@ /****************************************************************************/ /* Define our flash layout. */ +/* Memory-mapped internal flash */ +#define CONFIG_INTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE + +/* Program is run directly from storage */ +#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE + +/* Compute the rest of the flash params from these */ #include "config_std_internal_flash.h" /****************************************************************************/ diff --git a/chip/nrf51/config_chip.h b/chip/nrf51/config_chip.h index cade6fed97..82ac548477 100644 --- a/chip/nrf51/config_chip.h +++ b/chip/nrf51/config_chip.h @@ -43,6 +43,14 @@ #define CONFIG_FLASH_SIZE 0x00040000 #define CONFIG_FLASH_BANK_SIZE 0x1000 +/* Memory-mapped internal flash */ +#define CONFIG_INTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE + +/* Program is run directly from storage */ +#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE + +/* Compute the rest of the flash params from these */ #include "config_std_internal_flash.h" /* Number of IRQ vectors on the NVIC */ diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h index 3668d1b7e5..571f8ae015 100644 --- a/chip/stm32/config_chip.h +++ b/chip/stm32/config_chip.h @@ -45,6 +45,14 @@ #define CONFIG_PROGRAM_MEMORY_BASE 0x08000000 +/* Memory-mapped internal flash */ +#define CONFIG_INTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE + +/* Program is run directly from storage */ +#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE + +/* Compute the rest of the flash params from these */ #include "config_std_internal_flash.h" /* System stack size */ diff --git a/include/config_std_internal_flash.h b/include/config_std_internal_flash.h index ad97110547..cfe31773ea 100644 --- a/include/config_std_internal_flash.h +++ b/include/config_std_internal_flash.h @@ -32,18 +32,11 @@ * TODO(crosbug.com/p/23796): Finish implementing the spec. */ -/* Memory-mapped internal flash w/ PSTATE */ -#define CONFIG_INTERNAL_STORAGE -#define CONFIG_MAPPED_STORAGE -#define CONFIG_FLASH_PSTATE - -/* Program is run directly from storage */ -#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE - /* * The EC uses the one bank of flash to emulate a SPI-like write protect * register with persistent state. */ +#define CONFIG_FLASH_PSTATE #define CONFIG_FW_PSTATE_SIZE CONFIG_FLASH_BANK_SIZE #define CONFIG_FW_PSTATE_OFF (CONFIG_FW_IMAGE_SIZE - CONFIG_FW_PSTATE_SIZE) |