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))
149 (((nbits) - 1) & CDNS_PCIE_AT_OB_REGION_PCI_ADDR0_NBITS_MASK)
189 (((nbits) - 1) & CDNS_PCIE_AT_OB_REGION_CPU_ADDR0_NBITS_MASK)
200 (((nbits) - 1) & CDNS_PCIE_AT_IB_RP_BAR_ADDR0_NBITS_MASK)
216 RP_BAR_UNDEFINED = -1,
286 * struct cdns_pcie - private data for Cadence PCIe controller drivers
291 * @phy_count: number of supported PHY devices
292 * @phy: list of pointers to specific PHY control blocks
294 * @ops: Platform-specific ops to control various inputs from Cadence PCIe
303 struct phy **phy; member
309 * struct cdns_pcie_rc - private data for this PCIe Root Complex driver
310 * @pcie: Cadence PCIe controller
335 * struct cdns_pcie_epf - Structure to hold info about endpoint function
345 * struct cdns_pcie_ep - private data for this PCIe endpoint controller driver
346 * @pcie: Cadence PCIe controller
388 writel(value, pcie->reg_base + reg); in cdns_pcie_writel()
393 return readl(pcie->reg_base + reg); in cdns_pcie_readl()
410 return (val >> (8 * offset)) & ((1 << (size * 8)) - 1); in cdns_pcie_read_sz()
430 mask = ~(((1 << (size * 8)) - 1) << (offset * 8)); in cdns_pcie_write_sz()
440 void __iomem *addr = pcie->reg_base + CDNS_PCIE_RP_BASE + reg; in cdns_pcie_rp_writeb()
448 void __iomem *addr = pcie->reg_base + CDNS_PCIE_RP_BASE + reg; in cdns_pcie_rp_writew()
455 void __iomem *addr = pcie->reg_base + CDNS_PCIE_RP_BASE + reg; in cdns_pcie_rp_readw()
464 void __iomem *addr = pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg; in cdns_pcie_ep_fn_writeb()
472 void __iomem *addr = pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg; in cdns_pcie_ep_fn_writew()
480 writel(value, pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg); in cdns_pcie_ep_fn_writel()
485 void __iomem *addr = pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg; in cdns_pcie_ep_fn_readw()
492 return readl(pcie->reg_base + CDNS_PCIE_EP_FUNC_BASE(fn) + reg); in cdns_pcie_ep_fn_readl()
497 if (pcie->ops->start_link) in cdns_pcie_start_link()
498 return pcie->ops->start_link(pcie); in cdns_pcie_start_link()
505 if (pcie->ops->stop_link) in cdns_pcie_stop_link()
506 pcie->ops->stop_link(pcie); in cdns_pcie_stop_link()
511 if (pcie->ops->link_up) in cdns_pcie_link_up()
512 return pcie->ops->link_up(pcie); in cdns_pcie_link_up()