From 12b121cdb450d96309dd96b2ccc25fc5501d2250 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki 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/i82801gx/azalia.c | 1 + src/southbridge/intel/i82801gx/i82801gx.h | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/southbridge/intel/i82801gx') diff --git a/src/southbridge/intel/i82801gx/azalia.c b/src/southbridge/intel/i82801gx/azalia.c index 938dc4edd6..56baab1edc 100644 --- a/src/southbridge/intel/i82801gx/azalia.c +++ b/src/southbridge/intel/i82801gx/azalia.c @@ -22,6 +22,7 @@ #include #include #include +#include "chip.h" #include "i82801gx.h" #define HDA_ICII_REG 0x68 diff --git a/src/southbridge/intel/i82801gx/i82801gx.h b/src/southbridge/intel/i82801gx/i82801gx.h index fb855dc743..7fc0114aac 100644 --- a/src/southbridge/intel/i82801gx/i82801gx.h +++ b/src/southbridge/intel/i82801gx/i82801gx.h @@ -34,13 +34,14 @@ #ifndef __ACPI__ #define DEBUG_PERIODIC_SMIS 0 -#if !defined(__ASSEMBLER__) -#if !defined(__PRE_RAM__) -#if !defined(__SIMPLE_DEVICE__) +#ifndef __ROMCC__ +#include void i82801gx_enable(struct device *dev); #endif -#else + void enable_smbus(void); + +#if ENV_ROMSTAGE int smbus_read_byte(unsigned int device, unsigned int address); int i2c_eeprom_read(unsigned int device, unsigned int cmd, unsigned int bytes, u8 *buf); @@ -48,7 +49,6 @@ int smbus_block_read(unsigned int device, unsigned int cmd, u8 bytes, u8 *buf); int smbus_block_write(unsigned int device, unsigned int cmd, u8 bytes, const u8 *buf); #endif -#endif #define MAINBOARD_POWER_OFF 0 #define MAINBOARD_POWER_ON 1 -- cgit v1.2.3