summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm/include/arch/pci_ops.h3
-rw-r--r--src/arch/arm64/include/arch/pci_ops.h3
-rw-r--r--src/arch/mips/include/arch/pci_ops.h3
-rw-r--r--src/arch/x86/include/arch/io.h4
-rw-r--r--src/include/device/device.h1
-rw-r--r--src/include/device/pci_type.h22
6 files changed, 27 insertions, 9 deletions
diff --git a/src/arch/arm/include/arch/pci_ops.h b/src/arch/arm/include/arch/pci_ops.h
index 533ad8097a..75bb20e05f 100644
--- a/src/arch/arm/include/arch/pci_ops.h
+++ b/src/arch/arm/include/arch/pci_ops.h
@@ -17,8 +17,7 @@
#define ARCH_ARM_PCI_OPS_H
#include <stdint.h>
-
-typedef u32 pci_devfn_t;
+#include <device/pci_type.h>
#ifdef __SIMPLE_DEVICE__
u8 pci_read_config8(pci_devfn_t dev, unsigned int where);
diff --git a/src/arch/arm64/include/arch/pci_ops.h b/src/arch/arm64/include/arch/pci_ops.h
index 32e7601d9c..0e6f52d79f 100644
--- a/src/arch/arm64/include/arch/pci_ops.h
+++ b/src/arch/arm64/include/arch/pci_ops.h
@@ -17,8 +17,7 @@
#define ARCH_ARM64_PCI_OPS_H
#include <stdint.h>
-
-typedef u32 pci_devfn_t;
+#include <device/pci_type.h>
#ifdef __SIMPLE_DEVICE__
u8 pci_read_config8(pci_devfn_t dev, unsigned int where);
diff --git a/src/arch/mips/include/arch/pci_ops.h b/src/arch/mips/include/arch/pci_ops.h
index f57befa31e..7bfcbdd8f9 100644
--- a/src/arch/mips/include/arch/pci_ops.h
+++ b/src/arch/mips/include/arch/pci_ops.h
@@ -17,8 +17,7 @@
#define ARCH_MIPS_PCI_OPS_H
#include <stdint.h>
-
-typedef u32 pci_devfn_t;
+#include <device/pci_type.h>
#ifdef __SIMPLE_DEVICE__
u8 pci_read_config8(pci_devfn_t dev, unsigned int where);
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h
index f47973e2fb..9e2a877906 100644
--- a/src/arch/x86/include/arch/io.h
+++ b/src/arch/x86/include/arch/io.h
@@ -17,9 +17,7 @@
#include <endian.h>
#include <stdint.h>
#include <rules.h>
-
-typedef u32 pci_devfn_t;
-typedef u32 pnp_devfn_t;
+#include <device/pci_type.h>
/*
* This file contains the definitions for the x86 IO instructions
diff --git a/src/include/device/device.h b/src/include/device/device.h
index c2f8ecefd7..5e539ea339 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -14,6 +14,7 @@
#include <rules.h>
#include <device/resource.h>
#include <device/path.h>
+#include <device/pci_type.h>
#include <arch/io.h>
struct device;
diff --git a/src/include/device/pci_type.h b/src/include/device/pci_type.h
new file mode 100644
index 0000000000..2849ececa7
--- /dev/null
+++ b/src/include/device/pci_type.h
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef DEVICE_PCI_TYPE_H
+#define DEVICE_PCI_TYPE_H
+
+#include <stdint.h>
+
+typedef u32 pci_devfn_t;
+typedef u32 pnp_devfn_t;
+
+#endif /* DEVICE_PCI_TYPE_H */