sf: Warn to use BAR for > 16MiB flashes
authorJagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com>
Fri, 21 Jun 2013 13:49:03 +0000 (19:19 +0530)
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Sun, 23 Jun 2013 16:40:36 +0000 (22:10 +0530)
Warning for > 16MiB flashes to #define CONFIG_SPI_FLASH_BAR

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
drivers/mtd/spi/spi_flash.c

index 51142d8f19a45529f5f08b36af42873827d822b2..a468208f4348b933ac56c24502abc6430a0a0131 100644 (file)
@@ -557,6 +557,12 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
        if (flash->memory_map)
                printf(", mapped at %p", flash->memory_map);
        puts("\n");
+#ifndef CONFIG_SPI_FLASH_BAR
+       if (flash->size > SPI_FLASH_16MB_BOUN) {
+               puts("SF: Warning - Only lower 16MiB accessible,");
+               puts(" Full access #define CONFIG_SPI_FLASH_BAR\n");
+       }
+#endif
 
        spi_release_bus(spi);