summaryrefslogtreecommitdiff
path: root/board/sweetberry
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2017-04-13 09:32:22 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-04-15 04:08:07 -0700
commit2b460c9830670070152a4509ab38b24aa80ed304 (patch)
tree8b5691b01c6bd23eec510861df344ff73f1d866d /board/sweetberry
parent2f5e46cef48ec0671fd014bbdb38b060339db998 (diff)
downloadchrome-ec-2b460c9830670070152a4509ab38b24aa80ed304.tar.gz
common/update_fw: Remove board-specific rw_sections
rw_sections is defined in the exact same way on all common code boards, let's remove it, and hard-code the values in update_fw.c instead. Take this as an opportunity to fold set_valid_section in fw_update_start (this will be useful later on, as we also want to return the inactive region version). BRANCH=none BUG=b:35587171 TEST=make buildall -j TEST=Can update hammer over USB using usb_updater2 Change-Id: I4dd3224f17f89c1851c379255f1195dc54528b3d Reviewed-on: https://chromium-review.googlesource.com/476451 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Nick Sanders <nsanders@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'board/sweetberry')
-rw-r--r--board/sweetberry/board.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/board/sweetberry/board.c b/board/sweetberry/board.c
index 2bb97fde39..d05bb70bf4 100644
--- a/board/sweetberry/board.c
+++ b/board/sweetberry/board.c
@@ -67,25 +67,6 @@ const struct i2c_port_t i2c_ports[] = {
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
-/******************************************************************************
- * Support firmware upgrade over USB. We can update whichever section is not
- * the current section.
- */
-
-/*
- * This array defines possible sections available for the firmware update.
- * The section which does not map the current executing code is picked as the
- * valid update area. The values are offsets into the flash space.
- */
-const struct section_descriptor board_rw_sections[] = {
- {CONFIG_RO_MEM_OFF,
- CONFIG_RO_MEM_OFF + CONFIG_RO_SIZE},
- {CONFIG_RW_MEM_OFF,
- CONFIG_RW_MEM_OFF + CONFIG_RW_SIZE},
-};
-const struct section_descriptor * const rw_sections = board_rw_sections;
-const int num_rw_sections = ARRAY_SIZE(board_rw_sections);
-
#define GPIO_SET_HS(bank, number) \
(STM32_GPIO_OSPEEDR(GPIO_##bank) |= (0x3 << ((number) * 2)))