northbridge/amd/amdmct: Incorrect usage of logical over bitwise and
Small mix up of logical/bitwise logical and operation. Spotted by Clang. Change-Id: I2c2256b9b2f2b6ca627914118c745f579555acc9 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5820 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
This commit is contained in:
parent
ba363d3f18
commit
68a56caf7e
|
@ -439,7 +439,7 @@ static void vErratum372(struct DCTStatStruc *pDCTstat)
|
||||||
{
|
{
|
||||||
msr_t msr = rdmsr(NB_CFG_MSR);
|
msr_t msr = rdmsr(NB_CFG_MSR);
|
||||||
|
|
||||||
int nbPstate1supported = ! (msr.hi && (1 << (NB_GfxNbPstateDis -32))) ;
|
int nbPstate1supported = !(msr.hi & (1 << (NB_GfxNbPstateDis -32)));
|
||||||
|
|
||||||
// is this the right way to check for NB pstate 1 or DDR3-1333 ?
|
// is this the right way to check for NB pstate 1 or DDR3-1333 ?
|
||||||
if (((pDCTstat->PresetmaxFreq==1333)||(nbPstate1supported))
|
if (((pDCTstat->PresetmaxFreq==1333)||(nbPstate1supported))
|
||||||
|
@ -456,10 +456,10 @@ static void vErratum414(struct DCTStatStruc *pDCTstat)
|
||||||
for(; dct < 2 ; dct++)
|
for(; dct < 2 ; dct++)
|
||||||
{
|
{
|
||||||
int dRAMConfigHi = Get_NB32(pDCTstat->dev_dct,0x94 + (0x100 * dct));
|
int dRAMConfigHi = Get_NB32(pDCTstat->dev_dct,0x94 + (0x100 * dct));
|
||||||
int powerDown = dRAMConfigHi && (1 << PowerDownEn ) ;
|
int powerDown = dRAMConfigHi & (1 << PowerDownEn );
|
||||||
int ddr3 = dRAMConfigHi && (1 << Ddr3Mode ) ;
|
int ddr3 = dRAMConfigHi & (1 << Ddr3Mode );
|
||||||
int dRAMMRS = Get_NB32(pDCTstat->dev_dct,0x84 + (0x100 * dct));
|
int dRAMMRS = Get_NB32(pDCTstat->dev_dct,0x84 + (0x100 * dct));
|
||||||
int pchgPDModeSel = dRAMMRS && (1 << PchgPDModeSel ) ;
|
int pchgPDModeSel = dRAMMRS & (1 << PchgPDModeSel);
|
||||||
if (powerDown && ddr3 && pchgPDModeSel )
|
if (powerDown && ddr3 && pchgPDModeSel )
|
||||||
{
|
{
|
||||||
Set_NB32(pDCTstat->dev_dct,0x84 + (0x100 * dct), dRAMMRS & ~(1 << PchgPDModeSel) );
|
Set_NB32(pDCTstat->dev_dct,0x84 + (0x100 * dct), dRAMMRS & ~(1 << PchgPDModeSel) );
|
||||||
|
|
Loading…
Reference in New Issue