• Home
  • Raw
  • Download

Lines Matching refs:pp

67 		struct pcie_port *pp = pcie_port + i;  in mv78xx0_pcie_preinit()  local
69 snprintf(pp->io_space_name, sizeof(pp->io_space_name), in mv78xx0_pcie_preinit()
70 "PCIe %d.%d I/O", pp->maj, pp->min); in mv78xx0_pcie_preinit()
71 pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0; in mv78xx0_pcie_preinit()
72 pp->res[0].name = pp->io_space_name; in mv78xx0_pcie_preinit()
73 pp->res[0].start = MV78XX0_PCIE_IO_PHYS_BASE(i); in mv78xx0_pcie_preinit()
74 pp->res[0].end = pp->res[0].start + MV78XX0_PCIE_IO_SIZE - 1; in mv78xx0_pcie_preinit()
75 pp->res[0].flags = IORESOURCE_IO; in mv78xx0_pcie_preinit()
77 snprintf(pp->mem_space_name, sizeof(pp->mem_space_name), in mv78xx0_pcie_preinit()
78 "PCIe %d.%d MEM", pp->maj, pp->min); in mv78xx0_pcie_preinit()
79 pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0; in mv78xx0_pcie_preinit()
80 pp->res[1].name = pp->mem_space_name; in mv78xx0_pcie_preinit()
81 pp->res[1].flags = IORESOURCE_MEM; in mv78xx0_pcie_preinit()
111 struct pcie_port *pp = pcie_port + i; in mv78xx0_pcie_preinit() local
113 pp->res[1].start = start; in mv78xx0_pcie_preinit()
114 pp->res[1].end = start + size_each - 1; in mv78xx0_pcie_preinit()
119 struct pcie_port *pp = pcie_port + i; in mv78xx0_pcie_preinit() local
121 if (request_resource(&pcie_io_space, &pp->res[0])) in mv78xx0_pcie_preinit()
124 if (request_resource(&pcie_mem_space, &pp->res[1])) in mv78xx0_pcie_preinit()
130 struct pcie_port *pp = pcie_port + i; in mv78xx0_pcie_preinit() local
132 mv78xx0_setup_pcie_io_win(win++, pp->res[0].start, in mv78xx0_pcie_preinit()
133 resource_size(&pp->res[0]), in mv78xx0_pcie_preinit()
134 pp->maj, pp->min); in mv78xx0_pcie_preinit()
136 mv78xx0_setup_pcie_mem_win(win++, pp->res[1].start, in mv78xx0_pcie_preinit()
137 resource_size(&pp->res[1]), in mv78xx0_pcie_preinit()
138 pp->maj, pp->min); in mv78xx0_pcie_preinit()
144 struct pcie_port *pp; in mv78xx0_pcie_setup() local
149 pp = &pcie_port[nr]; in mv78xx0_pcie_setup()
150 pp->root_bus_nr = sys->busnr; in mv78xx0_pcie_setup()
155 orion_pcie_set_local_bus_nr(pp->base, sys->busnr); in mv78xx0_pcie_setup()
156 orion_pcie_setup(pp->base); in mv78xx0_pcie_setup()
158 pci_add_resource_offset(&sys->resources, &pp->res[0], sys->io_offset); in mv78xx0_pcie_setup()
159 pci_add_resource_offset(&sys->resources, &pp->res[1], sys->mem_offset); in mv78xx0_pcie_setup()
177 static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) in pcie_valid_config() argument
183 if (bus == pp->root_bus_nr && dev > 1) in pcie_valid_config()
192 struct pcie_port *pp = bus_to_port(bus->number); in pcie_rd_conf() local
196 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) { in pcie_rd_conf()
201 spin_lock_irqsave(&pp->conf_lock, flags); in pcie_rd_conf()
202 ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val); in pcie_rd_conf()
203 spin_unlock_irqrestore(&pp->conf_lock, flags); in pcie_rd_conf()
211 struct pcie_port *pp = bus_to_port(bus->number); in pcie_wr_conf() local
215 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) in pcie_wr_conf()
218 spin_lock_irqsave(&pp->conf_lock, flags); in pcie_wr_conf()
219 ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val); in pcie_wr_conf()
220 spin_unlock_irqrestore(&pp->conf_lock, flags); in pcie_wr_conf()
266 struct pcie_port *pp = bus_to_port(dev->bus->number); in mv78xx0_pcie_map_irq() local
268 return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min; in mv78xx0_pcie_map_irq()
285 struct pcie_port *pp = &pcie_port[num_pcie_ports++]; in add_pcie_port() local
289 pp->maj = maj; in add_pcie_port()
290 pp->min = min; in add_pcie_port()
291 pp->root_bus_nr = -1; in add_pcie_port()
292 pp->base = (void __iomem *)base; in add_pcie_port()
293 spin_lock_init(&pp->conf_lock); in add_pcie_port()
294 memset(pp->res, 0, sizeof(pp->res)); in add_pcie_port()