diff mbox

[v2.1,3/9] ARM: S3C24XX: enable usage of common dclk if common clock framework is enabled

Message ID 3835735.0k9HAgQHzN@phil (mailing list archive)
State New, archived
Headers show

Commit Message

Heiko Stübner April 23, 2014, 8:09 p.m. UTC
Add platform device and select the correct implementation automatically
depending on wether the old samsung_clock or the common clock framework
is enabled.

This is only done for machines already using the old dclk implementation,
as everybody else should move to use dt anyway.

The machine-specific settings for the external clocks will have to be set
by somebody with knowledge about the specific hardware.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
adapted to apply against v3.16-next/clk-s3c24xx

 arch/arm/mach-s3c24xx/Kconfig       | 22 +++++++++++++++++-----
 arch/arm/mach-s3c24xx/common.c      | 14 ++++++++++++++
 arch/arm/mach-s3c24xx/common.h      |  2 ++
 arch/arm/mach-s3c24xx/mach-anubis.c |  5 +++++
 arch/arm/mach-s3c24xx/mach-bast.c   |  5 +++++
 arch/arm/mach-s3c24xx/mach-osiris.c |  5 +++++
 arch/arm/mach-s3c24xx/mach-rx1950.c |  5 +++++
 arch/arm/mach-s3c24xx/mach-vr1000.c |  5 +++++
 arch/arm/mach-s3c24xx/s3c244x.c     |  2 ++
 9 files changed, 60 insertions(+), 5 deletions(-)

Comments

Paul Bolle May 9, 2014, 4:49 p.m. UTC | #1
On Wed, 2014-04-23 at 22:09 +0200, Heiko Stübner wrote:
> Add platform device and select the correct implementation automatically
> depending on wether the old samsung_clock or the common clock framework
> is enabled.
> 
> This is only done for machines already using the old dclk implementation,
> as everybody else should move to use dt anyway.
> 
> The machine-specific settings for the external clocks will have to be set
> by somebody with knowledge about the specific hardware.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Tomasz Figa <t.figa@samsung.com>

It seems this one just hit linux-next (in next-20140509).

> --- a/arch/arm/mach-s3c24xx/Kconfig
> +++ b/arch/arm/mach-s3c24xx/Kconfig
> @@ -18,6 +18,13 @@ config PLAT_S3C24XX
>  	help
>  	  Base platform code for any Samsung S3C24XX device
>  
> +config S3C2410_COMMON_DCLK
> +	bool
> +	select REGMAP_MMIO
> +	help
> +	  Temporary symbol to build the dclk driver based on the common clock
> +	  framework.
> +
>  menu "SAMSUNG S3C24XX SoCs Support"
>  
>  comment "S3C24XX SoCs"
> @@ -264,7 +271,8 @@ config ARCH_BAST
>  	select ISA
>  	select MACH_BAST_IDE
>  	select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ
> -	select S3C24XX_DCLK
> +	select S3C24XX_DCLK if SAMSUNG_CLOCK
> +	select S3C2410_COMMON_DCLK if COMMON_CLK
>  	select S3C24XX_SIMTEC_NOR
>  	select S3C24XX_SIMTEC_PM if PM
>  	select S3C24XX_SIMTEC_USB
> @@ -345,7 +353,8 @@ config MACH_TCT_HAMMER
>  config MACH_VR1000
>  	bool "Thorcom VR1000"
>  	select MACH_BAST_IDE
> -	select S3C24XX_DCLK
> +	select S3C24XX_DCLK if SAMSUNG_CLOCK
> +	select S3C2410_COMMON_DCLK if COMMON_CLK
>  	select S3C24XX_SIMTEC_NOR
>  	select S3C24XX_SIMTEC_PM if PM
>  	select S3C24XX_SIMTEC_USB
> @@ -530,7 +539,8 @@ config MACH_ANUBIS
>  	bool "Simtec Electronics ANUBIS"
>  	select HAVE_PATA_PLATFORM
>  	select S3C2440_XTAL_12000000
> -	select S3C24XX_DCLK
> +	select S3C24XX_DCLK if SAMSUNG_CLOCK
> +	select S3C2410_COMMON_DCLK if COMMON_CLK
>  	select S3C24XX_SIMTEC_PM if PM
>  	select S3C_DEV_USB_HOST
>  	help
> @@ -571,7 +581,8 @@ config MACH_OSIRIS
>  	bool "Simtec IM2440D20 (OSIRIS) module"
>  	select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
>  	select S3C2440_XTAL_12000000
> -	select S3C24XX_DCLK
> +	select S3C24XX_DCLK if SAMSUNG_CLOCK
> +	select S3C2410_COMMON_DCLK if COMMON_CLK
>  	select S3C24XX_SIMTEC_PM if PM
>  	select S3C_DEV_NAND
>  	select S3C_DEV_USB_HOST
> @@ -643,7 +654,8 @@ config MACH_RX1950
>  	select PM_H1940 if PM
>  	select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
>  	select S3C2440_XTAL_16934400
> -	select S3C24XX_DCLK
> +	select S3C24XX_DCLK if SAMSUNG_CLOCK
> +	select S3C24XX_COMMON_DCLK if COMMON_CLK

This looks like a typo. Did you mean S3C2410_COMMON_DCLK?

>  	select S3C24XX_PWM
>  	select S3C_DEV_NAND
>  	help


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa May 9, 2014, 5:53 p.m. UTC | #2
On 09.05.2014 18:49, Paul Bolle wrote:
> On Wed, 2014-04-23 at 22:09 +0200, Heiko Stübner wrote:
>> Add platform device and select the correct implementation automatically
>> depending on wether the old samsung_clock or the common clock framework
>> is enabled.
>>
>> This is only done for machines already using the old dclk implementation,
>> as everybody else should move to use dt anyway.
>>
>> The machine-specific settings for the external clocks will have to be set
>> by somebody with knowledge about the specific hardware.
>>
>> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>
> It seems this one just hit linux-next (in next-20140509).
>

Which is bad, because:
a) it conflicts with patches already applied in samsung-clk tree,
b) the DT binding added by patch 4/9 has not been acked .

Kukjin, might I ask you to drop this series from your tree and let me 
send you a pull request with necessary dependencies and this series 
applied properly to resolve merge conflicts, as I suggested before in 
one of my replies to this thread?

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Heiko Stübner May 9, 2014, 10:57 p.m. UTC | #3
Am Freitag, 9. Mai 2014, 18:49:41 schrieb Paul Bolle:
> > @@ -643,7 +654,8 @@ config MACH_RX1950
> > 
> >  	select PM_H1940 if PM
> >  	select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
> >  	select S3C2440_XTAL_16934400
> > 
> > -	select S3C24XX_DCLK
> > +	select S3C24XX_DCLK if SAMSUNG_CLOCK
> > +	select S3C24XX_COMMON_DCLK if COMMON_CLK
> 
> This looks like a typo. Did you mean S3C2410_COMMON_DCLK?

yep that is a typo, S3C2410_COMMON_DCLK is the correct one.

Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Heiko Stübner May 9, 2014, 11:07 p.m. UTC | #4
Am Freitag, 9. Mai 2014, 19:53:21 schrieb Tomasz Figa:
> On 09.05.2014 18:49, Paul Bolle wrote:
> > On Wed, 2014-04-23 at 22:09 +0200, Heiko Stübner wrote:
> >> Add platform device and select the correct implementation automatically
> >> depending on wether the old samsung_clock or the common clock framework
> >> is enabled.
> >> 
> >> This is only done for machines already using the old dclk implementation,
> >> as everybody else should move to use dt anyway.
> >> 
> >> The machine-specific settings for the external clocks will have to be set
> >> by somebody with knowledge about the specific hardware.
> >> 
> >> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> >> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
> > 
> > It seems this one just hit linux-next (in next-20140509).
> 
> Which is bad, because:
> a) it conflicts with patches already applied in samsung-clk tree,

I remember seeing patches regarding more than one clk-samsung clock providers.
Do you need any additional changes for s3c24xx from me for this?


> b) the DT binding added by patch 4/9 has not been acked .

I'm not 100% sure if this is necessary, as the binding is similar to most 
other Samsung bindings and looking through recent clock binding changes I 
didn't find any that seemed to have a special dt-maintainer ack - including 
Exynos ones. Also if I remember correctly there was this "if we don't respond, 
carry on" policy around :-) .


Heiko

> Kukjin, might I ask you to drop this series from your tree and let me
> send you a pull request with necessary dependencies and this series
> applied properly to resolve merge conflicts, as I suggested before in
> one of my replies to this thread?
> 
> Best regards,
> Tomasz

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa May 9, 2014, 11:11 p.m. UTC | #5
Hi Heiko,

On 10.05.2014 01:07, Heiko Stübner wrote:
> Am Freitag, 9. Mai 2014, 19:53:21 schrieb Tomasz Figa:
>> On 09.05.2014 18:49, Paul Bolle wrote:
>>> On Wed, 2014-04-23 at 22:09 +0200, Heiko Stübner wrote:
>>>> Add platform device and select the correct implementation automatically
>>>> depending on wether the old samsung_clock or the common clock framework
>>>> is enabled.
>>>>
>>>> This is only done for machines already using the old dclk implementation,
>>>> as everybody else should move to use dt anyway.
>>>>
>>>> The machine-specific settings for the external clocks will have to be set
>>>> by somebody with knowledge about the specific hardware.
>>>>
>>>> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
>>>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>>>
>>> It seems this one just hit linux-next (in next-20140509).
>>
>> Which is bad, because:
>> a) it conflicts with patches already applied in samsung-clk tree,
>
> I remember seeing patches regarding more than one clk-samsung clock providers.
> Do you need any additional changes for s3c24xx from me for this?
>

Yes, that's the problem here. If you could do it, I would appreciate it, 
but if you don't have time then I can handle this. The changes needed 
are mostly trivial - basically every common samsung_clk function gets 
new argument to a context structure. The branch to base on would be 
for_3.16/exynos5260 in samsung-clk tree.

>
>> b) the DT binding added by patch 4/9 has not been acked .
>
> I'm not 100% sure if this is necessary, as the binding is similar to most
> other Samsung bindings and looking through recent clock binding changes I
> didn't find any that seemed to have a special dt-maintainer ack - including
> Exynos ones. Also if I remember correctly there was this "if we don't respond,
> carry on" policy around :-) .
>

Well, for me this could go as is, but rules should be followed and the 
rules are ACK or 3 weeks and a ping without response. So we need to wait 
at least to next Wednesday to bypass DT review.

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Heiko Stübner May 9, 2014, 11:33 p.m. UTC | #6
Hi Tomasz,

Am Samstag, 10. Mai 2014, 01:11:45 schrieb Tomasz Figa:
> On 10.05.2014 01:07, Heiko Stübner wrote:
> > Am Freitag, 9. Mai 2014, 19:53:21 schrieb Tomasz Figa:
> >> On 09.05.2014 18:49, Paul Bolle wrote:
> >>> On Wed, 2014-04-23 at 22:09 +0200, Heiko Stübner wrote:
> >>>> Add platform device and select the correct implementation automatically
> >>>> depending on wether the old samsung_clock or the common clock framework
> >>>> is enabled.
> >>>> 
> >>>> This is only done for machines already using the old dclk
> >>>> implementation,
> >>>> as everybody else should move to use dt anyway.
> >>>> 
> >>>> The machine-specific settings for the external clocks will have to be
> >>>> set
> >>>> by somebody with knowledge about the specific hardware.
> >>>> 
> >>>> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> >>>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
> >>> 
> >>> It seems this one just hit linux-next (in next-20140509).
> >> 
> >> Which is bad, because:
> >> a) it conflicts with patches already applied in samsung-clk tree,
> > 
> > I remember seeing patches regarding more than one clk-samsung clock
> > providers. Do you need any additional changes for s3c24xx from me for
> > this?
> 
> Yes, that's the problem here. If you could do it, I would appreciate it,
> but if you don't have time then I can handle this. The changes needed
> are mostly trivial - basically every common samsung_clk function gets
> new argument to a context structure. The branch to base on would be
> for_3.16/exynos5260 in samsung-clk tree.
> 
> >> b) the DT binding added by patch 4/9 has not been acked .
> > 
> > I'm not 100% sure if this is necessary, as the binding is similar to most
> > other Samsung bindings and looking through recent clock binding changes I
> > didn't find any that seemed to have a special dt-maintainer ack -
> > including
> > Exynos ones. Also if I remember correctly there was this "if we don't
> > respond, carry on" policy around :-) .
> 
> Well, for me this could go as is, but rules should be followed and the
> rules are ACK or 3 weeks and a ping without response. So we need to wait
> at least to next Wednesday to bypass DT review.

so I only remembered the abbreviated version of this :-) [without the 3 weeks 
requirement]. My guess is I should be able to adapt it to this change and also 
fix the typo Paul found until then.


Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kim Kukjin May 12, 2014, 10:47 p.m. UTC | #7
On 05/10/14 08:33, Heiko Stübner wrote:
> Hi Tomasz,

>>>>> It seems this one just hit linux-next (in next-20140509).
>>>>
>>>> Which is bad, because:
>>>> a) it conflicts with patches already applied in samsung-clk tree,
>>>
>>> I remember seeing patches regarding more than one clk-samsung clock
>>> providers. Do you need any additional changes for s3c24xx from me for
>>> this?
>>
>> Yes, that's the problem here. If you could do it, I would appreciate it,
>> but if you don't have time then I can handle this. The changes needed
>> are mostly trivial - basically every common samsung_clk function gets
>> new argument to a context structure. The branch to base on would be
>> for_3.16/exynos5260 in samsung-clk tree.
>>

I think, would be better if we could fix the conflicts with Hekio's 
additional patches...basically nobody wants revert something for next 
tree once it is landed. But in this case, it's up to Tomasz...

Probably, Heiko resubmitted? Is it based on the branch Tomasz memtioned, 
I didn't check it yet?..

Tomasz, do you still want me to drop this series in samsung tree now? 
Additional patches would be helpful to me because other dependency i.e., 
exynos5260...for me.

>>>> b) the DT binding added by patch 4/9 has not been acked .
>>>
>>> I'm not 100% sure if this is necessary, as the binding is similar to most
>>> other Samsung bindings and looking through recent clock binding changes I
>>> didn't find any that seemed to have a special dt-maintainer ack -
>>> including
>>> Exynos ones. Also if I remember correctly there was this "if we don't
>>> respond, carry on" policy around :-) .
>>
>> Well, for me this could go as is, but rules should be followed and the
>> rules are ACK or 3 weeks and a ping without response. So we need to wait
>> at least to next Wednesday to bypass DT review.
>
> so I only remembered the abbreviated version of this :-) [without the 3 weeks
> requirement]. My guess is I should be able to adapt it to this change and also
> fix the typo Paul found until then.
>
In my memory, not 3 weeks...maybe 1week or 10days?...

- Kukjin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Heiko Stübner May 12, 2014, 10:57 p.m. UTC | #8
Hi Kukjin,

Am Dienstag, 13. Mai 2014, 07:47:57 schrieb Kukjin Kim:
> On 05/10/14 08:33, Heiko Stübner wrote:
> > Hi Tomasz,
> > 
> >>>>> It seems this one just hit linux-next (in next-20140509).
> >>>> 
> >>>> Which is bad, because:
> >>>> a) it conflicts with patches already applied in samsung-clk tree,
> >>> 
> >>> I remember seeing patches regarding more than one clk-samsung clock
> >>> providers. Do you need any additional changes for s3c24xx from me for
> >>> this?
> >> 
> >> Yes, that's the problem here. If you could do it, I would appreciate it,
> >> but if you don't have time then I can handle this. The changes needed
> >> are mostly trivial - basically every common samsung_clk function gets
> >> new argument to a context structure. The branch to base on would be
> >> for_3.16/exynos5260 in samsung-clk tree.
> 
> I think, would be better if we could fix the conflicts with Hekio's
> additional patches...basically nobody wants revert something for next
> tree once it is landed. But in this case, it's up to Tomasz...
> 
> Probably, Heiko resubmitted? Is it based on the branch Tomasz memtioned,
> I didn't check it yet?..
> 
> Tomasz, do you still want me to drop this series in samsung tree now?
> Additional patches would be helpful to me because other dependency i.e.,
> exynos5260...for me.

I submitted a v3 series yesterday, that is based on Tomasz' branch. This 
prevents build errors from happening. I'll let you two decide how you want to 
handle this :-)

I can also produce fixup patches if you two decide to keep the v2 series and 
just fix the conflicts.


Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index d067f76..6036e77 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -18,6 +18,13 @@  config PLAT_S3C24XX
 	help
 	  Base platform code for any Samsung S3C24XX device
 
+config S3C2410_COMMON_DCLK
+	bool
+	select REGMAP_MMIO
+	help
+	  Temporary symbol to build the dclk driver based on the common clock
+	  framework.
+
 menu "SAMSUNG S3C24XX SoCs Support"
 
 comment "S3C24XX SoCs"
@@ -264,7 +271,8 @@  config ARCH_BAST
 	select ISA
 	select MACH_BAST_IDE
 	select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ
-	select S3C24XX_DCLK
+	select S3C24XX_DCLK if SAMSUNG_CLOCK
+	select S3C2410_COMMON_DCLK if COMMON_CLK
 	select S3C24XX_SIMTEC_NOR
 	select S3C24XX_SIMTEC_PM if PM
 	select S3C24XX_SIMTEC_USB
@@ -345,7 +353,8 @@  config MACH_TCT_HAMMER
 config MACH_VR1000
 	bool "Thorcom VR1000"
 	select MACH_BAST_IDE
-	select S3C24XX_DCLK
+	select S3C24XX_DCLK if SAMSUNG_CLOCK
+	select S3C2410_COMMON_DCLK if COMMON_CLK
 	select S3C24XX_SIMTEC_NOR
 	select S3C24XX_SIMTEC_PM if PM
 	select S3C24XX_SIMTEC_USB
@@ -530,7 +539,8 @@  config MACH_ANUBIS
 	bool "Simtec Electronics ANUBIS"
 	select HAVE_PATA_PLATFORM
 	select S3C2440_XTAL_12000000
-	select S3C24XX_DCLK
+	select S3C24XX_DCLK if SAMSUNG_CLOCK
+	select S3C2410_COMMON_DCLK if COMMON_CLK
 	select S3C24XX_SIMTEC_PM if PM
 	select S3C_DEV_USB_HOST
 	help
@@ -571,7 +581,8 @@  config MACH_OSIRIS
 	bool "Simtec IM2440D20 (OSIRIS) module"
 	select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
 	select S3C2440_XTAL_12000000
-	select S3C24XX_DCLK
+	select S3C24XX_DCLK if SAMSUNG_CLOCK
+	select S3C2410_COMMON_DCLK if COMMON_CLK
 	select S3C24XX_SIMTEC_PM if PM
 	select S3C_DEV_NAND
 	select S3C_DEV_USB_HOST
@@ -643,7 +654,8 @@  config MACH_RX1950
 	select PM_H1940 if PM
 	select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
 	select S3C2440_XTAL_16934400
-	select S3C24XX_DCLK
+	select S3C24XX_DCLK if SAMSUNG_CLOCK
+	select S3C24XX_COMMON_DCLK if COMMON_CLK
 	select S3C24XX_PWM
 	select S3C_DEV_NAND
 	help
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 92a1e3a..8e930e0 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -554,3 +554,17 @@  void __init s3c2443_init_clocks(int xtal)
 	s3c2443_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
 }
 #endif
+
+#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2440) || \
+	defined(CONFIG_CPU_S3C2442)
+static struct resource s3c2410_dclk_resource[] = {
+	[0] = DEFINE_RES_MEM(0x56000084, 0x4),
+};
+
+struct platform_device s3c2410_device_dclk = {
+	.name		= "s3c2410-dclk",
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(s3c2410_dclk_resource),
+	.resource	= s3c2410_dclk_resource,
+};
+#endif
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index 3fade6d..50504c7 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -114,6 +114,8 @@  extern struct platform_device s3c2412_device_dma;
 extern struct platform_device s3c2440_device_dma;
 extern struct platform_device s3c2443_device_dma;
 
+extern struct platform_device s3c2410_device_dclk;
+
 #ifdef CONFIG_S3C2412_COMMON_CLK
 void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
 				unsigned long ext_f, void __iomem *reg_base);
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index 2a16f8f..6a1a781 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -352,6 +352,7 @@  static struct platform_device anubis_device_sm501 = {
 /* Standard Anubis devices */
 
 static struct platform_device *anubis_devices[] __initdata = {
+	&s3c2410_device_dclk,
 	&s3c_device_ohci,
 	&s3c_device_wdt,
 	&s3c_device_adc,
@@ -364,6 +365,7 @@  static struct platform_device *anubis_devices[] __initdata = {
 	&anubis_device_sm501,
 };
 
+#ifdef CONFIG_SAMSUNG_CLOCK
 static struct clk *anubis_clocks[] __initdata = {
 	&s3c24xx_dclk0,
 	&s3c24xx_dclk1,
@@ -371,6 +373,7 @@  static struct clk *anubis_clocks[] __initdata = {
 	&s3c24xx_clkout1,
 	&s3c24xx_uclk,
 };
+#endif
 
 /* I2C devices. */
 
@@ -394,6 +397,7 @@  static struct s3c24xx_audio_simtec_pdata __initdata anubis_audio = {
 
 static void __init anubis_map_io(void)
 {
+#ifdef CONFIG_SAMSUNG_CLOCK
 	/* initialise the clocks */
 
 	s3c24xx_dclk0.parent = &clk_upll;
@@ -408,6 +412,7 @@  static void __init anubis_map_io(void)
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_register_clocks(anubis_clocks, ARRAY_SIZE(anubis_clocks));
+#endif
 
 	s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
 	s3c24xx_init_clocks(0);
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index 981ba1e..13e078c 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -523,6 +523,7 @@  static struct s3c_hwmon_pdata bast_hwmon_info = {
 // cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0
 
 static struct platform_device *bast_devices[] __initdata = {
+	&s3c2410_device_dclk,
 	&s3c_device_ohci,
 	&s3c_device_lcd,
 	&s3c_device_wdt,
@@ -537,6 +538,7 @@  static struct platform_device *bast_devices[] __initdata = {
 	&bast_sio,
 };
 
+#ifdef CONFIG_SAMSUNG_CLK
 static struct clk *bast_clocks[] __initdata = {
 	&s3c24xx_dclk0,
 	&s3c24xx_dclk1,
@@ -544,6 +546,7 @@  static struct clk *bast_clocks[] __initdata = {
 	&s3c24xx_clkout1,
 	&s3c24xx_uclk,
 };
+#endif
 
 static struct s3c_cpufreq_board __initdata bast_cpufreq = {
 	.refresh	= 7800, /* 7.8usec */
@@ -558,6 +561,7 @@  static struct s3c24xx_audio_simtec_pdata __initdata bast_audio = {
 
 static void __init bast_map_io(void)
 {
+#ifdef CONFIG_SAMSUNG_CLOCK
 	/* initialise the clocks */
 
 	s3c24xx_dclk0.parent = &clk_upll;
@@ -572,6 +576,7 @@  static void __init bast_map_io(void)
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
+#endif
 
 	s3c_hwmon_set_platdata(&bast_hwmon_info);
 
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index f84f2a4..93f42b5 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -344,12 +344,14 @@  static struct i2c_board_info osiris_i2c_devs[] __initdata = {
 /* Standard Osiris devices */
 
 static struct platform_device *osiris_devices[] __initdata = {
+	&s3c2410_device_dclk,
 	&s3c_device_i2c0,
 	&s3c_device_wdt,
 	&s3c_device_nand,
 	&osiris_pcmcia,
 };
 
+#ifdef CONFIG_SAMSUNG_CLOCK
 static struct clk *osiris_clocks[] __initdata = {
 	&s3c24xx_dclk0,
 	&s3c24xx_dclk1,
@@ -357,6 +359,7 @@  static struct clk *osiris_clocks[] __initdata = {
 	&s3c24xx_clkout1,
 	&s3c24xx_uclk,
 };
+#endif
 
 static struct s3c_cpufreq_board __initdata osiris_cpufreq = {
 	.refresh	= 7800, /* refresh period is 7.8usec */
@@ -368,6 +371,7 @@  static void __init osiris_map_io(void)
 {
 	unsigned long flags;
 
+#ifdef CONFIG_SAMSUNG_CLOCK
 	/* initialise the clocks */
 
 	s3c24xx_dclk0.parent = &clk_upll;
@@ -382,6 +386,7 @@  static void __init osiris_map_io(void)
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_register_clocks(osiris_clocks, ARRAY_SIZE(osiris_clocks));
+#endif
 
 	s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
 	s3c24xx_init_clocks(0);
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 0a5456c..21d9042 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -710,6 +710,7 @@  static struct i2c_board_info rx1950_i2c_devices[] = {
 };
 
 static struct platform_device *rx1950_devices[] __initdata = {
+	&s3c2410_device_dclk,
 	&s3c_device_lcd,
 	&s3c_device_wdt,
 	&s3c_device_i2c0,
@@ -728,17 +729,21 @@  static struct platform_device *rx1950_devices[] __initdata = {
 	&rx1950_leds,
 };
 
+#ifdef CONFIG_SAMSUNG_CLOCK
 static struct clk *rx1950_clocks[] __initdata = {
 	&s3c24xx_clkout0,
 	&s3c24xx_clkout1,
 };
+#endif
 
 static void __init rx1950_map_io(void)
 {
+#ifdef CONFIG_SAMSUNG_CLOCK
 	s3c24xx_clkout0.parent  = &clk_h;
 	s3c24xx_clkout1.parent  = &clk_f;
 
 	s3c24xx_register_clocks(rx1950_clocks, ARRAY_SIZE(rx1950_clocks));
+#endif
 
 	s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc));
 	s3c24xx_init_clocks(16934000);
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 755df48..02d3437 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -286,6 +286,7 @@  static struct i2c_board_info vr1000_i2c_devs[] __initdata = {
 /* devices for this board */
 
 static struct platform_device *vr1000_devices[] __initdata = {
+	&s3c2410_device_dclk,
 	&s3c_device_ohci,
 	&s3c_device_lcd,
 	&s3c_device_wdt,
@@ -299,6 +300,7 @@  static struct platform_device *vr1000_devices[] __initdata = {
 	&vr1000_led3,
 };
 
+#ifdef CONFIG_SAMSUNG_CLOCK
 static struct clk *vr1000_clocks[] __initdata = {
 	&s3c24xx_dclk0,
 	&s3c24xx_dclk1,
@@ -306,6 +308,7 @@  static struct clk *vr1000_clocks[] __initdata = {
 	&s3c24xx_clkout1,
 	&s3c24xx_uclk,
 };
+#endif
 
 static void vr1000_power_off(void)
 {
@@ -314,6 +317,7 @@  static void vr1000_power_off(void)
 
 static void __init vr1000_map_io(void)
 {
+#if CONFIG_SAMSUNG_CLOCK
 	/* initialise clock sources */
 
 	s3c24xx_dclk0.parent = &clk_upll;
@@ -328,6 +332,7 @@  static void __init vr1000_map_io(void)
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_register_clocks(vr1000_clocks, ARRAY_SIZE(vr1000_clocks));
+#endif
 
 	pm_power_off = vr1000_power_off;
 
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index 911b555..0ce2538 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -46,6 +46,7 @@ 
 #include <plat/nand-core.h>
 #include <plat/watchdog-reset.h>
 
+#include "common.h"
 #include "regs-dsc.h"
 
 static struct map_desc s3c244x_iodesc[] __initdata = {
@@ -74,6 +75,7 @@  void __init s3c244x_map_io(void)
 	s3c_nand_setname("s3c2440-nand");
 	s3c_device_ts.name = "s3c2440-ts";
 	s3c_device_usbgadget.name = "s3c2440-usbgadget";
+	s3c2410_device_dclk.name = "s3c2440-dclk";
 }
 
 void __init_or_cpufreq s3c244x_setup_clocks(void)