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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21/06/2022 18:11, Sricharan R wrote:
> From: Varadarajan Narayanan <quic_varada@xxxxxxxxxxx>
> 
> Add support for the global clock controller found on IPQ5018
> based devices.
> 
> Co-developed-by: Sricharan R <quic_srichara@xxxxxxxxxxx>
> Signed-off-by: Sricharan R <quic_srichara@xxxxxxxxxxx>
> Signed-off-by: Varadarajan Narayanan <quic_varada@xxxxxxxxxxx>

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(....)

> +	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.

> +
> +	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.

> +		.of_match_table = gcc_ipq5018_match_table,
> +	},
> +};
> +
> +static int __init gcc_ipq5018_init(void)
> +{
> +	return platform_driver_register(&gcc_ipq5018_driver);
> +}
> +core_initcall(gcc_ipq5018_init);
> +
> +static void __exit gcc_ipq5018_exit(void)
> +{
> +	platform_driver_unregister(&gcc_ipq5018_driver);
> +}
> +module_exit(gcc_ipq5018_exit);
> +
> +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. GCC IPQ5018 Driver");
> +MODULE_LICENSE("GPL v2");


Best regards,
Krzysztof



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux