diff for duplicates of <017101d3edaf$68653800$392fa800$@codeaurora.org> diff --git a/a/1.txt b/N1/1.txt index 5fbf8c7..130b591 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -12,26 +12,33 @@ > <david.brown@linaro.org>; catalin.marinas@arm.com; > will.deacon@arm.com; Rafael J. Wysocki <rjw@rjwysocki.net>; linux- > clk@vger.kernel.org; devicetree@vger.kernel.org; LKML <linux- -> kernel@vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; linux- +> kernel@vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; = +linux- > arm-msm@vger.kernel.org; linux-soc@vger.kernel.org; lakml <linux-arm- > kernel@lists.infradead.org>; Rajendra Nayak <rnayak@codeaurora.org>; > nicolas.dechesne@linaro.org; celster@codeaurora.org; > tfinkel@codeaurora.org > Subject: Re: [PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver -> -> On Tue, May 15, 2018 at 12:13 PM, Ilia Lin <ilialin@codeaurora.org> wrote: +>=20 +> On Tue, May 15, 2018 at 12:13 PM, Ilia Lin <ilialin@codeaurora.org> = +wrote: > > In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO -> > processors, the CPU ferequencies subset and voltage value of each OPP +> > processors, the CPU ferequencies subset and voltage value of each = +OPP > > varies -> +>=20 > s/ferequencies/frequency -> -> > based on the silicon variant in use. Qualcomm Process Voltage Scaling -> > Tables defines the voltage and frequency value based on the msm-id in +>=20 +> > based on the silicon variant in use. Qualcomm Process Voltage = +Scaling +> > Tables defines the voltage and frequency value based on the msm-id = +in > > SMEM and speedbin blown in the efuse combination. -> > The qcom-cpufreq-kryo driver reads the msm-id and efuse value from the +> > The qcom-cpufreq-kryo driver reads the msm-id and efuse value from = +the > > SoC to provide the OPP framework with required information. -> > This is used to determine the voltage and frequency value for each OPP +> > This is used to determine the voltage and frequency value for each = +OPP > > of > > operating-points-v2 table when it is parsed by the OPP framework. > > @@ -45,7 +52,8 @@ > > 4 files changed, 165 insertions(+) > > create mode 100644 drivers/cpufreq/qcom-cpufreq-kryo.c > > -> > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm +> > diff --git a/drivers/cpufreq/Kconfig.arm = +b/drivers/cpufreq/Kconfig.arm > > index de55c7d..5c16f05 100644 > > --- a/drivers/cpufreq/Kconfig.arm > > +++ b/drivers/cpufreq/Kconfig.arm @@ -55,13 +63,14 @@ > > > > +config ARM_QCOM_CPUFREQ_KRYO > > + bool "Qualcomm Technologies, Inc. Kryo based CPUFreq" -> -> "Qualcomm Kryo CPUFreq support" should be enough. Kconfig isn't the place +>=20 +> "Qualcomm Kryo CPUFreq support" should be enough. Kconfig isn't the = +place > for Trademark compliance :-) This is mandatory requirement of the QTIs legal. -> +>=20 > > + depends on QCOM_QFPROM > > + depends on QCOM_SMEM > > + select PM_OPP @@ -74,19 +83,20 @@ This is mandatory requirement of the QTIs legal. > > config ARM_S3C_CPUFREQ > > bool > > help -> > diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index +> > diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile = +index > > 8d24ade..fb4a2ec 100644 > > --- a/drivers/cpufreq/Makefile > > +++ b/drivers/cpufreq/Makefile -> > @@ -65,6 +65,7 @@ obj-$(CONFIG_MACH_MVEBU_V7) += mvebu- +> > @@ -65,6 +65,7 @@ obj-$(CONFIG_MACH_MVEBU_V7) +=3D mvebu- > cpufreq.o -> > obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o -> > obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) += pxa2xx-cpufreq.o -> > obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o -> > +obj-$(CONFIG_ARM_QCOM_CPUFREQ_KRYO) += qcom-cpufreq-kryo.o -> > obj-$(CONFIG_ARM_S3C2410_CPUFREQ) += s3c2410-cpufreq.o -> > obj-$(CONFIG_ARM_S3C2412_CPUFREQ) += s3c2412-cpufreq.o -> > obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o +> > obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) +=3D omap-cpufreq.o +> > obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) +=3D pxa2xx-cpufreq.o +> > obj-$(CONFIG_PXA3xx) +=3D pxa3xx-cpufreq.o +> > +obj-$(CONFIG_ARM_QCOM_CPUFREQ_KRYO) +=3D qcom-cpufreq-kryo.o +> > obj-$(CONFIG_ARM_S3C2410_CPUFREQ) +=3D s3c2410-cpufreq.o +> > obj-$(CONFIG_ARM_S3C2412_CPUFREQ) +=3D s3c2412-cpufreq.o +> > obj-$(CONFIG_ARM_S3C2416_CPUFREQ) +=3D s3c2416-cpufreq.o > > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c > > b/drivers/cpufreq/cpufreq-dt-platdev.c > > index 3b585e4..77d6ab8 100644 @@ -94,13 +104,13 @@ This is mandatory requirement of the QTIs legal. > > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c > > @@ -118,6 +118,9 @@ > > -> > { .compatible = "nvidia,tegra124", }, +> > { .compatible =3D "nvidia,tegra124", }, > > -> > + { .compatible = "qcom,apq8096", }, -> > + { .compatible = "qcom,msm8996", }, +> > + { .compatible =3D "qcom,apq8096", }, +> > + { .compatible =3D "qcom,msm8996", }, > > + -> > { .compatible = "st,stih407", }, -> > { .compatible = "st,stih410", }, +> > { .compatible =3D "st,stih407", }, +> > { .compatible =3D "st,stih410", }, > > > > diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c > > b/drivers/cpufreq/qcom-cpufreq-kryo.c @@ -111,14 +121,15 @@ This is mandatory requirement of the QTIs legal. > > @@ -0,0 +1,150 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* -> +>=20 > Stray space here. -> +>=20 > > + * Copyright (c) 2018, The Linux Foundation. All rights reserved. > > + * > > + * This program is free software; you can redistribute it and/or > > + modify -> > + * it under the terms of the GNU General Public License version 2 and +> > + * it under the terms of the GNU General Public License version 2 = +and > > + * only version 2 as published by the Free Software Foundation. > > + * > > + * This program is distributed in the hope that it will be useful, @@ -144,10 +155,10 @@ This is mandatory requirement of the QTIs legal. > > +#define GOLD_LEAD 2 > > + > > +enum _msm_id { -> > + MSM8996V3 = 0xF6ul, -> > + APQ8096V3 = 0x123ul, -> > + MSM8996SG = 0x131ul, -> > + APQ8096SG = 0x138ul, +> > + MSM8996V3 =3D 0xF6ul, +> > + APQ8096V3 =3D 0x123ul, +> > + MSM8996SG =3D 0x131ul, +> > + APQ8096SG =3D 0x138ul, > > +}; > > + > > +enum _msm8996_version { @@ -163,22 +174,23 @@ This is mandatory requirement of the QTIs legal. > > + u32 *msm_id; > > + enum _msm8996_version version; > > + -> > + msm_id = qcom_smem_get(QCOM_SMEM_HOST_ANY, +> > + msm_id =3D qcom_smem_get(QCOM_SMEM_HOST_ANY, > MSM_ID_SMEM, &len); -> > + /* The first 4 bytes are format, next to them is the actual msm-id */ +> > + /* The first 4 bytes are format, next to them is the actual = +msm-id */ > > + msm_id++; > > + > > + switch ((enum _msm_id)*msm_id) { > > + case MSM8996V3: > > + case APQ8096V3: -> > + version = MSM8996_V3; +> > + version =3D MSM8996_V3; > > + break; > > + case MSM8996SG: > > + case APQ8096SG: -> > + version = MSM8996_SG; +> > + version =3D MSM8996_SG; > > + break; > > + default: -> > + version = NUM_OF_MSM8996_VERSIONS; +> > + version =3D NUM_OF_MSM8996_VERSIONS; > > + } > > + > > + return version; @@ -194,123 +206,131 @@ This is mandatory requirement of the QTIs legal. > > + struct device *cpu_dev; > > + struct device_node *np; > > + struct nvmem_cell *speedbin_nvmem; -> > + struct opp_table *opp_temp = NULL; +> > + struct opp_table *opp_temp =3D NULL; > > + -> > + cpu_dev = get_cpu_device(SILVER_LEAD); +> > + cpu_dev =3D get_cpu_device(SILVER_LEAD); > > + if (IS_ERR_OR_NULL(cpu_dev)) > > + return PTR_ERR(cpu_dev); > > + -> > + msm8996_version = qcom_cpufreq_kryo_get_msm_id(); -> > + if (NUM_OF_MSM8996_VERSIONS == msm8996_version) { +> > + msm8996_version =3D qcom_cpufreq_kryo_get_msm_id(); +> > + if (NUM_OF_MSM8996_VERSIONS =3D=3D msm8996_version) { > > + dev_err(cpu_dev, "Not Snapdragon 820/821!"); > > + return -ENODEV; > > + } -> +>=20 > Use tab instead of spaces. -> +>=20 > > + -> > + np = dev_pm_opp_of_get_opp_desc_node(cpu_dev); +> > + np =3D dev_pm_opp_of_get_opp_desc_node(cpu_dev); > > + if (IS_ERR_OR_NULL(np)) > > + return PTR_ERR(np); > > + -> > + if (!of_device_is_compatible(np, "operating-points-v2-kryo-cpu")) { -> > + ret = -ENOENT; +> > + if (!of_device_is_compatible(np, = +"operating-points-v2-kryo-cpu")) { +> > + ret =3D -ENOENT; > > + goto free_np; > > + } > > + -> > + speedbin_nvmem = of_nvmem_cell_get(np, NULL); +> > + speedbin_nvmem =3D of_nvmem_cell_get(np, NULL); > > + if (IS_ERR(speedbin_nvmem)) { -> > + ret = PTR_ERR(speedbin_nvmem); -> > + dev_err(cpu_dev, "Could not get nvmem cell: %d\n", ret); +> > + ret =3D PTR_ERR(speedbin_nvmem); +> > + dev_err(cpu_dev, "Could not get nvmem cell: %d\n", = +ret); > > + goto free_np; > > + } > > + -> > + speedbin = nvmem_cell_read(speedbin_nvmem, &len); +> > + speedbin =3D nvmem_cell_read(speedbin_nvmem, &len); > > + > > + switch (msm8996_version) { > > + case MSM8996_V3: -> > + versions = 1 << (unsigned int)(*speedbin); +> > + versions =3D 1 << (unsigned int)(*speedbin); > > + break; > > + case MSM8996_SG: -> > + versions = 1 << ((unsigned int)(*speedbin) + 4); +> > + versions =3D 1 << ((unsigned int)(*speedbin) + 4); > > + break; > > + default: > > + BUG(); > > + break; > > + } > > + -> > + ret = PTR_ERR_OR_ZERO(opp_temp = -> > + dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); +> > + ret =3D PTR_ERR_OR_ZERO(opp_temp =3D +> > + = +dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); > > + if (0 > ret) -> -> Any particular reason to prefer this over (ret < 0) that is generally used? I've -> seen it used to avoid the == vs. = typos, but not for other comparisons. -> +>=20 +> Any particular reason to prefer this over (ret < 0) that is generally = +used? I've +> seen it used to avoid the =3D=3D vs. =3D typos, but not for other = +comparisons. +>=20 > Suggest sticking to what is commonly used i.e. ret < 0. -> +>=20 > > + goto free_opp; > > + -> > + cpu_dev = get_cpu_device(GOLD_LEAD); -> +> > + cpu_dev =3D get_cpu_device(GOLD_LEAD); +>=20 > Error check cpu_dev here? -> -> > + ret = PTR_ERR_OR_ZERO(opp_temp = -> > + dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); +>=20 +> > + ret =3D PTR_ERR_OR_ZERO(opp_temp =3D +> > + = +dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); > > + if (0 > ret) > > + goto free_opp; > > + > > + -> > + ret = PTR_ERR_OR_ZERO(platform_device_register_simple("cpufreq- +> > + ret =3D = +PTR_ERR_OR_ZERO(platform_device_register_simple("cpufreq- > dt", > > + -1, > > + NULL, 0)); > > + -> > + if (0 == ret) +> > + if (0 =3D=3D ret) > > + return 0; > > + > > +free_opp: > > + dev_pm_opp_put_supported_hw(opp_temp); -> +>=20 > This is not needed because dev_pm_opp_set_supported_hw will free -> memory in case of failure. This call in only needed in case of a successful get. -> +> memory in case of failure. This call in only needed in case of a = +successful get. +>=20 > > + > > +free_np: > > + of_node_put(np); > > + return ret; -> -> +>=20 +>=20 > Suggest something like this instead: -> +>=20 > . > . -> -> opp_temp = dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); +>=20 +> opp_temp =3D dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); > if (IS_ERR(opp_temp)) { > dev_err(cpu_dev, "Failed to set supported hardware\n"); -> ret = PTR_ERR(opp_temp); +> ret =3D PTR_ERR(opp_temp); > goto free_np; > } -> -> cpu_dev = get_cpu_device(GOLD_LEAD); -> -> opp_temp = dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); +>=20 +> cpu_dev =3D get_cpu_device(GOLD_LEAD); +>=20 +> opp_temp =3D dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); > if (IS_ERR(opp_temp)) { > dev_err(cpu_dev, "Failed to set supported hardware\n"); -> ret = PTR_ERR(opp_temp); +> ret =3D PTR_ERR(opp_temp); > goto free_np; > } -> -> ret = platform_device_register_simple("cpufreq-dt", -1, NULL, 0)); -> +>=20 +> ret =3D platform_device_register_simple("cpufreq-dt", -1, NULL, 0)); +>=20 > if (!IS_ERR_OR_NULL(ret)) > goto out; -> +>=20 > free_np: > of_node_put(np); > out: > return ret; -> +>=20 > > +} > > +late_initcall(qcom_cpufreq_kryo_driver_init); > > + diff --git a/a/content_digest b/N1/content_digest index feb54b1..088bf48 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -6,28 +6,29 @@ "Date\0Thu, 17 May 2018 10:19:27 +0300\0" "To\0'Amit Kucheria' <amit.kucheria@linaro.org>\0" "Cc\0'Michael Turquette' <mturquette@baylibre.com>" - sboyd@kernel.org + <sboyd@kernel.org> 'Rob Herring' <robh@kernel.org> 'Mark Rutland' <mark.rutland@arm.com> 'Viresh Kumar' <viresh.kumar@linaro.org> - nm@ti.com - lgirdwood@gmail.com - broonie@kernel.org + <nm@ti.com> + <lgirdwood@gmail.com> + <broonie@kernel.org> 'Andy Gross' <andy.gross@linaro.org> 'David Brown' <david.brown@linaro.org> - catalin.marinas@arm.com - will.deacon@arm.com + <catalin.marinas@arm.com> + <will.deacon@arm.com> 'Rafael J. Wysocki' <rjw@rjwysocki.net> - linux-clk@vger.kernel.org - devicetree@vger.kernel.org + <linux-clk@vger.kernel.org> + <devicetree@vger.kernel.org> 'LKML' <linux-kernel@vger.kernel.org> 'Linux PM list' <linux-pm@vger.kernel.org> - linux-arm-msm@vger.kernel.org - linux-soc@vger.kernel.org + <linux-arm-msm@vger.kernel.org> + <linux-soc@vger.kernel.org> 'lakml' <linux-arm-kernel@lists.infradead.org> 'Rajendra Nayak' <rnayak@codeaurora.org> - nicolas.dechesne@linaro.org - " celster@codeaurora.o\0" + <nicolas.dechesne@linaro.org> + <celster@codeaurora.org> + " <tfinkel@codeaurora.org>\0" "\00:1\0" "b\0" "\n" @@ -44,26 +45,33 @@ "> <david.brown@linaro.org>; catalin.marinas@arm.com;\n" "> will.deacon@arm.com; Rafael J. Wysocki <rjw@rjwysocki.net>; linux-\n" "> clk@vger.kernel.org; devicetree@vger.kernel.org; LKML <linux-\n" - "> kernel@vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; linux-\n" + "> kernel@vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; =\n" + "linux-\n" "> arm-msm@vger.kernel.org; linux-soc@vger.kernel.org; lakml <linux-arm-\n" "> kernel@lists.infradead.org>; Rajendra Nayak <rnayak@codeaurora.org>;\n" "> nicolas.dechesne@linaro.org; celster@codeaurora.org;\n" "> tfinkel@codeaurora.org\n" "> Subject: Re: [PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver\n" - "> \n" - "> On Tue, May 15, 2018 at 12:13 PM, Ilia Lin <ilialin@codeaurora.org> wrote:\n" + ">=20\n" + "> On Tue, May 15, 2018 at 12:13 PM, Ilia Lin <ilialin@codeaurora.org> =\n" + "wrote:\n" "> > In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO\n" - "> > processors, the CPU ferequencies subset and voltage value of each OPP\n" + "> > processors, the CPU ferequencies subset and voltage value of each =\n" + "OPP\n" "> > varies\n" - "> \n" + ">=20\n" "> s/ferequencies/frequency\n" - "> \n" - "> > based on the silicon variant in use. Qualcomm Process Voltage Scaling\n" - "> > Tables defines the voltage and frequency value based on the msm-id in\n" + ">=20\n" + "> > based on the silicon variant in use. Qualcomm Process Voltage =\n" + "Scaling\n" + "> > Tables defines the voltage and frequency value based on the msm-id =\n" + "in\n" "> > SMEM and speedbin blown in the efuse combination.\n" - "> > The qcom-cpufreq-kryo driver reads the msm-id and efuse value from the\n" + "> > The qcom-cpufreq-kryo driver reads the msm-id and efuse value from =\n" + "the\n" "> > SoC to provide the OPP framework with required information.\n" - "> > This is used to determine the voltage and frequency value for each OPP\n" + "> > This is used to determine the voltage and frequency value for each =\n" + "OPP\n" "> > of\n" "> > operating-points-v2 table when it is parsed by the OPP framework.\n" "> >\n" @@ -77,7 +85,8 @@ "> > 4 files changed, 165 insertions(+)\n" "> > create mode 100644 drivers/cpufreq/qcom-cpufreq-kryo.c\n" "> >\n" - "> > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm\n" + "> > diff --git a/drivers/cpufreq/Kconfig.arm =\n" + "b/drivers/cpufreq/Kconfig.arm\n" "> > index de55c7d..5c16f05 100644\n" "> > --- a/drivers/cpufreq/Kconfig.arm\n" "> > +++ b/drivers/cpufreq/Kconfig.arm\n" @@ -87,13 +96,14 @@ "> >\n" "> > +config ARM_QCOM_CPUFREQ_KRYO\n" "> > + bool \"Qualcomm Technologies, Inc. Kryo based CPUFreq\"\n" - "> \n" - "> \"Qualcomm Kryo CPUFreq support\" should be enough. Kconfig isn't the place\n" + ">=20\n" + "> \"Qualcomm Kryo CPUFreq support\" should be enough. Kconfig isn't the =\n" + "place\n" "> for Trademark compliance :-)\n" "\n" "This is mandatory requirement of the QTIs legal.\n" "\n" - "> \n" + ">=20\n" "> > + depends on QCOM_QFPROM\n" "> > + depends on QCOM_SMEM\n" "> > + select PM_OPP\n" @@ -106,19 +116,20 @@ "> > config ARM_S3C_CPUFREQ\n" "> > bool\n" "> > help\n" - "> > diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index\n" + "> > diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile =\n" + "index\n" "> > 8d24ade..fb4a2ec 100644\n" "> > --- a/drivers/cpufreq/Makefile\n" "> > +++ b/drivers/cpufreq/Makefile\n" - "> > @@ -65,6 +65,7 @@ obj-$(CONFIG_MACH_MVEBU_V7) += mvebu-\n" + "> > @@ -65,6 +65,7 @@ obj-$(CONFIG_MACH_MVEBU_V7) +=3D mvebu-\n" "> cpufreq.o\n" - "> > obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o\n" - "> > obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) += pxa2xx-cpufreq.o\n" - "> > obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o\n" - "> > +obj-$(CONFIG_ARM_QCOM_CPUFREQ_KRYO) += qcom-cpufreq-kryo.o\n" - "> > obj-$(CONFIG_ARM_S3C2410_CPUFREQ) += s3c2410-cpufreq.o\n" - "> > obj-$(CONFIG_ARM_S3C2412_CPUFREQ) += s3c2412-cpufreq.o\n" - "> > obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o\n" + "> > obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) +=3D omap-cpufreq.o\n" + "> > obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) +=3D pxa2xx-cpufreq.o\n" + "> > obj-$(CONFIG_PXA3xx) +=3D pxa3xx-cpufreq.o\n" + "> > +obj-$(CONFIG_ARM_QCOM_CPUFREQ_KRYO) +=3D qcom-cpufreq-kryo.o\n" + "> > obj-$(CONFIG_ARM_S3C2410_CPUFREQ) +=3D s3c2410-cpufreq.o\n" + "> > obj-$(CONFIG_ARM_S3C2412_CPUFREQ) +=3D s3c2412-cpufreq.o\n" + "> > obj-$(CONFIG_ARM_S3C2416_CPUFREQ) +=3D s3c2416-cpufreq.o\n" "> > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c\n" "> > b/drivers/cpufreq/cpufreq-dt-platdev.c\n" "> > index 3b585e4..77d6ab8 100644\n" @@ -126,13 +137,13 @@ "> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c\n" "> > @@ -118,6 +118,9 @@\n" "> >\n" - "> > { .compatible = \"nvidia,tegra124\", },\n" + "> > { .compatible =3D \"nvidia,tegra124\", },\n" "> >\n" - "> > + { .compatible = \"qcom,apq8096\", },\n" - "> > + { .compatible = \"qcom,msm8996\", },\n" + "> > + { .compatible =3D \"qcom,apq8096\", },\n" + "> > + { .compatible =3D \"qcom,msm8996\", },\n" "> > +\n" - "> > { .compatible = \"st,stih407\", },\n" - "> > { .compatible = \"st,stih410\", },\n" + "> > { .compatible =3D \"st,stih407\", },\n" + "> > { .compatible =3D \"st,stih410\", },\n" "> >\n" "> > diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c\n" "> > b/drivers/cpufreq/qcom-cpufreq-kryo.c\n" @@ -143,14 +154,15 @@ "> > @@ -0,0 +1,150 @@\n" "> > +// SPDX-License-Identifier: GPL-2.0\n" "> > +/*\n" - "> \n" + ">=20\n" "> Stray space here.\n" - "> \n" + ">=20\n" "> > + * Copyright (c) 2018, The Linux Foundation. All rights reserved.\n" "> > + *\n" "> > + * This program is free software; you can redistribute it and/or\n" "> > + modify\n" - "> > + * it under the terms of the GNU General Public License version 2 and\n" + "> > + * it under the terms of the GNU General Public License version 2 =\n" + "and\n" "> > + * only version 2 as published by the Free Software Foundation.\n" "> > + *\n" "> > + * This program is distributed in the hope that it will be useful,\n" @@ -176,10 +188,10 @@ "> > +#define GOLD_LEAD 2\n" "> > +\n" "> > +enum _msm_id {\n" - "> > + MSM8996V3 = 0xF6ul,\n" - "> > + APQ8096V3 = 0x123ul,\n" - "> > + MSM8996SG = 0x131ul,\n" - "> > + APQ8096SG = 0x138ul,\n" + "> > + MSM8996V3 =3D 0xF6ul,\n" + "> > + APQ8096V3 =3D 0x123ul,\n" + "> > + MSM8996SG =3D 0x131ul,\n" + "> > + APQ8096SG =3D 0x138ul,\n" "> > +};\n" "> > +\n" "> > +enum _msm8996_version {\n" @@ -195,22 +207,23 @@ "> > + u32 *msm_id;\n" "> > + enum _msm8996_version version;\n" "> > +\n" - "> > + msm_id = qcom_smem_get(QCOM_SMEM_HOST_ANY,\n" + "> > + msm_id =3D qcom_smem_get(QCOM_SMEM_HOST_ANY,\n" "> MSM_ID_SMEM, &len);\n" - "> > + /* The first 4 bytes are format, next to them is the actual msm-id */\n" + "> > + /* The first 4 bytes are format, next to them is the actual =\n" + "msm-id */\n" "> > + msm_id++;\n" "> > +\n" "> > + switch ((enum _msm_id)*msm_id) {\n" "> > + case MSM8996V3:\n" "> > + case APQ8096V3:\n" - "> > + version = MSM8996_V3;\n" + "> > + version =3D MSM8996_V3;\n" "> > + break;\n" "> > + case MSM8996SG:\n" "> > + case APQ8096SG:\n" - "> > + version = MSM8996_SG;\n" + "> > + version =3D MSM8996_SG;\n" "> > + break;\n" "> > + default:\n" - "> > + version = NUM_OF_MSM8996_VERSIONS;\n" + "> > + version =3D NUM_OF_MSM8996_VERSIONS;\n" "> > + }\n" "> > +\n" "> > + return version;\n" @@ -226,123 +239,131 @@ "> > + struct device *cpu_dev;\n" "> > + struct device_node *np;\n" "> > + struct nvmem_cell *speedbin_nvmem;\n" - "> > + struct opp_table *opp_temp = NULL;\n" + "> > + struct opp_table *opp_temp =3D NULL;\n" "> > +\n" - "> > + cpu_dev = get_cpu_device(SILVER_LEAD);\n" + "> > + cpu_dev =3D get_cpu_device(SILVER_LEAD);\n" "> > + if (IS_ERR_OR_NULL(cpu_dev))\n" "> > + return PTR_ERR(cpu_dev);\n" "> > +\n" - "> > + msm8996_version = qcom_cpufreq_kryo_get_msm_id();\n" - "> > + if (NUM_OF_MSM8996_VERSIONS == msm8996_version) {\n" + "> > + msm8996_version =3D qcom_cpufreq_kryo_get_msm_id();\n" + "> > + if (NUM_OF_MSM8996_VERSIONS =3D=3D msm8996_version) {\n" "> > + dev_err(cpu_dev, \"Not Snapdragon 820/821!\");\n" "> > + return -ENODEV;\n" "> > + }\n" - "> \n" + ">=20\n" "> Use tab instead of spaces.\n" - "> \n" + ">=20\n" "> > +\n" - "> > + np = dev_pm_opp_of_get_opp_desc_node(cpu_dev);\n" + "> > + np =3D dev_pm_opp_of_get_opp_desc_node(cpu_dev);\n" "> > + if (IS_ERR_OR_NULL(np))\n" "> > + return PTR_ERR(np);\n" "> > +\n" - "> > + if (!of_device_is_compatible(np, \"operating-points-v2-kryo-cpu\")) {\n" - "> > + ret = -ENOENT;\n" + "> > + if (!of_device_is_compatible(np, =\n" + "\"operating-points-v2-kryo-cpu\")) {\n" + "> > + ret =3D -ENOENT;\n" "> > + goto free_np;\n" "> > + }\n" "> > +\n" - "> > + speedbin_nvmem = of_nvmem_cell_get(np, NULL);\n" + "> > + speedbin_nvmem =3D of_nvmem_cell_get(np, NULL);\n" "> > + if (IS_ERR(speedbin_nvmem)) {\n" - "> > + ret = PTR_ERR(speedbin_nvmem);\n" - "> > + dev_err(cpu_dev, \"Could not get nvmem cell: %d\\n\", ret);\n" + "> > + ret =3D PTR_ERR(speedbin_nvmem);\n" + "> > + dev_err(cpu_dev, \"Could not get nvmem cell: %d\\n\", =\n" + "ret);\n" "> > + goto free_np;\n" "> > + }\n" "> > +\n" - "> > + speedbin = nvmem_cell_read(speedbin_nvmem, &len);\n" + "> > + speedbin =3D nvmem_cell_read(speedbin_nvmem, &len);\n" "> > +\n" "> > + switch (msm8996_version) {\n" "> > + case MSM8996_V3:\n" - "> > + versions = 1 << (unsigned int)(*speedbin);\n" + "> > + versions =3D 1 << (unsigned int)(*speedbin);\n" "> > + break;\n" "> > + case MSM8996_SG:\n" - "> > + versions = 1 << ((unsigned int)(*speedbin) + 4);\n" + "> > + versions =3D 1 << ((unsigned int)(*speedbin) + 4);\n" "> > + break;\n" "> > + default:\n" "> > + BUG();\n" "> > + break;\n" "> > + }\n" "> > +\n" - "> > + ret = PTR_ERR_OR_ZERO(opp_temp =\n" - "> > + dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" + "> > + ret =3D PTR_ERR_OR_ZERO(opp_temp =3D\n" + "> > + =\n" + "dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" "> > + if (0 > ret)\n" - "> \n" - "> Any particular reason to prefer this over (ret < 0) that is generally used? I've\n" - "> seen it used to avoid the == vs. = typos, but not for other comparisons.\n" - "> \n" + ">=20\n" + "> Any particular reason to prefer this over (ret < 0) that is generally =\n" + "used? I've\n" + "> seen it used to avoid the =3D=3D vs. =3D typos, but not for other =\n" + "comparisons.\n" + ">=20\n" "> Suggest sticking to what is commonly used i.e. ret < 0.\n" - "> \n" + ">=20\n" "> > + goto free_opp;\n" "> > +\n" - "> > + cpu_dev = get_cpu_device(GOLD_LEAD);\n" - "> \n" + "> > + cpu_dev =3D get_cpu_device(GOLD_LEAD);\n" + ">=20\n" "> Error check cpu_dev here?\n" - "> \n" - "> > + ret = PTR_ERR_OR_ZERO(opp_temp =\n" - "> > + dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" + ">=20\n" + "> > + ret =3D PTR_ERR_OR_ZERO(opp_temp =3D\n" + "> > + =\n" + "dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" "> > + if (0 > ret)\n" "> > + goto free_opp;\n" "> > +\n" "> > +\n" - "> > + ret = PTR_ERR_OR_ZERO(platform_device_register_simple(\"cpufreq-\n" + "> > + ret =3D =\n" + "PTR_ERR_OR_ZERO(platform_device_register_simple(\"cpufreq-\n" "> dt\",\n" "> > + -1,\n" "> > + NULL, 0));\n" "> > +\n" - "> > + if (0 == ret)\n" + "> > + if (0 =3D=3D ret)\n" "> > + return 0;\n" "> > +\n" "> > +free_opp:\n" "> > + dev_pm_opp_put_supported_hw(opp_temp);\n" - "> \n" + ">=20\n" "> This is not needed because dev_pm_opp_set_supported_hw will free\n" - "> memory in case of failure. This call in only needed in case of a successful get.\n" - "> \n" + "> memory in case of failure. This call in only needed in case of a =\n" + "successful get.\n" + ">=20\n" "> > +\n" "> > +free_np:\n" "> > + of_node_put(np);\n" "> > + return ret;\n" - "> \n" - "> \n" + ">=20\n" + ">=20\n" "> Suggest something like this instead:\n" - "> \n" + ">=20\n" "> .\n" "> .\n" - "> \n" - "> opp_temp = dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" + ">=20\n" + "> opp_temp =3D dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" "> if (IS_ERR(opp_temp)) {\n" "> dev_err(cpu_dev, \"Failed to set supported hardware\\n\");\n" - "> ret = PTR_ERR(opp_temp);\n" + "> ret =3D PTR_ERR(opp_temp);\n" "> goto free_np;\n" "> }\n" - "> \n" - "> cpu_dev = get_cpu_device(GOLD_LEAD);\n" - "> \n" - "> opp_temp = dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" + ">=20\n" + "> cpu_dev =3D get_cpu_device(GOLD_LEAD);\n" + ">=20\n" + "> opp_temp =3D dev_pm_opp_set_supported_hw(cpu_dev,&versions,1));\n" "> if (IS_ERR(opp_temp)) {\n" "> dev_err(cpu_dev, \"Failed to set supported hardware\\n\");\n" - "> ret = PTR_ERR(opp_temp);\n" + "> ret =3D PTR_ERR(opp_temp);\n" "> goto free_np;\n" "> }\n" - "> \n" - "> ret = platform_device_register_simple(\"cpufreq-dt\", -1, NULL, 0));\n" - "> \n" + ">=20\n" + "> ret =3D platform_device_register_simple(\"cpufreq-dt\", -1, NULL, 0));\n" + ">=20\n" "> if (!IS_ERR_OR_NULL(ret))\n" "> goto out;\n" - "> \n" + ">=20\n" "> free_np:\n" "> of_node_put(np);\n" "> out:\n" "> return ret;\n" - "> \n" + ">=20\n" "> > +}\n" "> > +late_initcall(qcom_cpufreq_kryo_driver_init);\n" "> > +\n" @@ -352,4 +373,4 @@ "> > 1.9.1\n" > > -2eb1d6956295935b2fcef80fa9b659e3bb7da6e4fbb19eb7fdd29017af21c50b +17bc1e861e214bc2bbe76eea12fb312551372684c068f1889f8e9846294743ed
diff --git a/a/1.txt b/N2/1.txt index 5fbf8c7..37f1e19 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,22 +1,22 @@ > -----Original Message----- -> From: amit.kucheria@verdurent.com <amit.kucheria@verdurent.com> On +> From: amit.kucheria at verdurent.com <amit.kucheria@verdurent.com> On > Behalf Of Amit Kucheria > Sent: Wednesday, May 16, 2018 16:13 > To: Ilia Lin <ilialin@codeaurora.org> -> Cc: Michael Turquette <mturquette@baylibre.com>; sboyd@kernel.org; Rob +> Cc: Michael Turquette <mturquette@baylibre.com>; sboyd at kernel.org; Rob > Herring <robh@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Viresh -> Kumar <viresh.kumar@linaro.org>; nm@ti.com; lgirdwood@gmail.com; -> broonie@kernel.org; Andy Gross <andy.gross@linaro.org>; David Brown -> <david.brown@linaro.org>; catalin.marinas@arm.com; -> will.deacon@arm.com; Rafael J. Wysocki <rjw@rjwysocki.net>; linux- -> clk@vger.kernel.org; devicetree@vger.kernel.org; LKML <linux- -> kernel@vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; linux- -> arm-msm@vger.kernel.org; linux-soc@vger.kernel.org; lakml <linux-arm- -> kernel@lists.infradead.org>; Rajendra Nayak <rnayak@codeaurora.org>; -> nicolas.dechesne@linaro.org; celster@codeaurora.org; -> tfinkel@codeaurora.org +> Kumar <viresh.kumar@linaro.org>; nm at ti.com; lgirdwood at gmail.com; +> broonie at kernel.org; Andy Gross <andy.gross@linaro.org>; David Brown +> <david.brown@linaro.org>; catalin.marinas at arm.com; +> will.deacon at arm.com; Rafael J. Wysocki <rjw@rjwysocki.net>; linux- +> clk at vger.kernel.org; devicetree at vger.kernel.org; LKML <linux- +> kernel at vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; linux- +> arm-msm at vger.kernel.org; linux-soc at vger.kernel.org; lakml <linux-arm- +> kernel at lists.infradead.org>; Rajendra Nayak <rnayak@codeaurora.org>; +> nicolas.dechesne at linaro.org; celster at codeaurora.org; +> tfinkel at codeaurora.org > Subject: Re: [PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver > > On Tue, May 15, 2018 at 12:13 PM, Ilia Lin <ilialin@codeaurora.org> wrote: diff --git a/a/content_digest b/N2/content_digest index feb54b1..2372bf2 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,54 +1,31 @@ "ref\01526375616-16904-1-git-send-email-ilialin@codeaurora.org\0" "ref\01526375616-16904-13-git-send-email-ilialin@codeaurora.org\0" "ref\0CAHLCerOYq4q2GE+m3MQAbMfxM4azPr95XiLKVtoPVG1Kv2Db=A@mail.gmail.com\0" - "From\0<ilialin@codeaurora.org>\0" - "Subject\0RE: [PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver\0" + "From\0ilialin@codeaurora.org (ilialin at codeaurora.org)\0" + "Subject\0[PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver\0" "Date\0Thu, 17 May 2018 10:19:27 +0300\0" - "To\0'Amit Kucheria' <amit.kucheria@linaro.org>\0" - "Cc\0'Michael Turquette' <mturquette@baylibre.com>" - sboyd@kernel.org - 'Rob Herring' <robh@kernel.org> - 'Mark Rutland' <mark.rutland@arm.com> - 'Viresh Kumar' <viresh.kumar@linaro.org> - nm@ti.com - lgirdwood@gmail.com - broonie@kernel.org - 'Andy Gross' <andy.gross@linaro.org> - 'David Brown' <david.brown@linaro.org> - catalin.marinas@arm.com - will.deacon@arm.com - 'Rafael J. Wysocki' <rjw@rjwysocki.net> - linux-clk@vger.kernel.org - devicetree@vger.kernel.org - 'LKML' <linux-kernel@vger.kernel.org> - 'Linux PM list' <linux-pm@vger.kernel.org> - linux-arm-msm@vger.kernel.org - linux-soc@vger.kernel.org - 'lakml' <linux-arm-kernel@lists.infradead.org> - 'Rajendra Nayak' <rnayak@codeaurora.org> - nicolas.dechesne@linaro.org - " celster@codeaurora.o\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "\n" "\n" "> -----Original Message-----\n" - "> From: amit.kucheria@verdurent.com <amit.kucheria@verdurent.com> On\n" + "> From: amit.kucheria at verdurent.com <amit.kucheria@verdurent.com> On\n" "> Behalf Of Amit Kucheria\n" "> Sent: Wednesday, May 16, 2018 16:13\n" "> To: Ilia Lin <ilialin@codeaurora.org>\n" - "> Cc: Michael Turquette <mturquette@baylibre.com>; sboyd@kernel.org; Rob\n" + "> Cc: Michael Turquette <mturquette@baylibre.com>; sboyd at kernel.org; Rob\n" "> Herring <robh@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Viresh\n" - "> Kumar <viresh.kumar@linaro.org>; nm@ti.com; lgirdwood@gmail.com;\n" - "> broonie@kernel.org; Andy Gross <andy.gross@linaro.org>; David Brown\n" - "> <david.brown@linaro.org>; catalin.marinas@arm.com;\n" - "> will.deacon@arm.com; Rafael J. Wysocki <rjw@rjwysocki.net>; linux-\n" - "> clk@vger.kernel.org; devicetree@vger.kernel.org; LKML <linux-\n" - "> kernel@vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; linux-\n" - "> arm-msm@vger.kernel.org; linux-soc@vger.kernel.org; lakml <linux-arm-\n" - "> kernel@lists.infradead.org>; Rajendra Nayak <rnayak@codeaurora.org>;\n" - "> nicolas.dechesne@linaro.org; celster@codeaurora.org;\n" - "> tfinkel@codeaurora.org\n" + "> Kumar <viresh.kumar@linaro.org>; nm at ti.com; lgirdwood at gmail.com;\n" + "> broonie at kernel.org; Andy Gross <andy.gross@linaro.org>; David Brown\n" + "> <david.brown@linaro.org>; catalin.marinas at arm.com;\n" + "> will.deacon at arm.com; Rafael J. Wysocki <rjw@rjwysocki.net>; linux-\n" + "> clk at vger.kernel.org; devicetree at vger.kernel.org; LKML <linux-\n" + "> kernel at vger.kernel.org>; Linux PM list <linux-pm@vger.kernel.org>; linux-\n" + "> arm-msm at vger.kernel.org; linux-soc at vger.kernel.org; lakml <linux-arm-\n" + "> kernel at lists.infradead.org>; Rajendra Nayak <rnayak@codeaurora.org>;\n" + "> nicolas.dechesne at linaro.org; celster at codeaurora.org;\n" + "> tfinkel at codeaurora.org\n" "> Subject: Re: [PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver\n" "> \n" "> On Tue, May 15, 2018 at 12:13 PM, Ilia Lin <ilialin@codeaurora.org> wrote:\n" @@ -352,4 +329,4 @@ "> > 1.9.1\n" > > -2eb1d6956295935b2fcef80fa9b659e3bb7da6e4fbb19eb7fdd29017af21c50b +cfc4459a925bad6e632ad5ee5db09bb9d36b1ff63bb3423e23775b087ac28e50
diff --git a/a/content_digest b/N3/content_digest index feb54b1..7db0308 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -6,28 +6,29 @@ "Date\0Thu, 17 May 2018 10:19:27 +0300\0" "To\0'Amit Kucheria' <amit.kucheria@linaro.org>\0" "Cc\0'Michael Turquette' <mturquette@baylibre.com>" - sboyd@kernel.org + <sboyd@kernel.org> 'Rob Herring' <robh@kernel.org> 'Mark Rutland' <mark.rutland@arm.com> 'Viresh Kumar' <viresh.kumar@linaro.org> - nm@ti.com - lgirdwood@gmail.com - broonie@kernel.org + <nm@ti.com> + <lgirdwood@gmail.com> + <broonie@kernel.org> 'Andy Gross' <andy.gross@linaro.org> 'David Brown' <david.brown@linaro.org> - catalin.marinas@arm.com - will.deacon@arm.com + <catalin.marinas@arm.com> + <will.deacon@arm.com> 'Rafael J. Wysocki' <rjw@rjwysocki.net> - linux-clk@vger.kernel.org - devicetree@vger.kernel.org + <linux-clk@vger.kernel.org> + <devicetree@vger.kernel.org> 'LKML' <linux-kernel@vger.kernel.org> 'Linux PM list' <linux-pm@vger.kernel.org> - linux-arm-msm@vger.kernel.org - linux-soc@vger.kernel.org + <linux-arm-msm@vger.kernel.org> + <linux-soc@vger.kernel.org> 'lakml' <linux-arm-kernel@lists.infradead.org> 'Rajendra Nayak' <rnayak@codeaurora.org> - nicolas.dechesne@linaro.org - " celster@codeaurora.o\0" + <nicolas.dechesne@linaro.org> + <celster@codeaurora.org> + " <tfinkel@codeaurora.org>\0" "\00:1\0" "b\0" "\n" @@ -352,4 +353,4 @@ "> > 1.9.1\n" > > -2eb1d6956295935b2fcef80fa9b659e3bb7da6e4fbb19eb7fdd29017af21c50b +d0af457ab81f396ba457ab5b6d7a9a9545357a6b7f7f00fcc3d45c97eb58c058
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.