From 12b121cdb450d96309dd96b2ccc25fc5501d2250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 18 Aug 2019 16:33:39 +0300 Subject: southbridge/intel: Tidy up preprocessor and headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I52a7b39566acd64ac21a345046675e05649a40f5 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34980 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/southbridge/intel/i82801ix/hdaudio.c | 1 + src/southbridge/intel/i82801ix/i82801ix.c | 1 + src/southbridge/intel/i82801ix/i82801ix.h | 11 +++-------- src/southbridge/intel/i82801ix/lpc.c | 1 + src/southbridge/intel/i82801ix/sata.c | 1 + 5 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src/southbridge/intel/i82801ix') diff --git a/src/southbridge/intel/i82801ix/hdaudio.c b/src/southbridge/intel/i82801ix/hdaudio.c index 16350d534e..f105a735f8 100644 --- a/src/southbridge/intel/i82801ix/hdaudio.c +++ b/src/southbridge/intel/i82801ix/hdaudio.c @@ -23,6 +23,7 @@ #include #include #include +#include "chip.h" #include "i82801ix.h" #define HDA_ICII_REG 0x68 diff --git a/src/southbridge/intel/i82801ix/i82801ix.c b/src/southbridge/intel/i82801ix/i82801ix.c index 99078dc402..341a98aec4 100644 --- a/src/southbridge/intel/i82801ix/i82801ix.c +++ b/src/southbridge/intel/i82801ix/i82801ix.c @@ -22,6 +22,7 @@ #include #include #include +#include "chip.h" #include "i82801ix.h" typedef struct southbridge_intel_i82801ix_config config_t; diff --git a/src/southbridge/intel/i82801ix/i82801ix.h b/src/southbridge/intel/i82801ix/i82801ix.h index 31eabb6e42..afaaade82d 100644 --- a/src/southbridge/intel/i82801ix/i82801ix.h +++ b/src/southbridge/intel/i82801ix/i82801ix.h @@ -18,12 +18,6 @@ #ifndef SOUTHBRIDGE_INTEL_I82801GX_I82801IX_H #define SOUTHBRIDGE_INTEL_I82801GX_I82801IX_H -#ifndef __ACPI__ -#ifndef __ASSEMBLER__ -#include "chip.h" -#endif -#endif - #define DEFAULT_TBAR ((u8 *)0xfed1b000) #include @@ -214,12 +208,13 @@ static inline int lpc_is_mobile(const u16 devid) void aseg_smm_lock(void); -#if defined(__PRE_RAM__) void enable_smbus(void); -int smbus_read_byte(unsigned device, unsigned address); void i82801ix_early_init(void); void i82801ix_dmi_setup(void); void i82801ix_dmi_poll_vc1(void); + +#if ENV_ROMSTAGE +int smbus_read_byte(unsigned device, unsigned address); #endif #endif diff --git a/src/southbridge/intel/i82801ix/lpc.c b/src/southbridge/intel/i82801ix/lpc.c index ba2b0282e5..cb964de35f 100644 --- a/src/southbridge/intel/i82801ix/lpc.c +++ b/src/southbridge/intel/i82801ix/lpc.c @@ -30,6 +30,7 @@ #include #include #include +#include "chip.h" #include "i82801ix.h" #include "nvs.h" #include diff --git a/src/southbridge/intel/i82801ix/sata.c b/src/southbridge/intel/i82801ix/sata.c index 49d2d36b85..fa6c1df6b3 100644 --- a/src/southbridge/intel/i82801ix/sata.c +++ b/src/southbridge/intel/i82801ix/sata.c @@ -25,6 +25,7 @@ #include #include +#include "chip.h" #include "i82801ix.h" typedef struct southbridge_intel_i82801ix_config config_t; -- cgit v1.2.3