pci-common.c (e856359685143a2f65876e7db4e4aa0ef5dce7f0) | pci-common.c (1fd0f52583a85b21a394201b007bc1ee104b235d) |
---|---|
1/* 2 * Contains common pci routines for ALL ppc platform 3 * (based on pci_32.c and pci_64.c) 4 * 5 * Port for PPC64 David Engebretsen, IBM Corp. 6 * Contains common pci routines for ppc64 platform, pSeries and iSeries brands. 7 * 8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM --- 39 unchanged lines hidden (view full) --- 48static DEFINE_SPINLOCK(hose_spinlock); 49 50/* XXX kill that some day ... */ 51static int global_phb_number; /* Global phb counter */ 52 53/* ISA Memory physical address */ 54resource_size_t isa_mem_base; 55 | 1/* 2 * Contains common pci routines for ALL ppc platform 3 * (based on pci_32.c and pci_64.c) 4 * 5 * Port for PPC64 David Engebretsen, IBM Corp. 6 * Contains common pci routines for ppc64 platform, pSeries and iSeries brands. 7 * 8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM --- 39 unchanged lines hidden (view full) --- 48static DEFINE_SPINLOCK(hose_spinlock); 49 50/* XXX kill that some day ... */ 51static int global_phb_number; /* Global phb counter */ 52 53/* ISA Memory physical address */ 54resource_size_t isa_mem_base; 55 |
56/* Default PCI flags is 0 */ 57unsigned int ppc_pci_flags; | 56/* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */ 57unsigned int ppc_pci_flags = 0; |
58 | 58 |
59 |
|
59static struct dma_mapping_ops *pci_dma_ops; 60 61void set_pci_dma_ops(struct dma_mapping_ops *dma_ops) 62{ 63 pci_dma_ops = dma_ops; 64} 65 66struct dma_mapping_ops *get_pci_dma_ops(void) --- 781 unchanged lines hidden (view full) --- 848 hose->mem_resources[--memno].flags = 0; 849 } 850} 851 852/* Decide whether to display the domain number in /proc */ 853int pci_proc_domain(struct pci_bus *bus) 854{ 855 struct pci_controller *hose = pci_bus_to_host(bus); | 60static struct dma_mapping_ops *pci_dma_ops; 61 62void set_pci_dma_ops(struct dma_mapping_ops *dma_ops) 63{ 64 pci_dma_ops = dma_ops; 65} 66 67struct dma_mapping_ops *get_pci_dma_ops(void) --- 781 unchanged lines hidden (view full) --- 849 hose->mem_resources[--memno].flags = 0; 850 } 851} 852 853/* Decide whether to display the domain number in /proc */ 854int pci_proc_domain(struct pci_bus *bus) 855{ 856 struct pci_controller *hose = pci_bus_to_host(bus); |
856#ifdef CONFIG_PPC64 857 return hose->buid != 0; 858#else | 857 |
859 if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS)) 860 return 0; 861 if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0) 862 return hose->global_number != 0; 863 return 1; | 858 if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS)) 859 return 0; 860 if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0) 861 return hose->global_number != 0; 862 return 1; |
864#endif | |
865} 866 867void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, 868 struct resource *res) 869{ 870 resource_size_t offset = 0, mask = (resource_size_t)-1; 871 struct pci_controller *hose = pci_bus_to_host(dev->bus); 872 --- 558 unchanged lines hidden --- | 863} 864 865void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, 866 struct resource *res) 867{ 868 resource_size_t offset = 0, mask = (resource_size_t)-1; 869 struct pci_controller *hose = pci_bus_to_host(dev->bus); 870 --- 558 unchanged lines hidden --- |