diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-06 16:37:32 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-06 16:37:32 -0500 |
| commit | 72e1e868ca8f14ef34c95e0e8b73f64b6acf5934 (patch) | |
| tree | d3bc99f121693ab8f09c03ea555254c9314ff98d /include | |
| parent | edb1daab8e91338b7e2a6c41faec695891ccda35 (diff) | |
| parent | f9a37be0f02a943d63e3346b19f9c9d8d91826cb (diff) | |
Merge branch 'pci/mjg-pci-roms-from-efi' into next
* pci/mjg-pci-roms-from-efi:
x86: Use PCI setup data
PCI: Add support for non-BAR ROMs
PCI: Add pcibios_add_device
EFI: Stash ROMs if they're not in the PCI BAR
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/efi.h | 71 | ||||
| -rw-r--r-- | include/linux/pci.h | 3 |
2 files changed, 74 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 8670eb1eb8cd..8eb1be17c801 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -196,6 +196,77 @@ typedef struct { | |||
| 196 | void *create_event_ex; | 196 | void *create_event_ex; |
| 197 | } efi_boot_services_t; | 197 | } efi_boot_services_t; |
| 198 | 198 | ||
| 199 | typedef enum { | ||
| 200 | EfiPciIoWidthUint8, | ||
| 201 | EfiPciIoWidthUint16, | ||
| 202 | EfiPciIoWidthUint32, | ||
| 203 | EfiPciIoWidthUint64, | ||
| 204 | EfiPciIoWidthFifoUint8, | ||
| 205 | EfiPciIoWidthFifoUint16, | ||
| 206 | EfiPciIoWidthFifoUint32, | ||
| 207 | EfiPciIoWidthFifoUint64, | ||
| 208 | EfiPciIoWidthFillUint8, | ||
| 209 | EfiPciIoWidthFillUint16, | ||
| 210 | EfiPciIoWidthFillUint32, | ||
| 211 | EfiPciIoWidthFillUint64, | ||
| 212 | EfiPciIoWidthMaximum | ||
| 213 | } EFI_PCI_IO_PROTOCOL_WIDTH; | ||
| 214 | |||
| 215 | typedef enum { | ||
| 216 | EfiPciIoAttributeOperationGet, | ||
| 217 | EfiPciIoAttributeOperationSet, | ||
| 218 | EfiPciIoAttributeOperationEnable, | ||
| 219 | EfiPciIoAttributeOperationDisable, | ||
| 220 | EfiPciIoAttributeOperationSupported, | ||
| 221 | EfiPciIoAttributeOperationMaximum | ||
| 222 | } EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION; | ||
| 223 | |||
| 224 | |||
| 225 | typedef struct { | ||
| 226 | void *read; | ||
| 227 | void *write; | ||
| 228 | } efi_pci_io_protocol_access_t; | ||
| 229 | |||
| 230 | typedef struct { | ||
| 231 | void *poll_mem; | ||
| 232 | void *poll_io; | ||
| 233 | efi_pci_io_protocol_access_t mem; | ||
| 234 | efi_pci_io_protocol_access_t io; | ||
| 235 | efi_pci_io_protocol_access_t pci; | ||
| 236 | void *copy_mem; | ||
| 237 | void *map; | ||
| 238 | void *unmap; | ||
| 239 | void *allocate_buffer; | ||
| 240 | void *free_buffer; | ||
| 241 | void *flush; | ||
| 242 | void *get_location; | ||
| 243 | void *attributes; | ||
| 244 | void *get_bar_attributes; | ||
| 245 | void *set_bar_attributes; | ||
| 246 | uint64_t romsize; | ||
| 247 | void *romimage; | ||
| 248 | } efi_pci_io_protocol; | ||
| 249 | |||
| 250 | #define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 | ||
| 251 | #define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 | ||
| 252 | #define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 | ||
| 253 | #define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 | ||
| 254 | #define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 | ||
| 255 | #define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 | ||
| 256 | #define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 | ||
| 257 | #define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 | ||
| 258 | #define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 | ||
| 259 | #define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 | ||
| 260 | #define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 | ||
| 261 | #define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 | ||
| 262 | #define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 | ||
| 263 | #define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 | ||
| 264 | #define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 | ||
| 265 | #define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 | ||
| 266 | #define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 | ||
| 267 | #define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 | ||
| 268 | #define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000 | ||
| 269 | |||
| 199 | /* | 270 | /* |
| 200 | * Types and defines for EFI ResetSystem | 271 | * Types and defines for EFI ResetSystem |
| 201 | */ | 272 | */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index a98a5f9ac1d5..ea41a0a52a59 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -333,6 +333,8 @@ struct pci_dev { | |||
| 333 | }; | 333 | }; |
| 334 | struct pci_ats *ats; /* Address Translation Service */ | 334 | struct pci_ats *ats; /* Address Translation Service */ |
| 335 | #endif | 335 | #endif |
| 336 | void *rom; /* Physical pointer to ROM if it's not from the BAR */ | ||
| 337 | size_t romlen; /* Length of ROM if it's not from the BAR */ | ||
| 336 | }; | 338 | }; |
| 337 | 339 | ||
| 338 | static inline struct pci_dev *pci_physfn(struct pci_dev *dev) | 340 | static inline struct pci_dev *pci_physfn(struct pci_dev *dev) |
| @@ -1599,6 +1601,7 @@ void pcibios_disable_device(struct pci_dev *dev); | |||
| 1599 | void pcibios_set_master(struct pci_dev *dev); | 1601 | void pcibios_set_master(struct pci_dev *dev); |
| 1600 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, | 1602 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, |
| 1601 | enum pcie_reset_state state); | 1603 | enum pcie_reset_state state); |
| 1604 | int pcibios_add_device(struct pci_dev *dev); | ||
| 1602 | 1605 | ||
| 1603 | #ifdef CONFIG_PCI_MMCONFIG | 1606 | #ifdef CONFIG_PCI_MMCONFIG |
| 1604 | extern void __init pci_mmcfg_early_init(void); | 1607 | extern void __init pci_mmcfg_early_init(void); |
