summaryrefslogtreecommitdiffstats
path: root/include/pci.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-01-11 13:24:15 -0600
committerKumar Gala <galak@kernel.crashing.org>2006-01-11 13:24:15 -0600
commita179012e37ae75de1fa7d6597e69d985ef79b7d0 (patch)
treee40ee9dd30243e00f238ca4847defe1364ed763b /include/pci.h
parentc7428d49ace4f2f16174ca028fe7072c02a473c8 (diff)
downloadbootable_bootloader_goldelico_gta04-a179012e37ae75de1fa7d6597e69d985ef79b7d0.zip
bootable_bootloader_goldelico_gta04-a179012e37ae75de1fa7d6597e69d985ef79b7d0.tar.gz
bootable_bootloader_goldelico_gta04-a179012e37ae75de1fa7d6597e69d985ef79b7d0.tar.bz2
Added support for PCI prefetchable region and BARs
If a host controller sets up a region as prefetchable and a device's BAR denotes it as prefetchable, allocate the BAR into the prefetch region. If a BAR is prefetchable and no prefetchable region has been setup by the controller we fall back to allocating the BAR into the normally memory region. Patch by Kumar Gala 11 Jan 2006
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/pci.h b/include/pci.h
index 8f19997..f78a769 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -309,6 +309,7 @@ struct pci_region {
#define PCI_REGION_MEM 0x00000000 /* PCI memory space */
#define PCI_REGION_IO 0x00000001 /* PCI IO space */
#define PCI_REGION_TYPE 0x00000001
+#define PCI_REGION_PREFETCH 0x00000008 /* prefetchable PCI memory */
#define PCI_REGION_MEMORY 0x00000100 /* System memory */
#define PCI_REGION_RO 0x00000200 /* Read-only memory */
@@ -386,7 +387,7 @@ struct pci_controller {
int (*write_dword)(struct pci_controller*, pci_dev_t, int where, u32);
/* Used by auto config */
- struct pci_region *pci_mem, *pci_io;
+ struct pci_region *pci_mem, *pci_io, *pci_prefetch;
/* Used by ppc405 autoconfig*/
struct pci_region *pci_fb;
@@ -472,6 +473,7 @@ extern int pciauto_region_allocate(struct pci_region* res, unsigned int size, un
extern void pciauto_setup_device(struct pci_controller *hose,
pci_dev_t dev, int bars_num,
struct pci_region *mem,
+ struct pci_region *prefetch,
struct pci_region *io);
int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev);