Lines Matching refs:pcic
111 txx9_alloc_pci_controller(struct pci_controller *pcic, in txx9_alloc_pci_controller() argument
115 struct pcic { in txx9_alloc_pci_controller() struct
122 if (!pcic) { in txx9_alloc_pci_controller()
131 pcic = &new->c; in txx9_alloc_pci_controller()
133 BUG_ON(pcic != &txx9_primary_pcic); in txx9_alloc_pci_controller()
134 pcic->io_resource->flags = IORESOURCE_IO; in txx9_alloc_pci_controller()
141 pcic->mem_resource[0].start = mem_base; in txx9_alloc_pci_controller()
142 pcic->mem_resource[0].end = mem_base + mem_size - 1; in txx9_alloc_pci_controller()
143 if (request_resource(&iomem_resource, &pcic->mem_resource[0])) in txx9_alloc_pci_controller()
161 &pcic->mem_resource[0], in txx9_alloc_pci_controller()
170 pcic->mem_resource[1].flags = IORESOURCE_MEM | IORESOURCE_BUSY; in txx9_alloc_pci_controller()
172 pcic->mem_resource[1].start = io_base; in txx9_alloc_pci_controller()
173 pcic->mem_resource[1].end = io_base + io_size - 1; in txx9_alloc_pci_controller()
174 if (request_resource(&iomem_resource, &pcic->mem_resource[1])) in txx9_alloc_pci_controller()
183 &pcic->mem_resource[1], in txx9_alloc_pci_controller()
190 io_base = pcic->mem_resource[1].start; in txx9_alloc_pci_controller()
193 pcic->mem_resource[0].flags = IORESOURCE_MEM; in txx9_alloc_pci_controller()
194 if (pcic == &txx9_primary_pcic && in txx9_alloc_pci_controller()
197 set_io_port_base(IO_BASE + pcic->mem_resource[1].start); in txx9_alloc_pci_controller()
198 pcic->io_resource->start = 0; in txx9_alloc_pci_controller()
199 pcic->io_offset = 0; /* busaddr == ioaddr */ in txx9_alloc_pci_controller()
200 pcic->io_map_base = IO_BASE + pcic->mem_resource[1].start; in txx9_alloc_pci_controller()
203 pcic->io_resource->start = in txx9_alloc_pci_controller()
205 pcic->io_offset = io_base - (mips_io_port_base - IO_BASE); in txx9_alloc_pci_controller()
206 pcic->io_map_base = mips_io_port_base; in txx9_alloc_pci_controller()
208 pcic->io_resource->end = pcic->io_resource->start + io_size - 1; in txx9_alloc_pci_controller()
210 pcic->mem_offset = 0; /* busaddr == physaddr */ in txx9_alloc_pci_controller()
212 pr_info("PCI: IO %pR MEM %pR\n", &pcic->mem_resource[1], in txx9_alloc_pci_controller()
213 &pcic->mem_resource[0]); in txx9_alloc_pci_controller()
216 release_resource(&pcic->mem_resource[0]); in txx9_alloc_pci_controller()
217 return pcic; in txx9_alloc_pci_controller()
219 release_resource(&pcic->mem_resource[0]); in txx9_alloc_pci_controller()