From: Phil Edworthy Date: Fri, 9 Dec 2016 15:03:39 +0000 (+0000) Subject: sf: Do not force the DT memory map size to exactly match the device X-Git-Tag: v2017.01-rc2~7^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=db9225ba2686d6b7e249d00e1803bd07f71d6070;p=u-boot sf: Do not force the DT memory map size to exactly match the device As long as the memory mapped size specifeid in the DT is the same or bigger than the device size, it will work. So do not force the sizes to be identical. Signed-off-by: Phil Edworthy Reviewed-by: Jagan Teki --- diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 41fc0a6a24..b902540e4f 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -985,7 +985,7 @@ int spi_flash_decode_fdt(const void *blob, struct spi_flash *flash) return 0; } - if (flash->size != size) { + if (flash->size > size) { debug("%s: Memory map must cover entire device\n", __func__); return -1; }