Lines Matching refs:port

204 static int __init pcie_clk_init(struct sh7786_pcie_port *port)
206 struct pci_channel *chan = port->hose;
219 * Grab the port's function clock, which the PHY clock depends
223 snprintf(fclk_name, sizeof(fclk_name), "pcie%d_fck", port->index);
225 port->fclk = clk_get(NULL, fclk_name);
226 if (IS_ERR(port->fclk)) {
227 ret = PTR_ERR(port->fclk);
231 clk_enable(port->fclk);
236 clk = &port->phy_clk;
251 clk_disable(port->fclk);
252 clk_put(port->fclk);
259 static int __init phy_init(struct sh7786_pcie_port *port)
261 struct pci_channel *chan = port->hose;
264 clk_enable(&port->phy_clk);
280 clk_disable(&port->phy_clk);
292 static void __init pcie_reset(struct sh7786_pcie_port *port)
294 struct pci_channel *chan = port->hose;
302 static int __init pcie_init(struct sh7786_pcie_port *port)
304 struct pci_channel *chan = port->hose;
310 pcie_reset(port);
313 * Initial header for port config space is type 1, set the device
323 if (port->endpoint)
343 data |= (port->index + 1) << 19;
417 * port to register anyways in order to support hotplug on future
436 port->index, (data >> 20) & 0x3f);
439 port->index);
502 struct sh7786_pcie_port *port = data;
509 port->endpoint = test_mode_pin(MODE_PIN11);
514 ret = pcie_clk_init(port);
516 pr_err("clock initialization failed for port#%d\n",
517 port->index);
521 ret = phy_init(port);
523 pr_err("phy initialization failed for port#%d\n",
524 port->index);
528 ret = pcie_init(port);
530 pr_err("core initialization failed for port#%d\n",
531 port->index);
538 register_pci_controller(port->hose);
596 struct sh7786_pcie_port *port = sh7786_pcie_ports + i;
598 port->index = i;
599 port->hose = sh7786_pci_channels + i;
600 port->hose->io_map_base = port->hose->resources[0].start;
602 async_schedule(sh7786_pcie_hwops->port_init_hw, port);