northbridge/intel/x4x: clean up includes

- Don't redefine D0F0_PCIEXBAR_LO, use the #define in x4x.h
- Move TPMBASE and TPM32() definitions into iomap.h
- Use "" style include for x4x.h in nortbridge files.
- Move includes of .h files out of x4x.h and into the c files that need
them.
- Protect function definitions in bootblock.

Change-Id: I3fdb579235c5446733a0ffba05fffe1a73381251
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12849
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Martin Roth 2016-01-05 19:40:41 -07:00
parent d274c99ad7
commit cbe38923d9
6 changed files with 14 additions and 10 deletions

View File

@ -15,10 +15,8 @@
*/ */
#include <arch/io.h> #include <arch/io.h>
#include "iomap.h"
#define D0F0_PCIEXBAR_LO 0x60 #include "x4x.h"
#define TPMBASE 0xfed40000
#define TPM32(x) *((volatile u32 *)(TPMBASE + x))
static void bootblock_northbridge_init(void) static void bootblock_northbridge_init(void)
{ {

View File

@ -16,6 +16,8 @@
#include <stdint.h> #include <stdint.h>
#include <arch/io.h> #include <arch/io.h>
#include "iomap.h"
#include <southbridge/intel/i82801gx/i82801gx.h> /* DEFAULT_PMBASE */
#include "x4x.h" #include "x4x.h"
void x4x_early_init(void) void x4x_early_init(void)

View File

@ -25,4 +25,7 @@
#define DEFAULT_EPBAR 0xfed19000 /* 4 KB */ #define DEFAULT_EPBAR 0xfed19000 /* 4 KB */
#define DEFAULT_HECIBAR 0xfed10000 #define DEFAULT_HECIBAR 0xfed10000
#define TPMBASE 0xfed40000
#define TPM32(x) *((volatile u32 *)(TPMBASE + x))
#endif /* X4X_IOMAP_H */ #endif /* X4X_IOMAP_H */

View File

@ -22,7 +22,9 @@
#include <delay.h> #include <delay.h>
#include <halt.h> #include <halt.h>
#include <lib.h> #include <lib.h>
#include <northbridge/intel/x4x/x4x.h> #include "iomap.h"
#include <southbridge/intel/i82801gx/i82801gx.h> /* smbus_read_byte */
#include "x4x.h"
#include <pc80/mc146818rtc.h> #include <pc80/mc146818rtc.h>
#include <spd.h> #include <spd.h>
#include <string.h> #include <string.h>

View File

@ -20,7 +20,8 @@
#include <console/console.h> #include <console/console.h>
#include <commonlib/helpers.h> #include <commonlib/helpers.h>
#include <delay.h> #include <delay.h>
#include <northbridge/intel/x4x/x4x.h> #include "iomap.h"
#include "x4x.h"
static inline void barrier(void) static inline void barrier(void)
{ {

View File

@ -18,9 +18,6 @@
#ifndef __NORTHBRIDGE_INTEL_X4X_H__ #ifndef __NORTHBRIDGE_INTEL_X4X_H__
#define __NORTHBRIDGE_INTEL_X4X_H__ #define __NORTHBRIDGE_INTEL_X4X_H__
#include <northbridge/intel/x4x/iomap.h>
#include <southbridge/intel/i82801gx/i82801gx.h>
/* /*
* D0:F0 * D0:F0
*/ */
@ -307,6 +304,7 @@ enum ddr2_signals {
DQ8 DQ8
}; };
#ifndef __BOOTBLOCK__
void x4x_early_init(void); void x4x_early_init(void);
u32 decode_igd_memory_size(u32 gms); u32 decode_igd_memory_size(u32 gms);
u32 decode_igd_gtt_size(u32 gsm); u32 decode_igd_gtt_size(u32 gsm);
@ -316,5 +314,5 @@ void raminit_ddr2(struct sysinfo *);
struct acpi_rsdp; struct acpi_rsdp;
unsigned long northbridge_write_acpi_tables(device_t device, unsigned long start, struct acpi_rsdp *rsdp); unsigned long northbridge_write_acpi_tables(device_t device, unsigned long start, struct acpi_rsdp *rsdp);
#endif
#endif /* __NORTHBRIDGE_INTEL_X4X_H__ */ #endif /* __NORTHBRIDGE_INTEL_X4X_H__ */