Consolidate the clkdev header files
Subsystems (14)
PATCH 1/1 Consolidate the clkdev header files
From: Kyungmin Park <[email protected]>
Now most of ARM machines has the alsmot same __clk_get/put() macro
So place it at the arch/arm/include/asm/clkdev.h and remove the reduntant header files
But some machines don't have the same form as above. It can use the machince specific clkdev file by HAVE_MACH_CLKDEV config
Now there are only 3 caese.
1) define the clk structure with clkdev macro => Need to move clk structure to proper header file
arch/arm/mach-versatile/include/mach/clkdev.harch/arm/mach-realview/include/mach/clkdev.harch/arm/mach-vexpress/include/mach/clkdev.harch/arm/mach-integrator/include/mach/clkdev.h
2) export the __clk_get/put function at clock.c
arch/arm/mach-shmobile/include/mach/clkdev.h
3) demuxing the clk sourcearch/arm/mach-u300/include/mach/clkdev.h
--- arch/arm/Kconfig | 6 ++++ arch/arm/include/asm/clkdev.h | 5 ++++ arch/arm/mach-at91/include/mach/clkdev.h | 7 ----- arch/arm/mach-bcmring/include/mach/clkdev.h | 7 ----- arch/arm/mach-davinci/include/mach/clkdev.h | 15 ----------- arch/arm/mach-ep93xx/include/mach/clkdev.h | 11 -------- arch/arm/mach-lpc32xx/include/mach/clkdev.h | 25 ------------------- arch/arm/mach-mmp/include/mach/clkdev.h | 7 ----- arch/arm/mach-msm/include/mach/clkdev.h | 19 -------------- arch/arm/mach-mxs/include/mach/clkdev.h | 7 ----- arch/arm/mach-nomadik/include/mach/clkdev.h | 7 ----- arch/arm/mach-nuc93x/include/mach/clkdev.h | 7 ----- arch/arm/mach-omap1/include/mach/clkdev.h | 5 ---- arch/arm/mach-omap2/include/mach/clkdev.h | 5 ---- arch/arm/mach-pnx4008/include/mach/clkdev.h | 7 ----- arch/arm/mach-pxa/include/mach/clkdev.h | 7 ----- arch/arm/mach-spear3xx/include/mach/clkdev.h | 19 -------------- arch/arm/mach-spear6xx/include/mach/clkdev.h | 19 -------------- arch/arm/mach-tegra/include/mach/clkdev.h | 34 -------------------------- arch/arm/mach-ux500/include/mach/clkdev.h | 7 ----- arch/arm/mach-w90x900/include/mach/clkdev.h | 7 ----- arch/arm/plat-mxc/include/mach/clkdev.h | 7 ----- arch/arm/plat-omap/include/plat/clkdev.h | 13 ---------- arch/arm/plat-spear/include/plat/clkdev.h | 20 --------------- arch/arm/plat-tcc/include/mach/clkdev.h | 7 ----- drivers/clk/Kconfig | 3 ++ 26 files changed, 14 insertions(+), 269 deletions(-) delete mode 100644 arch/arm/mach-at91/include/mach/clkdev.h delete mode 100644 arch/arm/mach-bcmring/include/mach/clkdev.h delete mode 100644 arch/arm/mach-davinci/include/mach/clkdev.h delete mode 100644 arch/arm/mach-ep93xx/include/mach/clkdev.h delete mode 100644 arch/arm/mach-lpc32xx/include/mach/clkdev.h delete mode 100644 arch/arm/mach-mmp/include/mach/clkdev.h delete mode 100644 arch/arm/mach-msm/include/mach/clkdev.h delete mode 100644 arch/arm/mach-mxs/include/mach/clkdev.h delete mode 100644 arch/arm/mach-nomadik/include/mach/clkdev.h delete mode 100644 arch/arm/mach-nuc93x/include/mach/clkdev.h delete mode 100644 arch/arm/mach-omap1/include/mach/clkdev.h delete mode 100644 arch/arm/mach-omap2/include/mach/clkdev.h delete mode 100644 arch/arm/mach-pnx4008/include/mach/clkdev.h delete mode 100644 arch/arm/mach-pxa/include/mach/clkdev.h delete mode 100644 arch/arm/mach-spear3xx/include/mach/clkdev.h delete mode 100644 arch/arm/mach-spear6xx/include/mach/clkdev.h delete mode 100644 arch/arm/mach-tegra/include/mach/clkdev.h delete mode 100644 arch/arm/mach-ux500/include/mach/clkdev.h delete mode 100644 arch/arm/mach-w90x900/include/mach/clkdev.h delete mode 100644 arch/arm/plat-mxc/include/mach/clkdev.h delete mode 100644 arch/arm/plat-omap/include/plat/clkdev.h delete mode 100644 arch/arm/plat-spear/include/plat/clkdev.h delete mode 100644 arch/arm/plat-tcc/include/mach/clkdev.h
arch/arm/Kconfig +6 -0
@@ -239,6 +239,7 @@ config ARCH_INTEGRATOR select ARM_AMBA select ARCH_HAS_CPUFREQ select CLKDEV_LOOKUP + select HAVE_MACH_CLKDEV select ICST select GENERIC_CLOCKEVENTS select PLAT_VERSATILE
@@ -250,6 +251,7 @@ config ARCH_REALVIEW bool "ARM Ltd. RealView family" select ARM_AMBA select CLKDEV_LOOKUP + select HAVE_MACH_CLKDEV select ICST select GENERIC_CLOCKEVENTS select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -265,6 +267,7 @@ config ARCH_VERSATILE select ARM_AMBA select ARM_VIC select CLKDEV_LOOKUP + select HAVE_MACH_CLKDEV select ICST select GENERIC_CLOCKEVENTS select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -281,6 +284,7 @@ config ARCH_VEXPRESS select ARM_AMBA select ARM_TIMER_SP804 select CLKDEV_LOOKUP + select HAVE_MACH_CLKDEV select GENERIC_CLOCKEVENTS select HAVE_CLK select HAVE_PATA_PLATFORM
@@ -638,6 +642,7 @@ config ARCH_SHMOBILE bool "Renesas SH-Mobile / R-Mobile" select HAVE_CLK select CLKDEV_LOOKUP + select HAVE_MACH_CLKDEV select GENERIC_CLOCKEVENTS select NO_IOPORT select SPARSE_IRQ
@@ -808,6 +813,7 @@ config ARCH_U300 select ARM_VIC select GENERIC_CLOCKEVENTS select CLKDEV_LOOKUP + select HAVE_MACH_CLKDEV select GENERIC_GPIO help Support for ST-Ericsson U300 series mobile platforms.
arch/arm/include/asm/clkdev.h +5 -0
@@ -14,7 +14,12 @@#include <linux/slab.h> +#ifdef CONFIG_HAVE_MACH_CLKDEV #include <mach/clkdev.h> +#else +#define __clk_get (clk) ({ 1; }) +#define __clk_put (clk) do { } while (0) +#endif static inline struct clk_lookup_alloc *__clkdev_alloc (size_t size) {
arch/arm/mach-at91/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-bcmring/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-davinci/include/mach/clkdev.h deleted +0 -15
@@ -1,15 +0,0 @@ -#ifndef __MACH_CLKDEV_H -#define __MACH_CLKDEV_H - -struct clk ; - -static inline int __clk_get (struct clk *clk) -{ -return 1 ; -} - -static inline void __clk_put (struct clk *clk) -{ -} - -#endif
arch/arm/mach-ep93xx/include/mach/clkdev.h deleted +0 -11
@@ -1,11 +0,0 @@ -/* -* arch/arm/mach-ep93xx/include/mach/clkdev.h -*/ - -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-lpc32xx/include/mach/clkdev.h deleted +0 -25
@@ -1,25 +0,0 @@ -/* -* arch/arm/mach-lpc32xx/include/mach/clkdev.h -* -* Author: Kevin Wells <[email protected]> -* -* Copyright (C) 2010 NXP Semiconductors -* -* 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; either version 2 of the License, or -* (at your option) any later version. -* -* 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. -*/ - -#ifndef __ASM_ARCH_CLKDEV_H -#define __ASM_ARCH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-mmp/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif /* __ASM_MACH_CLKDEV_H */
arch/arm/mach-msm/include/mach/clkdev.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* Copyright (c) 2011, Code Aurora Forum. 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 -* only version 2 as published by the Free Software Foundation. -* -* 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. -*/ -#ifndef __ASM_ARCH_MSM_CLKDEV_H -#define __ASM_ARCH_MSM_CLKDEV_H - -struct clk ; - -static inline int __clk_get (struct clk *clk) {return 1 ; } -static inline void __clk_put (struct clk *clk) { } -#endif
arch/arm/mach-mxs/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __MACH_MXS_CLKDEV_H__ -#define __MACH_MXS_CLKDEV_H__ - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-nomadik/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-nuc93x/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-omap1/include/mach/clkdev.h deleted +0 -5
@@ -1,5 +0,0 @@ -/* -* arch/arm/mach-omap1/include/mach/clkdev.h -*/ - -#include <plat/clkdev.h>
arch/arm/mach-omap2/include/mach/clkdev.h deleted +0 -5
@@ -1,5 +0,0 @@ -/* -* arch/arm/mach-omap2/include/mach/clkdev.h -*/ - -#include <plat/clkdev.h>
arch/arm/mach-pnx4008/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-pxa/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-spear3xx/include/mach/clkdev.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear3xx/include/mach/clkdev.h -* -* Clock Dev framework definitions for SPEAr3xx machine family -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar<[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. -*/ - -#ifndef __MACH_CLKDEV_H -#define __MACH_CLKDEV_H - -#include <plat/clkdev.h> - -#endif /* __MACH_CLKDEV_H */
arch/arm/mach-spear6xx/include/mach/clkdev.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear6xx/include/mach/clkdev.h -* -* Clock Dev framework definitions for SPEAr6xx machine family -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar<[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. -*/ - -#ifndef __MACH_CLKDEV_H -#define __MACH_CLKDEV_H - -#include <plat/clkdev.h> - -#endif /* __MACH_CLKDEV_H */
arch/arm/mach-tegra/include/mach/clkdev.h deleted +0 -34
@@ -1,34 +0,0 @@ -/* -* arch/arm/mach-tegra/include/mach/clkdev.h -* -* Copyright (C) 2010 Google, Inc. -* -* Author: -* Colin Cross <[email protected]> -* -* 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. -* -*/ - -#ifndef __MACH_CLKDEV_H -#define __MACH_CLKDEV_H - -struct clk ; - -static inline int __clk_get (struct clk *clk) -{ -return 1 ; -} - -static inline void __clk_put (struct clk *clk) -{ -} - -#endif
arch/arm/mach-ux500/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/mach-w90x900/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/plat-mxc/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
arch/arm/plat-omap/include/plat/clkdev.h deleted +0 -13
@@ -1,13 +0,0 @@ -#ifndef __MACH_CLKDEV_H -#define __MACH_CLKDEV_H - -static inline int __clk_get (struct clk *clk) -{ -return 1 ; -} - -static inline void __clk_put (struct clk *clk) -{ -} - -#endif
arch/arm/plat-spear/include/plat/clkdev.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* arch/arm/plat-spear/include/plat/clkdev.h -* -* Clock Dev framework definitions for SPEAr platform -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar<[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. -*/ - -#ifndef __PLAT_CLKDEV_H -#define __PLAT_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif /* __PLAT_CLKDEV_H */
arch/arm/plat-tcc/include/mach/clkdev.h deleted +0 -7
@@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_CLKDEV_H -#define __ASM_MACH_CLKDEV_H - -#define __clk_get (clk) ({ 1; }) -#define __clk_put (clk) do { } while (0) - -#endif
drivers/clk/Kconfig +3 -0
@@ -2,3 +2,6 @@ config CLKDEV_LOOKUP bool select HAVE_CLK + +config HAVE_MACH_CLKDEV + bool
Signature · 1 line
1.7.5.1.300.gc565c
PATCH 1/1 Consolidate the clkdev header files
Quoted 28 lines · Kyungmin Park
From: Kyungmin Park <[email protected]>
Now most of ARM machines has the alsmot same __clk_get/put() macro
So place it at the
arch/arm/include/asm/clkdev.hand remove the reduntant header filesBut some machines don't have the same form as above. It can use the machince specific clkdev file by
HAVE_MACH_CLKDEVconfigNow there are only 3 caese.
1) define the clk structure with clkdev macro => Need to move clk structure to proper header file
arch/arm/mach-versatile/include/mach/clkdev.harch/arm/mach-realview/include/mach/clkdev.harch/arm/mach-vexpress/include/mach/clkdev.harch/arm/mach-integrator/include/mach/clkdev.h2) export the __clk_get/put function at
clock.c
arch/arm/mach-shmobile/include/mach/clkdev.h3) demuxing the clk source
arch/arm/mach-u300/include/mach/clkdev.hSigned-off-by Kyungmin Park <[email protected]>---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?6 ++++ ?arch/arm/include/asm/clkdev.h ? ? ? ? ? ? ? ?| ? ?5 ++++
[...]
Quoted 3 lines
?arch/arm/mach-spear3xx/include/mach/clkdev.h | ? 19 -------------- ?arch/arm/mach-spear6xx/include/mach/clkdev.h | ? 19 -------------- ?arch/arm/plat-spear/include/plat/clkdev.h ? ?| ? 20 ---------------
PATCH 1/1 Consolidate the clkdev header files
In reply to Kyungmin ParkQuoted 17 lines · Kyungmin Park
From: Kyungmin Park <[email protected]>
Now most of ARM machines has the alsmot same __clk_get/put() macro
So place it at the
arch/arm/include/asm/clkdev.hand remove the reduntant header filesBut some machines don't have the same form as above. It can use the machince specific clkdev file by
HAVE_MACH_CLKDEVconfigNow there are only 3 caese.
1) define the clk structure with clkdev macro => Need to move clk structure to proper header file
arch/arm/mach-versatile/include/mach/clkdev.harch/arm/mach-realview/include/mach/clkdev.harch/arm/mach-vexpress/include/mach/clkdev.harch/arm/mach-integrator/include/mach/clkdev.h
Quoted 8 lines
2) export the __clk_get/put function at
clock.c
arch/arm/mach-shmobile/include/mach/clkdev.h3) demuxing the clk source
arch/arm/mach-u300/include/mach/clkdev.hSigned-off-by Kyungmin Park <[email protected]>
This looks like a very useful simplification by itself, nice work!
You definitely need to coordinate this with the struct clk consolidation that Jeremy Kerr has just posted though. It seems that you are touching some of the same code lines.
Arnd
PATCH 1/1 Consolidate the clkdev header files
In reply to Kyungmin ParkQuoted 24 lines · Kyungmin Park
From: Kyungmin Park <[email protected]>
Now most of ARM machines has the alsmot same __clk_get/put() macro
So place it at the
arch/arm/include/asm/clkdev.hand remove the reduntant header filesBut some machines don't have the same form as above. It can use the machince specific clkdev file by
HAVE_MACH_CLKDEVconfigNow there are only 3 caese.
1) define the clk structure with clkdev macro => Need to move clk structure to proper header file
arch/arm/mach-versatile/include/mach/clkdev.harch/arm/mach-realview/include/mach/clkdev.harch/arm/mach-vexpress/include/mach/clkdev.harch/arm/mach-integrator/include/mach/clkdev.h2) export the __clk_get/put function at
clock.c
arch/arm/mach-shmobile/include/mach/clkdev.h3) demuxing the clk source
arch/arm/mach-u300/include/mach/clkdev.h
Quoted 6 lines
Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/Kconfig | 6 ++++ arch/arm/include/asm/clkdev.h | 5 ++++arch/arm/mach-ep93xx/include/mach/clkdev.h | 11 --------
PATCH 1/1 Consolidate the clkdev header files
Hi Russell,
Any comments on this patch?
Thank you,
Kyungmin Park
Quoted 34 lines · H Hartley Sweeten
Quoted 24 lines · Kyungmin Park
From: Kyungmin Park <[email protected]>
Now most of ARM machines has the alsmot same __clk_get/put() macro
So place it at the
arch/arm/include/asm/clkdev.hand remove the reduntant header filesBut some machines don't have the same form as above. It can use the machince specific clkdev file by
HAVE_MACH_CLKDEVconfigNow there are only 3 caese.
1) define the clk structure with clkdev macro => Need to move clk structure to proper header file
arch/arm/mach-versatile/include/mach/clkdev.harch/arm/mach-realview/include/mach/clkdev.harch/arm/mach-vexpress/include/mach/clkdev.harch/arm/mach-integrator/include/mach/clkdev.h2) export the __clk_get/put function at
clock.c
arch/arm/mach-shmobile/include/mach/clkdev.h3) demuxing the clk source
arch/arm/mach-u300/include/mach/clkdev.hQuoted 6 lines
Signed-off-by Kyungmin Park <[email protected]>---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?6 ++++ ?arch/arm/include/asm/clkdev.h ? ? ? ? ? ? ? ?| ? ?5 ++++?arch/arm/mach-ep93xx/include/mach/clkdev.h ? | ? 11 --------
PATCH 1/1 Consolidate the clkdev header files
In reply to Kyungmin ParkQuoted 21 lines · Kyungmin Park
From: Kyungmin Park <[email protected]>
Now most of ARM machines has the alsmot same __clk_get/put() macro
So place it at the
arch/arm/include/asm/clkdev.hand remove the reduntant header filesBut some machines don't have the same form as above. It can use the machince specific clkdev file by
HAVE_MACH_CLKDEVconfigNow there are only 3 caese.
1) define the clk structure with clkdev macro => Need to move clk structure to proper header file
arch/arm/mach-versatile/include/mach/clkdev.harch/arm/mach-realview/include/mach/clkdev.harch/arm/mach-vexpress/include/mach/clkdev.harch/arm/mach-integrator/include/mach/clkdev.h2) export the __clk_get/put function at
clock.c
arch/arm/mach-shmobile/include/mach/clkdev.h
Quoted 8 lines
3) demuxing the clk source
arch/arm/mach-u300/include/mach/clkdev.hSigned-off-by Kyungmin Park <[email protected]>--- arch/arm/Kconfig | 6 ++++ arch/arm/include/asm/clkdev.h | 5 ++++ arch/arm/mach-at91/include/mach/clkdev.h | 7 -----
for at91
Best Regards,
J.