aboutsummaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorTom Rini2019-01-21 11:57:58 -0500
committerTom Rini2019-01-21 11:57:58 -0500
commit82eeb71ae9ddcdcd5326b397cbe0c42b71553f67 (patch)
tree106647a53670dcb066cdffce90da1d4c6a9c6098 /env
parent49ad40298cc5639436c6d490b699ecb60895ba2d (diff)
Revert "env: sf: fix environment in SPI NOR"
Per Heiko the original changes were correct and something is misbehaving on his hardware. This reverts commit 3d5931e5986a49c44cdab845c6751d845812e8d8. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env')
-rw-r--r--env/sf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/env/sf.c b/env/sf.c
index 31dd0035752..b3dec82c353 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -98,7 +98,7 @@ static int spi_flash_read_env(struct spi_flash *flash, u32 offset, size_t len,
u32 addr = 0;
u32 page_size = flash->page_size;
- memset(buf, 0xff, len);
+ memset(buf, 0x0, len);
for (int i = 0; i < len / page_size; ++i) {
int ret = spi_flash_read(flash, offset, page_size,
&((char *)buf)[addr]);