PCI, of: Move PCI I/O space management to PCI core code
No functional changes in this patch. PCI I/O space mapping code does not depend on OF; therefore it can be moved to PCI core code. This way we will be able to use it, e.g., in ACPI PCI code. Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Arnd Bergmann <arnd@arndb.de> CC: Liviu Dudau <Liviu.Dudau@arm.com>
This commit is contained in:

committed by
Bjorn Helgaas

parent
1958e7173d
commit
c5076cfe76
@@ -47,10 +47,6 @@ void __iomem *of_io_request_and_map(struct device_node *device,
|
||||
extern const __be32 *of_get_address(struct device_node *dev, int index,
|
||||
u64 *size, unsigned int *flags);
|
||||
|
||||
extern int pci_register_io_range(phys_addr_t addr, resource_size_t size);
|
||||
extern unsigned long pci_address_to_pio(phys_addr_t addr);
|
||||
extern phys_addr_t pci_pio_to_address(unsigned long pio);
|
||||
|
||||
extern int of_pci_range_parser_init(struct of_pci_range_parser *parser,
|
||||
struct device_node *node);
|
||||
extern struct of_pci_range *of_pci_range_parser_one(
|
||||
@@ -86,11 +82,6 @@ static inline const __be32 *of_get_address(struct device_node *dev, int index,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline phys_addr_t pci_pio_to_address(unsigned long pio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int of_pci_range_parser_init(struct of_pci_range_parser *parser,
|
||||
struct device_node *node)
|
||||
{
|
||||
|
@@ -1164,6 +1164,9 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
|
||||
void *alignf_data);
|
||||
|
||||
|
||||
int pci_register_io_range(phys_addr_t addr, resource_size_t size);
|
||||
unsigned long pci_address_to_pio(phys_addr_t addr);
|
||||
phys_addr_t pci_pio_to_address(unsigned long pio);
|
||||
int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr);
|
||||
|
||||
static inline pci_bus_addr_t pci_bus_address(struct pci_dev *pdev, int bar)
|
||||
@@ -1480,6 +1483,8 @@ static inline int pci_request_regions(struct pci_dev *dev, const char *res_name)
|
||||
{ return -EIO; }
|
||||
static inline void pci_release_regions(struct pci_dev *dev) { }
|
||||
|
||||
static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
|
||||
|
||||
static inline void pci_block_cfg_access(struct pci_dev *dev) { }
|
||||
static inline int pci_block_cfg_access_in_atomic(struct pci_dev *dev)
|
||||
{ return 0; }
|
||||
|
Reference in New Issue
Block a user