Lines Matching refs:inst

117 					struct xsphy_instance *inst)
119 void __iomem *pbase = inst->port_base;
125 if (inst->eye_src)
176 inst->index, fm_out, calib_val,
192 struct xsphy_instance *inst)
194 void __iomem *pbase = inst->port_base;
208 struct xsphy_instance *inst)
210 void __iomem *pbase = inst->port_base;
211 u32 index = inst->index;
227 struct xsphy_instance *inst)
229 void __iomem *pbase = inst->port_base;
230 u32 index = inst->index;
246 struct xsphy_instance *inst,
251 tmp = readl(inst->port_base + XSP_U2PHYDTM1);
266 writel(tmp, inst->port_base + XSP_U2PHYDTM1);
270 struct xsphy_instance *inst)
272 struct device *dev = &inst->phy->dev;
274 switch (inst->type) {
277 &inst->efuse_intr);
279 &inst->eye_src);
281 &inst->eye_vrt);
283 &inst->eye_term);
285 inst->efuse_intr, inst->eye_src,
286 inst->eye_vrt, inst->eye_term);
290 &inst->efuse_intr);
292 &inst->efuse_tx_imp);
294 &inst->efuse_rx_imp);
296 inst->efuse_intr, inst->efuse_tx_imp,
297 inst->efuse_rx_imp);
306 struct xsphy_instance *inst)
308 void __iomem *pbase = inst->port_base;
311 if (inst->efuse_intr) {
314 tmp |= P2A1_RG_INTR_CAL_VAL(inst->efuse_intr);
318 if (inst->eye_src) {
321 tmp |= P2A5_RG_HSTX_SRCTRL_VAL(inst->eye_src);
325 if (inst->eye_vrt) {
328 tmp |= P2A1_RG_VRT_SEL_VAL(inst->eye_vrt);
332 if (inst->eye_term) {
335 tmp |= P2A1_RG_TERM_SEL_VAL(inst->eye_term);
341 struct xsphy_instance *inst)
343 void __iomem *pbase = inst->port_base;
346 if (inst->efuse_intr) {
349 tmp |= RG_XTP_GLB_BIAS_INTR_CTRL_VAL(inst->efuse_intr);
353 if (inst->efuse_tx_imp) {
356 tmp |= RG_XTP_LN0_TX_IMPSEL_VAL(inst->efuse_tx_imp);
360 if (inst->efuse_rx_imp) {
363 tmp |= RG_XTP_LN0_RX_IMPSEL_VAL(inst->efuse_rx_imp);
370 struct xsphy_instance *inst = phy_get_drvdata(phy);
374 ret = clk_prepare_enable(inst->ref_clk);
380 switch (inst->type) {
382 u2_phy_instance_init(xsphy, inst);
383 u2_phy_props_set(xsphy, inst);
386 u3_phy_props_set(xsphy, inst);
390 clk_disable_unprepare(inst->ref_clk);
399 struct xsphy_instance *inst = phy_get_drvdata(phy);
402 if (inst->type == PHY_TYPE_USB2) {
403 u2_phy_instance_power_on(xsphy, inst);
404 u2_phy_slew_rate_calibrate(xsphy, inst);
412 struct xsphy_instance *inst = phy_get_drvdata(phy);
415 if (inst->type == PHY_TYPE_USB2)
416 u2_phy_instance_power_off(xsphy, inst);
423 struct xsphy_instance *inst = phy_get_drvdata(phy);
425 clk_disable_unprepare(inst->ref_clk);
431 struct xsphy_instance *inst = phy_get_drvdata(phy);
434 if (inst->type == PHY_TYPE_USB2)
435 u2_phy_instance_set_mode(xsphy, inst, mode);
444 struct xsphy_instance *inst = NULL;
455 inst = xsphy->phys[index];
459 if (!inst) {
464 inst->type = args->args[0];
465 if (!(inst->type == PHY_TYPE_USB2 ||
466 inst->type == PHY_TYPE_USB3)) {
467 dev_err(dev, "unsupported phy type: %d\n", inst->type);
471 phy_parse_property(xsphy, inst);
473 return inst->phy;
535 struct xsphy_instance *inst;
538 inst = devm_kzalloc(dev, sizeof(*inst), GFP_KERNEL);
539 if (!inst) {
544 xsphy->phys[port] = inst;
560 inst->port_base = devm_ioremap_resource(&phy->dev, &res);
561 if (IS_ERR(inst->port_base)) {
563 retval = PTR_ERR(inst->port_base);
567 inst->phy = phy;
568 inst->index = port;
569 phy_set_drvdata(phy, inst);
572 inst->ref_clk = devm_clk_get(&phy->dev, "ref");
573 if (IS_ERR(inst->ref_clk)) {
575 retval = PTR_ERR(inst->ref_clk);