From 3d5bb236aa6147ce24d9618f2d482e76eefc58c6 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sun, 9 May 2010 21:15:13 +0000 Subject: Move includes to where they are needed. This allows to simplify romstage.c files in mainboards. Signed-off-by: Patrick Georgi Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5539 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/include/stddef.h | 2 ++ src/cpu/amd/car/post_cache_as_ram.c | 1 + src/cpu/amd/model_10xxx/defaults.h | 2 ++ src/cpu/amd/model_10xxx/init_cpus.c | 6 ++++++ src/cpu/amd/quadcore/quadcore.c | 1 + src/include/cpu/amd/model_10xxx_msr.h | 2 ++ src/northbridge/amd/amdht/ht_wrapper.c | 3 +++ src/northbridge/amd/amdmct/mct/mctmtr_d.c | 1 + src/superio/smsc/smscsuperio/smscsuperio_early_serial.c | 1 + 9 files changed, 19 insertions(+) (limited to 'src') diff --git a/src/arch/i386/include/stddef.h b/src/arch/i386/include/stddef.h index e4fc019c87..6583cc62ef 100644 --- a/src/arch/i386/include/stddef.h +++ b/src/arch/i386/include/stddef.h @@ -8,7 +8,9 @@ typedef long ssize_t; typedef int wchar_t; typedef unsigned int wint_t; +#ifndef NULL #define NULL ((void *)0) +#endif #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c index 24ea8da5e6..58d38cd603 100644 --- a/src/cpu/amd/car/post_cache_as_ram.c +++ b/src/cpu/amd/car/post_cache_as_ram.c @@ -1,6 +1,7 @@ /* 2005.6 by yhlu * 2006.3 yhlu add copy data from CAR to ram */ +#include #include #include "cpu/amd/car/disable_cache_as_ram.c" diff --git a/src/cpu/amd/model_10xxx/defaults.h b/src/cpu/amd/model_10xxx/defaults.h index 98918ec312..78c46d4eaf 100644 --- a/src/cpu/amd/model_10xxx/defaults.h +++ b/src/cpu/amd/model_10xxx/defaults.h @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include /* * Default MSR and errata settings. diff --git a/src/cpu/amd/model_10xxx/init_cpus.c b/src/cpu/amd/model_10xxx/init_cpus.c index 3a86be296f..a64cdd8874 100644 --- a/src/cpu/amd/model_10xxx/init_cpus.c +++ b/src/cpu/amd/model_10xxx/init_cpus.c @@ -18,6 +18,12 @@ */ #include "defaults.h" +#include +#include +#include +#include +#include +#include //it takes the CONFIG_ENABLE_APIC_EXT_ID and CONFIG_APIC_ID_OFFSET and CONFIG_LIFT_BSP_APIC_ID #ifndef SET_FIDVID diff --git a/src/cpu/amd/quadcore/quadcore.c b/src/cpu/amd/quadcore/quadcore.c index d66f56c881..142a270125 100644 --- a/src/cpu/amd/quadcore/quadcore.c +++ b/src/cpu/amd/quadcore/quadcore.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #ifndef SET_NB_CFG_54 #define SET_NB_CFG_54 1 diff --git a/src/include/cpu/amd/model_10xxx_msr.h b/src/include/cpu/amd/model_10xxx_msr.h index a774125cb0..f497eb3a82 100644 --- a/src/include/cpu/amd/model_10xxx_msr.h +++ b/src/include/cpu/amd/model_10xxx_msr.h @@ -20,6 +20,8 @@ #ifndef CPU_AMD_MODEL_10XXX_MSR_H #define CPU_AMD_MODEL_10XXX_MSR_H +#include + #define HWCR_MSR 0xC0010015 #define NB_CFG_MSR 0xC001001f #define LS_CFG_MSR 0xC0011020 diff --git a/src/northbridge/amd/amdht/ht_wrapper.c b/src/northbridge/amd/amdht/ht_wrapper.c index f02ce44f80..38733c9863 100644 --- a/src/northbridge/amd/amdht/ht_wrapper.c +++ b/src/northbridge/amd/amdht/ht_wrapper.c @@ -17,6 +17,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include +#include /*---------------------------------------------------------------------------- * TYPEDEFS, DEFINITIONS AND MACROS diff --git a/src/northbridge/amd/amdmct/mct/mctmtr_d.c b/src/northbridge/amd/amdmct/mct/mctmtr_d.c index 76cf9806af..64500f0d58 100644 --- a/src/northbridge/amd/amdmct/mct/mctmtr_d.c +++ b/src/northbridge/amd/amdmct/mct/mctmtr_d.c @@ -19,6 +19,7 @@ #include "mct_d.h" +#include static void SetMTRRrangeWB_D(u32 Base, u32 *pLimit, u32 *pMtrrAddr); static void SetMTRRrange_D(u32 Base, u32 *pLimit, u32 *pMtrrAddr, u16 MtrrType); diff --git a/src/superio/smsc/smscsuperio/smscsuperio_early_serial.c b/src/superio/smsc/smscsuperio/smscsuperio_early_serial.c index 28022b649e..de2e891742 100644 --- a/src/superio/smsc/smscsuperio/smscsuperio_early_serial.c +++ b/src/superio/smsc/smscsuperio/smscsuperio_early_serial.c @@ -19,6 +19,7 @@ */ #include +#include /* All known/supported SMSC Super I/Os have the same logical device IDs * for the serial ports (COM1, COM2). -- cgit v1.2.3