search for: pci_bar_rom

Displaying 13 results from an estimated 13 matches for "pci_bar_rom".

Did you mean: pci_bar_io
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
..._of(s, struct pci_slot_attribute, attr) +enum pci_bar_type { + pci_bar_unknown, /* Standard PCI BAR probe */ + pci_bar_io, /* An io port BAR */ + pci_bar_mem32, /* A 32-bit memory BAR */ + pci_bar_mem64, /* A 64-bit memory BAR */ + pci_bar_rom, /* A ROM BAR */ +}; + +extern int pci_read_base(struct pci_dev *dev, enum pci_bar_type type, + struct resource *res, unsigned int reg); +extern struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, + struct pci_dev *bridg...
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
..._of(s, struct pci_slot_attribute, attr) +enum pci_bar_type { + pci_bar_unknown, /* Standard PCI BAR probe */ + pci_bar_io, /* An io port BAR */ + pci_bar_mem32, /* A 32-bit memory BAR */ + pci_bar_mem64, /* A 64-bit memory BAR */ + pci_bar_rom, /* A ROM BAR */ +}; + +extern int pci_read_base(struct pci_dev *dev, enum pci_bar_type type, + struct resource *res, unsigned int reg); +extern struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, + struct pci_dev *bridg...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...osition in config space, or 0 if the BAR is invalid. + */ +int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) +{ + if (resno < PCI_ROM_RESOURCE) { + *type = pci_bar_unknown; + return PCI_BASE_ADDRESS_0 + 4 * resno; + } else if (resno == PCI_ROM_RESOURCE) { + *type = pci_bar_rom; + return dev->rom_base_reg; + } + + dev_err(&dev->dev, "BAR: invalid resource #: %d\n", resno); + return 0; +} + static void __devinit pci_no_domains(void) { #ifdef CONFIG_PCI_DOMAINS diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d807cd7..5abd69c 100644 --- a/dri...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...osition in config space, or 0 if the BAR is invalid. + */ +int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) +{ + if (resno < PCI_ROM_RESOURCE) { + *type = pci_bar_unknown; + return PCI_BASE_ADDRESS_0 + 4 * resno; + } else if (resno == PCI_ROM_RESOURCE) { + *type = pci_bar_rom; + return dev->rom_base_reg; + } + + dev_err(&dev->dev, "BAR: invalid resource #: %d\n", resno); + return 0; +} + static void __devinit pci_no_domains(void) { #ifdef CONFIG_PCI_DOMAINS diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d807cd7..5abd69c 100644 --- a/dri...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...osition in config space, or 0 if the BAR is invalid. + */ +int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) +{ + if (resno < PCI_ROM_RESOURCE) { + *type = pci_bar_unknown; + return PCI_BASE_ADDRESS_0 + 4 * resno; + } else if (resno == PCI_ROM_RESOURCE) { + *type = pci_bar_rom; + return dev->rom_base_reg; + } + + dev_err(&dev->dev, "BAR: invalid resource #: %d\n", resno); + return 0; +} + static void __devinit pci_no_domains(void) { #ifdef CONFIG_PCI_DOMAINS diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d807cd7..5abd69c 100644 --- a/dri...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
.... + */ +int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) +{ + if (resno < PCI_ROM_RESOURCE) { + *type = pci_bar_unknown; + return PCI_BASE_ADDRESS_0 + 4 * resno; + } else if (resno == PCI_ROM_RESOURCE) { + *type = pci_bar_rom; + return dev->rom_base_reg; + } + + dev_err(&dev->dev, "BAR: invalid resource #%d\n", resno); + return 0; +} + static void __devinit pci_no_domains(void) { #ifdef CONFIG_PCI_DOMAINS diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 596e...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
.... + */ +int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) +{ + if (resno < PCI_ROM_RESOURCE) { + *type = pci_bar_unknown; + return PCI_BASE_ADDRESS_0 + 4 * resno; + } else if (resno == PCI_ROM_RESOURCE) { + *type = pci_bar_rom; + return dev->rom_base_reg; + } + + dev_err(&dev->dev, "BAR: invalid resource #%d\n", resno); + return 0; +} + static void __devinit pci_no_domains(void) { #ifdef CONFIG_PCI_DOMAINS diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 596e...
2008 Sep 27
0
[PATCH 4/9] dom0 PCI: support SR-IOV capability
...ource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) { + int reg; + if (resno < PCI_ROM_RESOURCE) { *type = pci_bar_unknown; return PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { *type = pci_bar_rom; return dev->rom_base_reg; + } else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + reg = pci_iov_resource_bar(dev, resno, type); + if (reg) + return reg; } dev...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...ignment(struct pci_dev *dev, int resno) */ int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) { + int reg; + if (resno < PCI_ROM_RESOURCE) { *type = pci_bar_unknown; return PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { *type = pci_bar_rom; return dev->rom_base_reg; + } else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + reg = pci_iov_resource_bar(dev, resno, type); + if (reg) + return reg; } dev_err(&dev->dev, "BAR: invalid resource #: %d\n", resno); diff --git a/dr...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...ignment(struct pci_dev *dev, int resno) */ int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) { + int reg; + if (resno < PCI_ROM_RESOURCE) { *type = pci_bar_unknown; return PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { *type = pci_bar_rom; return dev->rom_base_reg; + } else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + reg = pci_iov_resource_bar(dev, resno, type); + if (reg) + return reg; } dev_err(&dev->dev, "BAR: invalid resource #: %d\n", resno); diff --git a/dr...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...ignment(struct pci_dev *dev, int resno) */ int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) { + int reg; + if (resno < PCI_ROM_RESOURCE) { *type = pci_bar_unknown; return PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { *type = pci_bar_rom; return dev->rom_base_reg; + } else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + reg = pci_iov_resource_bar(dev, resno, type); + if (reg) + return reg; } dev_err(&dev->dev, "BAR: invalid resource #: %d\n", resno); diff --git a/dr...
2008 Sep 27
3
[PATCH 4/6 v3] PCI: support SR-IOV capability
...ource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) { + int reg; + if (resno < PCI_ROM_RESOURCE) { *type = pci_bar_unknown; return PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { *type = pci_bar_rom; return dev->rom_base_reg; + } else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + reg = pci_iov_resource_bar(dev, resno, type); + if (reg) + return reg; } dev...
2008 Sep 27
3
[PATCH 4/6 v3] PCI: support SR-IOV capability
...ource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type) { + int reg; + if (resno < PCI_ROM_RESOURCE) { *type = pci_bar_unknown; return PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { *type = pci_bar_rom; return dev->rom_base_reg; + } else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + reg = pci_iov_resource_bar(dev, resno, type); + if (reg) + return reg; } dev...