diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-03-10 11:50:39 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-03-11 23:18:09 +0000 |
commit | 27199e7b64659a2db7114c670b903578858f8d50 (patch) | |
tree | 71a7332d6b7bbbe3cd9c57ca21b1d736daff8f96 /include/spi_flash.h | |
parent | d32be0292f1e1aa389da579ea29f7a151ae002e1 (diff) | |
download | chrome-ec-27199e7b64659a2db7114c670b903578858f8d50.tar.gz |
spi_flash: Add protect support for W25X40
W25X40 uses a different protection register encoding than our existing
W25Q64 code. Move the SPI ROM option to a config, and add support for
the new part.
BUG=chrome-os-partner:37688
TEST=`make buildall -j`. W25X40 protection code tested in a subsequent
commit.
BRANCH=None
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Iaaeabf42c6c62c20debc91afd2cf8671c14244c8
Reviewed-on: https://chromium-review.googlesource.com/258440
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/spi_flash.h')
-rw-r--r-- | include/spi_flash.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/spi_flash.h b/include/spi_flash.h index 9e83ea9e91..9b8a0a64d5 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -141,11 +141,9 @@ uint64_t spi_flash_get_unique_id(void); * Note that this does not check the hardware WP pin as we might not be * able to read the WP pin status. * - * @param wp Status register write protection mode - * - * @return EC_SUCCESS for no protection, or non-zero if error. + * @return enum spi_flash_wp status based on protection */ -int spi_flash_check_wp(void); +enum spi_flash_wp spi_flash_check_wp(void); /** * Set SPI flash status register write protection |