diff options
-rw-r--r-- | src/soc/intel/broadwell/include/soc/sata.h | 8 | ||||
-rw-r--r-- | src/soc/intel/broadwell/sata.c | 16 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/soc/intel/broadwell/include/soc/sata.h b/src/soc/intel/broadwell/include/soc/sata.h index 357fe584af..73e7b3150a 100644 --- a/src/soc/intel/broadwell/include/soc/sata.h +++ b/src/soc/intel/broadwell/include/soc/sata.h @@ -25,8 +25,12 @@ #define SATA_SP 0xd0 /* Scratchpad */ /* SATA IOBP Registers */ -#define SATA_IOBP_SP0G3IR 0xea000151 -#define SATA_IOBP_SP1G3IR 0xea000051 +#define SATA_IOBP_SP0_SECRT88 0xea002688 +#define SATA_IOBP_SP1_SECRT88 0xea002488 + +#define SATA_SECRT88_VADJ_MASK 0xff +#define SATA_SECRT88_VADJ_SHIFT 16 + #define SATA_IOBP_SP0DTLE_DATA 0xea002550 #define SATA_IOBP_SP0DTLE_EDGE 0xea002554 #define SATA_IOBP_SP1DTLE_DATA 0xea002750 diff --git a/src/soc/intel/broadwell/sata.c b/src/soc/intel/broadwell/sata.c index cfb3854831..fd1e9f156a 100644 --- a/src/soc/intel/broadwell/sata.c +++ b/src/soc/intel/broadwell/sata.c @@ -138,12 +138,20 @@ static void sata_init(struct device *dev) /* Set Gen3 Transmitter settings if needed */ if (config->sata_port0_gen3_tx) - pch_iobp_update(SATA_IOBP_SP0G3IR, 0, - config->sata_port0_gen3_tx); + pch_iobp_update(SATA_IOBP_SP0_SECRT88, + ~(SATA_SECRT88_VADJ_MASK << + SATA_SECRT88_VADJ_SHIFT), + (config->sata_port0_gen3_tx & + SATA_SECRT88_VADJ_MASK) + << SATA_SECRT88_VADJ_SHIFT); if (config->sata_port1_gen3_tx) - pch_iobp_update(SATA_IOBP_SP1G3IR, 0, - config->sata_port1_gen3_tx); + pch_iobp_update(SATA_IOBP_SP1_SECRT88, + ~(SATA_SECRT88_VADJ_MASK << + SATA_SECRT88_VADJ_SHIFT), + (config->sata_port1_gen3_tx & + SATA_SECRT88_VADJ_MASK) + << SATA_SECRT88_VADJ_SHIFT); /* Set Gen3 DTLE DATA / EDGE registers if needed */ if (config->sata_port0_gen3_dtle) { |