Lines Matching full:usb0
357 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_prepare() local
363 return clk_prepare(usb0->fck); in da8xx_usb0_clk48_prepare()
368 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_unprepare() local
370 clk_unprepare(usb0->fck); in da8xx_usb0_clk48_unprepare()
375 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_enable() local
382 clk_enable(usb0->fck); in da8xx_usb0_clk48_enable()
390 regmap_write_bits(usb0->regmap, CFGCHIP(2), mask, val); in da8xx_usb0_clk48_enable()
391 ret = regmap_read_poll_timeout(usb0->regmap, CFGCHIP(2), val, in da8xx_usb0_clk48_enable()
394 clk_disable(usb0->fck); in da8xx_usb0_clk48_enable()
401 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_disable() local
405 regmap_write_bits(usb0->regmap, CFGCHIP(2), val, val); in da8xx_usb0_clk48_disable()
410 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_is_enabled() local
413 regmap_read(usb0->regmap, CFGCHIP(2), &val); in da8xx_usb0_clk48_is_enabled()
421 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_recalc_rate() local
458 regmap_write_bits(usb0->regmap, CFGCHIP(2), mask, val); in da8xx_usb0_clk48_recalc_rate()
472 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_set_parent() local
474 return regmap_write_bits(usb0->regmap, CFGCHIP(2), in da8xx_usb0_clk48_set_parent()
481 struct da8xx_usb0_clk48 *usb0 = to_da8xx_usb0_clk48(hw); in da8xx_usb0_clk48_get_parent() local
484 regmap_read(usb0->regmap, CFGCHIP(2), &val); in da8xx_usb0_clk48_get_parent()
507 struct da8xx_usb0_clk48 *usb0; in da8xx_cfgchip_register_usb0_clk48() local
517 usb0 = devm_kzalloc(dev, sizeof(*usb0), GFP_KERNEL); in da8xx_cfgchip_register_usb0_clk48()
518 if (!usb0) in da8xx_cfgchip_register_usb0_clk48()
526 usb0->hw.init = &init; in da8xx_cfgchip_register_usb0_clk48()
527 usb0->fck = fck_clk; in da8xx_cfgchip_register_usb0_clk48()
528 usb0->regmap = regmap; in da8xx_cfgchip_register_usb0_clk48()
530 ret = devm_clk_hw_register(dev, &usb0->hw); in da8xx_cfgchip_register_usb0_clk48()
534 return usb0; in da8xx_cfgchip_register_usb0_clk48()
607 struct da8xx_usb0_clk48 *usb0; in da8xx_cfgchip_register_usb_phy_clk() local
611 usb0 = da8xx_cfgchip_register_usb0_clk48(dev, regmap); in da8xx_cfgchip_register_usb_phy_clk()
612 if (IS_ERR(usb0)) in da8xx_cfgchip_register_usb_phy_clk()
613 return PTR_ERR(usb0); in da8xx_cfgchip_register_usb_phy_clk()
619 parent = clk_hw_get_parent_by_index(&usb0->hw, 1); in da8xx_cfgchip_register_usb_phy_clk()
621 clk_set_parent(usb0->hw.clk, parent->clk); in da8xx_cfgchip_register_usb_phy_clk()
623 dev_warn(dev, "Failed to find usb0 parent clock\n"); in da8xx_cfgchip_register_usb_phy_clk()
639 clk_hw_register_clkdev(&usb0->hw, "usb0_clk48", "da8xx-usb-phy"); in da8xx_cfgchip_register_usb_phy_clk()
648 struct da8xx_usb0_clk48 *usb0; in of_da8xx_usb_phy_clk_init() local
658 usb0 = da8xx_cfgchip_register_usb0_clk48(dev, regmap); in of_da8xx_usb_phy_clk_init()
659 if (IS_ERR(usb0)) { in of_da8xx_usb_phy_clk_init()
660 if (PTR_ERR(usb0) == -EPROBE_DEFER) in of_da8xx_usb_phy_clk_init()
664 PTR_ERR(usb0)); in of_da8xx_usb_phy_clk_init()
668 clk_data->hws[0] = &usb0->hw; in of_da8xx_usb_phy_clk_init()