[coreboot] [PATCH] v3: make header files self-contained

Peter Stuge peter at stuge.se
Tue Feb 19 01:21:25 CET 2008


On Mon, Feb 18, 2008 at 06:43:05PM +0100, Carl-Daniel Hailfinger wrote:
> 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.
> 

Looks good. Works? Ack.

> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Acked-by: Peter Stuge <peter at stuge.se>


> Index: LinuxBIOSv3-includecleanup/include/device/smbus.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/device/smbus.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/device/smbus.h	(working copy)
> @@ -18,7 +18,6 @@
>  #ifndef DEVICE_SMBUS_H
>  #define DEVICE_SMBUS_H
>  
> -#include <stdint.h>
>  #include <device/device.h>
>  #include <device/path.h>
>  #include <device/smbus_def.h>
> Index: LinuxBIOSv3-includecleanup/include/device/pcix.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/device/pcix.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/device/pcix.h	(working copy)
> @@ -18,6 +18,8 @@
>  #ifndef DEVICE_PCIX_H
>  #define DEVICE_PCIX_H
>  
> +#include <device/device.h>
> +
>  /* (c) 2005 Linux Networx GPL see COPYING for details */
>  
>  unsigned int pcix_scan_bus(struct bus *bus, 
> Index: LinuxBIOSv3-includecleanup/include/device/hypertransport.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/device/hypertransport.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/device/hypertransport.h	(working copy)
> @@ -18,6 +18,7 @@
>  #ifndef DEVICE_HYPERTRANSPORT_H
>  #define DEVICE_HYPERTRANSPORT_H
>  
> +#include <device/device.h>
>  #include <device/hypertransport_def.h>
>  
>  unsigned int hypertransport_scan_chain(struct bus *bus, 
> Index: LinuxBIOSv3-includecleanup/include/device/agp.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/device/agp.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/device/agp.h	(working copy)
> @@ -19,6 +19,8 @@
>  #ifndef DEVICE_AGP_H
>  #define DEVICE_AGP_H
>  
> +#include <device/device.h>
> +
>  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);
> Index: LinuxBIOSv3-includecleanup/include/device/pcie.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/device/pcie.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/device/pcie.h	(working copy)
> @@ -20,6 +20,8 @@
>  #ifndef DEVICE_PCIE_H
>  #define DEVICE_PCIE_H
>  
> +#include <device/device.h>
> +
>  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);
> Index: LinuxBIOSv3-includecleanup/include/device/cardbus.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/device/cardbus.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/device/cardbus.h	(working copy)
> @@ -19,6 +19,8 @@
>  #ifndef DEVICE_CARDBUS_H
>  #define DEVICE_CARDBUS_H
>  
> +#include <device/device.h>
> +
>  void cardbus_read_resources(struct device *dev);
>  unsigned int cardbus_scan_bus(struct bus *bus, 
>  	unsigned min_devfn, unsigned max_devfn, unsigned int max);
> Index: LinuxBIOSv3-includecleanup/include/device/pci_rom.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/device/pci_rom.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/device/pci_rom.h	(working copy)
> @@ -19,6 +19,7 @@
>  
>  #include <types.h>
>  #include <byteorder.h>
> +#include <device/device.h>
>  
>  #define PCI_ROM_HDR 0xAA55
>  #define PCI_DATA_HDR (u32) ( ('R' << 24) | ('I' << 16) | ('C' << 8) | 'P' )
> Index: LinuxBIOSv3-includecleanup/include/tables.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/tables.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/tables.h	(working copy)
> @@ -23,6 +23,8 @@
>  #ifndef TABLES_H
>  #define TABLES_H
>  
> +#include <types.h>
> +
>  /*
>   * Table management structs and prototypes for coreboot.
>   *
> Index: LinuxBIOSv3-includecleanup/include/post_code.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/post_code.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/post_code.h	(working copy)
> @@ -21,6 +21,7 @@
>  #ifndef POST_CODE_H
>  #define POST_CODE_H
>  
> +#include <types.h>
>  #include <shared.h>
>  
>  SHARED(post_code, void, u8 value);
> Index: LinuxBIOSv3-includecleanup/include/spd.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/spd.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/spd.h	(working copy)
> @@ -36,6 +36,8 @@
>  #ifndef _SPD_H_
>  #define _SPD_H_
>  
> +#include <types.h>
> +
>  /* 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 */
> Index: LinuxBIOSv3-includecleanup/include/arch/x86/pci_ops.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/arch/x86/pci_ops.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/arch/x86/pci_ops.h	(working copy)
> @@ -17,6 +17,8 @@
>  #ifndef ARCH_X86_PCI_OPS_H
>  #define ARCH_X86_PCI_OPS_H
>  
> +#include <device/device.h>
> +
>  extern const struct pci_bus_operations pci_cf8_conf1;
>  extern const struct pci_bus_operations pci_cf8_conf2;
>  
> Index: LinuxBIOSv3-includecleanup/include/arch/x86/msr.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/arch/x86/msr.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/arch/x86/msr.h	(working copy)
> @@ -20,6 +20,8 @@
>  #ifndef CPU_X86_MSR_H
>  #define CPU_X86_MSR_H
>  
> +#include <types.h>
> +
>  /* standard MSR operations, everyone has written these one hundred times */
>  struct msr {
>  	u32 lo;
> Index: LinuxBIOSv3-includecleanup/include/arch/x86/pirq_routing.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/include/arch/x86/pirq_routing.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/include/arch/x86/pirq_routing.h	(working copy)
> @@ -21,6 +21,8 @@
>  #ifndef ARCH_PIRQ_ROUTING_H
>  #define ARCH_PIRQ_ROUTING_H
>  
> +#include <types.h>
> +
>  #define PIRQ_SIGNATURE	(('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
>  #define PIRQ_VERSION 0x0100
>  
> Index: LinuxBIOSv3-includecleanup/device/smbus_ops.c
> ===================================================================
> --- LinuxBIOSv3-includecleanup/device/smbus_ops.c	(revision 609)
> +++ LinuxBIOSv3-includecleanup/device/smbus_ops.c	(working copy)
> @@ -20,7 +20,6 @@
>   */
>  
>  #include <console.h>
> -#include <stdint.h>
>  #include <device/device.h>
>  #include <device/path.h>
>  #include <device/smbus.h>
> Index: LinuxBIOSv3-includecleanup/northbridge/intel/i440bxemulation/i440bx.h
> ===================================================================
> --- LinuxBIOSv3-includecleanup/northbridge/intel/i440bxemulation/i440bx.h	(revision 609)
> +++ LinuxBIOSv3-includecleanup/northbridge/intel/i440bxemulation/i440bx.h	(working copy)
> @@ -21,6 +21,8 @@
>  #ifndef NORTHBRIDGE_INTEL_I440BXEMULATION_I440BX_H
>  #define NORTHBRIDGE_INTEL_I440BXEMULATION_I440BX_H
>  
> +#include <device/device.h>
> +
>  /*
>   * Datasheet:
>   *   - Name: Intel 440BX AGPset: 82443BX Host Bridge/Controller




More information about the coreboot mailing list