* [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init @ 2017-03-02 11:03 Daniel Kurtz 2017-03-02 11:03 ` [PATCH 2/2 v2] cpufreq: mediatek: Add support for MT8176 and MT817x Daniel Kurtz 2017-03-02 11:06 ` [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init Viresh Kumar 0 siblings, 2 replies; 5+ messages in thread From: Daniel Kurtz @ 2017-03-02 11:03 UTC (permalink / raw) Cc: Yidi Lin, Nicolas Boichat, Daniel Kurtz, Rafael J. Wysocki, Viresh Kumar, open list:CPU FREQUENCY DRIVERS, open list This function is only called once at boot by device_initcall(), so mark it as __init. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> --- drivers/cpufreq/mt8173-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c index ab25b1235a5e..72bc1192bd30 100644 --- a/drivers/cpufreq/mt8173-cpufreq.c +++ b/drivers/cpufreq/mt8173-cpufreq.c @@ -573,7 +573,7 @@ static struct platform_driver mt8173_cpufreq_platdrv = { .probe = mt8173_cpufreq_probe, }; -static int mt8173_cpufreq_driver_init(void) +static int __init mt8173_cpufreq_driver_init(void) { struct platform_device *pdev; int err; -- 2.12.0.rc1.440.g5b76565f74-goog ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2 v2] cpufreq: mediatek: Add support for MT8176 and MT817x 2017-03-02 11:03 [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init Daniel Kurtz @ 2017-03-02 11:03 ` Daniel Kurtz 2017-03-02 11:07 ` Viresh Kumar 2017-03-02 11:06 ` [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init Viresh Kumar 1 sibling, 1 reply; 5+ messages in thread From: Daniel Kurtz @ 2017-03-02 11:03 UTC (permalink / raw) Cc: Yidi Lin, Nicolas Boichat, Daniel Kurtz, Rafael J. Wysocki, Viresh Kumar, Matthias Brugger, open list:CPU FREQUENCY DRIVERS, open list, moderated list:ARM/Mediatek SoC support, moderated list:ARM/Mediatek SoC support The Mediatek MT8173 is just one of several SOCs from the same MT817x family, including the 6-core (4-little/2-big) MT8176. The mt8173-cpufreq driver supports all of these SOCs, however, machines using them may use a different machine compatible. Since this driver checks explicitly for the machine compatible string, add support for the whole family. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> --- This patch is based on the compatibles added by the MT8176 series: https://patchwork.kernel.org/patch/9573209/ https://patchwork.kernel.org/patch/9573213/ v2: - use of_match_node (Thanks, Viresh!) drivers/cpufreq/mt8173-cpufreq.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c index 72bc1192bd30..fd1886faf33a 100644 --- a/drivers/cpufreq/mt8173-cpufreq.c +++ b/drivers/cpufreq/mt8173-cpufreq.c @@ -573,14 +573,33 @@ static struct platform_driver mt8173_cpufreq_platdrv = { .probe = mt8173_cpufreq_probe, }; +/* List of machines supported by this driver */ +static const struct of_device_id mt8173_cpufreq_machines[] __initconst = { + { .compatible = "mediatek,mt817x", }, + { .compatible = "mediatek,mt8173", }, + { .compatible = "mediatek,mt8176", }, + + { } +}; + static int __init mt8173_cpufreq_driver_init(void) { + struct device_node *np; + const struct of_device_id *match; struct platform_device *pdev; int err; - if (!of_machine_is_compatible("mediatek,mt8173")) + np = of_find_node_by_path("/"); + if (!np) return -ENODEV; + match = of_match_node(mt8173_cpufreq_machines, np); + of_node_put(np); + if (!match) { + pr_warn("Machine is not compatible with mt8173-cpufreq\n"); + return -ENODEV; + } + err = platform_driver_register(&mt8173_cpufreq_platdrv); if (err) return err; -- 2.12.0.rc1.440.g5b76565f74-goog ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2 v2] cpufreq: mediatek: Add support for MT8176 and MT817x 2017-03-02 11:03 ` [PATCH 2/2 v2] cpufreq: mediatek: Add support for MT8176 and MT817x Daniel Kurtz @ 2017-03-02 11:07 ` Viresh Kumar 0 siblings, 0 replies; 5+ messages in thread From: Viresh Kumar @ 2017-03-02 11:07 UTC (permalink / raw) To: Daniel Kurtz Cc: Yidi Lin, Nicolas Boichat, Rafael J. Wysocki, Matthias Brugger, open list:CPU FREQUENCY DRIVERS, open list, moderated list:ARM/Mediatek SoC support, moderated list:ARM/Mediatek SoC support On 02-03-17, 19:03, Daniel Kurtz wrote: > The Mediatek MT8173 is just one of several SOCs from the same MT817x family, > including the 6-core (4-little/2-big) MT8176. > > The mt8173-cpufreq driver supports all of these SOCs, however, machines > using them may use a different machine compatible. > > Since this driver checks explicitly for the machine compatible string, add > support for the whole family. > > Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> > --- > This patch is based on the compatibles added by the MT8176 series: > > https://patchwork.kernel.org/patch/9573209/ > https://patchwork.kernel.org/patch/9573213/ > > v2: > - use of_match_node (Thanks, Viresh!) > > drivers/cpufreq/mt8173-cpufreq.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) Acked-by: Viresh Kumar <viresh.kumar@linaro.org> -- viresh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init 2017-03-02 11:03 [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init Daniel Kurtz 2017-03-02 11:03 ` [PATCH 2/2 v2] cpufreq: mediatek: Add support for MT8176 and MT817x Daniel Kurtz @ 2017-03-02 11:06 ` Viresh Kumar 2017-03-02 11:30 ` Daniel Kurtz 1 sibling, 1 reply; 5+ messages in thread From: Viresh Kumar @ 2017-03-02 11:06 UTC (permalink / raw) To: Daniel Kurtz Cc: Yidi Lin, Nicolas Boichat, Rafael J. Wysocki, open list:CPU FREQUENCY DRIVERS, open list On 02-03-17, 19:03, Daniel Kurtz wrote: > This function is only called once at boot by device_initcall(), so mark > it as __init. > > Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> > --- > drivers/cpufreq/mt8173-cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Viresh Kumar <viresh.kumar@linaro.org> -- viresh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init 2017-03-02 11:06 ` [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init Viresh Kumar @ 2017-03-02 11:30 ` Daniel Kurtz 0 siblings, 0 replies; 5+ messages in thread From: Daniel Kurtz @ 2017-03-02 11:30 UTC (permalink / raw) To: Viresh Kumar Cc: Yidi Lin, Nicolas Boichat, Rafael J. Wysocki, open list:CPU FREQUENCY DRIVERS, open list On Thu, Mar 2, 2017 at 7:06 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > > On 02-03-17, 19:03, Daniel Kurtz wrote: > > This function is only called once at boot by device_initcall(), so mark > > it as __init. > > > > Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> > > --- > > drivers/cpufreq/mt8173-cpufreq.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Its very strange. The patch itself does not appear to have made it to the list. But, I do see your Ack: https://www.spinics.net/lists/kernel/msg2455271.html > > -- > viresh ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-02 22:41 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-03-02 11:03 [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init Daniel Kurtz 2017-03-02 11:03 ` [PATCH 2/2 v2] cpufreq: mediatek: Add support for MT8176 and MT817x Daniel Kurtz 2017-03-02 11:07 ` Viresh Kumar 2017-03-02 11:06 ` [PATCH 1/2] cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init Viresh Kumar 2017-03-02 11:30 ` Daniel Kurtz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®