Lines Matching full:drv
56 struct rcar_gen2_phy_driver *drv; member
80 struct rcar_gen2_phy_driver *drv = channel->drv; in rcar_gen2_phy_init() local
93 clk_prepare_enable(drv->clk); in rcar_gen2_phy_init()
95 spin_lock_irqsave(&drv->lock, flags); in rcar_gen2_phy_init()
96 ugctrl2 = readl(drv->base + USBHS_UGCTRL2); in rcar_gen2_phy_init()
99 writel(ugctrl2, drv->base + USBHS_UGCTRL2); in rcar_gen2_phy_init()
100 spin_unlock_irqrestore(&drv->lock, flags); in rcar_gen2_phy_init()
109 clk_disable_unprepare(channel->drv->clk); in rcar_gen2_phy_exit()
119 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rcar_gen2_phy_power_on() local
120 void __iomem *base = drv->base; in rcar_gen2_phy_power_on()
129 spin_lock_irqsave(&drv->lock, flags); in rcar_gen2_phy_power_on()
155 spin_unlock_irqrestore(&drv->lock, flags); in rcar_gen2_phy_power_on()
163 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rcar_gen2_phy_power_off() local
164 void __iomem *base = drv->base; in rcar_gen2_phy_power_off()
172 spin_lock_irqsave(&drv->lock, flags); in rcar_gen2_phy_power_off()
187 spin_unlock_irqrestore(&drv->lock, flags); in rcar_gen2_phy_power_off()
195 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rz_g1c_phy_power_on() local
196 void __iomem *base = drv->base; in rz_g1c_phy_power_on()
200 spin_lock_irqsave(&drv->lock, flags); in rz_g1c_phy_power_on()
216 spin_unlock_irqrestore(&drv->lock, flags); in rz_g1c_phy_power_on()
224 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rz_g1c_phy_power_off() local
225 void __iomem *base = drv->base; in rz_g1c_phy_power_off()
229 spin_lock_irqsave(&drv->lock, flags); in rz_g1c_phy_power_off()
241 spin_unlock_irqrestore(&drv->lock, flags); in rz_g1c_phy_power_off()
311 struct rcar_gen2_phy_driver *drv; in rcar_gen2_phy_xlate() local
315 drv = dev_get_drvdata(dev); in rcar_gen2_phy_xlate()
316 if (!drv) in rcar_gen2_phy_xlate()
319 for (i = 0; i < drv->num_channels; i++) { in rcar_gen2_phy_xlate()
320 if (np == drv->channels[i].of_node) in rcar_gen2_phy_xlate()
324 if (i >= drv->num_channels || args->args[0] >= 2) in rcar_gen2_phy_xlate()
327 return drv->channels[i].phys[args->args[0]].phy; in rcar_gen2_phy_xlate()
338 struct rcar_gen2_phy_driver *drv; in rcar_gen2_phy_probe() local
362 drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL); in rcar_gen2_phy_probe()
363 if (!drv) in rcar_gen2_phy_probe()
366 spin_lock_init(&drv->lock); in rcar_gen2_phy_probe()
368 drv->clk = clk; in rcar_gen2_phy_probe()
369 drv->base = base; in rcar_gen2_phy_probe()
375 drv->num_channels = of_get_child_count(dev->of_node); in rcar_gen2_phy_probe()
376 drv->channels = devm_kcalloc(dev, drv->num_channels, in rcar_gen2_phy_probe()
379 if (!drv->channels) in rcar_gen2_phy_probe()
383 struct rcar_gen2_channel *channel = drv->channels + i; in rcar_gen2_phy_probe()
388 channel->drv = drv; in rcar_gen2_phy_probe()
425 dev_set_drvdata(dev, drv); in rcar_gen2_phy_probe()