From 9a8223a8db69b036f783493bb5c96465ce176bbf Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Wed, 18 Jul 2012 11:05:14 -0700 Subject: 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 Reviewed-on: https://gerrit.chromium.org/gerrit/27796 --- chip/lm4/flash.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'chip/lm4/flash.c') 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; -- cgit v1.2.1