* [PATCH] cpufreq: davinci: move configuration to include/linux/platform_data
@ 2019-02-14 17:05 Bartosz Golaszewski
2019-02-18 6:16 ` Viresh Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2019-02-14 17:05 UTC (permalink / raw)
To: Sekhar Nori, Kevin Hilman, Rafael J . Wysocki, Viresh Kumar
Cc: Bartosz Golaszewski, linux-kernel, linux-arm-kernel, linux-pm
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
The header containing the configuration structure for davinci cpufreq
driver lives in mach-davinci/include/mach/. This is fine for now but
if we want to make davinci part of the multi_v5 build, no code external
to mach-davinci should include machine-specific headers.
Move the configuration structure to include/linux/platform_data.
While we're at it: convert the GPL-2.0 boilerplate to a proper SPDX
license identifier.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
arch/arm/mach-davinci/da850.c | 2 +-
arch/arm/mach-davinci/include/mach/cpufreq.h | 26 -------------------
drivers/cpufreq/davinci-cpufreq.c | 5 +---
include/linux/platform_data/davinci-cpufreq.h | 19 ++++++++++++++
4 files changed, 21 insertions(+), 31 deletions(-)
delete mode 100644 arch/arm/mach-davinci/include/mach/cpufreq.h
create mode 100644 include/linux/platform_data/davinci-cpufreq.h
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index e7b78df2bfef..a02ff431ba47 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -21,6 +21,7 @@
#include <linux/mfd/da8xx-cfgchip.h>
#include <linux/platform_data/clk-da8xx-cfgchip.h>
#include <linux/platform_data/clk-davinci-pll.h>
+#include <linux/platform_data/davinci-cpufreq.h>
#include <linux/platform_data/gpio-davinci.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
@@ -29,7 +30,6 @@
#include <asm/mach/map.h>
#include <mach/common.h>
-#include <mach/cpufreq.h>
#include <mach/cputype.h>
#include <mach/da8xx.h>
#include <mach/irqs.h>
diff --git a/arch/arm/mach-davinci/include/mach/cpufreq.h b/arch/arm/mach-davinci/include/mach/cpufreq.h
deleted file mode 100644
index 3c089cfb6cd6..000000000000
--- a/arch/arm/mach-davinci/include/mach/cpufreq.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * TI DaVinci CPUFreq platform support.
- *
- * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-#ifndef _MACH_DAVINCI_CPUFREQ_H
-#define _MACH_DAVINCI_CPUFREQ_H
-
-#include <linux/cpufreq.h>
-
-struct davinci_cpufreq_config {
- struct cpufreq_frequency_table *freq_table;
- int (*set_voltage) (unsigned int index);
- int (*init) (void);
-};
-
-#endif
diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c
index d54a27c99121..940fe85db97a 100644
--- a/drivers/cpufreq/davinci-cpufreq.c
+++ b/drivers/cpufreq/davinci-cpufreq.c
@@ -23,13 +23,10 @@
#include <linux/init.h>
#include <linux/err.h>
#include <linux/clk.h>
+#include <linux/platform_data/davinci-cpufreq.h>
#include <linux/platform_device.h>
#include <linux/export.h>
-#include <mach/hardware.h>
-#include <mach/cpufreq.h>
-#include <mach/common.h>
-
struct davinci_cpufreq {
struct device *dev;
struct clk *armclk;
diff --git a/include/linux/platform_data/davinci-cpufreq.h b/include/linux/platform_data/davinci-cpufreq.h
new file mode 100644
index 000000000000..3fbf9f2793b5
--- /dev/null
+++ b/include/linux/platform_data/davinci-cpufreq.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * TI DaVinci CPUFreq platform support.
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/
+ */
+
+#ifndef _MACH_DAVINCI_CPUFREQ_H
+#define _MACH_DAVINCI_CPUFREQ_H
+
+#include <linux/cpufreq.h>
+
+struct davinci_cpufreq_config {
+ struct cpufreq_frequency_table *freq_table;
+ int (*set_voltage)(unsigned int index);
+ int (*init)(void);
+};
+
+#endif /* _MACH_DAVINCI_CPUFREQ_H */
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: davinci: move configuration to include/linux/platform_data
2019-02-14 17:05 [PATCH] cpufreq: davinci: move configuration to include/linux/platform_data Bartosz Golaszewski
@ 2019-02-18 6:16 ` Viresh Kumar
2019-02-18 6:26 ` Sekhar Nori
0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2019-02-18 6:16 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: linux-pm, Sekhar Nori, Kevin Hilman, Rafael J . Wysocki,
linux-kernel, Bartosz Golaszewski, linux-arm-kernel
On 14-02-19, 18:05, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> The header containing the configuration structure for davinci cpufreq
> driver lives in mach-davinci/include/mach/. This is fine for now but
> if we want to make davinci part of the multi_v5 build, no code external
> to mach-davinci should include machine-specific headers.
>
> Move the configuration structure to include/linux/platform_data.
>
> While we're at it: convert the GPL-2.0 boilerplate to a proper SPDX
> license identifier.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
> arch/arm/mach-davinci/da850.c | 2 +-
> arch/arm/mach-davinci/include/mach/cpufreq.h | 26 -------------------
> drivers/cpufreq/davinci-cpufreq.c | 5 +---
> include/linux/platform_data/davinci-cpufreq.h | 19 ++++++++++++++
> 4 files changed, 21 insertions(+), 31 deletions(-)
> delete mode 100644 arch/arm/mach-davinci/include/mach/cpufreq.h
> create mode 100644 include/linux/platform_data/davinci-cpufreq.h
>
> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
> index e7b78df2bfef..a02ff431ba47 100644
> --- a/arch/arm/mach-davinci/da850.c
> +++ b/arch/arm/mach-davinci/da850.c
> @@ -21,6 +21,7 @@
> #include <linux/mfd/da8xx-cfgchip.h>
> #include <linux/platform_data/clk-da8xx-cfgchip.h>
> #include <linux/platform_data/clk-davinci-pll.h>
> +#include <linux/platform_data/davinci-cpufreq.h>
> #include <linux/platform_data/gpio-davinci.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> @@ -29,7 +30,6 @@
> #include <asm/mach/map.h>
>
> #include <mach/common.h>
> -#include <mach/cpufreq.h>
> #include <mach/cputype.h>
> #include <mach/da8xx.h>
> #include <mach/irqs.h>
> diff --git a/arch/arm/mach-davinci/include/mach/cpufreq.h b/arch/arm/mach-davinci/include/mach/cpufreq.h
> deleted file mode 100644
> index 3c089cfb6cd6..000000000000
> --- a/arch/arm/mach-davinci/include/mach/cpufreq.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/*
> - * TI DaVinci CPUFreq platform support.
> - *
> - * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License as
> - * published by the Free Software Foundation version 2.
> - *
> - * This program is distributed "as is" WITHOUT ANY WARRANTY of any
> - * kind, whether express or implied; without even the implied warranty
> - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - */
> -#ifndef _MACH_DAVINCI_CPUFREQ_H
> -#define _MACH_DAVINCI_CPUFREQ_H
> -
> -#include <linux/cpufreq.h>
> -
> -struct davinci_cpufreq_config {
> - struct cpufreq_frequency_table *freq_table;
> - int (*set_voltage) (unsigned int index);
> - int (*init) (void);
> -};
> -
> -#endif
> diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c
> index d54a27c99121..940fe85db97a 100644
> --- a/drivers/cpufreq/davinci-cpufreq.c
> +++ b/drivers/cpufreq/davinci-cpufreq.c
> @@ -23,13 +23,10 @@
> #include <linux/init.h>
> #include <linux/err.h>
> #include <linux/clk.h>
> +#include <linux/platform_data/davinci-cpufreq.h>
> #include <linux/platform_device.h>
> #include <linux/export.h>
>
> -#include <mach/hardware.h>
> -#include <mach/cpufreq.h>
> -#include <mach/common.h>
> -
> struct davinci_cpufreq {
> struct device *dev;
> struct clk *armclk;
> diff --git a/include/linux/platform_data/davinci-cpufreq.h b/include/linux/platform_data/davinci-cpufreq.h
> new file mode 100644
> index 000000000000..3fbf9f2793b5
> --- /dev/null
> +++ b/include/linux/platform_data/davinci-cpufreq.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * TI DaVinci CPUFreq platform support.
> + *
> + * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/
> + */
> +
> +#ifndef _MACH_DAVINCI_CPUFREQ_H
> +#define _MACH_DAVINCI_CPUFREQ_H
> +
> +#include <linux/cpufreq.h>
> +
> +struct davinci_cpufreq_config {
> + struct cpufreq_frequency_table *freq_table;
> + int (*set_voltage)(unsigned int index);
> + int (*init)(void);
> +};
> +
> +#endif /* _MACH_DAVINCI_CPUFREQ_H */
Applied. Thanks.
--
viresh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: davinci: move configuration to include/linux/platform_data
2019-02-18 6:16 ` Viresh Kumar
@ 2019-02-18 6:26 ` Sekhar Nori
2019-02-18 6:29 ` Viresh Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Sekhar Nori @ 2019-02-18 6:26 UTC (permalink / raw)
To: Viresh Kumar, Bartosz Golaszewski
Cc: linux-pm, Kevin Hilman, Rafael J . Wysocki, linux-kernel,
Bartosz Golaszewski, linux-arm-kernel
On 18/02/19 11:46 AM, Viresh Kumar wrote:
> Applied. Thanks.
Here is a belated ack from my side.
Acked-by: Sekhar Nori <nsekhar@ti.com>
Thanks,
Sekhar
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: davinci: move configuration to include/linux/platform_data
2019-02-18 6:26 ` Sekhar Nori
@ 2019-02-18 6:29 ` Viresh Kumar
0 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2019-02-18 6:29 UTC (permalink / raw)
To: Sekhar Nori
Cc: linux-pm, Bartosz Golaszewski, Kevin Hilman, Rafael J . Wysocki,
linux-kernel, Bartosz Golaszewski, linux-arm-kernel
On 18-02-19, 11:56, Sekhar Nori wrote:
> On 18/02/19 11:46 AM, Viresh Kumar wrote:
> > Applied. Thanks.
>
> Here is a belated ack from my side.
>
> Acked-by: Sekhar Nori <nsekhar@ti.com>
Included that and pushed again :)
--
viresh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-18 6:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14 17:05 [PATCH] cpufreq: davinci: move configuration to include/linux/platform_data Bartosz Golaszewski
2019-02-18 6:16 ` Viresh Kumar
2019-02-18 6:26 ` Sekhar Nori
2019-02-18 6:29 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).