/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
H A D | pllgt215.c | 42 lM = (info->refclk + info->vco1.max_inputfreq) / info->vco1.max_inputfreq; in gt215_pll_calc() 44 hM = (info->refclk + info->vco1.min_inputfreq) / info->vco1.min_inputfreq; in gt215_pll_calc() 50 N = tmp / info->refclk; in gt215_pll_calc() 51 fN = tmp % info->refclk; in gt215_pll_calc() 54 if (fN >= info->refclk / 2) in gt215_pll_calc() 57 if (fN < info->refclk / 2) in gt215_pll_calc() 59 fN = tmp - (N * info->refclk); in gt215_pll_calc() 67 err = abs(freq - (info->refclk * N / M / *P)); in gt215_pll_calc() 75 *pfN = ((fN << 13) + info->refclk / 2) / info->refclk; in gt215_pll_calc() 86 return info->refclk * *pN / *pM / *P; in gt215_pll_calc()
|
/openbmc/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_cdclk.c | 1227 u16 refclk; member 1234 { .refclk = 19200, .cdclk = 144000, .divider = 8, .ratio = 60 }, 1235 { .refclk = 19200, .cdclk = 288000, .divider = 4, .ratio = 60 }, 1236 { .refclk = 19200, .cdclk = 384000, .divider = 3, .ratio = 60 }, 1237 { .refclk = 19200, .cdclk = 576000, .divider = 2, .ratio = 60 }, 1238 { .refclk = 19200, .cdclk = 624000, .divider = 2, .ratio = 65 }, 1243 { .refclk = 19200, .cdclk = 79200, .divider = 8, .ratio = 33 }, 1244 { .refclk = 19200, .cdclk = 158400, .divider = 4, .ratio = 33 }, 1245 { .refclk = 19200, .cdclk = 316800, .divider = 2, .ratio = 33 }, 1250 { .refclk = 19200, .cdclk = 172800, .divider = 2, .ratio = 18 }, [all …]
|
H A D | intel_dpll.c | 313 int pnv_calc_dpll_params(int refclk, struct dpll *clock) in pnv_calc_dpll_params() argument 319 clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); in pnv_calc_dpll_params() 330 int i9xx_calc_dpll_params(int refclk, struct dpll *clock) in i9xx_calc_dpll_params() argument 336 clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n + 2); in i9xx_calc_dpll_params() 342 int vlv_calc_dpll_params(int refclk, struct dpll *clock) in vlv_calc_dpll_params() argument 348 clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); in vlv_calc_dpll_params() 354 int chv_calc_dpll_params(int refclk, struct dpll *clock) in chv_calc_dpll_params() argument 360 clock->vco = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(refclk, clock->m), in chv_calc_dpll_params() 443 int target, int refclk, in i9xx_find_best_dpll() argument 467 i9xx_calc_dpll_params(refclk, &clock); in i9xx_find_best_dpll() [all …]
|
H A D | intel_dpll.h | 23 int vlv_calc_dpll_params(int refclk, struct dpll *clock); 24 int pnv_calc_dpll_params(int refclk, struct dpll *clock); 25 int i9xx_calc_dpll_params(int refclk, struct dpll *clock); 42 int chv_calc_dpll_params(int refclk, struct dpll *pll_clock);
|
/openbmc/linux/drivers/phy/ti/ |
H A D | phy-dm816x-usb.c | 47 struct clk *refclk; member 77 if (clk_get_rate(phy->refclk) != 24000000) in dm816x_usb_phy_init() 124 clk_disable(phy->refclk); in dm816x_usb_phy_runtime_suspend() 135 error = clk_enable(phy->refclk); in dm816x_usb_phy_runtime_resume() 152 clk_disable(phy->refclk); in dm816x_usb_phy_runtime_resume() 227 phy->refclk = devm_clk_get(phy->dev, "refclk"); in dm816x_usb_phy_probe() 228 if (IS_ERR(phy->refclk)) in dm816x_usb_phy_probe() 229 return PTR_ERR(phy->refclk); in dm816x_usb_phy_probe() 230 error = clk_prepare(phy->refclk); in dm816x_usb_phy_probe() 256 clk_unprepare(phy->refclk); in dm816x_usb_phy_probe() [all …]
|
H A D | phy-ti-pipe3.c | 171 struct clk *refclk; member 607 phy->refclk = devm_clk_get(dev, "refclk"); in ti_pipe3_get_clk() 608 if (IS_ERR(phy->refclk)) { in ti_pipe3_get_clk() 614 return PTR_ERR(phy->refclk); in ti_pipe3_get_clk() 826 if (!IS_ERR(phy->refclk)) { in ti_pipe3_probe() 827 clk_prepare_enable(phy->refclk); in ti_pipe3_probe() 849 clk_disable_unprepare(phy->refclk); in ti_pipe3_remove() 859 if (!IS_ERR(phy->refclk)) { in ti_pipe3_enable_clocks() 860 ret = clk_prepare_enable(phy->refclk); in ti_pipe3_enable_clocks() 890 if (!IS_ERR(phy->refclk)) in ti_pipe3_enable_clocks() [all …]
|
/openbmc/linux/drivers/gpu/drm/gma500/ |
H A D | gma_display.h | 44 int target, int refclk, 49 void (*clock)(int refclk, struct gma_clock_t *clock); 50 const struct gma_limit_t *(*limit)(struct drm_crtc *crtc, int refclk); 83 extern const struct gma_limit_t *gma_limit(struct drm_crtc *crtc, int refclk); 84 extern void gma_clock(int refclk, struct gma_clock_t *clock); 89 struct drm_crtc *crtc, int target, int refclk,
|
H A D | cdv_intel_display.c | 25 int refclk, struct gma_clock_t *best_clock); 365 int refclk) in cdv_intel_limit() argument 373 if (refclk == 96000) in cdv_intel_limit() 379 if (refclk == 27000) in cdv_intel_limit() 384 if (refclk == 27000) in cdv_intel_limit() 393 static void cdv_intel_clock(int refclk, struct gma_clock_t *clock) in cdv_intel_clock() argument 397 clock->vco = (refclk * clock->m) / clock->n; in cdv_intel_clock() 403 int refclk, in cdv_intel_find_dp_pll() argument 411 switch (refclk) { in cdv_intel_find_dp_pll() 448 gma_crtc->clock_funcs->clock(refclk, &clock); in cdv_intel_find_dp_pll() [all …]
|
H A D | oaktrail_crtc.c | 41 int refclk, struct gma_clock_t *best_clock); 45 int refclk, struct gma_clock_t *best_clock); 84 int refclk) in mrst_limit() argument 114 static void mrst_lvds_clock(int refclk, struct gma_clock_t *clock) in mrst_lvds_clock() argument 116 clock->dot = (refclk * clock->m) / (14 * clock->p1); in mrst_lvds_clock() 128 int refclk, struct gma_clock_t *best_clock) in mrst_sdvo_find_best_pll() argument 153 actual_freq = (refclk * clock.m) / in mrst_sdvo_find_best_pll() 186 int refclk, struct gma_clock_t *best_clock) in mrst_lvds_find_best_pll() argument 199 mrst_lvds_clock(refclk, &clock); in mrst_lvds_find_best_pll() 370 int refclk = 0; in oaktrail_crtc_mode_set() local [all …]
|
/openbmc/u-boot/drivers/video/rockchip/ |
H A D | rk_mipi.c | 207 u32 refclk = priv->ref_clk; in rk_mipi_phy_enable() local 208 u32 remain = refclk; in rk_mipi_phy_enable() 261 max_prediv = (refclk / (5 * MHz)); in rk_mipi_phy_enable() 262 min_prediv = ((refclk / (40 * MHz)) ? (refclk / (40 * MHz) + 1) : 1); in rk_mipi_phy_enable() 274 if ((ddr_clk * i % refclk < remain) && in rk_mipi_phy_enable() 275 (ddr_clk * i / refclk) < max_fbdiv) { in rk_mipi_phy_enable() 277 remain = ddr_clk * i % refclk; in rk_mipi_phy_enable() 280 fbdiv = ddr_clk * prediv / refclk; in rk_mipi_phy_enable() 281 ddr_clk = refclk * fbdiv / prediv; in rk_mipi_phy_enable() 285 __func__, refclk, prediv, fbdiv, ddr_clk); in rk_mipi_phy_enable()
|
/openbmc/linux/drivers/net/ethernet/arc/ |
H A D | emac_rockchip.c | 32 struct clk *refclk; member 147 priv->refclk = devm_clk_get(dev, "macref"); in emac_rockchip_probe() 148 if (IS_ERR(priv->refclk)) { in emac_rockchip_probe() 150 PTR_ERR(priv->refclk)); in emac_rockchip_probe() 151 err = PTR_ERR(priv->refclk); in emac_rockchip_probe() 155 err = clk_prepare_enable(priv->refclk); in emac_rockchip_probe() 195 err = clk_set_rate(priv->refclk, 50000000); in emac_rockchip_probe() 241 clk_disable_unprepare(priv->refclk); in emac_rockchip_probe() 254 clk_disable_unprepare(priv->refclk); in emac_rockchip_remove()
|
/openbmc/linux/drivers/phy/xilinx/ |
H A D | phy-zynqmp.c | 220 unsigned int refclk; member 392 ssc = gtr_phy->dev->refclk_sscs[gtr_phy->refclk]; in xpsgtr_configure_pll() 399 if (gtr_phy->refclk == gtr_phy->lane) in xpsgtr_configure_pll() 404 L0_REF_CLK_SEL_MASK, 1 << gtr_phy->refclk); in xpsgtr_configure_pll() 624 if (clk_prepare_enable(gtr_dev->clk[gtr_phy->refclk])) in xpsgtr_phy_init() 676 clk_disable_unprepare(gtr_dev->clk[gtr_phy->refclk]); in xpsgtr_phy_exit() 826 unsigned int refclk; in xpsgtr_xlate() local 856 refclk = args->args[3]; in xpsgtr_xlate() 857 if (refclk >= ARRAY_SIZE(gtr_dev->refclk_sscs) || in xpsgtr_xlate() 858 !gtr_dev->refclk_sscs[refclk]) { in xpsgtr_xlate() [all …]
|
/openbmc/qemu/hw/timer/ |
H A D | armv7m_systick.c | 42 ptimer_set_period_from_clock(s->ptimer, s->refclk, 1); in systick_set_period_from_clock() 101 if (!clock_has_source(s->refclk)) { in systick_read() 105 val = clock_ns_to_ticks(s->refclk, 10 * SCALE_MS) - 1; in systick_read() 107 if (clock_ticks_to_ns(s->refclk, val + 1) != 10 * SCALE_MS) { in systick_read() 142 if (!clock_has_source(s->refclk)) { in systick_write() 206 if (!clock_has_source(s->refclk)) { in systick_reset() 239 ptimer_set_period_from_clock(s->ptimer, s->refclk, 1); in systick_refclk_update() 252 s->refclk = qdev_init_clock_in(DEVICE(obj), "refclk", in systick_instance_init() 279 VMSTATE_CLOCK(refclk, SysTickState),
|
/openbmc/linux/Documentation/devicetree/bindings/usb/ |
H A D | octeon-usb.txt | 24 - cavium,refclk-type: type of the USB reference clock. Allowed values are 27 - refclk-frequency: deprecated, use "clock-frequency". 29 - refclk-type: deprecated, use "cavium,refclk-type". 54 cavium,refclk-type = "crystal";
|
H A D | dwc3-cavium.txt | 18 refclk-frequency = <0x05f5e100>; 19 refclk-type-ss = "dlmc_ref_clk0"; 20 refclk-type-hs = "dlmc_ref_clk0";
|
/openbmc/linux/Documentation/devicetree/bindings/mips/cavium/ |
H A D | uctl.txt | 16 - refclk-frequency: A single cell containing the reference clock 19 - refclk-type: A string describing the reference clock connection 30 refclk-frequency = <24000000>; 32 refclk-type = "crystal";
|
/openbmc/qemu/hw/arm/ |
H A D | stm32f100_soc.c | 63 s->refclk = qdev_init_clock_in(DEVICE(s), "refclk", NULL, NULL, 0); in stm32f100_soc_initfn() 80 if (clock_has_source(s->refclk)) { in stm32f100_soc_realize() 96 clock_set_mul_div(s->refclk, 8, 1); in stm32f100_soc_realize() 97 clock_set_source(s->refclk, s->sysclk); in stm32f100_soc_realize() 122 qdev_connect_clock_in(armv7m, "refclk", s->refclk); in stm32f100_soc_realize()
|
H A D | msf2-soc.c | 79 s->refclk = qdev_init_clock_in(DEVICE(obj), "refclk", NULL, NULL, 0); in m2sxxx_soc_initfn() 101 if (clock_has_source(s->refclk)) { in m2sxxx_soc_realize() 114 clock_set_mul_div(s->refclk, 32, 1); in m2sxxx_soc_realize() 115 clock_set_source(s->refclk, s->m3clk); in m2sxxx_soc_realize() 140 qdev_connect_clock_in(armv7m, "refclk", s->refclk); in m2sxxx_soc_realize()
|
H A D | stm32f205_soc.c | 80 s->refclk = qdev_init_clock_in(DEVICE(s), "refclk", NULL, NULL, 0); in stm32f205_soc_initfn() 97 if (clock_has_source(s->refclk)) { in stm32f205_soc_realize() 113 clock_set_mul_div(s->refclk, 8, 1); in stm32f205_soc_realize() 114 clock_set_source(s->refclk, s->sysclk); in stm32f205_soc_realize() 134 qdev_connect_clock_in(armv7m, "refclk", s->refclk); in stm32f205_soc_realize()
|
/openbmc/linux/drivers/spi/ |
H A D | spi-zynq-qspi.c | 136 struct clk *refclk; member 348 (clk_get_rate(xqspi->refclk) / (2 << baud_rate_val)) > in zynq_qspi_config_op() 387 ret = clk_enable(qspi->refclk); in zynq_qspi_setup_op() 393 clk_disable(qspi->refclk); in zynq_qspi_setup_op() 671 xqspi->refclk = devm_clk_get(&pdev->dev, "ref_clk"); in zynq_qspi_probe() 672 if (IS_ERR(xqspi->refclk)) { in zynq_qspi_probe() 674 ret = PTR_ERR(xqspi->refclk); in zynq_qspi_probe() 684 ret = clk_prepare_enable(xqspi->refclk); in zynq_qspi_probe() 719 ctlr->max_speed_hz = clk_get_rate(xqspi->refclk) / 2; in zynq_qspi_probe() 734 clk_disable_unprepare(xqspi->refclk); in zynq_qspi_probe() [all …]
|
/openbmc/linux/sound/soc/meson/ |
H A D | axg-spdifin.c | 55 struct clk *refclk; member 165 ret = clk_set_rate(priv->refclk, priv->conf->ref_rate); in axg_spdifin_sample_mode_config() 175 rate = clk_get_rate(priv->refclk); in axg_spdifin_sample_mode_config() 229 ret = clk_prepare_enable(priv->refclk); in axg_spdifin_dai_probe() 251 clk_disable_unprepare(priv->refclk); in axg_spdifin_dai_remove() 470 priv->refclk = devm_clk_get(dev, "refclk"); in axg_spdifin_probe() 471 if (IS_ERR(priv->refclk)) in axg_spdifin_probe() 472 return dev_err_probe(dev, PTR_ERR(priv->refclk), "failed to get mclk\n"); in axg_spdifin_probe()
|
/openbmc/u-boot/arch/arm/dts/ |
H A D | keystone-k2hk-evm.dts | 25 clock-output-names = "refclk-sys"; 32 clock-output-names = "refclk-pass"; 39 clock-output-names = "refclk-arm"; 46 clock-output-names = "refclk-ddr3a"; 53 clock-output-names = "refclk-ddr3b";
|
/openbmc/linux/arch/arm/boot/dts/synaptics/ |
H A D | berlin2cd.dtsi | 51 refclk: oscillator { label 389 clocks = <&refclk>; 390 clock-names = "refclk"; 446 clocks = <&refclk>; 453 clocks = <&refclk>; 461 clocks = <&refclk>; 486 clocks = <&refclk>; 497 clocks = <&refclk>; 507 clocks = <&refclk>; 532 clocks = <&refclk>; [all …]
|
/openbmc/linux/drivers/net/ethernet/ti/ |
H A D | cpts.c | 559 err = clk_enable(cpts->refclk); in cpts_register() 580 clk_disable(cpts->refclk); in cpts_register() 600 clk_disable(cpts->refclk); in cpts_unregister() 609 freq = clk_get_rate(cpts->refclk); in cpts_calc_mult_shift() 760 cpts->refclk = devm_get_clk_from_child(dev, node, "cpts"); in cpts_create() 761 if (IS_ERR(cpts->refclk)) in cpts_create() 763 cpts->refclk = devm_clk_get(dev, "cpts"); in cpts_create() 765 if (IS_ERR(cpts->refclk)) { in cpts_create() 767 PTR_ERR(cpts->refclk)); in cpts_create() 768 return ERR_CAST(cpts->refclk); in cpts_create() [all …]
|
/openbmc/linux/drivers/phy/ |
H A D | phy-pistachio-usb.c | 38 unsigned int refclk; member 68 p_phy->refclk << USB_PHY_STRAP_CONTROL_REFCLK_SHIFT); in pistachio_usb_phy_power_on() 71 if (p_phy->refclk == REFCLK_XO_CRYSTAL && rate != 12000000) { in pistachio_usb_phy_power_on() 161 &p_phy->refclk); in pistachio_usb_phy_probe()
|