Add support for LPASS Core and Audio Clock for SC7280
v2 cover Add support for LPASS Core and Audio Clock for SC7280
[v2]
* Drop code for "Add support for clock voting from GDSC" from drivers/clk/qcom/gdsc.c
* Add support for runtime PM get/put from clk_summary.
* Update commit message for PLL detect lock timeout increase.
* Fix documentation bindings errors reported by DT_CHECKER_FLAGS.
* Update the driver code to take care of the following
- KCONFIG to add "select QCOM_GDSC"
- Use of "const" for pll_vco and clk_init_data
- Use of index instead of fw_name.
- Fix extra space, remove 'lpass_create_pm_clks' and corresponding code.
- cleanup 'lpass_hm_core_probe' and 'lpass_hm_sc7280_match_table'.
[v1]
This patchset supports the following.
- Few PLLs might require to a higher time to detect lock, thus increase the polling time.
- GDSC which require clocks to be explicitly enabled before access.
- LPASS core and audio clock driver support for SC7280.
Taniya Das (5):
clk: qcom: clk-alpha-pll: Increase PLL lock detect poll time
clk: Enable/Disable runtime PM for clk_summary
clk: qcom: gcc-sc7280: Mark gcc_cfg_noc_lpass_clk always enabled
dt-bindings: clock: Add YAML schemas for LPASS clocks on SC7280
clk: qcom: lpass: Add support for LPASS clock controller for SC7280
.../bindings/clock/qcom,sc7280-lpasscorecc.yaml | 169 +++++ drivers/clk/clk.c | 2 + drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clk-alpha-pll.c | 2 +- drivers/clk/qcom/gcc-sc7280.c | 2 +- drivers/clk/qcom/lpassaudiocc-sc7280.c | 832 +++++++++++++++++++++ drivers/clk/qcom/lpasscorecc-sc7280.c | 433 +++++++++++ .../dt-bindings/clock/qcom,lpassaudiocc-sc7280.h | 43 ++ .../dt-bindings/clock/qcom,lpasscorecc-sc7280.h | 26 + 10 files changed, 1518 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml create mode 100644 drivers/clk/qcom/lpassaudiocc-sc7280.c create mode 100644 drivers/clk/qcom/lpasscorecc-sc7280.c create mode 100644 include/dt-bindings/clock/qcom,lpassaudiocc-sc7280.h create mode 100644 include/dt-bindings/clock/qcom,lpasscorecc-sc7280.h
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
PATCH v2 1/5 clk: qcom: clk-alpha-pll: Increase PLL lock detect poll time
PLL poll for lock detection can take more than 100us for certain type of Lucid PLLs and also the new PLLs types(Lucid EVO), thus update to 200us.
--- drivers/clk/qcom/clk-alpha-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/clk-alpha-pll.c +1 -1
@@ -223,7 +223,7 @@ static int wait_for_pll(struct clk_alpha_pll *pll, u32 mask, bool inverse,if (ret)return ret; -for (count =100 ; count >0 ; count--) { +for (count =200 ; count >0 ; count--) { ret =regmap_read (pll->clkr.regmap,PLL_MODE (pll), &val);if (ret)return ret;
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
Stephen Boyd
maintainerRe: [PATCH v2 1/5] clk: qcom: clk-alpha-pll: Increase PLL lock detect poll time
Quoting Taniya Das (2021-12-20 08:43:54)
Quoted 5 lines
PLL poll for lock detection can take more than 100us for certain type of Lucid PLLs and also the new PLLs types(Lucid EVO), thus update to 200us.
Signed-off-by Taniya Das <[email protected]>---
Any Fixes tag?
Re: [PATCH v2 1/5] clk: qcom: clk-alpha-pll: Increase PLL lock detect poll time
In reply to Taniya DasQuoting Taniya Das (2021-12-20 08:43:54)
Quoted 5 lines
PLL poll for lock detection can take more than 100us for certain type of Lucid PLLs and also the new PLLs types(Lucid EVO), thus update to 200us.
Signed-off-by Taniya Das <[email protected]>---
Applied to clk-next
PATCH v2 2/5 clk: Enable/Disable runtime PM for clk_summary
In reply to Taniya DasThe registers for some clocks in the SOC area, which are under the power domain are required to be enabled before accessing them. During the clk_summary if the power-domains are not enabled they could result into NoC errors.
Thus ensure the register access of the clock controller is done with pm_untime_get/put functions.
--- drivers/clk/clk.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/clk.c +2 -0
@@ -2966,7 +2966,9 @@ static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c, {struct clk_core *child; +clk_pm_runtime_get (c);clk_summary_show_one (s, c, level); +clk_pm_runtime_put (c);hlist_for_each_entry (child, &c->children, child_node)clk_summary_show_subtree (s, child, level +1 );
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
Re: [PATCH v2 2/5] clk: Enable/Disable runtime PM for clk_summary
Quoting Taniya Das (2021-12-20 08:43:55)
Quoted 10 lines
The registers for some clocks in the SOC area, which are under the power domain are required to be enabled before accessing them. During the
clk_summaryif the power-domains are not enabled they could result into NoC errors.Thus ensure the register access of the clock controller is done with pm_untime_get/put functions.
Signed-off-by Taniya Das <[email protected]>---
Applied to clk-next
PATCH v2 3/5 clk: qcom: gcc-sc7280: Mark gcc_cfg_noc_lpass_clk always enabled
In reply to Taniya DasThe gcc cfg noc lpass clock is required to be always enabled for the LPASS core and audio drivers to be functional.
--- drivers/clk/qcom/gcc-sc7280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/gcc-sc7280.c +1 -1
@@ -2917,7 +2917,7 @@ static struct clk_branch gcc_cfg_noc_lpass_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data ){ .name ="gcc_cfg_noc_lpass_clk" , - .ops = &clk_branch2_ops, + .ops = &clk_branch2_aon_ops, }, }, };
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
Re: [PATCH v2 3/5] clk: qcom: gcc-sc7280: Mark gcc_cfg_noc_lpass_clk always enabled
Quoting Taniya Das (2021-12-20 08:43:56)
Quoted 6 lines
The gcc cfg noc lpass clock is required to be always enabled for the LPASS core and audio drivers to be functional.
Fixes a3cc092196ef ("clk: qcom: Add Global Clock controller (GCC) driver for SC7280")Signed-off-by Taniya Das <[email protected]>---
Applied to clk-next
PATCH v2 4/5 dt-bindings: clock: Add YAML schemas for LPASS clocks on SC7280
In reply to Taniya DasThe LPASS(Low Power Audio Subsystem) clock provider have a bunch of generic properties that are needed in a device tree. Also add clock ids for LPASS core clocks and audio clock IDs for LPASS client to request for the clocks.
--- .../bindings/clock/qcom,sc7280-lpasscorecc.yaml | 169 +++++++++++++++++++++ .../dt-bindings/clock/qcom,lpassaudiocc-sc7280.h | 43 ++++++ .../dt-bindings/clock/qcom,lpasscorecc-sc7280.h | 26 ++++ 3 files changed, 238 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml create mode 100644 include/dt-bindings/clock/qcom,lpassaudiocc-sc7280.h create mode 100644 include/dt-bindings/clock/qcom,lpasscorecc-sc7280.h
Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml new file +169 -0
@@ -0,0 +1,169 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,sc7280-lpasscorecc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm LPASS Core & Audio Clock Controller Binding for SC7280 + +maintainers: + - Taniya Das <[email protected]> + +description: | + Qualcomm LPASS core and audio clock control module which supports the + clocks and power domains on SC7280. + + See also: + - dt-bindings/clock/qcom,lpasscorecc-sc7280.h + - dt-bindings/clock/qcom,lpassaudiocc-sc7280.h + +properties: + clocks: true + + clock-names: true + + compatible: + enum: + - qcom,sc7280-lpassaoncc + - qcom,sc7280-lpassaudiocc + - qcom,sc7280-lpasscorecc + - qcom,sc7280-lpasshm + + power-domains: + maxItems: 1 + + '#clock-cells': + const: 1 + + '#power-domain-cells': + const: 1 + + reg: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - '#clock-cells' + - '#power-domain-cells' + +additionalProperties: false + +allOf: + - if: + properties: + compatible: + contains: + const: qcom,sc7280-lpassaudiocc + + then: + properties: + clocks: + items: + - description: Board XO source + - description: LPASS_AON_CC_MAIN_RCG_CLK_SRC + + clock-names: + items: + - const: bi_tcxo + - const: lpass_aon_cc_main_rcg_clk_src + - if: + properties: + compatible: + contains: + enum: + - qcom,sc7280-lpassaoncc + + then: + properties: + clocks: + items: + - description: Board XO source + - description: LPASS_AON_CC_MAIN_RCG_CLK_SRC + + clock-names: + items: + - const: bi_tcxo + - const: iface + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc7280-lpasshm + - qcom,sc7280-lpasscorecc + + then: + properties: + clocks: + items: + - description: Board XO source + + clock-names: + items: + - const: bi_tcxo + +examples: + - | + #include <dt-bindings/clock/qcom,rpmh.h> + #include <dt-bindings/clock/qcom,gcc-sc7280.h> + #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> + #include <dt-bindings/clock/qcom,lpasscorecc-sc7280.h> + lpass_audiocc: clock-controller@3300000 { + compatible = "qcom,sc7280-lpassaudiocc"; + reg = <0x3300000 0x30000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&lpass_aon LPASS_AON_CC_MAIN_RCG_CLK_SRC>; + clock-names = "bi_tcxo", "lpass_aon_cc_main_rcg_clk_src"; + power-domains = <&lpass_aon LPASS_AON_CC_LPASS_AUDIO_HM_GDSC>; + #clock-cells = <1>; + #power-domain-cells = <1>; + }; + + - | + #include <dt-bindings/clock/qcom,rpmh.h> + #include <dt-bindings/clock/qcom,gcc-sc7280.h> + #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> + #include <dt-bindings/clock/qcom,lpasscorecc-sc7280.h> + lpass_hm: clock-controller@3c00000 { + compatible = "qcom,sc7280-lpasshm"; + reg = <0x3c00000 0x28>; + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "bi_tcxo"; + #clock-cells = <1>; + #power-domain-cells = <1>; + }; + + - | + #include <dt-bindings/clock/qcom,rpmh.h> + #include <dt-bindings/clock/qcom,gcc-sc7280.h> + #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> + #include <dt-bindings/clock/qcom,lpasscorecc-sc7280.h> + lpasscore: clock-controller@3900000 { + compatible = "qcom,sc7280-lpasscorecc"; + reg = <0x3900000 0x50000>; + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "bi_tcxo"; + power-domains = <&lpass_hm LPASS_CORE_CC_LPASS_CORE_HM_GDSC>; + #clock-cells = <1>; + #power-domain-cells = <1>; + }; + + - | + #include <dt-bindings/clock/qcom,rpmh.h> + #include <dt-bindings/clock/qcom,gcc-sc7280.h> + #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> + #include <dt-bindings/clock/qcom,lpasscorecc-sc7280.h> + lpass_aon: clock-controller@3380000 { + compatible = "qcom,sc7280-lpassaoncc"; + reg = <0x3380000 0x30000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, <&lpasscore LPASS_CORE_CC_CORE_CLK>; + clock-names = "bi_tcxo", "iface"; + #clock-cells = <1>; + #power-domain-cells = <1>; + }; + +...
include/dt-bindings/clock/qcom,lpassaudiocc-sc7280.h new file +43 -0
43 lines not on this page · raw message
include/dt-bindings/clock/qcom,lpasscorecc-sc7280.h new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* Copyright (c) 2021, The Linux Foundation. All rights reserved. +*/ + +#ifndef _DT_BINDINGS_CLK_QCOM_LPASS_CORE_CC_SC7280_H +#define _DT_BINDINGS_CLK_QCOM_LPASS_CORE_CC_SC7280_H + +/* LPASS_CORE_CC clocks */ +#define LPASS_CORE_CC_DIG_PLL 0 +#define LPASS_CORE_CC_DIG_PLL_OUT_MAIN_DIV_CLK_SRC 1 +#define LPASS_CORE_CC_DIG_PLL_OUT_ODD 2 +#define LPASS_CORE_CC_CORE_CLK 3 +#define LPASS_CORE_CC_CORE_CLK_SRC 4 +#define LPASS_CORE_CC_EXT_IF0_CLK_SRC 5 +#define LPASS_CORE_CC_EXT_IF0_IBIT_CLK 6 +#define LPASS_CORE_CC_EXT_IF1_CLK_SRC 7 +#define LPASS_CORE_CC_EXT_IF1_IBIT_CLK 8 +#define LPASS_CORE_CC_LPM_CORE_CLK 9 +#define LPASS_CORE_CC_LPM_MEM0_CORE_CLK 10 +#define LPASS_CORE_CC_SYSNOC_MPORT_CORE_CLK 11 + +/* LPASS_CORE_CC power domains */ +#define LPASS_CORE_CC_LPASS_CORE_HM_GDSC 0 + +#endif
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
PATCH v2 5/5 clk: qcom: lpass: Add support for LPASS clock controller for SC7280
In reply to Taniya DasThe Low Power Audio subsystem core and audio clocks are required for Audio client to be able to request for the clocks and power domains.
--- drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/lpassaudiocc-sc7280.c | 832 +++++++++++++++++++++++++++++++++ drivers/clk/qcom/lpasscorecc-sc7280.c | 433 +++++++++++++++++ 4 files changed, 1276 insertions(+) create mode 100644 drivers/clk/qcom/lpassaudiocc-sc7280.c create mode 100644 drivers/clk/qcom/lpasscorecc-sc7280.c
drivers/clk/qcom/Kconfig +10 -0
@@ -443,6 +443,16 @@ config SC_LPASS_CORECC_7180 Say Y if you want to use LPASS clocks and power domains of the LPASS core clock controller. +config SC_LPASS_CORECC_7280 + tristate "SC7280 LPASS Core & Audio Clock Controller" + select SC_GCC_7280 + select QCOM_GDSC + help + Support for the LPASS(Low Power Audio Subsystem) core and audio clock + controller on SC7280 devices. + Say Y if you want to use LPASS clocks and power domains of the LPASS + core clock controller. + config SC_MSS_7180 tristate "SC7180 Modem Clock Controller" select SC_GCC_7180
drivers/clk/qcom/Makefile +1 -0
@@ -70,6 +70,7 @@ obj-$(CONFIG_SC_GPUCC_7180) += gpucc-sc7180.o obj-$(CONFIG_SC_GPUCC_7280) += gpucc-sc7280.o obj-$(CONFIG_SC_LPASSCC_7280) += lpasscc-sc7280.o obj-$(CONFIG_SC_LPASS_CORECC_7180) += lpasscorecc-sc7180.o +obj-$(CONFIG_SC_LPASS_CORECC_7280) += lpasscorecc-sc7280.o lpassaudiocc-sc7280.o obj-$(CONFIG_SC_MSS_7180) += mss-sc7180.o obj-$(CONFIG_SC_VIDEOCC_7180) += videocc-sc7180.o obj-$(CONFIG_SC_VIDEOCC_7280) += videocc-sc7280.o
drivers/clk/qcom/lpassaudiocc-sc7280.c new file +832 -0
832 lines not on this page · raw message
drivers/clk/qcom/lpasscorecc-sc7280.c new file +433 -0
433 lines not on this page · raw message
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.
kernel test robot
build botRe: [PATCH v2 5/5] clk: qcom: lpass: Add support for LPASS clock controller for SC7280
Thank you for the patch! Perhaps something to improve:
Hi Taniya,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next linus/master v5.16-rc6 next-20211220] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Taniya-Das/Add-support-for-LPASS-Core-and-Audio-Clock-for-SC7280/20211221-004818 base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20211221/202112210805.wI87zJw0-lkp(a)intel.com/config) compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/fec640fab5ec498e79475ecd4b15bc95035a76b1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Taniya-Das/Add-support-for-LPASS-Core-and-Audio-Clock-for-SC7280/20211221-004818 git checkout fec640fab5ec498e79475ecd4b15bc95035a76b1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash drivers/clk/qcom/
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
>> drivers/clk/qcom/lpassaudiocc-sc7280.c:39:9: warning: this decimal constant is unsigned only in ISO C90
39 | { 595200000, 3600000000, 0 },
| ^
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/of.h:14,
from include/linux/clk-provider.h:9,
from drivers/clk/qcom/lpassaudiocc-sc7280.c:6:
drivers/clk/qcom/lpassaudiocc-sc7280.c: In function 'lpass_audio_cc_sc7280_probe':
include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:82:25: note: in expansion of macro 'NULL'
82 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpassaudiocc-sc7280.c:740:9: note: in expansion of macro 'pm_clk_suspend'
740 | pm_clk_suspend(&pdev->dev);
| ^~~~~~~~~~~~~~
drivers/clk/qcom/lpassaudiocc-sc7280.c: In function 'lpass_aon_cc_sc7280_probe':
include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:82:25: note: in expansion of macro 'NULL'
82 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpassaudiocc-sc7280.c:798:9: note: in expansion of macro 'pm_clk_suspend'
798 | pm_clk_suspend(&pdev->dev);
| ^~~~~~~~~~~~~~vim +39 drivers/clk/qcom/lpassaudiocc-sc7280.c
37
38 static const struct pll_vco zonda_vco[] = {
> 39 { 595200000, 3600000000, 0 },
40 };
41 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Stephen Boyd
maintainerRe: [PATCH v2 5/5] clk: qcom: lpass: Add support for LPASS clock controller for SC7280
Quoting kernel test robot (2021-12-20 17:02:06)
Quoted 25 lines
Hi Taniya,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next linus/master v5.16-rc6 next-20211220] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]url: https://github.com/0day-ci/linux/commits/Taniya-Das/Add-support-for-LPASS-Core-and-Audio-Clock-for-SC7280/20211221-004818 base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20211221/202112210805.wI87zJw0-lkp(a)intel.com/config) compiler: hppa-linux-gcc (GCC) 11.2.0reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/fec640fab5ec498e79475ecd4b15bc95035a76b1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Taniya-Das/Add-support-for-LPASS-Core-and-Audio-Clock-for-SC7280/20211221-004818 git checkoutfec640fab5ec498e79475ecd4b15bc95035a76b1
# save the config file to linux build tree
mkdirbuild_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bashdrivers/clk/qcom/
Quoted 7 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/clk/qcom/lpassaudiocc-sc7280.c:39:9: warning: this decimal constant is unsigned only in ISO C9039 | { 595200000, 3600000000, 0 },
This should be easy to fix.
Quoted 11 lines
| ^
In file included frominclude/uapi/linux/posix_types.h:5,from include/uapi/linux/types.h:14, from include/linux/types.h:6, from include/linux/of.h:14, from include/linux/clk-provider.h:9, from drivers/clk/qcom/lpassaudiocc-sc7280.c:6: drivers/clk/qcom/lpassaudiocc-sc7280.c: In function 'lpass_audio_cc_sc7280_probe': include/linux/stddef.h:8:14: error: called object is not a function or function pointer 8 | #define NULL ((void *)0) | ^
Quoted 2 lines
include/linux/pm_clock.h:82:25: note: in expansion of macro 'NULL'
82 | #definepm_clk_suspendNULL
This one looks like the driver needs some #ifdef CONFIG_PM somewhere.
Quoted 27 lines
| ^~~~
drivers/clk/qcom/lpassaudiocc-sc7280.c:740:9: note: in expansion of macro 'pm_clk_suspend'740 | pm_clk_suspend(&pdev->dev); | ^~~~~~~~~~~~~~ drivers/clk/qcom/lpassaudiocc-sc7280.c: In function 'lpass_aon_cc_sc7280_probe': include/linux/stddef.h:8:14: error: called object is not a function or function pointer 8 | #define NULL ((void *)0) | ^ include/linux/pm_clock.h:82:25: note: in expansion of macro 'NULL' 82 | #define pm_clk_suspend NULL | ^~~~ drivers/clk/qcom/lpassaudiocc-sc7280.c:798:9: note: in expansion of macro 'pm_clk_suspend' 798 | pm_clk_suspend(&pdev->dev); | ^~~~~~~~~~~~~~vim +39
drivers/clk/qcom/lpassaudiocc-sc7280.c37 38 static const struct pll_vco zonda_vco[] = {Quoted 1 line
39 { 595200000, 3600000000, 0 },
40 }; 41---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build botRe: [PATCH v2 5/5] clk: qcom: lpass: Add support for LPASS clock controller for SC7280
In reply to Taniya DasThank you for the patch! Yet something to improve:
Hi Taniya,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on clk/clk-next]
[also build test ERROR on robh/for-next linus/master v5.16-rc7 next-20211224] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Taniya-Das/Add-support-for-LPASS-Core-and-Audio-Clock-for-SC7280/20211221-004818 base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20211231/202112311037.baApS5Qa-lkp(a)intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/fec640fab5ec498e79475ecd4b15bc95035a76b1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Taniya-Das/Add-support-for-LPASS-Core-and-Audio-Clock-for-SC7280/20211221-004818 git checkout fec640fab5ec498e79475ecd4b15bc95035a76b1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/clk/qcom/
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/of.h:14,
from include/linux/clk-provider.h:9,
from drivers/clk/qcom/lpassaudiocc-sc7280.c:6:
drivers/clk/qcom/lpassaudiocc-sc7280.c: In function 'lpass_audio_cc_sc7280_probe':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:82:25: note: in expansion of macro 'NULL'
82 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpassaudiocc-sc7280.c:740:9: note: in expansion of macro 'pm_clk_suspend'
740 | pm_clk_suspend(&pdev->dev);
| ^~~~~~~~~~~~~~
drivers/clk/qcom/lpassaudiocc-sc7280.c: In function 'lpass_aon_cc_sc7280_probe':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:82:25: note: in expansion of macro 'NULL'
82 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpassaudiocc-sc7280.c:798:9: note: in expansion of macro 'pm_clk_suspend'
798 | pm_clk_suspend(&pdev->dev);
| ^~~~~~~~~~~~~~vim +8 include/linux/stddef.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 6 ^1da177e4c3f41 Linus Torvalds 2005-04-16 7 #undef NULL ^1da177e4c3f41 Linus Torvalds 2005-04-16 @8 #define NULL ((void *)0)
6e218287432472 Richard Knutsson 2006-09-30 9
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Stephen Boyd
maintainerRe: [PATCH v2 5/5] clk: qcom: lpass: Add support for LPASS clock controller for SC7280
In reply to Taniya DasQuoting Taniya Das (2021-12-20 08:43:58)
Quoted 11 lines
drivers/clk/qcom/lpasscorecc-sc7280.c new file +5
-0@@ -0,0 +1,433 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* +* Copyright (c) 2021, The Linux Foundation. All rights reserved. +*/ +
[...]
drivers/clk/qcom/lpasscorecc-sc7280.c line 331
Quoted 10 lines
drivers/clk/qcom/lpasscorecc-sc7280.c new file +10
-0+ [LPASS_CORE_CC_EXT_IF0_CLK_SRC] = &lpass_core_cc_ext_if0_clk_src.clkr, + [LPASS_CORE_CC_EXT_IF0_IBIT_CLK] = &lpass_core_cc_ext_if0_ibit_clk.clkr, + [LPASS_CORE_CC_EXT_IF1_CLK_SRC] = &lpass_core_cc_ext_if1_clk_src.clkr, + [LPASS_CORE_CC_EXT_IF1_IBIT_CLK] = &lpass_core_cc_ext_if1_ibit_clk.clkr, + [LPASS_CORE_CC_LPM_CORE_CLK] = &lpass_core_cc_lpm_core_clk.clkr, + [LPASS_CORE_CC_LPM_MEM0_CORE_CLK] = &lpass_core_cc_lpm_mem0_core_clk.clkr, + [LPASS_CORE_CC_SYSNOC_MPORT_CORE_CLK] = &lpass_core_cc_sysnoc_mport_core_clk.clkr, +}; + +static struct regmap_config lpass_core_cc_sc7280_regmap_config = {
Can this be const?
drivers/clk/qcom/lpasscorecc-sc7280.c
Quoted 4 lines
drivers/clk/qcom/lpasscorecc-sc7280.c new file +4
-0+ .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true,
Any .max_register?
Quoted 44 lines
drivers/clk/qcom/lpasscorecc-sc7280.c new file +44
-0+}; + +static const struct qcom_cc_desc lpass_core_cc_sc7280_desc = { + .config = &lpass_core_cc_sc7280_regmap_config, + .clks = lpass_core_cc_sc7280_clocks, + .num_clks =ARRAY_SIZE (lpass_core_cc_sc7280_clocks), +}; + +static const struct of_device_id lpass_core_cc_sc7280_match_table[] = { + { .compatible ="qcom,sc7280-lpasscorecc" }, + { } +}; +MODULE_DEVICE_TABLE (of, lpass_core_cc_sc7280_match_table); + +static struct gdsc *lpass_core_hm_sc7280_gdscs[] = { + [LPASS_CORE_CC_LPASS_CORE_HM_GDSC ] = &lpass_core_cc_lpass_core_hm_gdsc, +}; + +static const struct qcom_cc_desc lpass_core_hm_sc7280_desc = { + .config = &lpass_core_cc_sc7280_regmap_config, + .gdscs = lpass_core_hm_sc7280_gdscs, + .num_gdscs =ARRAY_SIZE (lpass_core_hm_sc7280_gdscs), +}; + +static int lpass_core_cc_sc7280_probe (struct platform_device *pdev) +{ +struct regmap *regmap; + + regmap =qcom_cc_map (pdev, &lpass_core_cc_sc7280_desc); +if (IS_ERR (regmap)) +return PTR_ERR (regmap); + +clk_lucid_pll_configure (&lpass_core_cc_dig_pll, regmap, &lpass_core_cc_dig_pll_config); + +return qcom_cc_really_probe (pdev, &lpass_core_cc_sc7280_desc, regmap); +} + +static struct platform_driver lpass_core_cc_sc7280_driver = { + .probe = lpass_core_cc_sc7280_probe, + .driver = { + .name ="lpass_core_cc-sc7280" , + .of_match_table = lpass_core_cc_sc7280_match_table, + }, +};
drivers/clk/qcom/lpasscorecc-sc7280.c line 389
Quoted 10 lines
drivers/clk/qcom/lpasscorecc-sc7280.c new file +10
-0+ +static int lpass_hm_core_probe (struct platform_device *pdev) +{ +const struct qcom_cc_desc *desc; +int ret; + + lpass_core_cc_sc7280_regmap_config.name ="lpass_hm_core" ; + desc = &lpass_core_hm_sc7280_desc; + + ret =qcom_cc_probe_by_index (pdev,0 , desc);
Why don't we use the desc directly here?
drivers/clk/qcom/lpasscorecc-sc7280.c line 396
Quoted 7 lines
drivers/clk/qcom/lpasscorecc-sc7280.c new file +7
-0+if (ret) + goto destroy_clk; + +return 0 ; + +destroy_clk: +return ret;
This can be simplified and the goto removed.
Quoted 2 lines
drivers/clk/qcom/lpasscorecc-sc7280.c new file +2
-0+} +