diff options
Diffstat (limited to 'chip/npcx')
-rw-r--r-- | chip/npcx/config_chip.h | 14 | ||||
-rw-r--r-- | chip/npcx/config_flash_layout.h | 5 | ||||
-rw-r--r-- | chip/npcx/spiflashfw/ec_npcxflash.c | 2 | ||||
-rw-r--r-- | chip/npcx/system.c | 3 |
4 files changed, 14 insertions, 10 deletions
diff --git a/chip/npcx/config_chip.h b/chip/npcx/config_chip.h index 6bb5809235..56db32cc65 100644 --- a/chip/npcx/config_chip.h +++ b/chip/npcx/config_chip.h @@ -45,13 +45,13 @@ /*****************************************************************************/ /* Memory mapping */ -#define CONFIG_RAM_BASE 0x200C0000 /* memory map address of data ram */ -#define CONFIG_RAM_SIZE (0x00008000 - 0x800) /* 30KB data ram */ -#define CONFIG_CDRAM_BASE 0x100A8000 /* memory map address of code ram */ -#define CONFIG_CDRAM_SIZE 0x00018000 /* 96KB code ram */ -#define CONFIG_FLASH_BASE 0x64000000 /* memory address of spi-flash */ -#define CONFIG_LPRAM_BASE 0x40001600 /* memory address of low power ram */ -#define CONFIG_LPRAM_SIZE 0x00000620 /* 1568B low power ram */ +#define CONFIG_RAM_BASE 0x200C0000 /* memory address of data ram */ +#define CONFIG_RAM_SIZE (0x00008000 - 0x800) /* 30KB data ram */ +#define CONFIG_CDRAM_BASE 0x100A8000 /* memory address of code ram */ +#define CONFIG_CDRAM_SIZE 0x00018000 /* 96KB code ram */ +#define CONFIG_PROGRAM_MEMORY_BASE 0x64000000 /* program memory base address */ +#define CONFIG_LPRAM_BASE 0x40001600 /* memory address of lpwr ram */ +#define CONFIG_LPRAM_SIZE 0x00000620 /* 1568B low power ram */ /* System stack size */ #define CONFIG_STACK_SIZE 4096 diff --git a/chip/npcx/config_flash_layout.h b/chip/npcx/config_flash_layout.h index 0988c3ca35..986c0bbfea 100644 --- a/chip/npcx/config_flash_layout.h +++ b/chip/npcx/config_flash_layout.h @@ -14,7 +14,10 @@ */ /* Memmapped, external SPI */ -#define CONFIG_FLASH_MAPPED +#define CONFIG_EXTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE +/* Storage is memory-mapped, but program runs from SRAM */ +#define CONFIG_MAPPED_STORAGE_BASE 0x64000000 #undef CONFIG_FLASH_PSTATE /* Size of one firmware image in flash */ diff --git a/chip/npcx/spiflashfw/ec_npcxflash.c b/chip/npcx/spiflashfw/ec_npcxflash.c index ccaff16872..cc97f69e5a 100644 --- a/chip/npcx/spiflashfw/ec_npcxflash.c +++ b/chip/npcx/spiflashfw/ec_npcxflash.c @@ -218,7 +218,7 @@ int sspi_flash_verify(int offset, int size, const char *data) uint8_t *ptr_flash; uint8_t *ptr_mram; - ptr_flash = (uint8_t *)(CONFIG_FLASH_BASE + offset); + ptr_flash = (uint8_t *)(CONFIG_PROGRAM_MEMORY_BASE + offset); ptr_mram = (uint8_t *)data; result = 1; diff --git a/chip/npcx/system.c b/chip/npcx/system.c index 525049acba..23d66d7882 100644 --- a/chip/npcx/system.c +++ b/chip/npcx/system.c @@ -708,7 +708,8 @@ void system_jump_to_booter(void) } /* Make sure the reset vector is inside the destination image */ - addr_entry = *(uintptr_t *)(flash_offset + CONFIG_FLASH_BASE + 4); + addr_entry = *(uintptr_t *)(flash_offset + + CONFIG_PROGRAM_MEMORY_BASE + 4); download_from_flash( flash_offset, /* The offset of the data in spi flash */ |