diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-07-18 11:05:14 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-07-18 18:14:47 -0700 |
commit | 9a8223a8db69b036f783493bb5c96465ce176bbf (patch) | |
tree | 64998c9b7c83bfd9e7b3f303dc8ff11f7f643438 /chip/lm4/flash.c | |
parent | 1a76325fa8ec6256946598e0e41e17262d8d9198 (diff) | |
download | chrome-ec-9a8223a8db69b036f783493bb5c96465ce176bbf.tar.gz |
Remove flash_read()
Everything now uses flash_dataptr() to get at flash memory rather than
calling the read function, since the read function adds a needless memcpy().
BUG=chrome-os-partner:11150
TEST=manual
flashwp enable
reboot
flashinfo -> should show ro_at_boot
flashwp disable
reboot
flashinfo -> should no longer show ro_at_boot
Change-Id: I1830e2f036cf6777115c782c1737335ff2eb4ce0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27796
Diffstat (limited to 'chip/lm4/flash.c')
-rw-r--r-- | chip/lm4/flash.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/chip/lm4/flash.c b/chip/lm4/flash.c index c69538d5bc..0df24ed838 100644 --- a/chip/lm4/flash.c +++ b/chip/lm4/flash.c @@ -32,39 +32,26 @@ int flash_get_write_block_size(void) return FLASH_WRITE_BYTES; } - int flash_get_erase_block_size(void) { return FLASH_ERASE_BYTES; } - int flash_get_protect_block_size(void) { BUILD_ASSERT(FLASH_PROTECT_BYTES == CONFIG_FLASH_BANK_SIZE); return FLASH_PROTECT_BYTES; } - int flash_physical_size(void) { return (LM4_FLASH_FSIZE + 1) * FLASH_PROTECT_BYTES; } - -int flash_physical_read(int offset, int size, char *data) -{ - /* Just read the flash from its memory window. */ - /* TODO: (crosbug.com/p/7473) is this affected by data cache? - * That is, if we read a block, then alter it, then read it - * again, do we get the old data? */ - memcpy(data, (char *)offset, size); - return EC_SUCCESS; -} - - -/* Perform a write-buffer operation. Buffer (FWB) and address (FMA) must be - * pre-loaded. */ +/** + * Perform a write-buffer operation. Buffer (FWB) and address (FMA) must be + * pre-loaded. + */ static int write_buffer(void) { int t; |