[U-Boot] [PATCH] 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 phil.edworthy@renesas.com --- drivers/mtd/spi/spi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 6e595c8..fee930b 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -902,7 +902,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; }

On Fri, Dec 9, 2016 at 4:03 PM, Phil Edworthy phil.edworthy@renesas.com wrote:
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 phil.edworthy@renesas.com
Applied to u-boot-spi/master
thanks!
participants (2)
-
Jagan Teki
-
Phil Edworthy