From 883b03f3230ad032dffae9e3e053c6c1963abebc Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 6 May 2013 15:18:57 +0200 Subject: AMD AGESA Hudson: Include `stdint.h` and `io.h` to fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently the files `smbus.{h,c}`, where never used and therefore build beforehand. Needing one function in them for the ASUS F2A85-M the build fails as some headers are missing. Including the headers `stdint.h` and `io.h` fixes the following errors. […] CC southbridge/amd/agesa/hudson/smbus.romstage.o In file included from src/southbridge/amd/agesa/hudson/smbus.c:23:0: src/southbridge/amd/agesa/hudson/smbus.h:67:24: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:67:43: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:67:55: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:68:25: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:68:44: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:68:56: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:68:69: error: unknown type name 'u8' src/southbridge/amd/agesa/hudson/smbus.h:69:24: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:69:43: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:70:24: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:70:43: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:70:55: error: unknown type name 'u8' src/southbridge/amd/agesa/hudson/smbus.h:71:20: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:71:35: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:71:49: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:71:59: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:71:69: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:72:20: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:72:35: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:72:49: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:72:59: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:73:20: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:73:32: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:73:44: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.h:73:54: error: unknown type name 'u32' src/southbridge/amd/agesa/hudson/smbus.c: In function 'smbus_delay': src/southbridge/amd/agesa/hudson/smbus.c:27:2: error: implicit declaration of function 'outb' [-Werror=implicit-function-declaration] src/southbridge/amd/agesa/hudson/smbus.c:27:2: error: implicit declaration of function 'inb' [-Werror=implicit-function-declaration] […] Probably all the (AMD(?)) `smbus.{h,c}` suffer from this and should be fixed. Even better, as these function do not differ between most boards, the file should be moved out from the specific southbridge directories. [1] http://qa.coreboot.org/job/coreboot-gerrit/6168/testReport/junit/(root)/board/i386_asus_f2a85_m/ Change-Id: I285101fa06a365da44fa27b688c536e614d57f50 Signed-off-by: Paul Menzel Reviewed-on: http://review.coreboot.org/3202 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Dave Frodin --- src/southbridge/amd/agesa/hudson/smbus.c | 2 ++ src/southbridge/amd/agesa/hudson/smbus.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/southbridge') diff --git a/src/southbridge/amd/agesa/hudson/smbus.c b/src/southbridge/amd/agesa/hudson/smbus.c index 682b86de95..e428d43591 100644 --- a/src/southbridge/amd/agesa/hudson/smbus.c +++ b/src/southbridge/amd/agesa/hudson/smbus.c @@ -20,6 +20,8 @@ #ifndef _HUDSON_SMBUS_C_ #define _HUDSON_SMBUS_C_ +#include +#include #include "smbus.h" static inline void smbus_delay(void) diff --git a/src/southbridge/amd/agesa/hudson/smbus.h b/src/southbridge/amd/agesa/hudson/smbus.h index b194aaeb27..53cc0e6c44 100644 --- a/src/southbridge/amd/agesa/hudson/smbus.h +++ b/src/southbridge/amd/agesa/hudson/smbus.h @@ -20,7 +20,7 @@ #ifndef HUDSON_SMBUS_H #define HUDSON_SMBUS_H -//#include +#include #define SMBHSTSTAT 0x0 #define SMBSLVSTAT 0x1 -- cgit v1.2.3