summaryrefslogtreecommitdiff
path: root/common/spi_flash.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-11-20 14:40:48 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-21 02:44:47 +0000
commit905fc1cf6f469581154fe7ed3bc29cf766be1241 (patch)
treef61d9fab3ac547a2c4fb09ee5c29420b1c7d6d9e /common/spi_flash.c
parenta58083c421e211dd5cdb1426056a9cf2486bde70 (diff)
downloadchrome-ec-905fc1cf6f469581154fe7ed3bc29cf766be1241.tar.gz
Fix errors discovered by new compiler.
The latest gcc picked up a couple out-of-bounds issues, so "make buildall" was failing. This fixes them. BUG=none BRANCH=ToT TEST=make buildall -j Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Idcd6a3358ecbb0e0d2a610e1cd28c2f138ce520b Reviewed-on: https://chromium-review.googlesource.com/231156 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/spi_flash.c')
-rw-r--r--common/spi_flash.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/common/spi_flash.c b/common/spi_flash.c
index 20e4ce37cb..b68936ef91 100644
--- a/common/spi_flash.c
+++ b/common/spi_flash.c
@@ -425,22 +425,6 @@ int spi_flash_write(unsigned int offset, unsigned int bytes,
}
/**
- * Returns the SPI flash manufacturer ID and device ID [8:0]
- *
- * @return flash manufacturer + device ID or -1 on error
- */
-uint16_t spi_flash_get_id(void)
-{
- uint8_t cmd[4] = {SPI_FLASH_MFR_DEV_ID, 0, 0, 0};
- uint8_t resp[2];
-
- if (spi_transaction(cmd, 4, resp, 2) != EC_SUCCESS)
- return -1;
-
- return (resp[4] << 8) | resp[5];
-}
-
-/**
* Returns the SPI flash JEDEC ID (manufacturer ID, memory type, and capacity)
*
* @return flash JEDEC ID or -1 on error