Lines Matching refs:drv

57 	struct rcar_gen2_phy_driver *drv;  member
81 struct rcar_gen2_phy_driver *drv = channel->drv; in rcar_gen2_phy_init() local
94 clk_prepare_enable(drv->clk); in rcar_gen2_phy_init()
96 spin_lock_irqsave(&drv->lock, flags); in rcar_gen2_phy_init()
97 ugctrl2 = readl(drv->base + USBHS_UGCTRL2); in rcar_gen2_phy_init()
100 writel(ugctrl2, drv->base + USBHS_UGCTRL2); in rcar_gen2_phy_init()
101 spin_unlock_irqrestore(&drv->lock, flags); in rcar_gen2_phy_init()
110 clk_disable_unprepare(channel->drv->clk); in rcar_gen2_phy_exit()
120 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rcar_gen2_phy_power_on() local
121 void __iomem *base = drv->base; in rcar_gen2_phy_power_on()
130 spin_lock_irqsave(&drv->lock, flags); in rcar_gen2_phy_power_on()
156 spin_unlock_irqrestore(&drv->lock, flags); in rcar_gen2_phy_power_on()
164 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rcar_gen2_phy_power_off() local
165 void __iomem *base = drv->base; in rcar_gen2_phy_power_off()
173 spin_lock_irqsave(&drv->lock, flags); in rcar_gen2_phy_power_off()
188 spin_unlock_irqrestore(&drv->lock, flags); in rcar_gen2_phy_power_off()
196 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rz_g1c_phy_power_on() local
197 void __iomem *base = drv->base; in rz_g1c_phy_power_on()
201 spin_lock_irqsave(&drv->lock, flags); in rz_g1c_phy_power_on()
217 spin_unlock_irqrestore(&drv->lock, flags); in rz_g1c_phy_power_on()
225 struct rcar_gen2_phy_driver *drv = phy->channel->drv; in rz_g1c_phy_power_off() local
226 void __iomem *base = drv->base; in rz_g1c_phy_power_off()
230 spin_lock_irqsave(&drv->lock, flags); in rz_g1c_phy_power_off()
242 spin_unlock_irqrestore(&drv->lock, flags); in rz_g1c_phy_power_off()
312 struct rcar_gen2_phy_driver *drv; in rcar_gen2_phy_xlate() local
316 drv = dev_get_drvdata(dev); in rcar_gen2_phy_xlate()
317 if (!drv) in rcar_gen2_phy_xlate()
320 for (i = 0; i < drv->num_channels; i++) { in rcar_gen2_phy_xlate()
321 if (np == drv->channels[i].of_node) in rcar_gen2_phy_xlate()
325 if (i >= drv->num_channels || args->args[0] >= 2) in rcar_gen2_phy_xlate()
328 return drv->channels[i].phys[args->args[0]].phy; in rcar_gen2_phy_xlate()
339 struct rcar_gen2_phy_driver *drv; in rcar_gen2_phy_probe() local
363 drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL); in rcar_gen2_phy_probe()
364 if (!drv) in rcar_gen2_phy_probe()
367 spin_lock_init(&drv->lock); in rcar_gen2_phy_probe()
369 drv->clk = clk; in rcar_gen2_phy_probe()
370 drv->base = base; in rcar_gen2_phy_probe()
376 drv->num_channels = of_get_child_count(dev->of_node); in rcar_gen2_phy_probe()
377 drv->channels = devm_kcalloc(dev, drv->num_channels, in rcar_gen2_phy_probe()
380 if (!drv->channels) in rcar_gen2_phy_probe()
384 struct rcar_gen2_channel *channel = drv->channels + i; in rcar_gen2_phy_probe()
389 channel->drv = drv; in rcar_gen2_phy_probe()
426 dev_set_drvdata(dev, drv); in rcar_gen2_phy_probe()