From 31a9e22fa407ee05fdef052026bc8098fdbeb742 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 19 Feb 2008 00:34:32 +0000 Subject: [PATCH] A lot of the v3 header files require other header files to be #included before they can be #included. That is completely counter-intuitive. Add necessary #includes to the header files themselves. Fix a few cases where nonexisting files were #included. Compile tested on Qemu and Alix1C. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Peter Stuge git-svn-id: svn://coreboot.org/repository/coreboot-v3@611 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- device/smbus_ops.c | 1 - include/arch/x86/msr.h | 2 ++ include/arch/x86/pci_ops.h | 2 ++ include/arch/x86/pirq_routing.h | 2 ++ include/device/agp.h | 2 ++ include/device/cardbus.h | 2 ++ include/device/hypertransport.h | 1 + include/device/pci_rom.h | 1 + include/device/pcie.h | 2 ++ include/device/pcix.h | 2 ++ include/device/smbus.h | 1 - include/post_code.h | 1 + include/spd.h | 2 ++ northbridge/intel/i440bxemulation/i440bx.h | 2 ++ 14 files changed, 21 insertions(+), 2 deletions(-) diff --git a/device/smbus_ops.c b/device/smbus_ops.c index e963d9a9f3..9b4f93bbe0 100644 --- a/device/smbus_ops.c +++ b/device/smbus_ops.c @@ -20,7 +20,6 @@ */ #include -#include #include #include #include diff --git a/include/arch/x86/msr.h b/include/arch/x86/msr.h index 3322a81747..48b7b4d876 100644 --- a/include/arch/x86/msr.h +++ b/include/arch/x86/msr.h @@ -20,6 +20,8 @@ #ifndef CPU_X86_MSR_H #define CPU_X86_MSR_H +#include + /* standard MSR operations, everyone has written these one hundred times */ struct msr { u32 lo; diff --git a/include/arch/x86/pci_ops.h b/include/arch/x86/pci_ops.h index 283aa03b5e..6121d85300 100644 --- a/include/arch/x86/pci_ops.h +++ b/include/arch/x86/pci_ops.h @@ -17,6 +17,8 @@ #ifndef ARCH_X86_PCI_OPS_H #define ARCH_X86_PCI_OPS_H +#include + extern const struct pci_bus_operations pci_cf8_conf1; extern const struct pci_bus_operations pci_cf8_conf2; diff --git a/include/arch/x86/pirq_routing.h b/include/arch/x86/pirq_routing.h index 031b610e2c..6525ad6d7f 100644 --- a/include/arch/x86/pirq_routing.h +++ b/include/arch/x86/pirq_routing.h @@ -21,6 +21,8 @@ #ifndef ARCH_PIRQ_ROUTING_H #define ARCH_PIRQ_ROUTING_H +#include + #define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24)) #define PIRQ_VERSION 0x0100 diff --git a/include/device/agp.h b/include/device/agp.h index 48f17b95c1..e260caed9b 100644 --- a/include/device/agp.h +++ b/include/device/agp.h @@ -19,6 +19,8 @@ #ifndef DEVICE_AGP_H #define DEVICE_AGP_H +#include + unsigned int agp_scan_bus(struct bus *bus, unsigned min_devfn, unsigned max_devfn, unsigned int max); unsigned int agp_scan_bridge(struct device *dev, unsigned int max); diff --git a/include/device/cardbus.h b/include/device/cardbus.h index 4797155805..f6caed2296 100644 --- a/include/device/cardbus.h +++ b/include/device/cardbus.h @@ -19,6 +19,8 @@ #ifndef DEVICE_CARDBUS_H #define DEVICE_CARDBUS_H +#include + void cardbus_read_resources(struct device *dev); unsigned int cardbus_scan_bus(struct bus *bus, unsigned min_devfn, unsigned max_devfn, unsigned int max); diff --git a/include/device/hypertransport.h b/include/device/hypertransport.h index b2db30beb3..7060a52d33 100644 --- a/include/device/hypertransport.h +++ b/include/device/hypertransport.h @@ -18,6 +18,7 @@ #ifndef DEVICE_HYPERTRANSPORT_H #define DEVICE_HYPERTRANSPORT_H +#include #include unsigned int hypertransport_scan_chain(struct bus *bus, diff --git a/include/device/pci_rom.h b/include/device/pci_rom.h index ed114138f6..c0c08d66e2 100644 --- a/include/device/pci_rom.h +++ b/include/device/pci_rom.h @@ -19,6 +19,7 @@ #include #include +#include #define PCI_ROM_HDR 0xAA55 #define PCI_DATA_HDR (u32) ( ('R' << 24) | ('I' << 16) | ('C' << 8) | 'P' ) diff --git a/include/device/pcie.h b/include/device/pcie.h index 0d70c5c439..9eff0e295b 100644 --- a/include/device/pcie.h +++ b/include/device/pcie.h @@ -20,6 +20,8 @@ #ifndef DEVICE_PCIE_H #define DEVICE_PCIE_H +#include + unsigned int pcie_scan_bus(struct bus *bus, unsigned min_devfn, unsigned max_devfn, unsigned int max); unsigned int pcie_scan_bridge(struct device *dev, unsigned int max); diff --git a/include/device/pcix.h b/include/device/pcix.h index c125edb79c..2fb98c843b 100644 --- a/include/device/pcix.h +++ b/include/device/pcix.h @@ -18,6 +18,8 @@ #ifndef DEVICE_PCIX_H #define DEVICE_PCIX_H +#include + /* (c) 2005 Linux Networx GPL see COPYING for details */ unsigned int pcix_scan_bus(struct bus *bus, diff --git a/include/device/smbus.h b/include/device/smbus.h index db4fe780f8..4044f4a40b 100644 --- a/include/device/smbus.h +++ b/include/device/smbus.h @@ -18,7 +18,6 @@ #ifndef DEVICE_SMBUS_H #define DEVICE_SMBUS_H -#include #include #include #include diff --git a/include/post_code.h b/include/post_code.h index 86a8e063b8..5b186444f0 100644 --- a/include/post_code.h +++ b/include/post_code.h @@ -21,6 +21,7 @@ #ifndef POST_CODE_H #define POST_CODE_H +#include #include SHARED(post_code, void, u8 value); diff --git a/include/spd.h b/include/spd.h index 59eb88691c..d001a4c663 100644 --- a/include/spd.h +++ b/include/spd.h @@ -36,6 +36,8 @@ #ifndef _SPD_H_ #define _SPD_H_ +#include + /* Byte numbers. */ #define SPD_NUM_MANUFACTURER_BYTES 0 /* Number of bytes used by module manufacturer */ #define SPD_TOTAL_SPD_MEMORY_SIZE 1 /* Total SPD memory size */ diff --git a/northbridge/intel/i440bxemulation/i440bx.h b/northbridge/intel/i440bxemulation/i440bx.h index 15e4ebf77e..ca9cd48f38 100644 --- a/northbridge/intel/i440bxemulation/i440bx.h +++ b/northbridge/intel/i440bxemulation/i440bx.h @@ -21,6 +21,8 @@ #ifndef NORTHBRIDGE_INTEL_I440BXEMULATION_I440BX_H #define NORTHBRIDGE_INTEL_I440BXEMULATION_I440BX_H +#include + /* * Datasheet: * - Name: Intel 440BX AGPset: 82443BX Host Bridge/Controller