[PATCH V2 3/8] clk: qcom: Add Global Clock controller (GCC) driver for IPQ5018

Sricharan Ramabadhran quic_srichara at quicinc.com
Wed Jun 22 23:06:15 PDT 2022


On 6/22/2022 8:38 PM, Krzysztof Kozlowski wrote:
> On 21/06/2022 18:11, Sricharan R wrote:
>> From: Varadarajan Narayanan <quic_varada at quicinc.com>
>>
>> Add support for the global clock controller found on IPQ5018
>> based devices.
>>
>> Co-developed-by: Sricharan R <quic_srichara at quicinc.com>
>> Signed-off-by: Sricharan R <quic_srichara at quicinc.com>
>> Signed-off-by: Varadarajan Narayanan <quic_varada at quicinc.com>
> Thank you for your patch. There is something to discuss/improve.
>
>> ---
>>   drivers/clk/qcom/Kconfig       |    7 +
>>   drivers/clk/qcom/Makefile      |    1 +
>>   drivers/clk/qcom/gcc-ipq5018.c | 3995 ++++++++++++++++++++++++++++++++
>>   3 files changed, 4003 insertions(+)
>>   create mode 100644 drivers/clk/qcom/gcc-ipq5018.c
>>
>> diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
>> index d01436be6d7a..294fb975db85 100644
>> --- a/drivers/clk/qcom/Kconfig
>> +++ b/drivers/clk/qcom/Kconfig
>> @@ -172,6 +172,13 @@ config IPQ_GCC_8074
>>   	  i2c, USB, SD/eMMC, etc. Select this for the root clock
>>   	  of ipq8074.
>>   
>> +config IPQ_GCC_5018
>> +	tristate "IPQ5018 Global Clock Controller"
>> +	help
>> +	 Support for global clock controller on ipq5018 devices.
>> +	 Say Y if you want to use peripheral devices such as UART, SPI,
>> +	 i2c, USB, SD/eMMC, etc.
>> +
>>   config MSM_GCC_8660
>>   	tristate "MSM8660 Global Clock Controller"
>>   	help
>> diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile
>> index 671cf5821af1..33ab4ce9b863 100644
>> --- a/drivers/clk/qcom/Makefile
>> +++ b/drivers/clk/qcom/Makefile
>> @@ -26,6 +26,7 @@ obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o
>>   obj-$(CONFIG_IPQ_GCC_6018) += gcc-ipq6018.o
>>   obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
>>   obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o
>> +obj-$(CONFIG_IPQ_GCC_5018) += gcc-ipq5018.o
>>   obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o
>>   obj-$(CONFIG_MDM_GCC_9607) += gcc-mdm9607.o
>>   obj-$(CONFIG_MDM_GCC_9615) += gcc-mdm9615.o
> (...)
>
>> +
>> +static int gcc_ipq5018_probe(struct platform_device *pdev)
>> +{
>> +	int ret;
>> +	struct regmap *regmap;
>> +	struct qcom_cc_desc ipq5018_desc = gcc_ipq5018_desc;
>> +
>> +	regmap = qcom_cc_map(pdev, &ipq5018_desc);
>> +	if (IS_ERR(regmap))
>> +		return PTR_ERR(regmap);
>> +
>> +	clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config);
>> +
>> +	ret = qcom_cc_really_probe(pdev, &ipq5018_desc, regmap);
> return qcom_cc_really_probe(....)

  ok.


>> +	if (ret) {
>> +		dev_err(&pdev->dev, "Failed to register ipq5018 GCC clocks\n");
>> +		return ret;
>> +	}
>> +
>> +	dev_info(&pdev->dev, "Registered ipq5018 GCC clocks provider");
> No probe success messages. This pollutes the log and there is other
> infrastructure to check for successful probe.

  ok.


>> +
>> +	return ret;
>> +}
>> +
>> +static struct platform_driver gcc_ipq5018_driver = {
>> +	.probe = gcc_ipq5018_probe,
>> +	.driver = {
>> +		.name   = "qcom,gcc-ipq5018",
>> +		.owner  = THIS_MODULE,
> No need for owner.

  ok.

Regards,
     Sricharan




More information about the linux-arm-kernel mailing list