lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d5a37ebd-6614-be91-f500-46ba7be1bed6@linaro.org>
Date:   Tue, 31 Jan 2023 13:38:37 +0100
From:   Konrad Dybcio <konrad.dybcio@...aro.org>
To:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        linux-arm-msm@...r.kernel.org, andersson@...nel.org,
        agross@...nel.org, krzysztof.kozlowski@...aro.org
Cc:     marijn.suijten@...ainline.org,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org
Subject: Re: [PATCH v4 8/8] clk: qcom: Add GPU clock controller driver for
 SM6115



On 31.01.2023 10:25, Dmitry Baryshkov wrote:
> On 31/01/2023 01:59, Konrad Dybcio wrote:
>> Add support for the GPU clock controller found on SM6115.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
>> ---
>>   drivers/clk/qcom/Kconfig        |   9 +
>>   drivers/clk/qcom/Makefile       |   1 +
>>   drivers/clk/qcom/gpucc-sm6115.c | 512 ++++++++++++++++++++++++++++++++
>>   3 files changed, 522 insertions(+)
>>   create mode 100644 drivers/clk/qcom/gpucc-sm6115.c
> 
> [skipped]
> 
>> +static int gpu_cc_sm6115_probe(struct platform_device *pdev)
>> +{
>> +    struct regmap *regmap;
>> +    unsigned int value, mask;
>> +
>> +    regmap = qcom_cc_map(pdev, &gpu_cc_sm6115_desc);
>> +    if (IS_ERR(regmap))
>> +        return PTR_ERR(regmap);
>> +
>> +    clk_alpha_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
>> +    clk_alpha_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
>> +
>> +    /* Recommended WAKEUP/SLEEP settings for the gpu_cc_cx_gmu_clk */
>> +    mask = CX_GMU_CBCR_WAKE_MASK << CX_GMU_CBCR_WAKE_SHIFT;
>> +    mask |= CX_GMU_CBCR_SLEEP_MASK << CX_GMU_CBCR_SLEEP_SHIFT;
>> +    value = 0xf << CX_GMU_CBCR_WAKE_SHIFT | 0xf << CX_GMU_CBCR_SLEEP_SHIFT;
>> +    regmap_update_bits(regmap, gpu_cc_cx_gmu_clk.clkr.enable_reg, mask, value);
>> +
>> +    /* Set up PERIPH/MEM retain on the GPU core clock */
>> +    regmap_update_bits(regmap, gpu_cc_gx_gfx3d_clk.halt_reg,
>> +               (BIT(14) | BIT(13)), (BIT(14) | BIT(13)));
> 
> But you have your new helpers to set these values, don't you?
Welp, that's what I get for managing 3 almost-identical drivers
at once ;) Will fix.

Konrad
> 
>> +
>> +    return qcom_cc_really_probe(pdev, &gpu_cc_sm6115_desc, regmap);
>> +}
>> +
>> +static struct platform_driver gpu_cc_sm6115_driver = {
>> +    .probe = gpu_cc_sm6115_probe,
>> +    .driver = {
>> +        .name = "sm6115-gpucc",
>> +        .of_match_table = gpu_cc_sm6115_match_table,
>> +    },
>> +};
>> +module_platform_driver(gpu_cc_sm6115_driver);
>> +
>> +MODULE_DESCRIPTION("QTI GPU_CC SM6115 Driver");
>> +MODULE_LICENSE("GPL");
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ