summaryrefslogtreecommitdiff
path: root/board/polyberry
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/polyberry
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/polyberry')
-rw-r--r--board/polyberry/board.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/board/polyberry/board.c b/board/polyberry/board.c
index d270498809..65039abd86 100644
--- a/board/polyberry/board.c
+++ b/board/polyberry/board.c
@@ -47,25 +47,6 @@ struct dwc_usb usb_ctl = {
.irq = STM32_IRQ_OTG_HS,
};
-/******************************************************************************
- * 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)))