aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2012-07-20 20:35:14 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2012-07-20 20:35:14 +0000
commit32508eb304428551cff40b291d44823aafec7574 (patch)
tree0641d77a791290f6842fd60446e87871f6867651
parent3834c2d7e5a08e09e580be0dc7f9369c941b2a70 (diff)
downloadflashrom-32508eb304428551cff40b291d44823aafec7574.tar.gz
flashrom-32508eb304428551cff40b291d44823aafec7574.tar.bz2
flashrom-32508eb304428551cff40b291d44823aafec7574.zip
Hide hwaccess.h from public API
Move hwaccess.h #include from flash.h to individual drivers. libflashrom users need flash.h, but they do not care about hwaccess.h and should not see its definitions because they may conflict with other hardware access functions and #defines used by the libflashrom user. Corresponding to flashrom svn r1549. Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-rw-r--r--atahpt.c1
-rw-r--r--board_enable.c1
-rw-r--r--chipset_enable.c1
-rw-r--r--drkaiser.c1
-rw-r--r--flash.h1
-rw-r--r--gfxnvidia.c1
-rw-r--r--hwaccess.c1
-rw-r--r--ichspi.c1
-rw-r--r--internal.c1
-rw-r--r--it85spi.c1
-rw-r--r--it87spi.c1
-rw-r--r--mcp6x_spi.c1
-rw-r--r--nic3com.c1
-rw-r--r--nicintel.c1
-rw-r--r--nicintel_spi.c1
-rw-r--r--nicnatsemi.c1
-rw-r--r--nicrealtek.c1
-rw-r--r--ogp_spi.c1
-rw-r--r--pcidev.c1
-rw-r--r--physmap.c1
-rw-r--r--programmer.h2
-rw-r--r--rayer_spi.c1
-rw-r--r--satamv.c1
-rw-r--r--satasii.c1
-rw-r--r--sb600spi.c1
-rw-r--r--wbsio_spi.c1
26 files changed, 26 insertions, 1 deletions
diff --git a/atahpt.c b/atahpt.c
index 4234f6d3..41a82cb7 100644
--- a/atahpt.c
+++ b/atahpt.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define BIOS_ROM_ADDR 0x90
#define BIOS_ROM_DATA 0x94
diff --git a/board_enable.c b/board_enable.c
index 98607aa4..04cb557a 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -27,6 +27,7 @@
#include <string.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#if defined(__i386__) || defined(__x86_64__)
/*
diff --git a/chipset_enable.c b/chipset_enable.c
index 5cfcd1b5..bde2e12e 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define NOT_DONE_YET 1
diff --git a/drkaiser.c b/drkaiser.c
index 362db579..a3844b82 100644
--- a/drkaiser.c
+++ b/drkaiser.c
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define PCI_VENDOR_ID_DRKAISER 0x1803
diff --git a/flash.h b/flash.h
index 60d52e17..d669512f 100644
--- a/flash.h
+++ b/flash.h
@@ -26,7 +26,6 @@
#include <stdint.h>
#include <stddef.h>
-#include "hwaccess.h"
#ifdef _WIN32
#include <windows.h>
#undef min
diff --git a/gfxnvidia.c b/gfxnvidia.c
index b8750b30..ddf82e70 100644
--- a/gfxnvidia.c
+++ b/gfxnvidia.c
@@ -22,6 +22,7 @@
#include <string.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define PCI_VENDOR_ID_NVIDIA 0x10de
diff --git a/hwaccess.c b/hwaccess.c
index 571edd70..e1821679 100644
--- a/hwaccess.c
+++ b/hwaccess.c
@@ -30,6 +30,7 @@
#include <errno.h>
#endif
#include "flash.h"
+#include "hwaccess.h"
#if defined(__i386__) || defined(__x86_64__)
diff --git a/ichspi.c b/ichspi.c
index 29c507ab..792d35da 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#include "spi.h"
#include "ich_descriptors.h"
diff --git a/internal.c b/internal.c
index 5b245779..c99ca1fb 100644
--- a/internal.c
+++ b/internal.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#if NEED_PCI == 1
struct pci_dev *pci_dev_find_filter(struct pci_filter filter)
diff --git a/it85spi.c b/it85spi.c
index a5d5c2e4..0b074eb1 100644
--- a/it85spi.c
+++ b/it85spi.c
@@ -32,6 +32,7 @@
#include "flash.h"
#include "spi.h"
#include "programmer.h"
+#include "hwaccess.h"
#define MAX_TIMEOUT 100000
#define MAX_TRY 5
diff --git a/it87spi.c b/it87spi.c
index c02f77bb..c7bbb139 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -30,6 +30,7 @@
#include "flash.h"
#include "chipdrivers.h"
#include "programmer.h"
+#include "hwaccess.h"
#include "spi.h"
#define ITE_SUPERIO_PORT1 0x2e
diff --git a/mcp6x_spi.c b/mcp6x_spi.c
index 23f39a53..ac405579 100644
--- a/mcp6x_spi.c
+++ b/mcp6x_spi.c
@@ -29,6 +29,7 @@
#include <ctype.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
/* Bit positions for each pin. */
diff --git a/nic3com.c b/nic3com.c
index 473c7b11..a137c646 100644
--- a/nic3com.c
+++ b/nic3com.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define BIOS_ROM_ADDR 0x04
#define BIOS_ROM_DATA 0x08
diff --git a/nicintel.c b/nicintel.c
index 49bdec2c..813049c1 100644
--- a/nicintel.c
+++ b/nicintel.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
uint8_t *nicintel_bar;
uint8_t *nicintel_control_bar;
diff --git a/nicintel_spi.c b/nicintel_spi.c
index 4ff8554b..7a02cdae 100644
--- a/nicintel_spi.c
+++ b/nicintel_spi.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define PCI_VENDOR_ID_INTEL 0x8086
diff --git a/nicnatsemi.c b/nicnatsemi.c
index eb2a7f88..46468671 100644
--- a/nicnatsemi.c
+++ b/nicnatsemi.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define PCI_VENDOR_ID_NATSEMI 0x100b
diff --git a/nicrealtek.c b/nicrealtek.c
index 32aa4349..61e07d80 100644
--- a/nicrealtek.c
+++ b/nicrealtek.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_VENDOR_ID_SMC1211 0x1113
diff --git a/ogp_spi.c b/ogp_spi.c
index 812420c5..29660249 100644
--- a/ogp_spi.c
+++ b/ogp_spi.c
@@ -21,6 +21,7 @@
#include <string.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define PCI_VENDOR_ID_OGP 0x1227
diff --git a/pcidev.c b/pcidev.c
index f490a68e..c1b6d6ab 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -23,6 +23,7 @@
#include <string.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
uint32_t io_base_addr;
struct pci_access *pacc;
diff --git a/physmap.c b/physmap.c
index e54dee41..eca6760d 100644
--- a/physmap.c
+++ b/physmap.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include "flash.h"
+#include "hwaccess.h"
/* Do we need any file access or ioctl for physmap or MSR? */
#if !defined(__DJGPP__) && !defined(__LIBPAYLOAD__)
diff --git a/programmer.h b/programmer.h
index 51d04fd7..6f07dd0a 100644
--- a/programmer.h
+++ b/programmer.h
@@ -144,6 +144,7 @@ struct bitbang_spi_master {
};
#if CONFIG_INTERNAL == 1
+struct pci_dev;
struct penable {
uint16_t vendor_id;
uint16_t device_id;
@@ -294,6 +295,7 @@ extern int superio_count;
#define SUPERIO_VENDOR_WINBOND 0x2
#endif
#if NEED_PCI == 1
+struct pci_filter;
struct pci_dev *pci_dev_find_filter(struct pci_filter filter);
struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass);
struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device);
diff --git a/rayer_spi.c b/rayer_spi.c
index 0011bc0e..584a6a06 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -34,6 +34,7 @@
#include <string.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
enum rayer_type {
TYPE_RAYER,
diff --git a/satamv.c b/satamv.c
index e39385b2..70deb06f 100644
--- a/satamv.c
+++ b/satamv.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
uint8_t *mv_bar;
uint16_t mv_iobar;
diff --git a/satasii.c b/satasii.c
index 387c605d..aae76f32 100644
--- a/satasii.c
+++ b/satasii.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#define PCI_VENDOR_ID_SII 0x1095
diff --git a/sb600spi.c b/sb600spi.c
index e36ac962..fe60aa9d 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -25,6 +25,7 @@
#include "flash.h"
#include "programmer.h"
+#include "hwaccess.h"
#include "spi.h"
/* This struct is unused, but helps visualize the SB600 SPI BAR layout.
diff --git a/wbsio_spi.c b/wbsio_spi.c
index 38ac2d88..7d4bb2ac 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -23,6 +23,7 @@
#include "flash.h"
#include "chipdrivers.h"
#include "programmer.h"
+#include "hwaccess.h"
#include "spi.h"
#define WBSIO_PORT1 0x2e