Lines Matching refs:core

47 	struct sr_pcie_phy_core *core;  member
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()
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
224 core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL); in sr_pcie_phy_probe()
225 if (!core) in sr_pcie_phy_probe()
228 core->dev = dev; in sr_pcie_phy_probe()
231 core->base = devm_ioremap_resource(core->dev, res); in sr_pcie_phy_probe()
232 if (IS_ERR(core->base)) in sr_pcie_phy_probe()
233 return PTR_ERR(core->base); in sr_pcie_phy_probe()
235 core->cdru = syscon_regmap_lookup_by_phandle(node, "brcm,sr-cdru"); in sr_pcie_phy_probe()
236 if (IS_ERR(core->cdru)) { in sr_pcie_phy_probe()
237 dev_err(core->dev, "unable to find CDRU device\n"); in sr_pcie_phy_probe()
238 return PTR_ERR(core->cdru); in sr_pcie_phy_probe()
241 core->mhb = syscon_regmap_lookup_by_phandle(node, "brcm,sr-mhb"); in sr_pcie_phy_probe()
242 if (IS_ERR(core->mhb)) { in sr_pcie_phy_probe()
243 dev_err(core->dev, "unable to find MHB device\n"); in sr_pcie_phy_probe()
244 return PTR_ERR(core->mhb); in sr_pcie_phy_probe()
248 core->pipemux = pipemux_strap_read(core); in sr_pcie_phy_probe()
249 if (!pipemux_strap_is_valid(core->pipemux)) { in sr_pcie_phy_probe()
250 dev_err(core->dev, "invalid PCIe PIPEMUX strap %u\n", in sr_pcie_phy_probe()
251 core->pipemux); in sr_pcie_phy_probe()
256 struct sr_pcie_phy *p = &core->phys[phy_idx]; in sr_pcie_phy_probe()
270 p->core = core; in sr_pcie_phy_probe()
275 dev_set_drvdata(dev, core); in sr_pcie_phy_probe()