diff options
Diffstat (limited to 'chip/mchp/config_flash_layout.h')
-rw-r--r-- | chip/mchp/config_flash_layout.h | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/chip/mchp/config_flash_layout.h b/chip/mchp/config_flash_layout.h index caa1e204e0..f495f65465 100644 --- a/chip/mchp/config_flash_layout.h +++ b/chip/mchp/config_flash_layout.h @@ -1,4 +1,4 @@ -/* Copyright 2017 The Chromium OS Authors. All rights reserved. +/* Copyright 2017 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -16,8 +16,8 @@ /* Non-memmory mapped, external SPI */ #define CONFIG_EXTERNAL_STORAGE -#undef CONFIG_MAPPED_STORAGE -#undef CONFIG_FLASH_PSTATE +#undef CONFIG_MAPPED_STORAGE +#undef CONFIG_FLASH_PSTATE #define CONFIG_SPI_FLASH /* @@ -33,32 +33,30 @@ * EC_RO and EC_RW padded sizes from the build are 188KB each. * Storage size is 1/2 flash size. */ -#define CONFIG_EC_PROTECTED_STORAGE_OFF 0 +#define CONFIG_EC_PROTECTED_STORAGE_OFF 0 /* Lower 256KB of flash is protected region */ #define CONFIG_EC_PROTECTED_STORAGE_SIZE 0x40000 /* Writable storage for EC_RW starts at 256KB */ #define CONFIG_EC_WRITABLE_STORAGE_OFF 0x40000 /* Writeable storage is 256KB */ -#define CONFIG_EC_WRITABLE_STORAGE_SIZE 0x40000 - +#define CONFIG_EC_WRITABLE_STORAGE_SIZE 0x40000 /* Loader resides at the beginning of program memory */ -#define CONFIG_LOADER_MEM_OFF 0 -#define CONFIG_LOADER_SIZE 0x1000 +#define CONFIG_LOADER_MEM_OFF 0 +#define CONFIG_LOADER_SIZE 0x1000 /* Write protect Loader and RO Image */ -#define CONFIG_WP_STORAGE_OFF CONFIG_EC_PROTECTED_STORAGE_OFF +#define CONFIG_WP_STORAGE_OFF CONFIG_EC_PROTECTED_STORAGE_OFF /* * Write protect LFW + EC_RO */ -#define CONFIG_WP_STORAGE_SIZE CONFIG_EC_PROTECTED_STORAGE_SIZE +#define CONFIG_WP_STORAGE_SIZE CONFIG_EC_PROTECTED_STORAGE_SIZE /* * RO / RW images follow the loader in program memory. Either RO or RW * image will be loaded -- both cannot be loaded at the same time. */ -#define CONFIG_RO_MEM_OFF (CONFIG_LOADER_MEM_OFF + \ - CONFIG_LOADER_SIZE) +#define CONFIG_RO_MEM_OFF (CONFIG_LOADER_MEM_OFF + CONFIG_LOADER_SIZE) /* * Total SRAM and the amount allocated for data are specified * by CONFIG_MEC_SRAM_SIZE and CONFIG_RAM_SIZE in config_chip.h @@ -69,20 +67,20 @@ * and must be located on a erase block boundary. !!! */ #if (CONFIG_MEC_SRAM_SIZE > CONFIG_EC_PROTECTED_STORAGE_SIZE) -#define CONFIG_RO_SIZE (CONFIG_EC_PROTECTED_STORAGE_SIZE - \ - CONFIG_LOADER_SIZE - 0x2000) +#define CONFIG_RO_SIZE \ + (CONFIG_EC_PROTECTED_STORAGE_SIZE - CONFIG_LOADER_SIZE - 0x2000) #else -#define CONFIG_RO_SIZE (CONFIG_MEC_SRAM_SIZE - \ - CONFIG_RAM_SIZE - CONFIG_LOADER_SIZE) +#define CONFIG_RO_SIZE \ + (CONFIG_MEC_SRAM_SIZE - CONFIG_RAM_SIZE - CONFIG_LOADER_SIZE) #endif -#define CONFIG_RW_MEM_OFF CONFIG_RO_MEM_OFF +#define CONFIG_RW_MEM_OFF CONFIG_RO_MEM_OFF /* * NOTE: CONFIG_RW_SIZE is passed to the SPI image generation script by * chip build.mk * LFW requires CONFIG_RW_SIZE is equal to CONFIG_RO_SIZE !!! */ -#define CONFIG_RW_SIZE CONFIG_RO_SIZE +#define CONFIG_RW_SIZE CONFIG_RO_SIZE /* * WP region consists of first half of SPI containing TAGs at beginning @@ -104,7 +102,7 @@ * greater aligned boundaries. */ -#define CONFIG_RW_BOOT_HEADER_STORAGE_OFF 0 +#define CONFIG_RW_BOOT_HEADER_STORAGE_OFF 0 #if defined(CHIP_FAMILY_MEC172X) /* * Changed to 0x140 original 0xc0 which is incorrect @@ -123,33 +121,31 @@ * 0x40000 - 0x7ffff = EC_RW padded with 0xFF * To EC the "header" is one 4KB chunk at offset 0 */ -#define CONFIG_BOOT_HEADER_STORAGE_OFF 0 -#define CONFIG_BOOT_HEADER_STORAGE_SIZE 0x1000 +#define CONFIG_BOOT_HEADER_STORAGE_OFF 0 +#define CONFIG_BOOT_HEADER_STORAGE_SIZE 0x1000 #elif defined(CHIP_FAMILY_MEC152X) -#define CONFIG_BOOT_HEADER_STORAGE_OFF 0x1000 -#define CONFIG_BOOT_HEADER_STORAGE_SIZE 0x140 +#define CONFIG_BOOT_HEADER_STORAGE_OFF 0x1000 +#define CONFIG_BOOT_HEADER_STORAGE_SIZE 0x140 #elif defined(CHIP_FAMILY_MEC170X) -#define CONFIG_BOOT_HEADER_STORAGE_OFF 0x1000 -#define CONFIG_BOOT_HEADER_STORAGE_SIZE 0x80 +#define CONFIG_BOOT_HEADER_STORAGE_OFF 0x1000 +#define CONFIG_BOOT_HEADER_STORAGE_SIZE 0x80 #else #error "FORCED BUILD ERROR: CHIP_FAMILY_xxxx not set or invalid" #endif -#define CONFIG_RW_BOOT_HEADER_STORAGE_SIZE 0 +#define CONFIG_RW_BOOT_HEADER_STORAGE_SIZE 0 /* Loader / lfw image immediately follows the boot header on SPI */ -#define CONFIG_LOADER_STORAGE_OFF (CONFIG_BOOT_HEADER_STORAGE_OFF + \ - CONFIG_BOOT_HEADER_STORAGE_SIZE) +#define CONFIG_LOADER_STORAGE_OFF \ + (CONFIG_BOOT_HEADER_STORAGE_OFF + CONFIG_BOOT_HEADER_STORAGE_SIZE) /* RO image immediately follows the loader image */ -#define CONFIG_RO_STORAGE_OFF (CONFIG_LOADER_STORAGE_OFF + \ - CONFIG_LOADER_SIZE) +#define CONFIG_RO_STORAGE_OFF (CONFIG_LOADER_STORAGE_OFF + CONFIG_LOADER_SIZE) /* * RW image starts at offset 0 of second half of SPI. * RW Header not needed. */ -#define CONFIG_RW_STORAGE_OFF (CONFIG_RW_BOOT_HEADER_STORAGE_OFF + \ - CONFIG_RW_BOOT_HEADER_STORAGE_SIZE) - +#define CONFIG_RW_STORAGE_OFF \ + (CONFIG_RW_BOOT_HEADER_STORAGE_OFF + CONFIG_RW_BOOT_HEADER_STORAGE_SIZE) #endif /* __CROS_EC_CONFIG_FLASH_LAYOUT_H */ |