From a71aa070e78eecd0fbc5b193e29cc32515d13b74 Mon Sep 17 00:00:00 2001 From: lihaichen Date: Wed, 4 Apr 2018 17:04:23 +0000 Subject: [PATCH] Merged in lihaichen/nuttx_fix_w25 (pull request #623) fix w25_cacheflush sector bug. Approved-by: Gregory Nutt --- drivers/mtd/w25.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/w25.c b/drivers/mtd/w25.c index d98364266e..3517796517 100644 --- a/drivers/mtd/w25.c +++ b/drivers/mtd/w25.c @@ -878,7 +878,7 @@ static void w25_cacheflush(struct w25_dev_s *priv) { /* Write entire erase block to FLASH */ - w25_pagewrite(priv, priv->sector, (off_t)priv->esectno << W25_PAGE_SHIFT, + w25_pagewrite(priv, priv->sector, (off_t)priv->esectno << W25_SECTOR_SHIFT, W25_SECTOR_SIZE); /* The case is no long dirty and the FLASH is no longer erased */