61 lines
2.1 KiB
Diff
61 lines
2.1 KiB
Diff
|
From 65a6669afc667dacacf24a3a3f340205e38b0c5d Mon Sep 17 00:00:00 2001
|
||
|
From: Yunhui Cui <yunhui.cui@nxp.com>
|
||
|
Date: Fri, 27 May 2016 10:25:09 +0800
|
||
|
Subject: [PATCH 37/93] driver: spi: remove Warning prints for Spansion FS-S
|
||
|
fmaily
|
||
|
|
||
|
The Spansion flash FS-S family don't support the bank related
|
||
|
commands, Even if flash size exceed 16MB, we cannot enable the
|
||
|
macro CONFIG_SPI_FLASH_BAR. Also, we need remove the irrelevant
|
||
|
warnings:
|
||
|
"puts("SF: Warning - Only lower 16MiB accessible,"
|
||
|
"Full access #define CONFIG_SPI_FLASH_BAR"
|
||
|
|
||
|
Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||
|
---
|
||
|
drivers/mtd/spi/spi_flash.c | 13 +++++++++----
|
||
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
|
||
|
index e9d1c64..b0f09ab 100644
|
||
|
--- a/drivers/mtd/spi/spi_flash.c
|
||
|
+++ b/drivers/mtd/spi/spi_flash.c
|
||
|
@@ -1009,6 +1009,9 @@ int spi_flash_scan(struct spi_flash *flash)
|
||
|
u8 idcode[5];
|
||
|
u8 cmd;
|
||
|
int ret;
|
||
|
+#ifdef CONFIG_SPI_FLASH_SPANSION
|
||
|
+ u8 id[6];
|
||
|
+#endif
|
||
|
|
||
|
/* Read the ID codes */
|
||
|
ret = spi_flash_cmd(spi, CMD_READ_ID, idcode, sizeof(idcode));
|
||
|
@@ -1062,7 +1065,6 @@ int spi_flash_scan(struct spi_flash *flash)
|
||
|
if ((jedec == 0x0219 || (jedec == 0x0220)) &&
|
||
|
(ext_jedec & 0xff00) == 0x4d00) {
|
||
|
int ret;
|
||
|
- u8 id[6];
|
||
|
|
||
|
/* Read the ID codes again, 6 bytes */
|
||
|
ret = spi_flash_cmd(flash->spi, CMD_READ_ID, id, sizeof(id));
|
||
|
@@ -1253,10 +1255,13 @@ int spi_flash_scan(struct spi_flash *flash)
|
||
|
#endif
|
||
|
|
||
|
#ifndef CONFIG_SPI_FLASH_BAR
|
||
|
- if (((flash->dual_flash == SF_SINGLE_FLASH) &&
|
||
|
- (flash->size > SPI_FLASH_16MB_BOUN)) ||
|
||
|
+ if ((id[5] != 0x81) &&
|
||
|
+ /*Spansion FS-S family not support BAR ,
|
||
|
+ Even if CONFIG_SPI_FLASH_BAR is unable, Need not the Warning prints */
|
||
|
+ ((((flash->dual_flash == SF_SINGLE_FLASH) &&
|
||
|
+ (flash->size > SPI_FLASH_16MB_BOUN))) ||
|
||
|
((flash->dual_flash > SF_SINGLE_FLASH) &&
|
||
|
- (flash->size > SPI_FLASH_16MB_BOUN << 1))) {
|
||
|
+ (flash->size > SPI_FLASH_16MB_BOUN << 1)))) {
|
||
|
puts("SF: Warning - Only lower 16MiB accessible,");
|
||
|
puts(" Full access #define CONFIG_SPI_FLASH_BAR\n");
|
||
|
}
|
||
|
--
|
||
|
1.7.9.5
|
||
|
|