Author: hailfinger Date: Fri Jul 20 22:35:14 2012 New Revision: 1549 URL: http://flashrom.org/trac/flashrom/changeset/1549
Log: 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.
Signed-off-by: Patrick Georgi patrick.georgi@secunet.com Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Modified: trunk/atahpt.c trunk/board_enable.c trunk/chipset_enable.c trunk/drkaiser.c trunk/flash.h trunk/gfxnvidia.c trunk/hwaccess.c trunk/ichspi.c trunk/internal.c trunk/it85spi.c trunk/it87spi.c trunk/mcp6x_spi.c trunk/nic3com.c trunk/nicintel.c trunk/nicintel_spi.c trunk/nicnatsemi.c trunk/nicrealtek.c trunk/ogp_spi.c trunk/pcidev.c trunk/physmap.c trunk/programmer.h trunk/rayer_spi.c trunk/satamv.c trunk/satasii.c trunk/sb600spi.c trunk/wbsio_spi.c
Modified: trunk/atahpt.c ============================================================================== --- trunk/atahpt.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/atahpt.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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
Modified: trunk/board_enable.c ============================================================================== --- trunk/board_enable.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/board_enable.c Fri Jul 20 22:35:14 2012 (r1549) @@ -27,6 +27,7 @@ #include <string.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#if defined(__i386__) || defined(__x86_64__) /*
Modified: trunk/chipset_enable.c ============================================================================== --- trunk/chipset_enable.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/chipset_enable.c Fri Jul 20 22:35:14 2012 (r1549) @@ -34,6 +34,7 @@ #include <errno.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#define NOT_DONE_YET 1
Modified: trunk/drkaiser.c ============================================================================== --- trunk/drkaiser.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/drkaiser.c Fri Jul 20 22:35:14 2012 (r1549) @@ -21,6 +21,7 @@ #include <stdlib.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#define PCI_VENDOR_ID_DRKAISER 0x1803
Modified: trunk/flash.h ============================================================================== --- trunk/flash.h Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/flash.h Fri Jul 20 22:35:14 2012 (r1549) @@ -26,7 +26,6 @@
#include <stdint.h> #include <stddef.h> -#include "hwaccess.h" #ifdef _WIN32 #include <windows.h> #undef min
Modified: trunk/gfxnvidia.c ============================================================================== --- trunk/gfxnvidia.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/gfxnvidia.c Fri Jul 20 22:35:14 2012 (r1549) @@ -22,6 +22,7 @@ #include <string.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#define PCI_VENDOR_ID_NVIDIA 0x10de
Modified: trunk/hwaccess.c ============================================================================== --- trunk/hwaccess.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/hwaccess.c Fri Jul 20 22:35:14 2012 (r1549) @@ -30,6 +30,7 @@ #include <errno.h> #endif #include "flash.h" +#include "hwaccess.h"
#if defined(__i386__) || defined(__x86_64__)
Modified: trunk/ichspi.c ============================================================================== --- trunk/ichspi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/ichspi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -29,6 +29,7 @@ #include <stdlib.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h" #include "spi.h" #include "ich_descriptors.h"
Modified: trunk/internal.c ============================================================================== --- trunk/internal.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/internal.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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)
Modified: trunk/it85spi.c ============================================================================== --- trunk/it85spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/it85spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -32,6 +32,7 @@ #include "flash.h" #include "spi.h" #include "programmer.h" +#include "hwaccess.h"
#define MAX_TIMEOUT 100000 #define MAX_TRY 5
Modified: trunk/it87spi.c ============================================================================== --- trunk/it87spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/it87spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -30,6 +30,7 @@ #include "flash.h" #include "chipdrivers.h" #include "programmer.h" +#include "hwaccess.h" #include "spi.h"
#define ITE_SUPERIO_PORT1 0x2e
Modified: trunk/mcp6x_spi.c ============================================================================== --- trunk/mcp6x_spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/mcp6x_spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -29,6 +29,7 @@ #include <ctype.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
/* Bit positions for each pin. */
Modified: trunk/nic3com.c ============================================================================== --- trunk/nic3com.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/nic3com.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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
Modified: trunk/nicintel.c ============================================================================== --- trunk/nicintel.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/nicintel.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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;
Modified: trunk/nicintel_spi.c ============================================================================== --- trunk/nicintel_spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/nicintel_spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -28,6 +28,7 @@ #include <stdlib.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#define PCI_VENDOR_ID_INTEL 0x8086
Modified: trunk/nicnatsemi.c ============================================================================== --- trunk/nicnatsemi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/nicnatsemi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -23,6 +23,7 @@ #include <stdlib.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#define PCI_VENDOR_ID_NATSEMI 0x100b
Modified: trunk/nicrealtek.c ============================================================================== --- trunk/nicrealtek.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/nicrealtek.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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
Modified: trunk/ogp_spi.c ============================================================================== --- trunk/ogp_spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/ogp_spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -21,6 +21,7 @@ #include <string.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#define PCI_VENDOR_ID_OGP 0x1227
Modified: trunk/pcidev.c ============================================================================== --- trunk/pcidev.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/pcidev.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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;
Modified: trunk/physmap.c ============================================================================== --- trunk/physmap.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/physmap.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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__)
Modified: trunk/programmer.h ============================================================================== --- trunk/programmer.h Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/programmer.h Fri Jul 20 22:35:14 2012 (r1549) @@ -144,6 +144,7 @@ };
#if CONFIG_INTERNAL == 1 +struct pci_dev; struct penable { uint16_t vendor_id; uint16_t device_id; @@ -294,6 +295,7 @@ #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);
Modified: trunk/rayer_spi.c ============================================================================== --- trunk/rayer_spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/rayer_spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -34,6 +34,7 @@ #include <string.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
enum rayer_type { TYPE_RAYER,
Modified: trunk/satamv.c ============================================================================== --- trunk/satamv.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/satamv.c Fri Jul 20 22:35:14 2012 (r1549) @@ -24,6 +24,7 @@ #include <stdlib.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
uint8_t *mv_bar; uint16_t mv_iobar;
Modified: trunk/satasii.c ============================================================================== --- trunk/satasii.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/satasii.c Fri Jul 20 22:35:14 2012 (r1549) @@ -23,6 +23,7 @@ #include <stdlib.h> #include "flash.h" #include "programmer.h" +#include "hwaccess.h"
#define PCI_VENDOR_ID_SII 0x1095
Modified: trunk/sb600spi.c ============================================================================== --- trunk/sb600spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/sb600spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -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.
Modified: trunk/wbsio_spi.c ============================================================================== --- trunk/wbsio_spi.c Mon Jul 16 23:32:19 2012 (r1548) +++ trunk/wbsio_spi.c Fri Jul 20 22:35:14 2012 (r1549) @@ -23,6 +23,7 @@ #include "flash.h" #include "chipdrivers.h" #include "programmer.h" +#include "hwaccess.h" #include "spi.h"
#define WBSIO_PORT1 0x2e