Lines Matching +full:phy +full:- +full:cadence
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (c) 2017 Cadence
3 // Cadence PCIe controller driver.
4 // Author: Cyrille Pitchen <cyrille.pitchen@free-electrons.com>
11 #include <linux/pci-epf.h>
12 #include <linux/phy/phy.h>
117 (((aperture) - 2) << ((bar) * 8))
155 (((nbits) - 1) & CDNS_PCIE_AT_OB_REGION_PCI_ADDR0_NBITS_MASK)
195 (((nbits) - 1) & CDNS_PCIE_AT_OB_REGION_CPU_ADDR0_NBITS_MASK)
206 (((nbits) - 1) & CDNS_PCIE_AT_IB_RP_BAR_ADDR0_NBITS_MASK)
222 RP_BAR_UNDEFINED = -1,
292 * struct cdns_pcie - private data for Cadence PCIe controller drivers
297 * @phy_count: number of supported PHY devices
298 * @phy: list of pointers to specific PHY control blocks
300 * @ops: Platform-specific ops to control various inputs from Cadence PCIe
309 struct phy **phy; member
315 * struct cdns_pcie_rc - private data for this PCIe Root Complex driver
316 * @pcie: Cadence PCIe controller
340 * struct cdns_pcie_epf - Structure to hold info about endpoint function
350 * struct cdns_pcie_ep - private data for this PCIe endpoint controller driver
351 * @pcie: Cadence PCIe controller
393 writel(value, pcie->reg_base + reg); in cdns_pcie_writel()
398 return readl(pcie->reg_base + reg); in cdns_pcie_readl()
415 return (val >> (8 * offset)) & ((1 << (size * 8)) - 1); in cdns_pcie_read_sz()
435 mask = ~(((1 << (size * 8)) - 1) << (offset * 8)); in cdns_pcie_write_sz()
445 void __iomem *addr = pcie->reg_base + CDNS_PCIE_RP_BASE + reg; in cdns_pcie_rp_writeb()
453 void __iomem *addr = pcie->reg_base + CDNS_PCIE_RP_BASE + reg; in cdns_pcie_rp_writew()
460 void __iomem *addr = pcie->reg_base + CDNS_PCIE_RP_BASE + reg; in cdns_pcie_rp_readw()
469 void __iomem *addr = pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg; in cdns_pcie_ep_fn_writeb()
477 void __iomem *addr = pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg; in cdns_pcie_ep_fn_writew()
485 writel(value, pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg); in cdns_pcie_ep_fn_writel()
490 void __iomem *addr = pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg; in cdns_pcie_ep_fn_readw()
497 return readl(pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg); in cdns_pcie_ep_fn_readl()
502 if (pcie->ops->start_link) in cdns_pcie_start_link()
503 return pcie->ops->start_link(pcie); in cdns_pcie_start_link()
510 if (pcie->ops->stop_link) in cdns_pcie_stop_link()
511 pcie->ops->stop_link(pcie); in cdns_pcie_stop_link()
516 if (pcie->ops->link_up) in cdns_pcie_link_up()
517 return pcie->ops->link_up(pcie); in cdns_pcie_link_up()