summaryrefslogtreecommitdiff
path: root/include/flash.h
diff options
context:
space:
mode:
authorPatryk Duda <pdk@semihalf.com>2022-10-04 17:14:56 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-22 21:20:24 +0000
commitf6bcb51d2d26a0470d955700c9e5bf7ab0d0eeba (patch)
tree4e4493d82847ce8b3bd08d6440fb6b4a3e849f5e /include/flash.h
parent8510a42afaaae1aece2a63fa9aad1530a64c4f78 (diff)
downloadchrome-ec-f6bcb51d2d26a0470d955700c9e5bf7ab0d0eeba.tar.gz
flash: Move printing information about regions to separate function
Printing information about sectors requires information about flash size and number of sectors (or flash_bank_array in case of different sector size) to be defined in CrosEC. When using Zephyr we should use DTS or structures defined in the Zephyr flash driver (through API). Moving code that depends on CrosEC structures/defines will make easier to enable support for variable sector sizes in CrosEC with Zephyr. BUG=b:239712345 BRANCH=none TEST=make buildall -j TEST=Compile bloonchipper firmware and flash it on dragonclaw board. Run 'flashinfo' command. Make sure that the output is correct. LOW_COVERAGE_REASON=This patch only moves prints to a separate function. Coverage is low because we are only testing a case without CONFIG_FLASH_MULTIPLE_REGION enabled. Later commits add tests which will check behaviour with this option enabled, but they will use another printing function (introduced later). I've checked this manually (see TEST above). Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I5b93a910b9c1c5906da1648a61f00f42e563bf25 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3932161 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Patryk Duda <patrykd@google.com> Commit-Queue: Patryk Duda <patrykd@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Bobby Casey <bobbycasey@google.com>
Diffstat (limited to 'include/flash.h')
-rw-r--r--include/flash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h
index 5df6afdb09..7e9cbf3f40 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -50,6 +50,8 @@ int crec_flash_bank_start_offset(int bank);
int crec_flash_bank_erase_size(int bank);
+void crec_flash_print_region_info(void);
+
/* Number of physical flash banks */
#define PHYSICAL_BANKS CONFIG_FLASH_MULTIPLE_REGION