zero warnings days.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5394 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2010-04-09 13:35:03 +00:00 committed by Stefan Reinauer
parent d41a0bc532
commit 306343266b
6 changed files with 72 additions and 99 deletions

View File

@ -20,6 +20,6 @@
#ifndef NORTHBRIDGE_AMD_AMDFAM10_H #ifndef NORTHBRIDGE_AMD_AMDFAM10_H
#define NORTHBRIDGE_AMD_AMDFAM10_H #define NORTHBRIDGE_AMD_AMDFAM10_H
extern u32 amdfam10_scan_root_bus(device_t root, u32 max); u32 amdfam10_scan_root_bus(device_t root, u32 max);
#endif /* NORTHBRIDGE_AMD_AMDFAM10_H */ #endif /* NORTHBRIDGE_AMD_AMDFAM10_H */

View File

@ -166,7 +166,7 @@ static void setHtControlRegisterBits(SBDFO reg, u8 hiBit, u8 loBit, u32 *pValue)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* writeRoutingTable(u8 node, u8 target, u8 Link, cNorthBridge *nb) * writeRoutingTable(u8 node, u8 target, u8 Link, cNorthBridge *nb)
* *
* Description: * Description:
@ -188,7 +188,7 @@ static void setHtControlRegisterBits(SBDFO reg, u8 hiBit, u8 loBit, u32 *pValue)
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void writeRoutingTable(u8 node, u8 target, u8 link, cNorthBridge *nb) static void writeRoutingTable(u8 node, u8 target, u8 link, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u32 temp = (nb->selfRouteResponseMask | nb->selfRouteRequestMask) << (link + 1); u32 temp = (nb->selfRouteResponseMask | nb->selfRouteRequestMask) << (link + 1);
@ -206,7 +206,7 @@ void writeRoutingTable(u8 node, u8 target, u8 link, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* writeNodeID(u8 node, u8 nodeID, cNorthBridge *nb) * writeNodeID(u8 node, u8 nodeID, cNorthBridge *nb)
* *
* Description: * Description:
@ -220,7 +220,7 @@ void writeRoutingTable(u8 node, u8 target, u8 link, cNorthBridge *nb)
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void writeNodeID(u8 node, u8 nodeID, cNorthBridge *nb) static void writeNodeID(u8 node, u8 nodeID, cNorthBridge *nb)
{ {
u32 temp = nodeID; u32 temp = nodeID;
ASSERT((node < nb->maxNodes) && (nodeID < nb->maxNodes)); ASSERT((node < nb->maxNodes) && (nodeID < nb->maxNodes));
@ -234,7 +234,7 @@ void writeNodeID(u8 node, u8 nodeID, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* readDefLnk(u8 node, cNorthBridge *nb) * readDefLnk(u8 node, cNorthBridge *nb)
* *
* Description: * Description:
@ -252,7 +252,7 @@ void writeNodeID(u8 node, u8 nodeID, cNorthBridge *nb)
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u8 readDefLnk(u8 node, cNorthBridge *nb) static u8 readDefLnk(u8 node, cNorthBridge *nb)
{ {
u32 deflink = 0; u32 deflink = 0;
SBDFO licr; SBDFO licr;
@ -273,7 +273,7 @@ u8 readDefLnk(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* enableRoutingTables(u8 node, cNorthBridge *nb) * enableRoutingTables(u8 node, cNorthBridge *nb)
* *
* Description: * Description:
@ -286,7 +286,7 @@ u8 readDefLnk(u8 node, cNorthBridge *nb)
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void enableRoutingTables(u8 node, cNorthBridge *nb) static void enableRoutingTables(u8 node, cNorthBridge *nb)
{ {
u32 temp = 0; u32 temp = 0;
ASSERT((node < nb->maxNodes)); ASSERT((node < nb->maxNodes));
@ -301,7 +301,7 @@ void enableRoutingTables(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static BOOL
* verifyLinkIsCoherent(u8 node, u8 Link, cNorthBridge *nbk) * verifyLinkIsCoherent(u8 node, u8 Link, cNorthBridge *nbk)
* *
* Description: * Description:
@ -322,7 +322,7 @@ void enableRoutingTables(u8 node, cNorthBridge *nb)
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
BOOL verifyLinkIsCoherent(u8 node, u8 link, cNorthBridge *nb) static BOOL verifyLinkIsCoherent(u8 node, u8 link, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
@ -345,7 +345,7 @@ BOOL verifyLinkIsCoherent(u8 node, u8 link, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* bool * static bool
* readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb) * readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -371,7 +371,7 @@ BOOL verifyLinkIsCoherent(u8 node, u8 link, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
BOOL readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb) static BOOL readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb)
{ {
u32 before, after, unconnected, crc; u32 before, after, unconnected, crc;
SBDFO linkBase; SBDFO linkBase;
@ -436,7 +436,7 @@ BOOL readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u8 * static u8
* readToken(u8 node, cNorthBridge *nb) * readToken(u8 node, cNorthBridge *nb)
* *
* Description: * Description:
@ -452,7 +452,7 @@ BOOL readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u8 readToken(u8 node, cNorthBridge *nb) static u8 readToken(u8 node, cNorthBridge *nb)
{ {
u32 temp; u32 temp;
@ -472,7 +472,7 @@ u8 readToken(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* writeToken(u8 node, u8 Value, cNorthBridge *nb) * writeToken(u8 node, u8 Value, cNorthBridge *nb)
* *
* Description: * Description:
@ -488,7 +488,7 @@ u8 readToken(u8 node, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void writeToken(u8 node, u8 value, cNorthBridge *nb) static void writeToken(u8 node, u8 value, cNorthBridge *nb)
{ {
u32 temp = value; u32 temp = value;
ASSERT((node < nb->maxNodes)); ASSERT((node < nb->maxNodes));
@ -504,7 +504,7 @@ void writeToken(u8 node, u8 value, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u8 * static u8
* fam0FGetNumCoresOnNode(u8 node, cNorthBridge *nb) * fam0FGetNumCoresOnNode(u8 node, cNorthBridge *nb)
* *
* Description: * Description:
@ -517,7 +517,7 @@ void writeToken(u8 node, u8 value, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u8 fam0FGetNumCoresOnNode(u8 node, cNorthBridge *nb) static u8 fam0FGetNumCoresOnNode(u8 node, cNorthBridge *nb)
{ {
u32 temp; u32 temp;
@ -536,7 +536,7 @@ u8 fam0FGetNumCoresOnNode(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u8 * static u8
* fam10GetNumCoresOnNode(u8 node, cNorthBridge *nb) * fam10GetNumCoresOnNode(u8 node, cNorthBridge *nb)
* *
* Description: * Description:
@ -549,7 +549,7 @@ u8 fam0FGetNumCoresOnNode(u8 node, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u8 fam10GetNumCoresOnNode(u8 node, cNorthBridge *nb) static u8 fam10GetNumCoresOnNode(u8 node, cNorthBridge *nb)
{ {
u32 temp, leveling, cores; u32 temp, leveling, cores;
u8 i; u8 i;
@ -583,7 +583,7 @@ u8 fam10GetNumCoresOnNode(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* setTotalNodesAndCores(u8 node, u8 totalNodes, u8 totalCores, cNorthBridge *nb) * setTotalNodesAndCores(u8 node, u8 totalNodes, u8 totalCores, cNorthBridge *nb)
* *
* Description: * Description:
@ -597,7 +597,7 @@ u8 fam10GetNumCoresOnNode(u8 node, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void setTotalNodesAndCores(u8 node, u8 totalNodes, u8 totalCores, cNorthBridge *nb) static void setTotalNodesAndCores(u8 node, u8 totalNodes, u8 totalCores, cNorthBridge *nb)
{ {
SBDFO nodeIDReg; SBDFO nodeIDReg;
u32 temp; u32 temp;
@ -621,7 +621,7 @@ void setTotalNodesAndCores(u8 node, u8 totalNodes, u8 totalCores, cNorthBridge *
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* limitNodes(u8 node, cNorthBridge *nb) * limitNodes(u8 node, cNorthBridge *nb)
* *
* Description: * Description:
@ -633,7 +633,7 @@ void setTotalNodesAndCores(u8 node, u8 totalNodes, u8 totalCores, cNorthBridge *
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void limitNodes(u8 node, cNorthBridge *nb) static void limitNodes(u8 node, cNorthBridge *nb)
{ {
u32 temp = 1; u32 temp = 1;
ASSERT((node < nb->maxNodes)); ASSERT((node < nb->maxNodes));
@ -647,7 +647,7 @@ void limitNodes(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* writeFullRoutingTable(u8 node, u8 target, u8 reqLink, u8 rspLink, u32 BClinks, cNorthBridge *nb) * writeFullRoutingTable(u8 node, u8 target, u8 reqLink, u8 rspLink, u32 BClinks, cNorthBridge *nb)
* *
* Description: * Description:
@ -664,7 +664,7 @@ void limitNodes(u8 node, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void writeFullRoutingTable(u8 node, u8 target, u8 reqLink, u8 rspLink, u32 bClinks, cNorthBridge *nb) static void writeFullRoutingTable(u8 node, u8 target, u8 reqLink, u8 rspLink, u32 bClinks, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u32 value = 0; u32 value = 0;
@ -732,7 +732,7 @@ static u32 makeKey(u8 node)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* BOOL * static BOOL
* isCompatible(u8 currentNode, cNorthBridge *nb) * isCompatible(u8 currentNode, cNorthBridge *nb)
* *
* Description: * Description:
@ -747,14 +747,14 @@ static u32 makeKey(u8 node)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
BOOL isCompatible(u8 node, cNorthBridge *nb) static BOOL isCompatible(u8 node, cNorthBridge *nb)
{ {
return (makeKey(node) == nb->compatibleKey); return (makeKey(node) == nb->compatibleKey);
} }
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* BOOL * static BOOL
* fam0fIsCapable(u8 node, sMainData *pDat, cNorthBridge *nb) * fam0fIsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -770,7 +770,7 @@ BOOL isCompatible(u8 node, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
BOOL fam0fIsCapable(u8 node, sMainData *pDat, cNorthBridge *nb) static BOOL fam0fIsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u32 temp; u32 temp;
@ -808,7 +808,7 @@ BOOL fam0fIsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* BOOL * static BOOL
* fam10IsCapable(u8 node, sMainData *pDat, cNorthBridge *nb) * fam10IsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -824,7 +824,7 @@ BOOL fam0fIsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
BOOL fam10IsCapable(u8 node, sMainData *pDat, cNorthBridge *nb) static BOOL fam10IsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u32 temp; u32 temp;
@ -861,7 +861,7 @@ BOOL fam10IsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* fam0fStopLink(u8 currentNode, u8 currentLink, cNorthBridge *nb) * fam0fStopLink(u8 currentNode, u8 currentLink, cNorthBridge *nb)
* *
* Description: * Description:
@ -874,7 +874,7 @@ BOOL fam10IsCapable(u8 node, sMainData *pDat, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void fam0fStopLink(u8 node, u8 link, cNorthBridge *nb) static void fam0fStopLink(u8 node, u8 link, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u32 temp; u32 temp;
@ -892,7 +892,7 @@ void fam0fStopLink(u8 node, u8 link, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* commonVoid() * commonVoid()
* *
* Description: * Description:
@ -903,13 +903,13 @@ void fam0fStopLink(u8 node, u8 link, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void commonVoid() static void commonVoid(void)
{ {
} }
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* BOOL * static BOOL
* commonReturnFalse() * commonReturnFalse()
* *
* Description: * Description:
@ -919,7 +919,7 @@ void commonVoid()
* @param[out] BOOL result = false * @param[out] BOOL result = false
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
BOOL commonReturnFalse() static BOOL commonReturnFalse(void)
{ {
return 0; return 0;
} }
@ -931,7 +931,7 @@ BOOL commonReturnFalse()
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u8 * static u8
* readSbLink(cNorthBridge *nb) * readSbLink(cNorthBridge *nb)
* *
* Description: * Description:
@ -943,7 +943,7 @@ BOOL commonReturnFalse()
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u8 readSbLink(cNorthBridge *nb) static u8 readSbLink(cNorthBridge *nb)
{ {
u32 temp; u32 temp;
AmdPCIReadBits(MAKE_SBDFO(makePCISegmentFromNode(0), AmdPCIReadBits(MAKE_SBDFO(makePCISegmentFromNode(0),
@ -957,7 +957,7 @@ u8 readSbLink(cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* BOOL * static BOOL
* verifyLinkIsNonCoherent(u8 node, u8 link, cNorthBridge *nb) * verifyLinkIsNonCoherent(u8 node, u8 link, cNorthBridge *nb)
* *
* Description: * Description:
@ -977,7 +977,7 @@ u8 readSbLink(cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
BOOL verifyLinkIsNonCoherent(u8 node, u8 link, cNorthBridge *nb) static BOOL verifyLinkIsNonCoherent(u8 node, u8 link, cNorthBridge *nb)
{ {
u32 linkType; u32 linkType;
SBDFO linkBase; SBDFO linkBase;
@ -995,7 +995,7 @@ BOOL verifyLinkIsNonCoherent(u8 node, u8 link, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* ht3SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode, u8 targetLink, sMainData *pDat, cNorthBridge *nb) * ht3SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode, u8 targetLink, sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -1012,7 +1012,7 @@ BOOL verifyLinkIsNonCoherent(u8 node, u8 link, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void ht3SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode, u8 targetLink, sMainData *pDat, cNorthBridge *nb) static void ht3SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode, u8 targetLink, sMainData *pDat, cNorthBridge *nb)
{ {
u8 curNode; u8 curNode;
SBDFO linkBase; SBDFO linkBase;
@ -1094,7 +1094,7 @@ static void ht1SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u8 * static u8
* convertBitsToWidth(u8 value, cNorthBridge *nb) * convertBitsToWidth(u8 value, cNorthBridge *nb)
* *
* Description: * Description:
@ -1107,7 +1107,7 @@ static void ht1SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u8 convertBitsToWidth(u8 value, cNorthBridge *nb) static u8 convertBitsToWidth(u8 value, cNorthBridge *nb)
{ {
switch(value) { switch(value) {
case 1: return 16; case 1: return 16;
@ -1121,7 +1121,7 @@ u8 convertBitsToWidth(u8 value, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u8 * static u8
* convertWidthToBits(u8 value, cNorthBridge *nb) * convertWidthToBits(u8 value, cNorthBridge *nb)
* *
* Description: * Description:
@ -1134,7 +1134,7 @@ u8 convertBitsToWidth(u8 value, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u8 convertWidthToBits(u8 value, cNorthBridge *nb) static u8 convertWidthToBits(u8 value, cNorthBridge *nb)
{ {
switch (value) { switch (value) {
case 16: return 1; case 16: return 1;
@ -1148,7 +1148,7 @@ u8 convertWidthToBits(u8 value, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u16 * static u16
* ht1NorthBridgeFreqMask(u8 NodeID, cNorthBridge *nb) * ht1NorthBridgeFreqMask(u8 NodeID, cNorthBridge *nb)
* *
* Description: * Description:
@ -1162,7 +1162,7 @@ u8 convertWidthToBits(u8 value, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u16 ht1NorthBridgeFreqMask(u8 node, cNorthBridge *nb) static u16 ht1NorthBridgeFreqMask(u8 node, cNorthBridge *nb)
{ {
/* only up to HT1 speeds */ /* only up to HT1 speeds */
return (HT_FREQUENCY_LIMIT_HT1_ONLY); return (HT_FREQUENCY_LIMIT_HT1_ONLY);
@ -1170,7 +1170,7 @@ u16 ht1NorthBridgeFreqMask(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* u16 * static u16
* fam10NorthBridgeFreqMask(u8 NodeID, cNorthBridge *nb) * fam10NorthBridgeFreqMask(u8 NodeID, cNorthBridge *nb)
* *
* Description: * Description:
@ -1184,7 +1184,7 @@ u16 ht1NorthBridgeFreqMask(u8 node, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
u16 fam10NorthBridgeFreqMask(u8 node, cNorthBridge *nb) static u16 fam10NorthBridgeFreqMask(u8 node, cNorthBridge *nb)
{ {
u8 nbCOF; u8 nbCOF;
u16 supported; u16 supported;
@ -1225,7 +1225,7 @@ u16 fam10NorthBridgeFreqMask(u8 node, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* gatherLinkData(sMainData *pDat, cNorthBridge *nb) * gatherLinkData(sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -1238,7 +1238,7 @@ u16 fam10NorthBridgeFreqMask(u8 node, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void gatherLinkData(sMainData *pDat, cNorthBridge *nb) static void gatherLinkData(sMainData *pDat, cNorthBridge *nb)
{ {
u8 i; u8 i;
SBDFO linkBase; SBDFO linkBase;
@ -1301,7 +1301,7 @@ void gatherLinkData(sMainData *pDat, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* setLinkData(sMainData *pDat, cNorthBridge *nb) * setLinkData(sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -1314,7 +1314,7 @@ void gatherLinkData(sMainData *pDat, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void setLinkData(sMainData *pDat, cNorthBridge *nb) static void setLinkData(sMainData *pDat, cNorthBridge *nb)
{ {
u8 i; u8 i;
SBDFO linkBase; SBDFO linkBase;
@ -1614,7 +1614,7 @@ static void fam0fWriteHTLinkDatBufferAlloc(u8 node, u8 link, u8 reqD, u8 preqD,
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* ht3WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb) * ht3WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
* *
* Description: * Description:
@ -1627,7 +1627,7 @@ static void fam0fWriteHTLinkDatBufferAlloc(u8 node, u8 link, u8 reqD, u8 preqD,
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void ht3WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb) static void ht3WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u32 temp; u32 temp;
@ -1670,7 +1670,7 @@ void ht3WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* ht1WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb) * ht1WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
* *
* Description: * Description:
@ -1685,7 +1685,7 @@ void ht3WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void ht1WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb) static void ht1WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u32 route01, route10; u32 route01, route10;
@ -1779,7 +1779,7 @@ void ht1WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* fam0fBufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb) * fam0fBufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -1793,7 +1793,7 @@ void ht1WriteTrafficDistribution(u32 links01, u32 links10, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void fam0fBufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb) static void fam0fBufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb)
{ {
#ifndef HT_BUILD_NC_ONLY #ifndef HT_BUILD_NC_ONLY
u8 i; u8 i;
@ -1976,7 +1976,7 @@ void fam0fBufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb)
/**---------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------
* *
* void * static void
* fam10BufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb) * fam10BufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb)
* *
* Description: * Description:
@ -1990,7 +1990,7 @@ void fam0fBufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb)
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
*/ */
void fam10BufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb) static void fam10BufferOptimizations(u8 node, sMainData *pDat, cNorthBridge *nb)
{ {
u32 temp; u32 temp;
SBDFO currentPtr; SBDFO currentPtr;

View File

@ -1183,7 +1183,7 @@ exitGetAddr:
} }
void mct_Write1LTestPattern_D(struct MCTStatStruc *pMCTstat, static void mct_Write1LTestPattern_D(struct MCTStatStruc *pMCTstat,
struct DCTStatStruc *pDCTstat, struct DCTStatStruc *pDCTstat,
u32 TestAddr, u8 pattern) u32 TestAddr, u8 pattern)
{ {

View File

@ -44,7 +44,7 @@ u8 mct_Get_Start_RcvrEnDly_1Pass(u8 pass)
return 0; return 0;
} }
u8 mct_Average_RcvrEnDly_1Pass(struct DCTStatStruc *pDCTstat, u8 Channel, u8 Receiver, static u8 mct_Average_RcvrEnDly_1Pass(struct DCTStatStruc *pDCTstat, u8 Channel, u8 Receiver,
u8 Pass) u8 Pass)
{ {
u8 i, MaxValue; u8 i, MaxValue;
@ -72,7 +72,7 @@ u8 mct_Average_RcvrEnDly_1Pass(struct DCTStatStruc *pDCTstat, u8 Channel, u8 Rec
u8 mct_AdjustFinalDQSRcvValue_1Pass(u8 val_1p, u8 val_2p) static u8 mct_AdjustFinalDQSRcvValue_1Pass(u8 val_1p, u8 val_2p)
{ {
return (val_1p & 0xff) + ((val_2p & 0xff)<<8); return (val_1p & 0xff) + ((val_2p & 0xff)<<8);
} }

View File

@ -1,3 +1,5 @@
#include <reset.h>
/* by yhlu 2005.10 */ /* by yhlu 2005.10 */
static unsigned get_sbdn(unsigned bus) static unsigned get_sbdn(unsigned bus)
{ {

View File

@ -17,38 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <reset.h>
#include <arch/io.h> #include <arch/io.h>
#include <arch/romcc_io.h>
#define PCI_DEV(BUS, DEV, FN) ( \
(((BUS) & 0xFFF) << 20) | \
(((DEV) & 0x1F) << 15) | \
(((FN) & 0x7) << 12))
typedef u32 device_t;
static void pci_write_config8(device_t dev, unsigned where, unsigned char value)
{
unsigned addr;
addr = (dev>>4) | where;
outl(0x80000000 | (addr & ~3), 0xCF8);
outb(value, 0xCFC + (addr & 3));
}
static void pci_write_config32(device_t dev, unsigned where, unsigned value)
{
unsigned addr;
addr = (dev>>4) | where;
outl(0x80000000 | (addr & ~3), 0xCF8);
outl(value, 0xCFC);
}
static unsigned pci_read_config32(device_t dev, unsigned where)
{
unsigned addr;
addr = (dev>>4) | where;
outl(0x80000000 | (addr & ~3), 0xCF8);
return inl(0xCFC);
}
#include "../../../northbridge/amd/amdk8/reset_test.c" #include "../../../northbridge/amd/amdk8/reset_test.c"