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
520 usb0 = devm_kzalloc(dev, sizeof(*usb0), GFP_KERNEL); in da8xx_cfgchip_register_usb0_clk48()
521 if (!usb0) in da8xx_cfgchip_register_usb0_clk48()
529 usb0->hw.init = &init; in da8xx_cfgchip_register_usb0_clk48()
530 usb0->fck = fck_clk; in da8xx_cfgchip_register_usb0_clk48()
531 usb0->regmap = regmap; in da8xx_cfgchip_register_usb0_clk48()
533 ret = devm_clk_hw_register(dev, &usb0->hw); in da8xx_cfgchip_register_usb0_clk48()
537 return usb0; in da8xx_cfgchip_register_usb0_clk48()
611 struct da8xx_usb0_clk48 *usb0; in da8xx_cfgchip_register_usb_phy_clk() local
615 usb0 = da8xx_cfgchip_register_usb0_clk48(dev, regmap); in da8xx_cfgchip_register_usb_phy_clk()
616 if (IS_ERR(usb0)) in da8xx_cfgchip_register_usb_phy_clk()
617 return PTR_ERR(usb0); in da8xx_cfgchip_register_usb_phy_clk()
623 parent = clk_hw_get_parent_by_index(&usb0->hw, 1); in da8xx_cfgchip_register_usb_phy_clk()
625 clk_set_parent(usb0->hw.clk, parent->clk); in da8xx_cfgchip_register_usb_phy_clk()
627 dev_warn(dev, "Failed to find usb0 parent clock\n"); in da8xx_cfgchip_register_usb_phy_clk()
643 clk_hw_register_clkdev(&usb0->hw, "usb0_clk48", "da8xx-usb-phy"); in da8xx_cfgchip_register_usb_phy_clk()
652 struct da8xx_usb0_clk48 *usb0; in of_da8xx_usb_phy_clk_init() local
662 usb0 = da8xx_cfgchip_register_usb0_clk48(dev, regmap); in of_da8xx_usb_phy_clk_init()
663 if (IS_ERR(usb0)) { in of_da8xx_usb_phy_clk_init()
664 if (PTR_ERR(usb0) == -EPROBE_DEFER) in of_da8xx_usb_phy_clk_init()
668 PTR_ERR(usb0)); in of_da8xx_usb_phy_clk_init()
672 clk_data->hws[0] = &usb0->hw; in of_da8xx_usb_phy_clk_init()