AMD SB900: fix warnings

Add a prototype to a .h file
Remove an unused file (GppHp.c) from the build by deleting it from the
  makefile. I left the file since this is vendorcode. This is the code
  for PCIe hotplug.
Inside GppHp.c, make functions not called from outside static.
  This obviously isn't important since the file isn't used, but for
  the sake of the cleanup I thought I'd go ahead with it...

This was tested with the torpedo build.

This fixes these warnings:

src/vendorcode/amd/cimx/sb900/Dispatcher.c: In function 'LocateImage':
src/vendorcode/amd/cimx/sb900/Dispatcher.c:193:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

src/vendorcode/amd/cimx/sb900/Usb.c:740:1: warning: no previous prototype for 'XhciA12Fix' [-Wmissing-prototypes]

src/vendorcode/amd/cimx/sb900/GppHp.c:65:1: warning: no previous prototype for 'sbGppHotPlugSmiProcess' [-Wmissing-prototypes]
src/vendorcode/amd/cimx/sb900/GppHp.c: In function 'sbGppHotPlugSmiProcess':
src/vendorcode/amd/cimx/sb900/GppHp.c:76:5: warning: implicit declaration of function 'SbStall' [-Wimplicit-function-declaration]
src/vendorcode/amd/cimx/sb900/GppHp.c: At top level:
src/vendorcode/amd/cimx/sb900/GppHp.c:101:1: warning: no previous prototype for 'sbGppHotUnplugSmiProcess' [-Wmissing-prototypes]
src/vendorcode/amd/cimx/sb900/GppHp.c:134:1: warning: no previous prototype for 'sbGppHotplugSmiCallback' [-Wmissing-prototypes]
src/vendorcode/amd/cimx/sb900/GppHp.c: In function 'sbGppHotplugSmiCallback':
src/vendorcode/amd/cimx/sb900/GppHp.c:158:5: warning: implicit declaration of function 'outPort80' [-Wimplicit-function-declaration]

Change-Id: I5a1a20eeb81e1f4d59e3e3192f081e11d8506f56
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/2349
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Martin Roth 2013-02-10 14:26:20 -07:00 committed by Patrick Georgi
parent c52e1065df
commit 96e3035a1f
4 changed files with 5 additions and 4 deletions

View File

@ -190,7 +190,7 @@ LocateImage (
#ifdef x64 #ifdef x64
12346789 12346789
#else #else
Result = VerifyImage (Signature, (VOID*) (__int64)ImagePtr); Result = VerifyImage (Signature, (VOID*) (intptr_t) ImagePtr);
#endif #endif
if ( Result != NULL ) { if ( Result != NULL ) {
return Result; return Result;

View File

@ -43,6 +43,7 @@
*/ */
#include "SbPlatform.h" #include "SbPlatform.h"
#include "cbtypes.h" #include "cbtypes.h"
#include "AmdSbLib.h"
// //
// Declaration of external functions // Declaration of external functions
@ -61,7 +62,7 @@ UINT8 GppPortPollingLtssm (IN AMDSBCFG* pConfig, IN UINT8 ActivePorts, IN BOOLEA
* @param[in] HpPort The hot plug port number. * @param[in] HpPort The hot plug port number.
* *
*/ */
VOID static VOID
sbGppHotPlugSmiProcess ( sbGppHotPlugSmiProcess (
IN AMDSBCFG* pConfig, IN AMDSBCFG* pConfig,
IN UINT32 HpPort IN UINT32 HpPort
@ -97,7 +98,7 @@ sbGppHotPlugSmiProcess (
* @param[in] HpPort The hot plug port number. * @param[in] HpPort The hot plug port number.
* *
*/ */
VOID static VOID
sbGppHotUnplugSmiProcess ( sbGppHotUnplugSmiProcess (
IN AMDSBCFG* pConfig, IN AMDSBCFG* pConfig,
IN UINT32 HpPort IN UINT32 HpPort

View File

@ -76,7 +76,6 @@ ramstage-y += Usb.c
#ramstage-y += Legacy.c #ramstage-y += Legacy.c
#ramstage-y += SbModInf.c #ramstage-y += SbModInf.c
ramstage-y += Debug.c ramstage-y += Debug.c
ramstage-y += GppHp.c
ramstage-y += Hwm.c ramstage-y += Hwm.c
CIMX_CFLAGS = CIMX_CFLAGS =

View File

@ -605,3 +605,4 @@ void TurnOffCG2 (OUT void);
*/ */
void BackUpCG2 (OUT void); void BackUpCG2 (OUT void);
void XhciA12Fix (OUT void);