diff options
author | Marc Jones <marc.jones@amd.com> | 2008-07-17 19:50:37 +0000 |
---|---|---|
committer | Marc Jones <marc.jones@amd.com> | 2008-07-17 19:50:37 +0000 |
commit | 212486e9f634f6a6aaf1efdacfb39397c19a7bc7 (patch) | |
tree | eb784b0a0ac6e8f0e19f88d8dbec9213ad537e00 /src/northbridge/amd/amdht/h3ncmn.c | |
parent | 2df291574dd16038714091ac44f0d602c764c17d (diff) |
Clean up AMD FAM10 HT variable initialization. The structure init is cleaner, avoid compiler warnings, and matches the AMD example code more closely.
Signed-off-by: Marc Jones <marc.jones@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3425 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd/amdht/h3ncmn.c')
-rw-r--r-- | src/northbridge/amd/amdht/h3ncmn.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/northbridge/amd/amdht/h3ncmn.c b/src/northbridge/amd/amdht/h3ncmn.c index 828097a42f..5b038a3a58 100644 --- a/src/northbridge/amd/amdht/h3ncmn.c +++ b/src/northbridge/amd/amdht/h3ncmn.c @@ -401,7 +401,11 @@ BOOL readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb) if (pDat->HtBlock->AMD_CB_EventNotify) { /* Pass the node and link on which the generic synch flood event occurred. */ - sHtEventHWHtCrc evt = {sizeof(sHtEventHWHtCrc), node, link, (u8)crc}; + sHtEventHWHtCrc evt; + evt.eSize = sizeof(sHtEventHWHtCrc); + evt.node = node; + evt.link = link; + evt.laneMask = (uint8)crc; pDat->HtBlock->AMD_CB_EventNotify(HT_EVENT_CLASS_HW_FAULT, HT_EVENT_HW_HTCRC, @@ -414,7 +418,10 @@ BOOL readTrueLinkFailStatus(u8 node, u8 link, sMainData *pDat, cNorthBridge *nb) if (pDat->HtBlock->AMD_CB_EventNotify) { /* Pass the node and link on which the generic synch flood event occurred. */ - sHtEventHWSynchFlood evt = {sizeof(sHtEventHWSynchFlood), node, link}; + sHtEventHWSynchFlood evt; + evt.eSize = sizeof(sHtEventHWSynchFlood); + evt.node = node; + evt.link = link; pDat->HtBlock->AMD_CB_EventNotify(HT_EVENT_CLASS_HW_FAULT, HT_EVENT_HW_SYNCHFLOOD, @@ -1112,8 +1119,6 @@ u8 convertBitsToWidth(u8 value, cNorthBridge *nb) return 2; } STOP_HERE; /* This is an error internal condition */ - - return 0xFF; // make the compiler happy. } /**---------------------------------------------------------------------------------------- @@ -1143,8 +1148,6 @@ u8 convertWidthToBits(u8 value, cNorthBridge *nb) return 4; } STOP_HERE; /* This is an internal error condition */ - - return 0xFF; // make the compiler happy. } /**---------------------------------------------------------------------------------------- @@ -1468,10 +1471,11 @@ void setLinkData(sMainData *pDat, cNorthBridge *nb) { if (pDat->HtBlock->AMD_CB_EventNotify) { - sHtEventOptRequiredCap evt ={sizeof(sHtEventOptRequiredCap), - pDat->PortList[i].NodeID, - pDat->PortList[i].HostLink, - pDat->PortList[i].HostDepth}; + sHtEventOptRequiredCap evt; + evt.eSize = sizeof(sHtEventOptRequiredCap); + evt.node = pDat->PortList[i].NodeID; + evt.link = pDat->PortList[i].HostLink; + evt.depth = pDat->PortList[i].HostDepth; pDat->HtBlock->AMD_CB_EventNotify(HT_EVENT_CLASS_WARNING, HT_EVENT_OPT_REQUIRED_CAP_RETRY, @@ -1513,10 +1517,11 @@ void setLinkData(sMainData *pDat, cNorthBridge *nb) { if (pDat->HtBlock->AMD_CB_EventNotify) { - sHtEventOptRequiredCap evt ={sizeof(sHtEventOptRequiredCap), - pDat->PortList[i].NodeID, - pDat->PortList[i].HostLink, - pDat->PortList[i].HostDepth}; + sHtEventOptRequiredCap evt; + evt.eSize = sizeof(sHtEventOptRequiredCap); + evt.node = pDat->PortList[i].NodeID; + evt.link = pDat->PortList[i].HostLink; + evt.depth = pDat->PortList[i].HostDepth; pDat->HtBlock->AMD_CB_EventNotify(HT_EVENT_CLASS_WARNING, HT_EVENT_OPT_REQUIRED_CAP_GEN3, |