diff options
Diffstat (limited to 'src/mainboard/amd/torpedo/BiosCallOuts.c')
-rwxr-xr-x | src/mainboard/amd/torpedo/BiosCallOuts.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mainboard/amd/torpedo/BiosCallOuts.c b/src/mainboard/amd/torpedo/BiosCallOuts.c index bd6c633c65..355077f189 100755 --- a/src/mainboard/amd/torpedo/BiosCallOuts.c +++ b/src/mainboard/amd/torpedo/BiosCallOuts.c @@ -539,25 +539,30 @@ AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr) Data16 |= Data8; AcpiMmioAddr = (UINT32)Data16 << 16; GpioMmioAddr = AcpiMmioAddr + GPIO_BASE; - if(MemData->ParameterListPtr->DDR3Voltage == VOLT1_5) { - Data8 = Read64Mem8(GpioMmioAddr+SB_GPIO_REG178); - Data8 |= BIT6; - Write64Mem8(GpioMmioAddr+SB_GPIO_REG178, Data8); - } else if(MemData->ParameterListPtr->DDR3Voltage == VOLT1_35) { + + switch(MemData->ParameterListPtr->DDR3Voltage){ + case VOLT1_35: Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178); Data8 &= ~(UINT8)BIT6; Write64Mem8(GpioMmioAddr+SB_GPIO_REG178, Data8); Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG179); - Data8 |= BIT6; + Data8 |= (UINT8)BIT6; Write64Mem8(GpioMmioAddr+SB_GPIO_REG179, Data8); - } else if(MemData->ParameterListPtr->DDR3Voltage == VOLT1_25) { + break; + case VOLT1_25: Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178); Data8 &= ~(UINT8)BIT6; Write64Mem8(GpioMmioAddr+SB_GPIO_REG178, Data8); Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG179); Data8 &= ~(UINT8)BIT6; Write64Mem8(GpioMmioAddr+SB_GPIO_REG179, Data8); - } else {} + break; + case VOLT1_5: + default: + Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178); + Data8 |= (UINT8)BIT6; + Write64Mem8(GpioMmioAddr+SB_GPIO_REG178, Data8); + } return Status; } |