diff options
author | CHLin <CHLIN56@nuvoton.com> | 2017-08-22 10:47:20 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-23 21:17:23 -0700 |
commit | 1f5ea1619b584e896967703c6ac002f272e24d72 (patch) | |
tree | ef31236bd017ac776695e1cbcf241eb23b39070c | |
parent | 8eea86766b02055a615b261739e2272ba1531b10 (diff) | |
download | chrome-ec-1f5ea1619b584e896967703c6ac002f272e24d72.tar.gz |
npcx: Don't enable CONFIG_CMD_FLASH_TRISTATE when internal flash is used
The bit controlling the tri-state of FIU pins is reserved when the
internal flash is used and should not be modified. This CL adds a
compiler error to prevent this kind of misuse.
BRANCH=none
BUG=none
TEST=No build errors for "make buildall". "BORAD=npcx7_evb make" with
CONFIG_CMD_FLASH_TRISTATE defined, make sure the error message is
printed.
Change-Id: I020c8ab9e02b9a377879bbd2a337943e77a369d6
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/624828
Commit-Ready: CH Lin <chlin56@nuvoton.com>
Tested-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | chip/npcx/flash.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/npcx/flash.c b/chip/npcx/flash.c index 9c73bbdb3c..a0a02791ca 100644 --- a/chip/npcx/flash.c +++ b/chip/npcx/flash.c @@ -730,6 +730,9 @@ DECLARE_HOST_COMMAND(EC_CMD_FLASH_SPI_INFO, #endif #ifdef CONFIG_CMD_FLASH_TRISTATE +#ifdef NPCX_INT_FLASH_SUPPORT +#error "Flash tristate is not relevant when internal flash is used." +#endif static void flash_tristate(int enable) { /* Enable/Disable FIU pins to tri-state */ |