@@ -242,64 +242,64 @@ static const struct sfdp_bfpt_read sfdp_bfpt_reads[] = {
242242 /* Fast Read 1-1-2 */
243243 {
244244 SNOR_HWCAPS_READ_1_1_2 ,
245- BFPT_DWORD (1 ), BIT (16 ), /* Supported bit */
246- BFPT_DWORD (4 ), 0 , /* Settings */
245+ SFDP_DWORD (1 ), BIT (16 ), /* Supported bit */
246+ SFDP_DWORD (4 ), 0 , /* Settings */
247247 SNOR_PROTO_1_1_2 ,
248248 },
249249
250250 /* Fast Read 1-2-2 */
251251 {
252252 SNOR_HWCAPS_READ_1_2_2 ,
253- BFPT_DWORD (1 ), BIT (20 ), /* Supported bit */
254- BFPT_DWORD (4 ), 16 , /* Settings */
253+ SFDP_DWORD (1 ), BIT (20 ), /* Supported bit */
254+ SFDP_DWORD (4 ), 16 , /* Settings */
255255 SNOR_PROTO_1_2_2 ,
256256 },
257257
258258 /* Fast Read 2-2-2 */
259259 {
260260 SNOR_HWCAPS_READ_2_2_2 ,
261- BFPT_DWORD (5 ), BIT (0 ), /* Supported bit */
262- BFPT_DWORD (6 ), 16 , /* Settings */
261+ SFDP_DWORD (5 ), BIT (0 ), /* Supported bit */
262+ SFDP_DWORD (6 ), 16 , /* Settings */
263263 SNOR_PROTO_2_2_2 ,
264264 },
265265
266266 /* Fast Read 1-1-4 */
267267 {
268268 SNOR_HWCAPS_READ_1_1_4 ,
269- BFPT_DWORD (1 ), BIT (22 ), /* Supported bit */
270- BFPT_DWORD (3 ), 16 , /* Settings */
269+ SFDP_DWORD (1 ), BIT (22 ), /* Supported bit */
270+ SFDP_DWORD (3 ), 16 , /* Settings */
271271 SNOR_PROTO_1_1_4 ,
272272 },
273273
274274 /* Fast Read 1-4-4 */
275275 {
276276 SNOR_HWCAPS_READ_1_4_4 ,
277- BFPT_DWORD (1 ), BIT (21 ), /* Supported bit */
278- BFPT_DWORD (3 ), 0 , /* Settings */
277+ SFDP_DWORD (1 ), BIT (21 ), /* Supported bit */
278+ SFDP_DWORD (3 ), 0 , /* Settings */
279279 SNOR_PROTO_1_4_4 ,
280280 },
281281
282282 /* Fast Read 4-4-4 */
283283 {
284284 SNOR_HWCAPS_READ_4_4_4 ,
285- BFPT_DWORD (5 ), BIT (4 ), /* Supported bit */
286- BFPT_DWORD (7 ), 16 , /* Settings */
285+ SFDP_DWORD (5 ), BIT (4 ), /* Supported bit */
286+ SFDP_DWORD (7 ), 16 , /* Settings */
287287 SNOR_PROTO_4_4_4 ,
288288 },
289289};
290290
291291static const struct sfdp_bfpt_erase sfdp_bfpt_erases [] = {
292292 /* Erase Type 1 in DWORD8 bits[15:0] */
293- {BFPT_DWORD (8 ), 0 },
293+ {SFDP_DWORD (8 ), 0 },
294294
295295 /* Erase Type 2 in DWORD8 bits[31:16] */
296- {BFPT_DWORD (8 ), 16 },
296+ {SFDP_DWORD (8 ), 16 },
297297
298298 /* Erase Type 3 in DWORD9 bits[15:0] */
299- {BFPT_DWORD (9 ), 0 },
299+ {SFDP_DWORD (9 ), 0 },
300300
301301 /* Erase Type 4 in DWORD9 bits[31:16] */
302- {BFPT_DWORD (9 ), 16 },
302+ {SFDP_DWORD (9 ), 16 },
303303};
304304
305305/**
@@ -458,7 +458,7 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
458458 le32_to_cpu_array (bfpt .dwords , BFPT_DWORD_MAX );
459459
460460 /* Number of address bytes. */
461- switch (bfpt .dwords [BFPT_DWORD (1 )] & BFPT_DWORD1_ADDRESS_BYTES_MASK ) {
461+ switch (bfpt .dwords [SFDP_DWORD (1 )] & BFPT_DWORD1_ADDRESS_BYTES_MASK ) {
462462 case BFPT_DWORD1_ADDRESS_BYTES_3_ONLY :
463463 case BFPT_DWORD1_ADDRESS_BYTES_3_OR_4 :
464464 params -> addr_nbytes = 3 ;
@@ -475,7 +475,7 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
475475 }
476476
477477 /* Flash Memory Density (in bits). */
478- val = bfpt .dwords [BFPT_DWORD (2 )];
478+ val = bfpt .dwords [SFDP_DWORD (2 )];
479479 if (val & BIT (31 )) {
480480 val &= ~BIT (31 );
481481
@@ -555,13 +555,13 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
555555 return spi_nor_post_bfpt_fixups (nor , bfpt_header , & bfpt );
556556
557557 /* Page size: this field specifies 'N' so the page size = 2^N bytes. */
558- val = bfpt .dwords [BFPT_DWORD (11 )];
558+ val = bfpt .dwords [SFDP_DWORD (11 )];
559559 val &= BFPT_DWORD11_PAGE_SIZE_MASK ;
560560 val >>= BFPT_DWORD11_PAGE_SIZE_SHIFT ;
561561 params -> page_size = 1U << val ;
562562
563563 /* Quad Enable Requirements. */
564- switch (bfpt .dwords [BFPT_DWORD (15 )] & BFPT_DWORD15_QER_MASK ) {
564+ switch (bfpt .dwords [SFDP_DWORD (15 )] & BFPT_DWORD15_QER_MASK ) {
565565 case BFPT_DWORD15_QER_NONE :
566566 params -> quad_enable = NULL ;
567567 break ;
@@ -608,15 +608,15 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
608608 }
609609
610610 /* Soft Reset support. */
611- if (bfpt .dwords [BFPT_DWORD (16 )] & BFPT_DWORD16_SWRST_EN_RST )
611+ if (bfpt .dwords [SFDP_DWORD (16 )] & BFPT_DWORD16_SWRST_EN_RST )
612612 nor -> flags |= SNOR_F_SOFT_RESET ;
613613
614614 /* Stop here if not JESD216 rev C or later. */
615615 if (bfpt_header -> length == BFPT_DWORD_MAX_JESD216B )
616616 return spi_nor_post_bfpt_fixups (nor , bfpt_header , & bfpt );
617617
618618 /* 8D-8D-8D command extension. */
619- switch (bfpt .dwords [BFPT_DWORD (18 )] & BFPT_DWORD18_CMD_EXT_MASK ) {
619+ switch (bfpt .dwords [SFDP_DWORD (18 )] & BFPT_DWORD18_CMD_EXT_MASK ) {
620620 case BFPT_DWORD18_CMD_EXT_REP :
621621 nor -> cmd_ext_type = SPI_NOR_EXT_REPEAT ;
622622 break ;
0 commit comments