lkml.org 
[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] clk: qcom: Add MSM8998 GPU Clock Controller (GPUCC) driver
Date
Quoting Jeffrey Hugo (2019-05-28 09:48:03)
> diff --git a/drivers/clk/qcom/gpucc-msm8998.c b/drivers/clk/qcom/gpucc-msm8998.c
> new file mode 100644
> index 000000000000..e45062e40718
> --- /dev/null
> +++ b/drivers/clk/qcom/gpucc-msm8998.c
> +
> +static int gpucc_msm8998_probe(struct platform_device *pdev)
> +{
> + struct regmap *regmap;
> + struct clk *xo;
> +
> + /*
> + * We must have a valid XO to continue until orphan probe defer is
> + * implemented.
> + */
> + xo = clk_get(&pdev->dev, "xo");

Why is this necessary?

> + if (IS_ERR(xo))
> + return PTR_ERR(xo);
> + clk_put(xo);
> +
> + regmap = qcom_cc_map(pdev, &gpucc_msm8998_desc);
> + if (IS_ERR(regmap))
> + return PTR_ERR(regmap);
> +
> + /* force periph logic on to acoid perf counter corruption */

avoid?

> + regmap_write_bits(regmap, gfx3d_clk.clkr.enable_reg, BIT(13), BIT(13));
> + /* tweak droop detector (GPUCC_GPU_DD_WRAP_CTRL) to reduce leakage */
> + regmap_write_bits(regmap, gfx3d_clk.clkr.enable_reg, BIT(0), BIT(0));
> +
> + return qcom_cc_really_probe(pdev, &gpucc_msm8998_desc, regmap);
> +}
> +

\
 
 \ /
  Last update: 2019-06-07 01:01    [W:0.070 / U:5.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site