Lines Matching refs:pcic
110 txx9_alloc_pci_controller(struct pci_controller *pcic, in txx9_alloc_pci_controller() argument
114 struct pcic { in txx9_alloc_pci_controller() struct
121 if (!pcic) { in txx9_alloc_pci_controller()
130 pcic = &new->c; in txx9_alloc_pci_controller()
132 BUG_ON(pcic != &txx9_primary_pcic); in txx9_alloc_pci_controller()
133 pcic->io_resource->flags = IORESOURCE_IO; in txx9_alloc_pci_controller()
140 pcic->mem_resource[0].start = mem_base; in txx9_alloc_pci_controller()
141 pcic->mem_resource[0].end = mem_base + mem_size - 1; in txx9_alloc_pci_controller()
142 if (request_resource(&iomem_resource, &pcic->mem_resource[0])) in txx9_alloc_pci_controller()
160 &pcic->mem_resource[0], in txx9_alloc_pci_controller()
169 pcic->mem_resource[1].flags = IORESOURCE_MEM | IORESOURCE_BUSY; in txx9_alloc_pci_controller()
171 pcic->mem_resource[1].start = io_base; in txx9_alloc_pci_controller()
172 pcic->mem_resource[1].end = io_base + io_size - 1; in txx9_alloc_pci_controller()
173 if (request_resource(&iomem_resource, &pcic->mem_resource[1])) in txx9_alloc_pci_controller()
182 &pcic->mem_resource[1], in txx9_alloc_pci_controller()
189 io_base = pcic->mem_resource[1].start; in txx9_alloc_pci_controller()
192 pcic->mem_resource[0].flags = IORESOURCE_MEM; in txx9_alloc_pci_controller()
193 if (pcic == &txx9_primary_pcic && in txx9_alloc_pci_controller()
196 set_io_port_base(IO_BASE + pcic->mem_resource[1].start); in txx9_alloc_pci_controller()
197 pcic->io_resource->start = 0; in txx9_alloc_pci_controller()
198 pcic->io_offset = 0; /* busaddr == ioaddr */ in txx9_alloc_pci_controller()
199 pcic->io_map_base = IO_BASE + pcic->mem_resource[1].start; in txx9_alloc_pci_controller()
202 pcic->io_resource->start = in txx9_alloc_pci_controller()
204 pcic->io_offset = io_base - (mips_io_port_base - IO_BASE); in txx9_alloc_pci_controller()
205 pcic->io_map_base = mips_io_port_base; in txx9_alloc_pci_controller()
207 pcic->io_resource->end = pcic->io_resource->start + io_size - 1; in txx9_alloc_pci_controller()
209 pcic->mem_offset = 0; /* busaddr == physaddr */ in txx9_alloc_pci_controller()
211 pr_info("PCI: IO %pR MEM %pR\n", &pcic->mem_resource[1], in txx9_alloc_pci_controller()
212 &pcic->mem_resource[0]); in txx9_alloc_pci_controller()
215 release_resource(&pcic->mem_resource[0]); in txx9_alloc_pci_controller()
216 return pcic; in txx9_alloc_pci_controller()
218 release_resource(&pcic->mem_resource[0]); in txx9_alloc_pci_controller()