Re: [PATCH v2 2/5] clk: qcom: Add IPQ4019 Global Clock Controller support
Hi Varadarajan, [auto build test WARNING on: robh/for-next] [also build test WARNING on: v4.4-rc1 next-20151116] url: https://github.com/0day-ci/linux/commits/Matthew-McClintock/pinctrl-qcom-ipq4019-Add-IPQ4019-pinctrl-support/20151117-050512 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next config: x86_64-allmodconfig (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/clk/qcom/gcc-ipq4019.c: In function 'gcc_ipq4019_probe': >> drivers/clk/qcom/gcc-ipq4019.c:1329:17: warning: unused variable 'dev' >> [-Wunused-variable] struct device *dev = >dev; ^ vim +/dev +1329 drivers/clk/qcom/gcc-ipq4019.c 1313 static const struct qcom_cc_desc gcc_ipq4019_desc = { 1314 .config = _ipq4019_regmap_config, 1315 .clks = gcc_ipq4019_clocks, 1316 .num_clks = ARRAY_SIZE(gcc_ipq4019_clocks), 1317 .resets = gcc_ipq4019_resets, 1318 .num_resets = ARRAY_SIZE(gcc_ipq4019_resets), 1319 }; 1320 1321 static const struct of_device_id gcc_ipq4019_match_table[] = { 1322 { .compatible = "qcom,gcc-ipq4019" }, 1323 { } 1324 }; 1325 MODULE_DEVICE_TABLE(of, gcc_ipq4019_match_table); 1326 1327 static int gcc_ipq4019_probe(struct platform_device *pdev) 1328 { > 1329 struct device *dev = >dev; 1330 1331 1332 return qcom_cc_probe(pdev, _ipq4019_desc); 1333 } 1334 1335 static struct platform_driver gcc_ipq4019_driver = { 1336 .probe = gcc_ipq4019_probe, 1337 .driver = { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH v2 2/5] clk: qcom: Add IPQ4019 Global Clock Controller support
From: Varadarajan Narayanan This patch adds support for the global clock controller found on the IPQ4019 based devices. This includes UART, I2C, SPI etc. Signed-off-by: Pradeep Banavathi Signed-off-by: Senthilkumar N L Signed-off-by: Varadarajan Narayanan Signed-off-by: Matthew McClintock --- v2 - drop calls qcom_cc_remove, gcc_ipq4019_remove - move defines into clk structs - remove src,cfg in struct initializations - make hex values lowercase - clean up MODULE_ALIAS and MODULE_DESCRIPTION - change tabs after define to spacein dt include files - remove extra AUDIO_BLK_ARES define - remove unneeded of_match_device from gcc_ipq4019_probe - move sleep_clk and xo to soc and board level dts - drop all the (not required) fixed-clocks for now - combine reset dts include files into one overall dts include .../devicetree/bindings/clock/qcom,gcc.txt |1 + drivers/clk/qcom/Kconfig |9 + drivers/clk/qcom/Makefile |1 + drivers/clk/qcom/gcc-ipq4019.c | 1358 include/dt-bindings/clock/qcom,gcc-ipq4019.h | 158 +++ 5 files changed, 1527 insertions(+) create mode 100644 drivers/clk/qcom/gcc-ipq4019.c create mode 100644 include/dt-bindings/clock/qcom,gcc-ipq4019.h diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.txt b/Documentation/devicetree/bindings/clock/qcom,gcc.txt index 152dfaa..4c98ab3 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.txt @@ -7,6 +7,7 @@ Required properties : "qcom,gcc-apq8064" "qcom,gcc-apq8084" "qcom,gcc-ipq8064" + "qcom,gcc-ipq4019" "qcom,gcc-msm8660" "qcom,gcc-msm8916" "qcom,gcc-msm8960" diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index ee4c83a..085fc17 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -28,6 +28,15 @@ config APQ_MMCC_8084 Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc. +config IPQ_GCC_4019 + tristate "IPQ4019 Global Clock Controller" + depends on COMMON_CLK_QCOM + help + Support for the global clock controller on ipq4019 devices. + Say Y if you want to use peripheral devices such as UART, SPI, + i2c, USB, SD/eMMC, etc. + + config IPQ_GCC_806X tristate "IPQ806x Global Clock Controller" depends on COMMON_CLK_QCOM diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index fe62523..c88d92f 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -13,6 +13,7 @@ clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o obj-$(CONFIG_APQ_GCC_8084) += gcc-apq8084.o obj-$(CONFIG_APQ_MMCC_8084) += mmcc-apq8084.o +obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o diff --git a/drivers/clk/qcom/gcc-ipq4019.c b/drivers/clk/qcom/gcc-ipq4019.c new file mode 100644 index 000..a2bbb91 --- /dev/null +++ b/drivers/clk/qcom/gcc-ipq4019.c @@ -0,0 +1,1358 @@ +/* + * Copyright (c) 2015 The Linux Foundation. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "common.h" +#include "clk-regmap.h" +#include "clk-rcg.h" +#include "clk-branch.h" +#include "reset.h" + +enum { + P_XO, + P_FEPLL200, + P_FEPLL500, + P_DDRPLL, + P_FEPLLWCSS2G, + P_FEPLLWCSS5G, + P_FEPLL125DLY, + P_DDRPLLAPSS, +}; + +static struct parent_map gcc_xo_200_500_map[] = { + { P_XO, 0 }, + { P_FEPLL200, 1 }, + { P_FEPLL500, 2 }, +}; + +static const char * const gcc_xo_200_500[] = { + "xo", + "fepll200", + "fepll500", +}; + +static struct parent_map gcc_xo_200_map[] = { + { P_XO, 0 }, + { P_FEPLL200, 1 }, +}; + +static const char * const gcc_xo_200[] = { + "xo", + "fepll200", +}; + +static struct parent_map gcc_xo_200_spi_map[] = { + { P_XO, 0 }, + { P_FEPLL200, 2 }, +}; + +static const char * const gcc_xo_200_spi[] = { + "xo", + "fepll200", +}; + +static struct parent_map gcc_xo_sdcc1_500_map[] = { + { P_XO,
Re: [PATCH v2 2/5] clk: qcom: Add IPQ4019 Global Clock Controller support
Hi Varadarajan, [auto build test WARNING on: robh/for-next] [also build test WARNING on: v4.4-rc1 next-20151116] url: https://github.com/0day-ci/linux/commits/Matthew-McClintock/pinctrl-qcom-ipq4019-Add-IPQ4019-pinctrl-support/20151117-050512 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next config: x86_64-allmodconfig (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/clk/qcom/gcc-ipq4019.c: In function 'gcc_ipq4019_probe': >> drivers/clk/qcom/gcc-ipq4019.c:1329:17: warning: unused variable 'dev' >> [-Wunused-variable] struct device *dev = >dev; ^ vim +/dev +1329 drivers/clk/qcom/gcc-ipq4019.c 1313 static const struct qcom_cc_desc gcc_ipq4019_desc = { 1314 .config = _ipq4019_regmap_config, 1315 .clks = gcc_ipq4019_clocks, 1316 .num_clks = ARRAY_SIZE(gcc_ipq4019_clocks), 1317 .resets = gcc_ipq4019_resets, 1318 .num_resets = ARRAY_SIZE(gcc_ipq4019_resets), 1319 }; 1320 1321 static const struct of_device_id gcc_ipq4019_match_table[] = { 1322 { .compatible = "qcom,gcc-ipq4019" }, 1323 { } 1324 }; 1325 MODULE_DEVICE_TABLE(of, gcc_ipq4019_match_table); 1326 1327 static int gcc_ipq4019_probe(struct platform_device *pdev) 1328 { > 1329 struct device *dev = >dev; 1330 1331 1332 return qcom_cc_probe(pdev, _ipq4019_desc); 1333 } 1334 1335 static struct platform_driver gcc_ipq4019_driver = { 1336 .probe = gcc_ipq4019_probe, 1337 .driver = { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH v2 2/5] clk: qcom: Add IPQ4019 Global Clock Controller support
From: Varadarajan NarayananThis patch adds support for the global clock controller found on the IPQ4019 based devices. This includes UART, I2C, SPI etc. Signed-off-by: Pradeep Banavathi Signed-off-by: Senthilkumar N L Signed-off-by: Varadarajan Narayanan Signed-off-by: Matthew McClintock --- v2 - drop calls qcom_cc_remove, gcc_ipq4019_remove - move defines into clk structs - remove src,cfg in struct initializations - make hex values lowercase - clean up MODULE_ALIAS and MODULE_DESCRIPTION - change tabs after define to spacein dt include files - remove extra AUDIO_BLK_ARES define - remove unneeded of_match_device from gcc_ipq4019_probe - move sleep_clk and xo to soc and board level dts - drop all the (not required) fixed-clocks for now - combine reset dts include files into one overall dts include .../devicetree/bindings/clock/qcom,gcc.txt |1 + drivers/clk/qcom/Kconfig |9 + drivers/clk/qcom/Makefile |1 + drivers/clk/qcom/gcc-ipq4019.c | 1358 include/dt-bindings/clock/qcom,gcc-ipq4019.h | 158 +++ 5 files changed, 1527 insertions(+) create mode 100644 drivers/clk/qcom/gcc-ipq4019.c create mode 100644 include/dt-bindings/clock/qcom,gcc-ipq4019.h diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.txt b/Documentation/devicetree/bindings/clock/qcom,gcc.txt index 152dfaa..4c98ab3 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.txt @@ -7,6 +7,7 @@ Required properties : "qcom,gcc-apq8064" "qcom,gcc-apq8084" "qcom,gcc-ipq8064" + "qcom,gcc-ipq4019" "qcom,gcc-msm8660" "qcom,gcc-msm8916" "qcom,gcc-msm8960" diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index ee4c83a..085fc17 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -28,6 +28,15 @@ config APQ_MMCC_8084 Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc. +config IPQ_GCC_4019 + tristate "IPQ4019 Global Clock Controller" + depends on COMMON_CLK_QCOM + help + Support for the global clock controller on ipq4019 devices. + Say Y if you want to use peripheral devices such as UART, SPI, + i2c, USB, SD/eMMC, etc. + + config IPQ_GCC_806X tristate "IPQ806x Global Clock Controller" depends on COMMON_CLK_QCOM diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index fe62523..c88d92f 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -13,6 +13,7 @@ clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o obj-$(CONFIG_APQ_GCC_8084) += gcc-apq8084.o obj-$(CONFIG_APQ_MMCC_8084) += mmcc-apq8084.o +obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o diff --git a/drivers/clk/qcom/gcc-ipq4019.c b/drivers/clk/qcom/gcc-ipq4019.c new file mode 100644 index 000..a2bbb91 --- /dev/null +++ b/drivers/clk/qcom/gcc-ipq4019.c @@ -0,0 +1,1358 @@ +/* + * Copyright (c) 2015 The Linux Foundation. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "common.h" +#include "clk-regmap.h" +#include "clk-rcg.h" +#include "clk-branch.h" +#include "reset.h" + +enum { + P_XO, + P_FEPLL200, + P_FEPLL500, + P_DDRPLL, + P_FEPLLWCSS2G, + P_FEPLLWCSS5G, + P_FEPLL125DLY, + P_DDRPLLAPSS, +}; + +static struct parent_map gcc_xo_200_500_map[] = { + { P_XO, 0 }, + { P_FEPLL200, 1 }, + { P_FEPLL500, 2 }, +}; + +static const char * const gcc_xo_200_500[] = { + "xo", + "fepll200", + "fepll500", +}; + +static struct parent_map gcc_xo_200_map[] = { + { P_XO, 0 }, + { P_FEPLL200, 1 }, +}; + +static const char * const gcc_xo_200[] = { + "xo", + "fepll200", +}; + +static struct parent_map gcc_xo_200_spi_map[] = { + { P_XO, 0 }, + { P_FEPLL200, 2 }, +}; + +static const char * const