fsl_sata: Move the snoop bit to another place
PATCH 3/3 fsl_sata: Move the snoop bit to another place
For P1022 SATA host controller, the data snoop bit of DW3 in PRDT is moved to bit28.
--- drivers/block/fsl_sata.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/fsl_sata.h +4 -0
@@ -244,7 +244,11 @@ typedef struct prd_entry {/* ext_c_ddc */ #define PRD_ENTRY_EXT 0x80000000/* extension flag or called indirect descriptor flag */ +#ifdef CONFIG_P1022 +#define PRD_ENTRY_DATA_SNOOP 0x10000000/* Snoop enable for all data associated with the PRD entry */ +#else #define PRD_ENTRY_DATA_SNOOP 0x00400000/* Snoop enable for all data associated with the PRD entry */ +#endif #define PRD_ENTRY_LEN_MASK 0x003fffff/* Data word count */ #define PRD_ENTRY_MAX_XFER_SZ (PRD_ENTRY_LEN_MASK + 1)
Signature · 1 line
1.6.4
PATCH 3/3 fsl_sata: Move the snoop bit to another place
Quoted 13 lines · Dave Liu
For P1022 SATA host controller, the data snoop bit of DW3 in PRDT is moved to bit28.
Signed-off-by Dave Liu <[email protected]>---
drivers/block/fsl_sata.h| 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)drivers/block/fsl_sata.h +0
-0
drivers/block/fsl_sata.h typedef struct prd_entry { · line 247
Quoted 4 lines
drivers/block/fsl_sata.h +1
-0@@ -244,7 +244,11 @@ typedef struct prd_entry {/* ext_c_ddc */ #define PRD_ENTRY_EXT 0x80000000/* extension flag or called indirect descriptor flag */ +#ifdef CONFIG_P1022
This should be something like CONFIG_FSL_SATA_V2. While P1022 is the first others will need this change and its more specific the the 2nd generation of the SATA HW IP block.
My preference is to make it run time if we can determine the IP block version based on a register read.
Quoted 14 lines
drivers/block/fsl_sata.h +3
-0+#define PRD_ENTRY_DATA_SNOOP 0x10000000/* Snoop enable for all data associated with the PRD entry */ +#else #define PRD_ENTRY_DATA_SNOOP 0x00400000/* Snoop enable for all data associated with the PRD entry */ +#endif #define PRD_ENTRY_LEN_MASK 0x003fffff/* Data word count */ #define PRD_ENTRY_MAX_XFER_SZ (PRD_ENTRY_LEN_MASK + 1)Signature · 6 lines
1.6.4 _______________________________________________ u-boot-release mailing list u-boot-release at linux.freescale.net http://linux.freescale.net/mailman/listinfo/u-boot-release
PATCH 3/3 fsl_sata: Move the snoop bit to another place
Quoted 5 lines
Quoted 1 line
+#ifdef
CONFIG_P1022This should be something like
CONFIG_FSL_SATA_V2. While P1022 is the first others will need this change and its more specific the the 2nd generation of the SATA HW IP block.
Good idea, CONFIG_FSL_SATA_V2 is better.