summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorKuo-Jung Su <dantesu@faraday-tech.com>2013-07-04 03:40:36 (GMT)
committerStefan Roese <sr@denx.de>2013-07-25 14:43:40 (GMT)
commitd8b57c0a83f9cabc476ca0045c0089195c894b81 (patch)
treeaf908f279e17927c3a928e0c9aa2248086377b46 /drivers/mtd
parent62c175fbb8a0f9a926c88294ea9f7e88eb898f6c (diff)
downloadu-boot-fsl-qoriq-d8b57c0a83f9cabc476ca0045c0089195c894b81.tar.xz
cfi_flash: use buffer length in unmap_physmem()
While the flash_detect_legacy() of drivers/mtd/cfi_flash.c feed unmap_physmem() with MAP_NOCACHE as 2nd parameter, the do_spi_flash_read_write() of common/cmd_sf.c feed unmap_physmem() with the length of the mapped buffer as 2nd parameter. It's apparently a bug, and I personally think the 2nd parameter should be the length of the mapped buffer. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Albert Aribaud <albert.u.boot@aribaud.net> CC: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/cfi_flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 25a5710..616750d 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1820,7 +1820,7 @@ static int flash_detect_legacy(phys_addr_t base, int banknum)
break;
else
unmap_physmem((void *)info->start[0],
- MAP_NOCACHE);
+ info->portwidth);
}
}