summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShamile Khan <shamile.khan@intel.com>2015-06-02 18:08:42 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-07 20:26:04 +0000
commit377384e40023b613fb7369e6043247a93272b05f (patch)
tree9e0c689d5e3c30a3ec88439edaf5013795084d15
parentdab5edc1b4f7658fd6141ec3b8e5826ad52cd84b (diff)
downloadchrome-ec-377384e40023b613fb7369e6043247a93272b05f.tar.gz
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 <shamile.khan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/275633 Reviewed-by: Icarus W Sparry <icarus.w.sparry@intel.com> Commit-Queue: Icarus W Sparry <icarus.w.sparry@intel.com> Tested-by: Icarus W Sparry <icarus.w.sparry@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--chip/mec1322/flash.c6
1 files changed, 1 insertions, 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);