Lines Matching full:usb0

358 	struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw);  in da8xx_usb0_clk48_prepare()  local
364 return clk_prepare(usb0->fck); in da8xx_usb0_clk48_prepare()
369 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_unprepare() local
371 clk_unprepare(usb0->fck); in da8xx_usb0_clk48_unprepare()
376 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_enable() local
383 clk_enable(usb0->fck); in da8xx_usb0_clk48_enable()
391 regmap_write_bits(usb0->regmap, CFGCHIP(2), mask, val); in da8xx_usb0_clk48_enable()
392 ret = regmap_read_poll_timeout(usb0->regmap, CFGCHIP(2), val, in da8xx_usb0_clk48_enable()
395 clk_disable(usb0->fck); in da8xx_usb0_clk48_enable()
402 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_disable() local
406 regmap_write_bits(usb0->regmap, CFGCHIP(2), val, val); in da8xx_usb0_clk48_disable()
411 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_is_enabled() local
414 regmap_read(usb0->regmap, CFGCHIP(2), &val); in da8xx_usb0_clk48_is_enabled()
422 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_recalc_rate() local
459 regmap_write_bits(usb0->regmap, CFGCHIP(2), mask, val); in da8xx_usb0_clk48_recalc_rate()
475 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_set_parent() local
477 return regmap_write_bits(usb0->regmap, CFGCHIP(2), in da8xx_usb0_clk48_set_parent()
484 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_get_parent() local
487 regmap_read(usb0->regmap, CFGCHIP(2), &val); in da8xx_usb0_clk48_get_parent()
510 struct da8xx_usb0_clk48 *usb0; in da8xx_cfgchip_register_usb0_clk48() local
519 usb0 = devm_kzalloc(dev, sizeof(*usb0), GFP_KERNEL); in da8xx_cfgchip_register_usb0_clk48()
520 if (!usb0) in da8xx_cfgchip_register_usb0_clk48()
528 usb0->hw.init = &init; in da8xx_cfgchip_register_usb0_clk48()
529 usb0->fck = fck_clk; in da8xx_cfgchip_register_usb0_clk48()
530 usb0->regmap = regmap; in da8xx_cfgchip_register_usb0_clk48()
532 ret = devm_clk_hw_register(dev, &usb0->hw); in da8xx_cfgchip_register_usb0_clk48()
536 return usb0; in da8xx_cfgchip_register_usb0_clk48()
610 struct da8xx_usb0_clk48 *usb0; in da8xx_cfgchip_register_usb_phy_clk() local
614 usb0 = da8xx_cfgchip_register_usb0_clk48(dev, regmap); in da8xx_cfgchip_register_usb_phy_clk()
615 if (IS_ERR(usb0)) in da8xx_cfgchip_register_usb_phy_clk()
616 return PTR_ERR(usb0); in da8xx_cfgchip_register_usb_phy_clk()
622 parent = clk_hw_get_parent_by_index(&usb0->hw, 1); in da8xx_cfgchip_register_usb_phy_clk()
624 clk_set_parent(usb0->hw.clk, parent->clk); in da8xx_cfgchip_register_usb_phy_clk()
626 dev_warn(dev, "Failed to find usb0 parent clock\n"); in da8xx_cfgchip_register_usb_phy_clk()
642 clk_hw_register_clkdev(&usb0->hw, "usb0_clk48", "da8xx-usb-phy"); in da8xx_cfgchip_register_usb_phy_clk()
651 struct da8xx_usb0_clk48 *usb0; in of_da8xx_usb_phy_clk_init() local
661 usb0 = da8xx_cfgchip_register_usb0_clk48(dev, regmap); in of_da8xx_usb_phy_clk_init()
662 if (IS_ERR(usb0)) { in of_da8xx_usb_phy_clk_init()
663 if (PTR_ERR(usb0) == -EPROBE_DEFER) in of_da8xx_usb_phy_clk_init()
667 PTR_ERR(usb0)); in of_da8xx_usb_phy_clk_init()
671 clk_data->hws[0] = &usb0->hw; in of_da8xx_usb_phy_clk_init()