From 7ed9a96cd7247e66d60464bb7737c139d71e7395 Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 20 Dec 2016 10:56:11 -0800 Subject: [PATCH] servo_v4: Remove PSTATE to create more space in RO When including USB PD support, the image won't fit in the default RO size of 0xf000, but does fit in the 0x10000 RW. This change removes PSTATE and increases the RO to 0x10000. BRANCH=none BUG=chrome-os-partner:61170 TEST=manual Verfied the image still builds and can run after updating via util/flash_ec and via /usb_updater/fw_update.py -b servo_v4.json Change-Id: I8f60bb1f107060e26390e6c8292a3add58703c0d Signed-off-by: Scott Reviewed-on: https://chromium-review.googlesource.com/422450 Commit-Ready: Scott Collyer Tested-by: Scott Collyer Reviewed-by: Shawn N --- board/servo_v4/board.h | 12 ++++++++++++ extra/usb_updater/servo_v4.json | 3 +-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/board/servo_v4/board.h b/board/servo_v4/board.h index 24cff51544..1480583af6 100644 --- a/board/servo_v4/board.h +++ b/board/servo_v4/board.h @@ -68,6 +68,18 @@ #define CONFIG_I2C_MASTER #define I2C_PORT_MASTER 1 +/* + * Create 0x1000 more space in RO so that the build with USB PD will fit. + * TODO(crosbug.com/p/61170): This fix works currently, but as more PD + * options are included, the image will no longer fit in the 0x10000 space + * that's allocated. + */ +#undef CONFIG_FLASH_PSTATE +#undef CONFIG_FLASH_PSTATE_BANK +#undef CONFIG_FW_PSTATE_SIZE +#define CONFIG_FW_PSTATE_SIZE 0 + + /* PD features */ #define CONFIG_ADC diff --git a/extra/usb_updater/servo_v4.json b/extra/usb_updater/servo_v4.json index 0167fa1cb4..d85949aec4 100644 --- a/extra/usb_updater/servo_v4.json +++ b/extra/usb_updater/servo_v4.json @@ -8,7 +8,6 @@ "Comment on region format": "name: [baseoffset, length]", "regions": { "RW": ["0x10000", "0x10000"], - "PSTATE": ["0xf000", "0x1000"], - "RO": ["0x0000", "0xf000"] + "RO": ["0x0000", "0x10000"] } }