summaryrefslogtreecommitdiff
path: root/include/flash.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2021-03-25 03:33:44 +0000
committerCommit Bot <commit-bot@chromium.org>2021-03-25 03:41:10 +0000
commit9b1155c2d10b611050f99dbd8e993338ec8a47bb (patch)
treec98b746fb9e4ef2ffe2e8cd583f809d398b33dd9 /include/flash.h
parent180a09484c9c6f94c3e2c8ec2ebd229b055efdb7 (diff)
downloadchrome-ec-9b1155c2d10b611050f99dbd8e993338ec8a47bb.tar.gz
Revert "Refactor CONFIG_FLASH_SIZE to CONFIG_FLASH_SIZE_BYTES"
This reverts commit 6f14eda97eae2fa3d98f6e87c46dc114169cedb1. Reason for revert: /opt/coreboot-sdk/lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld:build/coachz/firmware_image.lds:3336: nonconstant expression for load base Original change's description: > Refactor CONFIG_FLASH_SIZE to CONFIG_FLASH_SIZE_BYTES > > In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used > throughout. The issue is that the units don't match. In > Zephyr the value is in KiB instead of bytes. This refactor > simply renames CONFIG_FLASH_SIZE in platform/ec to include > the unit (via _BYTES). > > BRANCH=none > BUG=b:174873770 > TEST=make buildall > be generated by the build instead of per board > > Signed-off-by: Yuval Peress <peress@chromium.org> > Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638 > Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> > Reviewed-by: Simon Glass <sjg@chromium.org> > Reviewed-by: Tom Hughes <tomhughes@chromium.org> > Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> > (cherry picked from commit 9e422c3c05fdd324565049b09be27c446f9dc0ca) > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782078 > Reviewed-by: Wai-Hong Tam <waihong@google.com> > Commit-Queue: Wai-Hong Tam <waihong@google.com> > Tested-by: Wai-Hong Tam <waihong@google.com> Bug: b:174873770 Change-Id: I83361fe984e495f5d585bae62f29bdfb23229900 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785270 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/flash.h')
-rw-r--r--include/flash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/flash.h b/include/flash.h
index 5fc6ae1055..7dfb309122 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -61,7 +61,7 @@ int flash_bank_erase_size(int bank);
#else /* CONFIG_FLASH_MULTIPLE_REGION */
/* Number of physical flash banks */
#ifndef PHYSICAL_BANKS
-#define PHYSICAL_BANKS (CONFIG_FLASH_SIZE_BYTES / CONFIG_FLASH_BANK_SIZE)
+#define PHYSICAL_BANKS (CONFIG_FLASH_SIZE / CONFIG_FLASH_BANK_SIZE)
#endif
/* WP region offset and size in units of flash banks */