Skip to contentSkip to conversation

fsl_qspi: fix address mask issue

PATCH New Ye Li 3 participants 3 messages Jan 19, 2016 – Feb 2, 2016 SPI

lore
Share & tools
lore

Ye Li

author
#0 lore raw

PATCH 1/1 fsl_qspi: fix address mask issue

The OFFSET_BITS_MASK should mask bit from 0-23.
By using GENMASK(24, 0), when using the fast read common (0xb), a invalid sf_addr 0x1000000 is produced by swab32(txbuf) & OFFSET_BITS_MASK.

---
 drivers/spi/fsl_qspi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/spi/fsl_qspi.c +1 -1
index feec3e8..542b6cf 100644
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define TX_BUFFER_SIZE		0x40
 #endif
 
-#define OFFSET_BITS_MASK	GENMASK(24, 0)
+#define OFFSET_BITS_MASK	GENMASK(23, 0)
 
 #define FLASH_STATUS_WEL	0x02
 
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 fsl_qspi: fix address mask issue

Quoted 14 lines · Ye Li

The OFFSET_BITS_MASK should mask bit from 0-23.
By using GENMASK(24, 0), when using the fast read common (0xb), a invalid sf_addr 0x1000000 is produced by swab32(txbuf) & OFFSET_BITS_MASK.

---
drivers/spi/fsl_qspi.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
drivers/spi/fsl_qspi.c +0 -0
index feec3e8..542b6cf 100644

drivers/spi/fsl_qspi.c DECLARE_GLOBAL_DATA_PTR; · line 30

Quoted 7 lines
drivers/spi/fsl_qspi.c +1 -1
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define TX_BUFFER_SIZE		0x40
 #endif
 
-#define OFFSET_BITS_MASK	GENMASK(24, 0)
+#define OFFSET_BITS_MASK	GENMASK(23, 0)
 
 #define FLASH_STATUS_WEL	0x02
Quoted 8 lines
Signature · 7 lines
-- 
1.7.4.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot