/kernel/linux/linux-5.10/drivers/pci/controller/dwc/ |
D | pcie-tegra194.c | 319 static inline void appl_writel(struct tegra_pcie_dw *pcie, const u32 value, in appl_writel() argument 322 writel_relaxed(value, pcie->appl_base + reg); in appl_writel() 325 static inline u32 appl_readl(struct tegra_pcie_dw *pcie, const u32 reg) in appl_readl() argument 327 return readl_relaxed(pcie->appl_base + reg); in appl_readl() 337 struct tegra_pcie_dw *pcie = to_tegra_pcie(pci); in apply_bad_link_workaround() local 346 val = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + PCI_EXP_LNKSTA); in apply_bad_link_workaround() 350 if (pcie->init_link_width > current_link_width) { in apply_bad_link_workaround() 352 val = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + in apply_bad_link_workaround() 356 dw_pcie_writew_dbi(pci, pcie->pcie_cap_base + in apply_bad_link_workaround() 359 val = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + in apply_bad_link_workaround() [all …]
|
D | pci-layerscape.c | 56 static bool ls_pcie_is_bridge(struct ls_pcie *pcie) in ls_pcie_is_bridge() argument 58 struct dw_pcie *pci = pcie->pci; in ls_pcie_is_bridge() 68 static void ls_pcie_clear_multifunction(struct ls_pcie *pcie) in ls_pcie_clear_multifunction() argument 70 struct dw_pcie *pci = pcie->pci; in ls_pcie_clear_multifunction() 76 static void ls_pcie_drop_msg_tlp(struct ls_pcie *pcie) in ls_pcie_drop_msg_tlp() argument 79 struct dw_pcie *pci = pcie->pci; in ls_pcie_drop_msg_tlp() 86 static void ls_pcie_disable_outbound_atus(struct ls_pcie *pcie) in ls_pcie_disable_outbound_atus() argument 91 dw_pcie_disable_atu(pcie->pci, i, DW_PCIE_REGION_OUTBOUND); in ls_pcie_disable_outbound_atus() 97 struct ls_pcie *pcie = to_ls_pcie(pci); in ls1021_pcie_link_up() local 99 if (!pcie->scfg) in ls1021_pcie_link_up() [all …]
|
D | pcie-armada8k.c | 74 static void armada8k_pcie_disable_phys(struct armada8k_pcie *pcie) in armada8k_pcie_disable_phys() argument 79 phy_power_off(pcie->phy[i]); in armada8k_pcie_disable_phys() 80 phy_exit(pcie->phy[i]); in armada8k_pcie_disable_phys() 84 static int armada8k_pcie_enable_phys(struct armada8k_pcie *pcie) in armada8k_pcie_enable_phys() argument 90 ret = phy_init(pcie->phy[i]); in armada8k_pcie_enable_phys() 94 ret = phy_set_mode_ext(pcie->phy[i], PHY_MODE_PCIE, in armada8k_pcie_enable_phys() 95 pcie->phy_count); in armada8k_pcie_enable_phys() 97 phy_exit(pcie->phy[i]); in armada8k_pcie_enable_phys() 101 ret = phy_power_on(pcie->phy[i]); in armada8k_pcie_enable_phys() 103 phy_exit(pcie->phy[i]); in armada8k_pcie_enable_phys() [all …]
|
D | pcie-qcom.c | 176 int (*get_resources)(struct qcom_pcie *pcie); 177 int (*init)(struct qcom_pcie *pcie); 178 int (*post_init)(struct qcom_pcie *pcie); 179 void (*deinit)(struct qcom_pcie *pcie); 180 void (*post_deinit)(struct qcom_pcie *pcie); 181 void (*ltssm_enable)(struct qcom_pcie *pcie); 196 static void qcom_ep_reset_assert(struct qcom_pcie *pcie) in qcom_ep_reset_assert() argument 198 gpiod_set_value_cansleep(pcie->reset, 1); in qcom_ep_reset_assert() 202 static void qcom_ep_reset_deassert(struct qcom_pcie *pcie) in qcom_ep_reset_deassert() argument 206 gpiod_set_value_cansleep(pcie->reset, 0); in qcom_ep_reset_deassert() [all …]
|
/kernel/linux/linux-5.10/drivers/pci/controller/ |
D | pci-aardvark.c | 298 static inline void advk_writel(struct advk_pcie *pcie, u32 val, u64 reg) in advk_writel() argument 300 writel(val, pcie->base + reg); in advk_writel() 303 static inline u32 advk_readl(struct advk_pcie *pcie, u64 reg) in advk_readl() argument 305 return readl(pcie->base + reg); in advk_readl() 308 static u8 advk_pcie_ltssm_state(struct advk_pcie *pcie) in advk_pcie_ltssm_state() argument 313 val = advk_readl(pcie, CFG_REG); in advk_pcie_ltssm_state() 318 static inline bool advk_pcie_link_up(struct advk_pcie *pcie) in advk_pcie_link_up() argument 321 u8 ltssm_state = advk_pcie_ltssm_state(pcie); in advk_pcie_link_up() 325 static inline bool advk_pcie_link_active(struct advk_pcie *pcie) in advk_pcie_link_active() argument 335 u8 ltssm_state = advk_pcie_ltssm_state(pcie); in advk_pcie_link_active() [all …]
|
D | pcie-altera.c | 45 #define S10_RP_CFG_ADDR(pcie, reg) \ argument 46 (((pcie)->hip_base) + (reg) + (1 << 20)) 47 #define S10_RP_SECONDARY(pcie) \ argument 48 readb(S10_RP_CFG_ADDR(pcie, PCI_SECONDARY_BUS)) 60 #define TLP_CFG_DW0(pcie, cfg) \ argument 63 #define TLP_CFG_DW1(pcie, tag, be) \ argument 64 (((TLP_REQ_ID(pcie->root_bus_nr, RP_DEVFN)) << 16) | (tag << 8) | (be)) 99 int (*tlp_read_pkt)(struct altera_pcie *pcie, u32 *value); 100 void (*tlp_write_pkt)(struct altera_pcie *pcie, u32 *headers, 102 bool (*get_link_status)(struct altera_pcie *pcie); [all …]
|
D | pci-tegra.c | 376 struct tegra_pcie *pcie; member 394 static inline void afi_writel(struct tegra_pcie *pcie, u32 value, in afi_writel() argument 397 writel(value, pcie->afi + offset); in afi_writel() 400 static inline u32 afi_readl(struct tegra_pcie *pcie, unsigned long offset) in afi_readl() argument 402 return readl(pcie->afi + offset); in afi_readl() 405 static inline void pads_writel(struct tegra_pcie *pcie, u32 value, in pads_writel() argument 408 writel(value, pcie->pads + offset); in pads_writel() 411 static inline u32 pads_readl(struct tegra_pcie *pcie, unsigned long offset) in pads_readl() argument 413 return readl(pcie->pads + offset); in pads_readl() 448 struct tegra_pcie *pcie = bus->sysdata; in tegra_pcie_map_bus() local [all …]
|
D | pcie-xilinx-nwl.c | 176 static inline u32 nwl_bridge_readl(struct nwl_pcie *pcie, u32 off) in nwl_bridge_readl() argument 178 return readl(pcie->breg_base + off); in nwl_bridge_readl() 181 static inline void nwl_bridge_writel(struct nwl_pcie *pcie, u32 val, u32 off) in nwl_bridge_writel() argument 183 writel(val, pcie->breg_base + off); in nwl_bridge_writel() 186 static bool nwl_pcie_link_up(struct nwl_pcie *pcie) in nwl_pcie_link_up() argument 188 if (readl(pcie->pcireg_base + PS_LINKUP_OFFSET) & PCIE_PHY_LINKUP_BIT) in nwl_pcie_link_up() 193 static bool nwl_phy_link_up(struct nwl_pcie *pcie) in nwl_phy_link_up() argument 195 if (readl(pcie->pcireg_base + PS_LINKUP_OFFSET) & PHY_RDY_LINKUP_BIT) in nwl_phy_link_up() 200 static int nwl_wait_for_link(struct nwl_pcie *pcie) in nwl_wait_for_link() argument 202 struct device *dev = pcie->dev; in nwl_wait_for_link() [all …]
|
D | pcie-iproc.c | 410 struct iproc_pcie *pcie = bus->sysdata; in iproc_data() local 411 return pcie; in iproc_data() 419 static inline u16 iproc_pcie_reg_offset(struct iproc_pcie *pcie, in iproc_pcie_reg_offset() argument 422 return pcie->reg_offsets[reg]; in iproc_pcie_reg_offset() 425 static inline u32 iproc_pcie_read_reg(struct iproc_pcie *pcie, in iproc_pcie_read_reg() argument 428 u16 offset = iproc_pcie_reg_offset(pcie, reg); in iproc_pcie_read_reg() 433 return readl(pcie->base + offset); in iproc_pcie_read_reg() 436 static inline void iproc_pcie_write_reg(struct iproc_pcie *pcie, in iproc_pcie_write_reg() argument 439 u16 offset = iproc_pcie_reg_offset(pcie, reg); in iproc_pcie_write_reg() 444 writel(val, pcie->base + offset); in iproc_pcie_write_reg() [all …]
|
D | pcie-rcar-host.c | 52 struct rcar_pcie pcie; member 61 static u32 rcar_read_conf(struct rcar_pcie *pcie, int where) in rcar_read_conf() argument 64 u32 val = rcar_pci_read_reg(pcie, where & ~3); in rcar_read_conf() 74 struct rcar_pcie *pcie = &host->pcie; in rcar_pcie_config_access() local 102 *data = rcar_pci_read_reg(pcie, PCICONF(index)); in rcar_pcie_config_access() 104 rcar_pci_write_reg(pcie, *data, PCICONF(index)); in rcar_pcie_config_access() 110 rcar_pci_write_reg(pcie, rcar_pci_read_reg(pcie, PCIEERRFR), PCIEERRFR); in rcar_pcie_config_access() 113 rcar_pci_write_reg(pcie, PCIE_CONF_BUS(bus->number) | in rcar_pcie_config_access() 118 rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE0, PCIECCTLR); in rcar_pcie_config_access() 120 rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE1, PCIECCTLR); in rcar_pcie_config_access() [all …]
|
D | pcie-brcmstb.c | 175 #define IDX_ADDR(pcie) (pcie->reg_offsets[EXT_CFG_INDEX]) argument 176 #define DATA_ADDR(pcie) (pcie->reg_offsets[EXT_CFG_DATA]) argument 177 #define PCIE_RGR1_SW_INIT_1(pcie) (pcie->reg_offsets[RGR1_SW_INIT_1]) argument 191 static inline void brcm_pcie_bridge_sw_init_set_7278(struct brcm_pcie *pcie, u32 val); 192 static inline void brcm_pcie_bridge_sw_init_set_generic(struct brcm_pcie *pcie, u32 val); 193 static inline void brcm_pcie_perst_set_7278(struct brcm_pcie *pcie, u32 val); 194 static inline void brcm_pcie_perst_set_generic(struct brcm_pcie *pcie, u32 val); 216 void (*perst_set)(struct brcm_pcie *pcie, u32 val); 217 void (*bridge_sw_init_set)(struct brcm_pcie *pcie, u32 val); 288 void (*perst_set)(struct brcm_pcie *pcie, u32 val); [all …]
|
D | pcie-rcar-ep.c | 26 struct rcar_pcie pcie; member 36 static void rcar_pcie_ep_hw_init(struct rcar_pcie *pcie) in rcar_pcie_ep_hw_init() argument 40 rcar_pci_write_reg(pcie, 0, PCIETCTLR); in rcar_pcie_ep_hw_init() 43 rcar_pci_write_reg(pcie, 0, PCIEMSR); in rcar_pcie_ep_hw_init() 46 rcar_rmw32(pcie, REXPCAP(0), 0xff, PCI_CAP_ID_EXP); in rcar_pcie_ep_hw_init() 47 rcar_rmw32(pcie, REXPCAP(PCI_EXP_FLAGS), in rcar_pcie_ep_hw_init() 49 rcar_rmw32(pcie, RCONF(PCI_HEADER_TYPE), 0x7f, in rcar_pcie_ep_hw_init() 53 rcar_rmw32(pcie, REXPCAP(PCI_EXP_SLTCAP), PCI_EXP_SLTCAP_PSN, 0); in rcar_pcie_ep_hw_init() 55 val = rcar_pci_read_reg(pcie, EXPCAP(1)); in rcar_pcie_ep_hw_init() 58 rcar_pci_write_reg(pcie, val, EXPCAP(1)); in rcar_pcie_ep_hw_init() [all …]
|
D | pcie-tango.c | 28 struct tango_pcie *pcie = irq_desc_get_handler_data(desc); in tango_msi_isr() local 32 spin_lock(&pcie->used_msi_lock); in tango_msi_isr() 34 while ((pos = find_next_bit(pcie->used_msi, MSI_MAX, pos)) < MSI_MAX) { in tango_msi_isr() 36 status = readl_relaxed(pcie->base + SMP8759_STATUS + base / 8); in tango_msi_isr() 38 virq = irq_find_mapping(pcie->dom, base + idx); in tango_msi_isr() 44 spin_unlock(&pcie->used_msi_lock); in tango_msi_isr() 50 struct tango_pcie *pcie = d->chip_data; in tango_ack() local 54 writel_relaxed(bit, pcie->base + SMP8759_STATUS + offset); in tango_ack() 60 struct tango_pcie *pcie = d->chip_data; in update_msi_enable() local 65 spin_lock_irqsave(&pcie->used_msi_lock, flags); in update_msi_enable() [all …]
|
D | pcie-rcar.c | 14 void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val, unsigned int reg) in rcar_pci_write_reg() argument 16 writel(val, pcie->base + reg); in rcar_pci_write_reg() 19 u32 rcar_pci_read_reg(struct rcar_pcie *pcie, unsigned int reg) in rcar_pci_read_reg() argument 21 return readl(pcie->base + reg); in rcar_pci_read_reg() 24 void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data) in rcar_rmw32() argument 27 u32 val = rcar_pci_read_reg(pcie, where & ~3); in rcar_rmw32() 31 rcar_pci_write_reg(pcie, val, where & ~3); in rcar_rmw32() 34 int rcar_pcie_wait_for_phyrdy(struct rcar_pcie *pcie) in rcar_pcie_wait_for_phyrdy() argument 39 if (rcar_pci_read_reg(pcie, PCIEPHYSR) & PHYRDY) in rcar_pcie_wait_for_phyrdy() 48 int rcar_pcie_wait_for_dl(struct rcar_pcie *pcie) in rcar_pcie_wait_for_dl() argument [all …]
|
D | pcie-iproc-platform.c | 43 struct iproc_pcie *pcie; in iproc_pcie_pltfm_probe() local 49 bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie)); in iproc_pcie_pltfm_probe() 53 pcie = pci_host_bridge_priv(bridge); in iproc_pcie_pltfm_probe() 55 pcie->dev = dev; in iproc_pcie_pltfm_probe() 56 pcie->type = (enum iproc_pcie_type) of_device_get_match_data(dev); in iproc_pcie_pltfm_probe() 64 pcie->base = devm_pci_remap_cfgspace(dev, reg.start, in iproc_pcie_pltfm_probe() 66 if (!pcie->base) { in iproc_pcie_pltfm_probe() 70 pcie->base_addr = reg.start; in iproc_pcie_pltfm_probe() 82 pcie->ob.axi_offset = val; in iproc_pcie_pltfm_probe() 83 pcie->need_ob_cfg = true; in iproc_pcie_pltfm_probe() [all …]
|
D | pcie-iproc-bcma.c | 28 struct iproc_pcie *pcie = dev->sysdata; in iproc_pcie_bcma_map_irq() local 29 struct bcma_device *bdev = container_of(pcie->dev, struct bcma_device, dev); in iproc_pcie_bcma_map_irq() 37 struct iproc_pcie *pcie; in iproc_pcie_bcma_probe() local 41 bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie)); in iproc_pcie_bcma_probe() 45 pcie = pci_host_bridge_priv(bridge); in iproc_pcie_bcma_probe() 47 pcie->dev = dev; in iproc_pcie_bcma_probe() 49 pcie->type = IPROC_PCIE_PAXB_BCMA; in iproc_pcie_bcma_probe() 50 pcie->base = bdev->io_addr; in iproc_pcie_bcma_probe() 51 if (!pcie->base) { in iproc_pcie_bcma_probe() 56 pcie->base_addr = bdev->addr; in iproc_pcie_bcma_probe() [all …]
|
/kernel/linux/linux-5.10/drivers/pci/controller/mobiveil/ |
D | pcie-mobiveil-host.c | 53 struct mobiveil_pcie *pcie = bus->sysdata; in mobiveil_pcie_map_bus() local 54 struct mobiveil_root_port *rp = &pcie->rp; in mobiveil_pcie_map_bus() 62 return pcie->csr_axi_slave_base + where; in mobiveil_pcie_map_bus() 74 mobiveil_csr_writel(pcie, value, PAB_AXI_AMAP_PEX_WIN_L(WIN_NUM_0)); in mobiveil_pcie_map_bus() 88 struct mobiveil_pcie *pcie = irq_desc_get_handler_data(desc); in mobiveil_pcie_isr() local 89 struct device *dev = &pcie->pdev->dev; in mobiveil_pcie_isr() 90 struct mobiveil_root_port *rp = &pcie->rp; in mobiveil_pcie_isr() 105 val = mobiveil_csr_readl(pcie, PAB_INTP_AMBA_MISC_STAT); in mobiveil_pcie_isr() 106 mask = mobiveil_csr_readl(pcie, PAB_INTP_AMBA_MISC_ENB); in mobiveil_pcie_isr() 111 shifted_status = mobiveil_csr_readl(pcie, in mobiveil_pcie_isr() [all …]
|
D | pcie-mobiveil.c | 28 static void mobiveil_pcie_sel_page(struct mobiveil_pcie *pcie, u8 pg_idx) in mobiveil_pcie_sel_page() argument 32 val = readl(pcie->csr_axi_slave_base + PAB_CTRL); in mobiveil_pcie_sel_page() 36 writel(val, pcie->csr_axi_slave_base + PAB_CTRL); in mobiveil_pcie_sel_page() 39 static void __iomem *mobiveil_pcie_comp_addr(struct mobiveil_pcie *pcie, in mobiveil_pcie_comp_addr() argument 44 mobiveil_pcie_sel_page(pcie, 0); in mobiveil_pcie_comp_addr() 45 return pcie->csr_axi_slave_base + off; in mobiveil_pcie_comp_addr() 48 mobiveil_pcie_sel_page(pcie, OFFSET_TO_PAGE_IDX(off)); in mobiveil_pcie_comp_addr() 49 return pcie->csr_axi_slave_base + OFFSET_TO_PAGE_ADDR(off); in mobiveil_pcie_comp_addr() 99 u32 mobiveil_csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size) in mobiveil_csr_read() argument 105 addr = mobiveil_pcie_comp_addr(pcie, off); in mobiveil_csr_read() [all …]
|
D | pcie-layerscape-gen4.c | 45 static inline u32 ls_pcie_g4_lut_readl(struct ls_pcie_g4 *pcie, u32 off) in ls_pcie_g4_lut_readl() argument 47 return ioread32(pcie->pci.csr_axi_slave_base + PCIE_LUT_OFF + off); in ls_pcie_g4_lut_readl() 50 static inline void ls_pcie_g4_lut_writel(struct ls_pcie_g4 *pcie, in ls_pcie_g4_lut_writel() argument 53 iowrite32(val, pcie->pci.csr_axi_slave_base + PCIE_LUT_OFF + off); in ls_pcie_g4_lut_writel() 56 static inline u32 ls_pcie_g4_pf_readl(struct ls_pcie_g4 *pcie, u32 off) in ls_pcie_g4_pf_readl() argument 58 return ioread32(pcie->pci.csr_axi_slave_base + PCIE_PF_OFF + off); in ls_pcie_g4_pf_readl() 61 static inline void ls_pcie_g4_pf_writel(struct ls_pcie_g4 *pcie, in ls_pcie_g4_pf_writel() argument 64 iowrite32(val, pcie->pci.csr_axi_slave_base + PCIE_PF_OFF + off); in ls_pcie_g4_pf_writel() 69 struct ls_pcie_g4 *pcie = to_ls_pcie_g4(pci); in ls_pcie_g4_link_up() local 72 state = ls_pcie_g4_pf_readl(pcie, PCIE_PF_DBG); in ls_pcie_g4_link_up() [all …]
|
/kernel/linux/linux-5.10/drivers/pci/controller/cadence/ |
D | pcie-cadence.c | 10 void cdns_pcie_detect_quiet_min_delay_set(struct cdns_pcie *pcie) in cdns_pcie_detect_quiet_min_delay_set() argument 18 ltssm_control_cap = cdns_pcie_readl(pcie, CDNS_PCIE_LTSSM_CONTROL_CAP); in cdns_pcie_detect_quiet_min_delay_set() 23 cdns_pcie_writel(pcie, CDNS_PCIE_LTSSM_CONTROL_CAP, ltssm_control_cap); in cdns_pcie_detect_quiet_min_delay_set() 26 void cdns_pcie_set_outbound_region(struct cdns_pcie *pcie, u8 busnr, u8 fn, in cdns_pcie_set_outbound_region() argument 46 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(r), addr0); in cdns_pcie_set_outbound_region() 47 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR1(r), addr1); in cdns_pcie_set_outbound_region() 75 if (pcie->is_rc) { in cdns_pcie_set_outbound_region() 88 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(r), desc0); in cdns_pcie_set_outbound_region() 89 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC1(r), desc1); in cdns_pcie_set_outbound_region() 92 if (pcie->ops->cpu_addr_fixup) in cdns_pcie_set_outbound_region() [all …]
|
D | pci-j721e.c | 74 static inline u32 j721e_pcie_user_readl(struct j721e_pcie *pcie, u32 offset) in j721e_pcie_user_readl() argument 76 return readl(pcie->user_cfg_base + offset); in j721e_pcie_user_readl() 79 static inline void j721e_pcie_user_writel(struct j721e_pcie *pcie, u32 offset, in j721e_pcie_user_writel() argument 82 writel(value, pcie->user_cfg_base + offset); in j721e_pcie_user_writel() 85 static inline u32 j721e_pcie_intd_readl(struct j721e_pcie *pcie, u32 offset) in j721e_pcie_intd_readl() argument 87 return readl(pcie->intd_cfg_base + offset); in j721e_pcie_intd_readl() 90 static inline void j721e_pcie_intd_writel(struct j721e_pcie *pcie, u32 offset, in j721e_pcie_intd_writel() argument 93 writel(value, pcie->intd_cfg_base + offset); in j721e_pcie_intd_writel() 98 struct j721e_pcie *pcie = priv; in j721e_pcie_link_irq_handler() local 99 struct device *dev = pcie->dev; in j721e_pcie_link_irq_handler() [all …]
|
D | pcie-cadence-ep.c | 23 struct cdns_pcie *pcie = &ep->pcie; in cdns_pcie_ep_write_header() local 25 cdns_pcie_ep_fn_writew(pcie, fn, PCI_DEVICE_ID, hdr->deviceid); in cdns_pcie_ep_write_header() 26 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_REVISION_ID, hdr->revid); in cdns_pcie_ep_write_header() 27 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_CLASS_PROG, hdr->progif_code); in cdns_pcie_ep_write_header() 28 cdns_pcie_ep_fn_writew(pcie, fn, PCI_CLASS_DEVICE, in cdns_pcie_ep_write_header() 30 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_CACHE_LINE_SIZE, in cdns_pcie_ep_write_header() 32 cdns_pcie_ep_fn_writew(pcie, fn, PCI_SUBSYSTEM_ID, hdr->subsys_id); in cdns_pcie_ep_write_header() 33 cdns_pcie_ep_fn_writeb(pcie, fn, PCI_INTERRUPT_PIN, hdr->interrupt_pin); in cdns_pcie_ep_write_header() 44 cdns_pcie_writel(pcie, CDNS_PCIE_LM_ID, id); in cdns_pcie_ep_write_header() 55 struct cdns_pcie *pcie = &ep->pcie; in cdns_pcie_ep_set_bar() local [all …]
|
D | pcie-cadence-host.c | 31 struct cdns_pcie *pcie = &rc->pcie; in cdns_pci_map_bus() local 44 return pcie->reg_base + (where & 0xfff); in cdns_pci_map_bus() 47 if (!(cdns_pcie_readl(pcie, CDNS_PCIE_LM_BASE) & 0x1)) in cdns_pci_map_bus() 50 cdns_pcie_writel(pcie, CDNS_PCIE_AT_LINKDOWN, 0x0); in cdns_pci_map_bus() 56 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(0), addr0); in cdns_pci_map_bus() 69 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(0), desc0); in cdns_pci_map_bus() 80 static int cdns_pcie_host_wait_for_link(struct cdns_pcie *pcie) in cdns_pcie_host_wait_for_link() argument 82 struct device *dev = pcie->dev; in cdns_pcie_host_wait_for_link() 87 if (cdns_pcie_link_up(pcie)) { in cdns_pcie_host_wait_for_link() 97 static int cdns_pcie_retrain(struct cdns_pcie *pcie) in cdns_pcie_retrain() argument [all …]
|
D | pcie-cadence.h | 263 int (*start_link)(struct cdns_pcie *pcie); 264 void (*stop_link)(struct cdns_pcie *pcie); 265 bool (*link_up)(struct cdns_pcie *pcie); 266 u64 (*cpu_addr_fixup)(struct cdns_pcie *pcie, u64 cpu_addr); 305 struct cdns_pcie pcie; member 346 struct cdns_pcie pcie; member 363 static inline void cdns_pcie_writel(struct cdns_pcie *pcie, u32 reg, u32 value) in cdns_pcie_writel() argument 365 writel(value, pcie->reg_base + reg); in cdns_pcie_writel() 368 static inline u32 cdns_pcie_readl(struct cdns_pcie *pcie, u32 reg) in cdns_pcie_readl() argument 370 return readl(pcie->reg_base + reg); in cdns_pcie_readl() [all …]
|
/kernel/linux/linux-5.10/drivers/staging/mt7621-pci/ |
D | pci-mt7621.c | 106 struct mt7621_pcie *pcie; member 145 static inline u32 pcie_read(struct mt7621_pcie *pcie, u32 reg) in pcie_read() argument 147 return readl(pcie->base + reg); in pcie_read() 150 static inline void pcie_write(struct mt7621_pcie *pcie, u32 val, u32 reg) in pcie_write() argument 152 writel(val, pcie->base + reg); in pcie_write() 155 static inline void pcie_rmw(struct mt7621_pcie *pcie, u32 reg, u32 clr, u32 set) in pcie_rmw() argument 157 u32 val = readl(pcie->base + reg); in pcie_rmw() 161 writel(val, pcie->base + reg); in pcie_rmw() 185 struct mt7621_pcie *pcie = bus->sysdata; in mt7621_pcie_map_bus() local 189 writel(address, pcie->base + RALINK_PCI_CONFIG_ADDR); in mt7621_pcie_map_bus() [all …]
|