* [PATCH 0/2] fixes for struct clk_core migration @ 2014-09-09 6:07 Mike Turquette 2014-09-09 6:07 ` [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core Mike Turquette ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Mike Turquette @ 2014-09-09 6:07 UTC (permalink / raw) To: linux-arm-kernel A few build issues have popped up with more extensive testing of the patches to split the clock framework into a proper provider/consumer relationship. [0] The first patch adapts Intel's LPSS driver to use the clock provider APIs. If no one objects to this patch then I will fold it into Tomeu's patch #2. [1] Tomeu, can you run your Coccinelle script again against all of arch/ and drivers/ to make sure nothing else was left out? The second patch brings the asm-generic version of clkdev.h up to speed with all of the asm-specific versions, by not declaring __clk_get and __clk_put if CONFIG_COMMON_CLK is set. If no one objects to this patch then I will move it to the front of the patch stack when rebasing Tomeu's series. [0] http://lkml.kernel.org/r/<1409758148-20104-1-git-send-email-tomeu.vizoso@collabora.com> [1] http://lkml.kernel.org/r/<1409758317-20564-1-git-send-email-tomeu.vizoso@collabora.com> Mike Turquette (2): acpi: lpss: convert from struct clk to struct clk_core asm-generic: COMMON_CLK defines __clk_{get,put} drivers/acpi/acpi_lpss.c | 6 +++--- include/asm-generic/clkdev.h | 2 ++ include/linux/platform_data/clk-lpss.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) -- 1.8.3.2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core 2014-09-09 6:07 [PATCH 0/2] fixes for struct clk_core migration Mike Turquette @ 2014-09-09 6:07 ` Mike Turquette 2014-09-09 13:16 ` Rafael J. Wysocki 2014-09-09 6:11 ` [PATCH 2/2] asm-generic: COMMON_CLK defines __clk_{get,put} Mike Turquette 2014-09-09 15:21 ` [PATCH 0/2] fixes for struct clk_core migration Tomeu Vizoso 2 siblings, 1 reply; 7+ messages in thread From: Mike Turquette @ 2014-09-09 6:07 UTC (permalink / raw) To: linux-arm-kernel Looks like this driver was missed during the original mass driver rework[0]. This patch converts the LPSS driver to the new clock provider data type (struct clk_core). If there are no objections I propose to roll this patch into a rebase of that patch[0] in my tree. [0] http://lkml.kernel.org/r/<1409758317-20564-1-git-send-email-tomeu.vizoso@collabora.com> Signed-off-by: Mike Turquette <mturquette@linaro.org> --- drivers/acpi/acpi_lpss.c | 6 +++--- include/linux/platform_data/clk-lpss.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 9dfec48..454179f 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -57,7 +57,7 @@ ACPI_MODULE_NAME("acpi_lpss"); struct lpss_shared_clock { const char *name; unsigned long rate; - struct clk *clk; + struct clk_core *clk; }; struct lpss_private_data; @@ -83,7 +83,7 @@ static struct lpss_device_desc lpss_dma_desc = { struct lpss_private_data { void __iomem *mmio_base; resource_size_t mmio_size; - struct clk *clk; + struct clk_core *clk; const struct lpss_device_desc *dev_desc; u32 prv_reg_ctx[LPSS_PRV_REG_COUNT]; }; @@ -278,7 +278,7 @@ static int register_device_clock(struct acpi_device *adev, const struct lpss_device_desc *dev_desc = pdata->dev_desc; struct lpss_shared_clock *shared_clock = dev_desc->shared_clock; const char *devname = dev_name(&adev->dev); - struct clk *clk = ERR_PTR(-ENODEV); + struct clk_core *clk = ERR_PTR(-ENODEV); struct lpss_clk_data *clk_data; const char *parent, *clk_name; void __iomem *prv_base; diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h index 2390199..3c3237c 100644 --- a/include/linux/platform_data/clk-lpss.h +++ b/include/linux/platform_data/clk-lpss.h @@ -15,7 +15,7 @@ struct lpss_clk_data { const char *name; - struct clk *clk; + struct clk_core *clk; }; extern int lpt_clk_init(void); -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core 2014-09-09 6:07 ` [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core Mike Turquette @ 2014-09-09 13:16 ` Rafael J. Wysocki 2014-09-09 13:52 ` Mika Westerberg 0 siblings, 1 reply; 7+ messages in thread From: Rafael J. Wysocki @ 2014-09-09 13:16 UTC (permalink / raw) To: linux-arm-kernel On Monday, September 08, 2014 11:07:47 PM Mike Turquette wrote: > Looks like this driver was missed during the original mass driver > rework[0]. This patch converts the LPSS driver to the new clock provider > data type (struct clk_core). > > If there are no objections I propose to roll this patch into a rebase of > that patch[0] in my tree. > > [0] http://lkml.kernel.org/r/<1409758317-20564-1-git-send-email-tomeu.vizoso@collabora.com> > > Signed-off-by: Mike Turquette <mturquette@linaro.org> Mika, any comments here? > --- > drivers/acpi/acpi_lpss.c | 6 +++--- > include/linux/platform_data/clk-lpss.h | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c > index 9dfec48..454179f 100644 > --- a/drivers/acpi/acpi_lpss.c > +++ b/drivers/acpi/acpi_lpss.c > @@ -57,7 +57,7 @@ ACPI_MODULE_NAME("acpi_lpss"); > struct lpss_shared_clock { > const char *name; > unsigned long rate; > - struct clk *clk; > + struct clk_core *clk; > }; > > struct lpss_private_data; > @@ -83,7 +83,7 @@ static struct lpss_device_desc lpss_dma_desc = { > struct lpss_private_data { > void __iomem *mmio_base; > resource_size_t mmio_size; > - struct clk *clk; > + struct clk_core *clk; > const struct lpss_device_desc *dev_desc; > u32 prv_reg_ctx[LPSS_PRV_REG_COUNT]; > }; > @@ -278,7 +278,7 @@ static int register_device_clock(struct acpi_device *adev, > const struct lpss_device_desc *dev_desc = pdata->dev_desc; > struct lpss_shared_clock *shared_clock = dev_desc->shared_clock; > const char *devname = dev_name(&adev->dev); > - struct clk *clk = ERR_PTR(-ENODEV); > + struct clk_core *clk = ERR_PTR(-ENODEV); > struct lpss_clk_data *clk_data; > const char *parent, *clk_name; > void __iomem *prv_base; > diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h > index 2390199..3c3237c 100644 > --- a/include/linux/platform_data/clk-lpss.h > +++ b/include/linux/platform_data/clk-lpss.h > @@ -15,7 +15,7 @@ > > struct lpss_clk_data { > const char *name; > - struct clk *clk; > + struct clk_core *clk; > }; > > extern int lpt_clk_init(void); > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core 2014-09-09 13:16 ` Rafael J. Wysocki @ 2014-09-09 13:52 ` Mika Westerberg 2014-09-10 5:30 ` Heikki Krogerus 0 siblings, 1 reply; 7+ messages in thread From: Mika Westerberg @ 2014-09-09 13:52 UTC (permalink / raw) To: linux-arm-kernel On Tue, Sep 09, 2014 at 03:16:29PM +0200, Rafael J. Wysocki wrote: > On Monday, September 08, 2014 11:07:47 PM Mike Turquette wrote: > > Looks like this driver was missed during the original mass driver > > rework[0]. This patch converts the LPSS driver to the new clock provider > > data type (struct clk_core). > > > > If there are no objections I propose to roll this patch into a rebase of > > that patch[0] in my tree. > > > > [0] http://lkml.kernel.org/r/<1409758317-20564-1-git-send-email-tomeu.vizoso@collabora.com> > > > > Signed-off-by: Mike Turquette <mturquette@linaro.org> > > Mika, any comments here? Adding Heikki who recently did some clock changes to acpi_lpss.c. To me this looks fine. > > > --- > > drivers/acpi/acpi_lpss.c | 6 +++--- > > include/linux/platform_data/clk-lpss.h | 2 +- > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c > > index 9dfec48..454179f 100644 > > --- a/drivers/acpi/acpi_lpss.c > > +++ b/drivers/acpi/acpi_lpss.c > > @@ -57,7 +57,7 @@ ACPI_MODULE_NAME("acpi_lpss"); > > struct lpss_shared_clock { > > const char *name; > > unsigned long rate; > > - struct clk *clk; > > + struct clk_core *clk; > > }; > > > > struct lpss_private_data; > > @@ -83,7 +83,7 @@ static struct lpss_device_desc lpss_dma_desc = { > > struct lpss_private_data { > > void __iomem *mmio_base; > > resource_size_t mmio_size; > > - struct clk *clk; > > + struct clk_core *clk; > > const struct lpss_device_desc *dev_desc; > > u32 prv_reg_ctx[LPSS_PRV_REG_COUNT]; > > }; > > @@ -278,7 +278,7 @@ static int register_device_clock(struct acpi_device *adev, > > const struct lpss_device_desc *dev_desc = pdata->dev_desc; > > struct lpss_shared_clock *shared_clock = dev_desc->shared_clock; > > const char *devname = dev_name(&adev->dev); > > - struct clk *clk = ERR_PTR(-ENODEV); > > + struct clk_core *clk = ERR_PTR(-ENODEV); > > struct lpss_clk_data *clk_data; > > const char *parent, *clk_name; > > void __iomem *prv_base; > > diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h > > index 2390199..3c3237c 100644 > > --- a/include/linux/platform_data/clk-lpss.h > > +++ b/include/linux/platform_data/clk-lpss.h > > @@ -15,7 +15,7 @@ > > > > struct lpss_clk_data { > > const char *name; > > - struct clk *clk; > > + struct clk_core *clk; > > }; > > > > extern int lpt_clk_init(void); > > > > -- > I speak only for myself. > Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core 2014-09-09 13:52 ` Mika Westerberg @ 2014-09-10 5:30 ` Heikki Krogerus 0 siblings, 0 replies; 7+ messages in thread From: Heikki Krogerus @ 2014-09-10 5:30 UTC (permalink / raw) To: linux-arm-kernel On Tue, Sep 09, 2014 at 04:52:09PM +0300, Mika Westerberg wrote: > On Tue, Sep 09, 2014 at 03:16:29PM +0200, Rafael J. Wysocki wrote: > > On Monday, September 08, 2014 11:07:47 PM Mike Turquette wrote: > > > Looks like this driver was missed during the original mass driver > > > rework[0]. This patch converts the LPSS driver to the new clock provider > > > data type (struct clk_core). > > > > > > If there are no objections I propose to roll this patch into a rebase of > > > that patch[0] in my tree. > > > > > > [0] http://lkml.kernel.org/r/<1409758317-20564-1-git-send-email-tomeu.vizoso@collabora.com> > > > > > > Signed-off-by: Mike Turquette <mturquette@linaro.org> > > > > Mika, any comments here? > > Adding Heikki who recently did some clock changes to acpi_lpss.c. > > To me this looks fine. Looks fine to me to. > > > --- > > > drivers/acpi/acpi_lpss.c | 6 +++--- > > > include/linux/platform_data/clk-lpss.h | 2 +- > > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > > > diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c > > > index 9dfec48..454179f 100644 > > > --- a/drivers/acpi/acpi_lpss.c > > > +++ b/drivers/acpi/acpi_lpss.c > > > @@ -57,7 +57,7 @@ ACPI_MODULE_NAME("acpi_lpss"); > > > struct lpss_shared_clock { > > > const char *name; > > > unsigned long rate; > > > - struct clk *clk; > > > + struct clk_core *clk; > > > }; > > > > > > struct lpss_private_data; > > > @@ -83,7 +83,7 @@ static struct lpss_device_desc lpss_dma_desc = { > > > struct lpss_private_data { > > > void __iomem *mmio_base; > > > resource_size_t mmio_size; > > > - struct clk *clk; > > > + struct clk_core *clk; > > > const struct lpss_device_desc *dev_desc; > > > u32 prv_reg_ctx[LPSS_PRV_REG_COUNT]; > > > }; > > > @@ -278,7 +278,7 @@ static int register_device_clock(struct acpi_device *adev, > > > const struct lpss_device_desc *dev_desc = pdata->dev_desc; > > > struct lpss_shared_clock *shared_clock = dev_desc->shared_clock; > > > const char *devname = dev_name(&adev->dev); > > > - struct clk *clk = ERR_PTR(-ENODEV); > > > + struct clk_core *clk = ERR_PTR(-ENODEV); > > > struct lpss_clk_data *clk_data; > > > const char *parent, *clk_name; > > > void __iomem *prv_base; > > > diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h > > > index 2390199..3c3237c 100644 > > > --- a/include/linux/platform_data/clk-lpss.h > > > +++ b/include/linux/platform_data/clk-lpss.h > > > @@ -15,7 +15,7 @@ > > > > > > struct lpss_clk_data { > > > const char *name; > > > - struct clk *clk; > > > + struct clk_core *clk; > > > }; > > > > > > extern int lpt_clk_init(void); > > > > > > > -- > > I speak only for myself. > > Rafael J. Wysocki, Intel Open Source Technology Center. -- heikki ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] asm-generic: COMMON_CLK defines __clk_{get,put} 2014-09-09 6:07 [PATCH 0/2] fixes for struct clk_core migration Mike Turquette 2014-09-09 6:07 ` [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core Mike Turquette @ 2014-09-09 6:11 ` Mike Turquette 2014-09-09 15:21 ` [PATCH 0/2] fixes for struct clk_core migration Tomeu Vizoso 2 siblings, 0 replies; 7+ messages in thread From: Mike Turquette @ 2014-09-09 6:11 UTC (permalink / raw) To: linux-arm-kernel If CONFIG_COMMON_CLK is selected then __clk_get and __clk_put are defined in drivers/clk/clk.c and declared in include/linux/clkdev.h. Sylwester's series[0] to properly support clk_{get,put} in the common clock framework made changes to the asm-specific clkdev.h headers, but not the asm-generic version. Tomeu's recent changes[1] to introduce a provider/consumer split in the clock framework uncovered this problem, causing the following build error on any architecture using the asm-generic clkdev.h (e.g. x86 architecture and the ACPI LPSS driver): In file included from drivers/acpi/acpi_lpss.c:15:0: include/linux/clkdev.h:59:5: error: conflicting types for ?__clk_get? int __clk_get(struct clk_core *clk); ^ In file included from arch/x86/include/generated/asm/clkdev.h:1:0, from include/linux/clkdev.h:15, from drivers/acpi/acpi_lpss.c:15: include/asm-generic/clkdev.h:20:19: note: previous definition of ?__clk_get? was here static inline int __clk_get(struct clk *clk) { return 1; } ^ Fixed by only declarating __clk_get and __clk_put when CONFIG_COMMON_CLK is set. [0] http://lkml.kernel.org/r/<1386177127-2894-5-git-send-email-s.nawrocki@samsung.com> [1] http://lkml.kernel.org/r/<1409758148-20104-1-git-send-email-tomeu.vizoso@collabora.com> Signed-off-by: Mike Turquette <mturquette@linaro.org> --- include/asm-generic/clkdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/clkdev.h b/include/asm-generic/clkdev.h index 90a32a6..4ff33474 100644 --- a/include/asm-generic/clkdev.h +++ b/include/asm-generic/clkdev.h @@ -15,10 +15,12 @@ #include <linux/slab.h> +#ifndef CONFIG_COMMON_CLK struct clk; static inline int __clk_get(struct clk *clk) { return 1; } static inline void __clk_put(struct clk *clk) { } +#endif static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) { -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 0/2] fixes for struct clk_core migration 2014-09-09 6:07 [PATCH 0/2] fixes for struct clk_core migration Mike Turquette 2014-09-09 6:07 ` [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core Mike Turquette 2014-09-09 6:11 ` [PATCH 2/2] asm-generic: COMMON_CLK defines __clk_{get,put} Mike Turquette @ 2014-09-09 15:21 ` Tomeu Vizoso 2 siblings, 0 replies; 7+ messages in thread From: Tomeu Vizoso @ 2014-09-09 15:21 UTC (permalink / raw) To: linux-arm-kernel On 9 September 2014 08:07, Mike Turquette <mturquette@linaro.org> wrote: > A few build issues have popped up with more extensive testing of the > patches to split the clock framework into a proper provider/consumer > relationship. [0] > > The first patch adapts Intel's LPSS driver to use the clock provider > APIs. If no one objects to this patch then I will fold it into Tomeu's > patch #2. [1] > > Tomeu, can you run your Coccinelle script again against all of arch/ and > drivers/ to make sure nothing else was left out? Sure, I had to add a few new files that are now in linux-next, including the lpss driver. I just sent a v10 of my series, but the only changed commit is the generated one: https://lkml.kernel.org/r/<1410271497-27148-1-git-send-email-tomeu.vizoso@collabora.com> Cheers, Tomeu > The second patch brings the asm-generic version of clkdev.h up to speed > with all of the asm-specific versions, by not declaring __clk_get and > __clk_put if CONFIG_COMMON_CLK is set. If no one objects to this patch > then I will move it to the front of the patch stack when rebasing > Tomeu's series. > > [0] http://lkml.kernel.org/r/<1409758148-20104-1-git-send-email-tomeu.vizoso@collabora.com> > [1] http://lkml.kernel.org/r/<1409758317-20564-1-git-send-email-tomeu.vizoso@collabora.com> > > Mike Turquette (2): > acpi: lpss: convert from struct clk to struct clk_core > asm-generic: COMMON_CLK defines __clk_{get,put} > > drivers/acpi/acpi_lpss.c | 6 +++--- > include/asm-generic/clkdev.h | 2 ++ > include/linux/platform_data/clk-lpss.h | 2 +- > 3 files changed, 6 insertions(+), 4 deletions(-) > > -- > 1.8.3.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-09-10 5:30 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-09-09 6:07 [PATCH 0/2] fixes for struct clk_core migration Mike Turquette 2014-09-09 6:07 ` [PATCH 1/2] acpi: lpss: convert from struct clk to struct clk_core Mike Turquette 2014-09-09 13:16 ` Rafael J. Wysocki 2014-09-09 13:52 ` Mika Westerberg 2014-09-10 5:30 ` Heikki Krogerus 2014-09-09 6:11 ` [PATCH 2/2] asm-generic: COMMON_CLK defines __clk_{get,put} Mike Turquette 2014-09-09 15:21 ` [PATCH 0/2] fixes for struct clk_core migration Tomeu Vizoso
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).