remove trailing whitespace
Change-Id: Ib91889a374515d36a2b12b53aeb12b6ea6e22732 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/364 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
committed by
Patrick Georgi
parent
784544b934
commit
5ff7c13e85
@@ -16,7 +16,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
#include "agesawrapper.h"
|
||||
#include "amdlib.h"
|
||||
#include "BiosCallOuts.h"
|
||||
@@ -61,7 +61,7 @@ CONST BIOS_CALLOUT_STRUCT BiosCallouts[REQUIRED_CALLOUTS] =
|
||||
{AGESA_HOOKBEFORE_DQS_TRAINING,
|
||||
BiosHookBeforeDQSTraining
|
||||
},
|
||||
|
||||
|
||||
{AGESA_HOOKBEFORE_DRAM_INIT,
|
||||
BiosHookBeforeDramInit
|
||||
},
|
||||
@@ -149,7 +149,7 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
/* If BufferHandle has not been allocated on the heap, CurrNodePtr here points
|
||||
to the end of the allocated nodes list.
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
/* Find the node that best fits the requested buffer size */
|
||||
FreedNodeOffset = BiosHeapBasePtr->StartOfFreedNodes;
|
||||
@@ -199,7 +199,7 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
|
||||
/* If BestFitNode is the first buffer in the list, then update
|
||||
StartOfFreedNodes to reflect the new free node
|
||||
*/
|
||||
*/
|
||||
if (BestFitNodeOffset == BiosHeapBasePtr->StartOfFreedNodes) {
|
||||
BiosHeapBasePtr->StartOfFreedNodes = NextFreeOffset;
|
||||
} else {
|
||||
@@ -284,10 +284,10 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
FreedNodePtr->NextNodeOffset = 0;
|
||||
|
||||
} else {
|
||||
/* Otherwise, add freed node to the start of the list
|
||||
Update NextNodeOffset and BufferSize to include the
|
||||
/* Otherwise, add freed node to the start of the list
|
||||
Update NextNodeOffset and BufferSize to include the
|
||||
size of BIOS_BUFFER_NODE
|
||||
*/
|
||||
*/
|
||||
AllocNodePtr->NextNodeOffset = FreedNodeOffset;
|
||||
}
|
||||
/* Update StartOfFreedNodes to the new first node */
|
||||
@@ -295,7 +295,7 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
} else {
|
||||
/* Traverse list of freed nodes to find where the deallocated node
|
||||
should be place
|
||||
*/
|
||||
*/
|
||||
NextNodeOffset = FreedNodeOffset;
|
||||
NextNodePtr = FreedNodePtr;
|
||||
while (AllocNodeOffset > NextNodeOffset) {
|
||||
@@ -309,7 +309,7 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
|
||||
/* If deallocated node is adjacent to the next node,
|
||||
concatenate both nodes
|
||||
*/
|
||||
*/
|
||||
if (NextNodeOffset == EndNodeOffset) {
|
||||
NextNodePtr = (BIOS_BUFFER_NODE *) (BiosHeapBaseAddr + NextNodeOffset);
|
||||
AllocNodePtr->BufferSize += NextNodePtr->BufferSize;
|
||||
@@ -323,7 +323,7 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
}
|
||||
/* If deallocated node is adjacent to the previous node,
|
||||
concatenate both nodes
|
||||
*/
|
||||
*/
|
||||
PrevNodePtr = (BIOS_BUFFER_NODE *) (BiosHeapBaseAddr + PrevNodeOffset);
|
||||
EndNodeOffset = PrevNodeOffset + PrevNodePtr->BufferSize;
|
||||
if (AllocNodeOffset == EndNodeOffset) {
|
||||
@@ -387,10 +387,10 @@ AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
UINT8 Value;
|
||||
UINTN ResetType;
|
||||
AMD_CONFIG_PARAMS *StdHeader;
|
||||
|
||||
|
||||
ResetType = Data;
|
||||
StdHeader = ConfigPtr;
|
||||
|
||||
|
||||
//
|
||||
// Perform the RESET based upon the ResetType. In case of
|
||||
// WARM_RESET_WHENVER and COLD_RESET_WHENEVER, the request will go to
|
||||
@@ -402,17 +402,17 @@ AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
case WARM_RESET_WHENEVER:
|
||||
case COLD_RESET_WHENEVER:
|
||||
break;
|
||||
|
||||
|
||||
case WARM_RESET_IMMEDIATELY:
|
||||
case COLD_RESET_IMMEDIATELY:
|
||||
Value = 0x06;
|
||||
LibAmdIoWrite (AccessWidth8, 0xCf9, &Value, StdHeader);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Status = 0;
|
||||
return Status;
|
||||
}
|
||||
@@ -445,10 +445,10 @@ AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
UINT8 Data8;
|
||||
UINT16 Data16;
|
||||
UINT8 TempData8;
|
||||
|
||||
|
||||
FcnData = Data;
|
||||
MemData = ConfigPtr;
|
||||
|
||||
|
||||
Status = AGESA_SUCCESS;
|
||||
/* Get SB800 MMIO Base (AcpiMmioAddr) */
|
||||
WriteIo8 (0xCD6, 0x27);
|
||||
@@ -459,14 +459,14 @@ AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
Data16 |= Data8;
|
||||
AcpiMmioAddr = (UINT32)Data16 << 16;
|
||||
GpioMmioAddr = AcpiMmioAddr + GPIO_BASE;
|
||||
|
||||
|
||||
Data8 = Read64Mem8(GpioMmioAddr+SB_GPIO_REG178);
|
||||
Data8 &= ~BIT5;
|
||||
TempData8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);
|
||||
TempData8 &= 0x03;
|
||||
TempData8 |= Data8;
|
||||
Write64Mem8(GpioMmioAddr+SB_GPIO_REG178, TempData8);
|
||||
|
||||
|
||||
Data8 |= BIT2+BIT3;
|
||||
Data8 &= ~BIT4;
|
||||
TempData8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);
|
||||
@@ -485,7 +485,7 @@ AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
TempData8 &= 0x23;
|
||||
TempData8 |= Data8;
|
||||
Write64Mem8(GpioMmioAddr+SB_GPIO_REG179, TempData8);
|
||||
|
||||
|
||||
switch(MemData->ParameterListPtr->DDR3Voltage){
|
||||
case VOLT1_35:
|
||||
Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);
|
||||
@@ -527,12 +527,12 @@ AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
AGESA_STATUS Status;
|
||||
UINTN FcnData;
|
||||
PCIe_SLOT_RESET_INFO *ResetInfo;
|
||||
|
||||
|
||||
UINT32 GpioMmioAddr;
|
||||
UINT32 AcpiMmioAddr;
|
||||
UINT8 Data8;
|
||||
UINT16 Data16;
|
||||
|
||||
|
||||
FcnData = Data;
|
||||
ResetInfo = ConfigPtr;
|
||||
// Get SB800 MMIO Base (AcpiMmioAddr)
|
||||
@@ -552,13 +552,13 @@ AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
{
|
||||
case AssertSlotReset:
|
||||
Data8 = Read64Mem8(GpioMmioAddr+SB_GPIO_REG21);
|
||||
Data8 &= ~(UINT8)BIT6 ;
|
||||
Data8 &= ~(UINT8)BIT6 ;
|
||||
Write64Mem8(GpioMmioAddr+SB_GPIO_REG21, Data8); // MXM_GPIO0. GPIO21
|
||||
Status = AGESA_SUCCESS;
|
||||
break;
|
||||
case DeassertSlotReset:
|
||||
Data8 = Read64Mem8(GpioMmioAddr+SB_GPIO_REG21);
|
||||
Data8 |= BIT6 ;
|
||||
Data8 |= BIT6 ;
|
||||
Write64Mem8 (GpioMmioAddr+SB_GPIO_REG21, Data8); // MXM_GPIO0. GPIO21
|
||||
Status = AGESA_SUCCESS;
|
||||
break;
|
||||
@@ -575,7 +575,7 @@ AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||
break;
|
||||
case DeassertSlotReset:
|
||||
Data8 = Read64Mem8(GpioMmioAddr+SB_GPIO_REG25);
|
||||
Data8 |= BIT6 ;
|
||||
Data8 |= BIT6 ;
|
||||
Write64Mem8 (GpioMmioAddr+SB_GPIO_REG25, Data8); // PCIE_RST#_LAN, GPIO25
|
||||
Status = AGESA_SUCCESS;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user