mirror of
				https://review.coreboot.org/flashrom.git
				synced 2025-10-31 05:10:41 +01:00 
			
		
		
		
	pci.h: move include into own wrapper
Split the include of hwaccess and libpci. There is no need to have pci.h included in hwaccess. Change-Id: Ibf00356f0ef5cc92e0ec99f8fe5cdda56f47b166 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
		 Thomas Heijligen
					Thomas Heijligen
				
			
				
					committed by
					
						 Nico Huber
						Nico Huber
					
				
			
			
				
	
			
			
			 Nico Huber
						Nico Huber
					
				
			
						parent
						
							9469f81d8f
						
					
				
				
					commit
					88c871e74c
				
			| @@ -19,6 +19,7 @@ | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "spi.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| /* same as serverengines */ | ||||
| static void enter_conf_mode_ec(uint16_t port) | ||||
|   | ||||
							
								
								
									
										1
									
								
								atahpt.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								atahpt.c
									
									
									
									
									
								
							| @@ -19,6 +19,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define BIOS_ROM_ADDR		0x90 | ||||
| #define BIOS_ROM_DATA		0x94 | ||||
|   | ||||
| @@ -19,6 +19,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define MAX_ROM_DECODE (32 * 1024) | ||||
| #define ADDR_MASK (MAX_ROM_DECODE - 1) | ||||
|   | ||||
							
								
								
									
										1
									
								
								atavia.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								atavia.c
									
									
									
									
									
								
							| @@ -21,6 +21,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_VIA	0x1106 | ||||
|  | ||||
|   | ||||
| @@ -26,6 +26,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #if defined(__i386__) || defined(__x86_64__) | ||||
| /* | ||||
|   | ||||
| @@ -34,6 +34,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define NOT_DONE_YET 1 | ||||
|  | ||||
|   | ||||
| @@ -18,6 +18,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_DRKAISER		0x1803 | ||||
|  | ||||
|   | ||||
| @@ -19,6 +19,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_NVIDIA	0x10de | ||||
|  | ||||
|   | ||||
							
								
								
									
										17
									
								
								hwaccess.h
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								hwaccess.h
									
									
									
									
									
								
							| @@ -20,23 +20,6 @@ | ||||
| #ifndef __HWACCESS_H__ | ||||
| #define __HWACCESS_H__ 1 | ||||
|  | ||||
| #if NEED_PCI == 1 | ||||
| /* | ||||
|  * libpci headers use the variable name "index" which triggers shadowing | ||||
|  * warnings on systems which have the index() function in a default #include | ||||
|  * or as builtin. | ||||
|  */ | ||||
| #define index shadow_workaround_index | ||||
|  | ||||
| #if !defined (__NetBSD__) | ||||
| #include <pci/pci.h> | ||||
| #else | ||||
| #include <pciutils/pci.h> | ||||
| #endif | ||||
|  | ||||
| #undef index | ||||
| #endif /* NEED_PCI == 1 */ | ||||
|  | ||||
| void mmio_writeb(uint8_t val, void *addr); | ||||
| void mmio_writew(uint16_t val, void *addr); | ||||
| void mmio_writel(uint32_t val, void *addr); | ||||
|   | ||||
| @@ -20,6 +20,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| int is_laptop = 0; | ||||
| int laptop_ok = 0; | ||||
|   | ||||
							
								
								
									
										1
									
								
								it8212.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								it8212.c
									
									
									
									
									
								
							| @@ -18,6 +18,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| static uint8_t *it8212_bar = NULL; | ||||
|  | ||||
|   | ||||
| @@ -24,6 +24,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| /* Bit positions for each pin. */ | ||||
|  | ||||
|   | ||||
| @@ -18,6 +18,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define BIOS_ROM_ADDR		0x04 | ||||
| #define BIOS_ROM_DATA		0x08 | ||||
|   | ||||
| @@ -19,6 +19,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| static uint8_t *nicintel_bar; | ||||
| static uint8_t *nicintel_control_bar; | ||||
|   | ||||
| @@ -35,6 +35,7 @@ | ||||
| #include "spi.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_INTEL 0x8086 | ||||
| #define MEMMAP_SIZE 0x1c /* Only EEC, EERD and EEWR are needed. */ | ||||
|   | ||||
| @@ -35,6 +35,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_INTEL 0x8086 | ||||
| #define MEMMAP_SIZE getpagesize() | ||||
|   | ||||
| @@ -18,6 +18,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_NATSEMI	0x100b | ||||
|  | ||||
|   | ||||
| @@ -18,6 +18,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_REALTEK	0x10ec | ||||
| #define PCI_VENDOR_ID_SMC1211	0x1113 | ||||
|   | ||||
| @@ -19,6 +19,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_OGP 0x1227 | ||||
|  | ||||
|   | ||||
							
								
								
									
										2
									
								
								pcidev.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								pcidev.c
									
									
									
									
									
								
							| @@ -19,7 +19,7 @@ | ||||
| #include <string.h> | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| struct pci_access *pacc; | ||||
|  | ||||
|   | ||||
							
								
								
									
										25
									
								
								platform/pci.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								platform/pci.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| /* | ||||
|  * This is a wrapper for libpci. | ||||
|  * ... | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #ifndef __PLATFORM_PCI_H__ | ||||
| #define __PLATFORM_PCI_H__ | ||||
|  | ||||
| /* | ||||
|  * An old libpci version seems to use the variable name "index" which triggers | ||||
|  * shadowing warnings on systems which have the index() function in a default | ||||
|  * #include or as builtin. | ||||
|  */ | ||||
| #define index shadow_workaround_index | ||||
|  | ||||
| #if defined (__NetBSD__) | ||||
| #include <pciutils/pci.h> | ||||
| #else | ||||
| #include <pci/pci.h> | ||||
| #endif | ||||
|  | ||||
| #undef index | ||||
|  | ||||
| #endif /* __PLATFORM_PCI_H__ */ | ||||
							
								
								
									
										1
									
								
								satamv.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								satamv.c
									
									
									
									
									
								
							| @@ -20,6 +20,7 @@ | ||||
| #include "flash.h" | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| static uint8_t *mv_bar; | ||||
| static uint16_t mv_iobar; | ||||
|   | ||||
| @@ -18,6 +18,7 @@ | ||||
|  | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| #define PCI_VENDOR_ID_SII	0x1095 | ||||
|  | ||||
|   | ||||
| @@ -24,6 +24,7 @@ | ||||
| #include "programmer.h" | ||||
| #include "hwaccess.h" | ||||
| #include "spi.h" | ||||
| #include "platform/pci.h" | ||||
|  | ||||
| /* This struct is unused, but helps visualize the SB600 SPI BAR layout. | ||||
|  *struct sb600_spi_controller { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user