• Home
  • Raw
  • Download

Lines Matching refs:phy_cfg

124 static int bcm_usb_ss_phy_init(struct bcm_usb_phy_cfg *phy_cfg)  in bcm_usb_ss_phy_init()  argument
127 void __iomem *regs = phy_cfg->regs; in bcm_usb_ss_phy_init()
131 offset = phy_cfg->offset; in bcm_usb_ss_phy_init()
155 static int bcm_usb_hs_phy_init(struct bcm_usb_phy_cfg *phy_cfg) in bcm_usb_hs_phy_init() argument
158 void __iomem *regs = phy_cfg->regs; in bcm_usb_hs_phy_init()
161 offset = phy_cfg->offset; in bcm_usb_hs_phy_init()
176 struct bcm_usb_phy_cfg *phy_cfg = phy_get_drvdata(phy); in bcm_usb_phy_reset() local
177 void __iomem *regs = phy_cfg->regs; in bcm_usb_phy_reset()
180 offset = phy_cfg->offset; in bcm_usb_phy_reset()
182 if (phy_cfg->type == USB_HS_PHY) { in bcm_usb_phy_reset()
194 struct bcm_usb_phy_cfg *phy_cfg = phy_get_drvdata(phy); in bcm_usb_phy_init() local
197 if (phy_cfg->type == USB_SS_PHY) in bcm_usb_phy_init()
198 ret = bcm_usb_ss_phy_init(phy_cfg); in bcm_usb_phy_init()
199 else if (phy_cfg->type == USB_HS_PHY) in bcm_usb_phy_init()
200 ret = bcm_usb_hs_phy_init(phy_cfg); in bcm_usb_phy_init()
214 struct bcm_usb_phy_cfg *phy_cfg; in bcm_usb_phy_xlate() local
217 phy_cfg = dev_get_drvdata(dev); in bcm_usb_phy_xlate()
218 if (!phy_cfg) in bcm_usb_phy_xlate()
221 if (phy_cfg->version == BCM_SR_USB_COMBO_PHY) { in bcm_usb_phy_xlate()
227 return phy_cfg[phy_idx].phy; in bcm_usb_phy_xlate()
229 return phy_cfg->phy; in bcm_usb_phy_xlate()
235 struct bcm_usb_phy_cfg *phy_cfg; in bcm_usb_phy_create() local
239 phy_cfg = devm_kzalloc(dev, NUM_BCM_SR_USB_COMBO_PHYS * in bcm_usb_phy_create()
242 if (!phy_cfg) in bcm_usb_phy_create()
246 phy_cfg[idx].regs = regs; in bcm_usb_phy_create()
247 phy_cfg[idx].version = version; in bcm_usb_phy_create()
249 phy_cfg[idx].offset = bcm_usb_combo_phy_hs; in bcm_usb_phy_create()
250 phy_cfg[idx].type = USB_HS_PHY; in bcm_usb_phy_create()
252 phy_cfg[idx].offset = bcm_usb_combo_phy_ss; in bcm_usb_phy_create()
253 phy_cfg[idx].type = USB_SS_PHY; in bcm_usb_phy_create()
255 phy_cfg[idx].phy = devm_phy_create(dev, node, in bcm_usb_phy_create()
257 if (IS_ERR(phy_cfg[idx].phy)) in bcm_usb_phy_create()
258 return PTR_ERR(phy_cfg[idx].phy); in bcm_usb_phy_create()
260 phy_set_drvdata(phy_cfg[idx].phy, &phy_cfg[idx]); in bcm_usb_phy_create()
263 phy_cfg = devm_kzalloc(dev, sizeof(struct bcm_usb_phy_cfg), in bcm_usb_phy_create()
265 if (!phy_cfg) in bcm_usb_phy_create()
268 phy_cfg->regs = regs; in bcm_usb_phy_create()
269 phy_cfg->version = version; in bcm_usb_phy_create()
270 phy_cfg->offset = bcm_usb_hs_phy; in bcm_usb_phy_create()
271 phy_cfg->type = USB_HS_PHY; in bcm_usb_phy_create()
272 phy_cfg->phy = devm_phy_create(dev, node, &sr_phy_ops); in bcm_usb_phy_create()
273 if (IS_ERR(phy_cfg->phy)) in bcm_usb_phy_create()
274 return PTR_ERR(phy_cfg->phy); in bcm_usb_phy_create()
276 phy_set_drvdata(phy_cfg->phy, phy_cfg); in bcm_usb_phy_create()
280 dev_set_drvdata(dev, phy_cfg); in bcm_usb_phy_create()