Lines Matching full:core

42  * @core: pointer to the Stingray PCIe PHY core control
47 struct sr_pcie_phy_core *core; member
53 * struct sr_pcie_phy_core - Stingray PCIe PHY core control
76 * core and associated serdes has been enabled as RC and is available for use
81 /* PIPEMUX = 1, EP 1x8 + RC 1x8, core 7 */
120 static u32 pipemux_strap_read(struct sr_pcie_phy_core *core) in pipemux_strap_read() argument
130 pipemux = readl(core->base + PCIE_PIPEMUX_CFG_OFFSET); in pipemux_strap_read()
133 regmap_read(core->cdru, CDRU_STRAP_DATA_LSW_OFFSET, &pipemux); in pipemux_strap_read()
142 * Given a PIPEMUX strap and PCIe core index, this function returns true if the
143 * PCIe core needs to be enabled
147 struct sr_pcie_phy_core *core = phy->core; in pcie_core_is_for_rc() local
150 return !!((pipemux_table[core->pipemux] >> core_idx) & 0x1); in pcie_core_is_for_rc()
171 struct sr_pcie_phy_core *core = phy->core; in sr_paxc_phy_init() local
178 regmap_read(core->mhb, MHB_MEM_PW_PAXC_OFFSET, &val); in sr_paxc_phy_init()
180 dev_err(core->dev, "PAXC is not powered up\n"); in sr_paxc_phy_init()
200 struct sr_pcie_phy_core *core; in sr_pcie_phy_xlate() local
203 core = dev_get_drvdata(dev); in sr_pcie_phy_xlate()
204 if (!core) in sr_pcie_phy_xlate()
212 return core->phys[phy_idx].phy; in sr_pcie_phy_xlate()
219 struct sr_pcie_phy_core *core; in sr_pcie_phy_probe() local
223 core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL); in sr_pcie_phy_probe()
224 if (!core) in sr_pcie_phy_probe()
227 core->dev = dev; in sr_pcie_phy_probe()
228 core->base = devm_platform_ioremap_resource(pdev, 0); in sr_pcie_phy_probe()
229 if (IS_ERR(core->base)) in sr_pcie_phy_probe()
230 return PTR_ERR(core->base); in sr_pcie_phy_probe()
232 core->cdru = syscon_regmap_lookup_by_phandle(node, "brcm,sr-cdru"); in sr_pcie_phy_probe()
233 if (IS_ERR(core->cdru)) { in sr_pcie_phy_probe()
234 dev_err(core->dev, "unable to find CDRU device\n"); in sr_pcie_phy_probe()
235 return PTR_ERR(core->cdru); in sr_pcie_phy_probe()
238 core->mhb = syscon_regmap_lookup_by_phandle(node, "brcm,sr-mhb"); in sr_pcie_phy_probe()
239 if (IS_ERR(core->mhb)) { in sr_pcie_phy_probe()
240 dev_err(core->dev, "unable to find MHB device\n"); in sr_pcie_phy_probe()
241 return PTR_ERR(core->mhb); in sr_pcie_phy_probe()
245 core->pipemux = pipemux_strap_read(core); in sr_pcie_phy_probe()
246 if (!pipemux_strap_is_valid(core->pipemux)) { in sr_pcie_phy_probe()
247 dev_err(core->dev, "invalid PCIe PIPEMUX strap %u\n", in sr_pcie_phy_probe()
248 core->pipemux); in sr_pcie_phy_probe()
253 struct sr_pcie_phy *p = &core->phys[phy_idx]; in sr_pcie_phy_probe()
267 p->core = core; in sr_pcie_phy_probe()
272 dev_set_drvdata(dev, core); in sr_pcie_phy_probe()