fsl_qspi: fix address mask issue
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
@@ -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
PATCH 1/1 fsl_qspi: fix address mask issue
Quoted 14 lines · Ye Li
The
OFFSET_BITS_MASKshould mask bit from 0-23.
By usingGENMASK(24, 0), when using the fast read common (0xb), a invalidsf_addr0x1000000is produced by swab32(txbuf) &OFFSET_BITS_MASK.Signed-off-by Ye Li <[email protected]>---
drivers/spi/fsl_qspi.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/spi/fsl_qspi.c +0
-0
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
PATCH 1/1 fsl_qspi: fix address mask issue
Quoted 6 lines · Peng Fan
Quoted 5 lines · Ye Li
The
OFFSET_BITS_MASKshould mask bit from 0-23.
By usingGENMASK(24, 0), when using the fast read common (0xb), a invalidsf_addr0x1000000is produced by swab32(txbuf) &OFFSET_BITS_MASK.Signed-off-by Ye Li <[email protected]>
It's already at ML [1]
[1] http://git.denx.de/?p=u-boot.git;a=commitdiff;h=8770413f380d07439bc9ad60c6b4d108d5a9adf0
--
Jagan.