File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2776,7 +2776,7 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor)
27762776{
27772777 struct spi_nor_flash_parameter * params = nor -> params ;
27782778 struct spi_nor_erase_map * map = & params -> erase_map ;
2779- const u8 no_sfdp_flags = nor -> info -> no_sfdp_flags ;
2779+ const u16 no_sfdp_flags = nor -> info -> no_sfdp_flags ;
27802780 u8 i , erase_mask ;
27812781
27822782 if (no_sfdp_flags & SPI_NOR_DUAL_READ ) {
@@ -2817,6 +2817,9 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor)
28172817 SPINOR_OP_PP , SNOR_PROTO_8_8_8_DTR );
28182818 }
28192819
2820+ if (no_sfdp_flags & SPI_NOR_DTR_BSWAP16 )
2821+ nor -> flags |= SNOR_F_DTR_BSWAP16 ;
2822+
28202823 /*
28212824 * Sector Erase settings. Sort Erase Types in ascending order, with the
28222825 * smallest erase size starting at BIT(0).
Original file line number Diff line number Diff line change @@ -484,6 +484,8 @@ struct spi_nor_fixups {
484484 * SPI_NOR_OCTAL_READ: flash supports Octal Read.
485485 * SPI_NOR_OCTAL_DTR_READ: flash supports octal DTR Read.
486486 * SPI_NOR_OCTAL_DTR_PP: flash supports Octal DTR Page Program.
487+ * SPI_NOR_DTR_BSWAP16: the byte order of 16-bit words is swapped when
488+ * read or written in DTR mode compared to STR mode.
487489 *
488490 * @fixup_flags: flags that indicate support that can be discovered via SFDP
489491 * ideally, but can not be discovered for this particular flash
@@ -528,14 +530,15 @@ struct flash_info {
528530#define SPI_NOR_QUAD_PP BIT(9)
529531#define SPI_NOR_RWW BIT(10)
530532
531- u8 no_sfdp_flags ;
533+ u16 no_sfdp_flags ;
532534#define SPI_NOR_SKIP_SFDP BIT(0)
533535#define SECT_4K BIT(1)
534536#define SPI_NOR_DUAL_READ BIT(3)
535537#define SPI_NOR_QUAD_READ BIT(4)
536538#define SPI_NOR_OCTAL_READ BIT(5)
537539#define SPI_NOR_OCTAL_DTR_READ BIT(6)
538540#define SPI_NOR_OCTAL_DTR_PP BIT(7)
541+ #define SPI_NOR_DTR_BSWAP16 BIT(8)
539542
540543 u8 fixup_flags ;
541544#define SPI_NOR_4B_OPCODES BIT(0)
You can’t perform that action at this time.
0 commit comments