From 377384e40023b613fb7369e6043247a93272b05f Mon Sep 17 00:00:00 2001 From: Shamile Khan Date: Tue, 2 Jun 2015 18:08:42 -0700 Subject: mec1322: Do not restrict SPI flash reads to Word Boundary. BUG=chrome-os-partner:41145 BRANCH=None TEST=flashrom can update EC's RW partition. Change-Id: I29c450c8cffbc8a47228836ce1959f316026e743 Signed-off-by: Shamile Khan Reviewed-on: https://chromium-review.googlesource.com/275633 Reviewed-by: Icarus W Sparry Commit-Queue: Icarus W Sparry Tested-by: Icarus W Sparry Reviewed-by: Shawn N --- chip/mec1322/flash.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/chip/mec1322/flash.c b/chip/mec1322/flash.c index 92a7dacb33..343258e811 100644 --- a/chip/mec1322/flash.c +++ b/chip/mec1322/flash.c @@ -21,7 +21,7 @@ * * @param offset Flash offset to write. * @param size Number of bytes to write. - * @param data Destination buffer for data. Must be 32-bit aligned. + * @param data Destination buffer for data. */ int flash_physical_read(int offset, int size, char *data) { @@ -29,10 +29,6 @@ int flash_physical_read(int offset, int size, char *data) offset += CONFIG_FLASH_BASE_SPI; - /* Fail if offset, size, and data aren't at least word-aligned */ - if ((offset | size | (uint32_t)(uintptr_t)data) & 3) - return EC_ERROR_INVAL; - spi_enable(1); ret = spi_flash_read((uint8_t *)data, offset, size); spi_enable(0); -- cgit v1.2.1