diff options
author | Tim Lin <tim2.lin@ite.corp-partner.google.com> | 2021-07-13 14:54:30 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-14 21:53:58 +0000 |
commit | aa284fcd49379fefe869b502050aaa40110ea1de (patch) | |
tree | e3c4082e5c670e6fa610a5d355dd7564e89fc099 | |
parent | 1fd309e18a8f70ec67acaa3667d48ba0cb5a6d02 (diff) | |
download | chrome-ec-aa284fcd49379fefe869b502050aaa40110ea1de.tar.gz |
zephyr/drivers: it8xxx2: flash protection API is deprecated
The function of flash_write_protection_set() is deprecated and will
be removed in Zephyr 2.8.
BUG=b:187192628
BRANCH=none
TEST=No warning while building the board of hayato on zephyr2.6
Change-Id: I65e38557d7d65b6f079f20af7ecc098e30d57220
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023747
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | zephyr/drivers/cros_flash/cros_flash_it8xxx2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c b/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c index 0f2102f401..5b7c04a24a 100644 --- a/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c +++ b/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c @@ -232,7 +232,9 @@ static int cros_flash_it8xxx2_protect_now(const struct device *dev, int all) if (all) { /* Protect the entire flash */ - flash_write_protection_set(flash_controller, all); + flash_protect_banks(0, + CONFIG_FLASH_SIZE_BYTES / CONFIG_FLASH_BANK_SIZE, + FLASH_WP_EC); data->all_protected = 1; } else { /* Protect the read-only section and persistent state */ |