From mboxrd@z Thu Jan 1 00:00:00 1970 From: Romain Naour Subject: Re: [PATCH] S3C24XX: add clockevent/clocksource support Date: Fri, 26 Oct 2012 12:51:01 +0200 Message-ID: <508A6B15.1040609@openwide.fr> References: <50885608.1030503@openwide.fr> <6694372.nV9NvELlFJ@flatron> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from zimbra3.corp.accelance.fr ([213.162.49.233]:59623 "EHLO zimbra3.corp.accelance.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758267Ab2JZKvL (ORCPT ); Fri, 26 Oct 2012 06:51:11 -0400 In-Reply-To: <6694372.nV9NvELlFJ@flatron> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Tomasz Figa Cc: linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, ben-linux@fluff.org, =?ISO-8859-1?Q?Heiko_St=FCbner?= , Sylwester Nawrocki Hi Tomasz, Thank you for your reply. Le 25/10/2012 22:39, Tomasz Figa a =E9crit : > Hi Romain, >=20 > On Wednesday 24 of October 2012 22:56:40 Romain Naour wrote: >> Hi, >> >> This patch converts the s3c24xx timer driver to the >> clocksource/clockevent API. I made some test on a mini2440 board and= I >> had to reduce timers frequency to 1MHz in order to produce a timer's >> overflow every 64ms. Initial timer's frequency (8,45MHz) provide onl= y >> 7ms between each overflow. It is not enough. As timers were previous= ly >> used to produce an IRQ at 200Hz, some board (Osiris, Anubis board) u= se >> an external 12MHz signal to clock the timers (tclk1). So, I changed >> their configuration to select internal pclk clock instead, but I can= 't >> test it. Also, I created a new file (s3c24xx_time.c) to avoid impact= ing >> the s3c64xx. Kernel rev v3.7-rc1 >> >> Do you have any comments on this patch ? >=20 > Generally looks fine, but I have some doubts: >=20 > - Isn't 64ms still way too little for overflow period? Someone who is= more=20 > into Linux time keeping should comment on this. It seems to work correctly with 64ms. Actually, it start to work with 15,5ms (timer's frequency =3D 4,21MHz) >=20 > - Much of the code is duplicated from s5p-time, maybe s5p-time could = be=20 > made a generic samsung-time instead? It could be also used for S3C64x= x. I'm agree, It would be great if we can use hrtimer on s3c64xx too :) I made another patch following your advice, but I'm not sure if we real= ly need to rename sp5-time.c and s5p_* functions. I tested this patch with and without hrtimer enabled on my mini2440. But, I need a confirmation for the frequency of pclk for each cpu. Normally it is between 70MHz and 50MHz. Also, we may need to define specific TSCALER_DIV TDIV value for s3c64xx= =2E (samsung-time.h) >=20 > CC'ing Heiko and Sylwester, as they might find this patch interesting= =2E >=20 > Best regards, > Tomasz Figa >=20 Regards, Romain Naour Here is the new patch: --- arch/arm/Kconfig | 6 +- arch/arm/mach-exynos/mach-universal_c210.c | 4 +- arch/arm/mach-s3c24xx/Kconfig | 6 + arch/arm/mach-s3c24xx/mach-amlm5900.c | 3 + arch/arm/mach-s3c24xx/mach-anubis.c | 2 + arch/arm/mach-s3c24xx/mach-at2440evb.c | 2 + arch/arm/mach-s3c24xx/mach-bast.c | 2 + arch/arm/mach-s3c24xx/mach-gta02.c | 2 + arch/arm/mach-s3c24xx/mach-h1940.c | 2 + arch/arm/mach-s3c24xx/mach-jive.c | 2 + arch/arm/mach-s3c24xx/mach-mini2440.c | 4 +- arch/arm/mach-s3c24xx/mach-n30.c | 2 + arch/arm/mach-s3c24xx/mach-nexcoder.c | 2 + arch/arm/mach-s3c24xx/mach-osiris.c | 2 + arch/arm/mach-s3c24xx/mach-otom.c | 2 + arch/arm/mach-s3c24xx/mach-qt2410.c | 2 + arch/arm/mach-s3c24xx/mach-rx1950.c | 2 + arch/arm/mach-s3c24xx/mach-rx3715.c | 2 + arch/arm/mach-s3c24xx/mach-smdk2410.c | 2 + arch/arm/mach-s3c24xx/mach-smdk2413.c | 2 + arch/arm/mach-s3c24xx/mach-smdk2416.c | 2 + arch/arm/mach-s3c24xx/mach-smdk2440.c | 2 + arch/arm/mach-s3c24xx/mach-smdk2443.c | 2 + arch/arm/mach-s3c24xx/mach-tct_hammer.c | 2 + arch/arm/mach-s3c24xx/mach-vr1000.c | 2 + arch/arm/mach-s3c24xx/mach-vstms.c | 3 +- arch/arm/mach-s3c64xx/mach-anw6410.c | 2 + arch/arm/mach-s3c64xx/mach-crag6410.c | 2 + arch/arm/mach-s3c64xx/mach-hmt.c | 2 + arch/arm/mach-s3c64xx/mach-mini6410.c | 2 + arch/arm/mach-s3c64xx/mach-ncp.c | 2 + arch/arm/mach-s3c64xx/mach-real6410.c | 2 + arch/arm/mach-s3c64xx/mach-smartq.c | 2 + arch/arm/mach-s3c64xx/mach-smartq5.c | 1 + arch/arm/mach-s3c64xx/mach-smartq7.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6400.c | 2 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 + arch/arm/mach-s5p64x0/Kconfig | 4 +- arch/arm/mach-s5p64x0/mach-smdk6440.c | 4 +- arch/arm/mach-s5p64x0/mach-smdk6450.c | 4 +- arch/arm/mach-s5pv210/Kconfig | 2 +- arch/arm/mach-s5pv210/mach-aquila.c | 4 +- arch/arm/mach-s5pv210/mach-goni.c | 4 +- arch/arm/mach-s5pv210/mach-smdkc110.c | 4 +- arch/arm/mach-s5pv210/mach-smdkv210.c | 4 +- arch/arm/mach-s5pv210/mach-torbreck.c | 4 +- arch/arm/plat-samsung/Kconfig | 2 +- arch/arm/plat-samsung/Makefile | 2 +- arch/arm/plat-samsung/include/plat/s5p-time.h | 40 --- arch/arm/plat-samsung/include/plat/samsung-time.h | 51 +++ arch/arm/plat-samsung/s5p-time.c | 405 --------------= -------- arch/arm/plat-samsung/samsung-time.c | 405 ++++++++++++++= ++++++++ 52 files changed, 555 insertions(+), 470 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/s5p-time.h create mode 100644 arch/arm/plat-samsung/include/plat/samsung-time.h delete mode 100644 arch/arm/plat-samsung/s5p-time.c create mode 100644 arch/arm/plat-samsung/samsung-time.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 73067ef..c1ac8a5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -737,7 +737,8 @@ config ARCH_SA1100 config ARCH_S3C24XX bool "Samsung S3C24XX SoCs" select ARCH_HAS_CPUFREQ - select ARCH_USES_GETTIMEOFFSET + select GENERIC_CLOCKEVENTS + select CLKSRC_MMIO select CLKDEV_LOOKUP select GENERIC_GPIO select HAVE_CLK @@ -756,7 +757,8 @@ config ARCH_S3C64XX bool "Samsung S3C64XX" select ARCH_HAS_CPUFREQ select ARCH_REQUIRE_GPIOLIB - select ARCH_USES_GETTIMEOFFSET + select GENERIC_CLOCKEVENTS + select CLKSRC_MMIO select ARM_VIC select CLKDEV_LOOKUP select CPU_V6 diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach= -exynos/mach-universal_c210.c index ebc9dd3..3b9ec1c 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include =20 @@ -1099,7 +1099,7 @@ static void __init universal_map_io(void) exynos_init_io(NULL, 0); s3c24xx_init_clocks(clk_xusbxti.rate); s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)= ); - s5p_set_timer_source(S5P_PWM2, S5P_PWM4); + samsung_set_timer_source(S5P_PWM2, S5P_PWM4); } =20 static void s5p_tv_setup(void) diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kcon= fig index 2b6cb5f..be2c482 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -21,6 +21,7 @@ config CPU_S3C2410 select S3C2410_CLOCK select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX select S3C2410_PM if PM + select SAMSUNG_HRT help Support for S3C2410 and S3C2410A family from the S3C24XX line of Samsung Mobile CPUs. @@ -32,6 +33,7 @@ config CPU_S3C2412 select CPU_LLSERIAL_S3C2440 select S3C2412_DMA if S3C24XX_DMA select S3C2412_PM if PM + select SAMSUNG_HRT help Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line =20 @@ -44,6 +46,7 @@ config CPU_S3C2416 select S3C2443_COMMON select S3C2443_DMA if S3C24XX_DMA select SAMSUNG_CLKSRC + select SAMSUNG_HRT help Support for the S3C2416 SoC from the S3C24XX line =20 @@ -54,6 +57,7 @@ config CPU_S3C2440 select S3C2410_CLOCK select S3C2410_PM if PM select S3C2440_DMA if S3C24XX_DMA + select SAMSUNG_HRT help Support for S3C2440 Samsung Mobile CPU based systems. =20 @@ -63,6 +67,7 @@ config CPU_S3C2442 select CPU_LLSERIAL_S3C2440 select S3C2410_CLOCK select S3C2410_PM if PM + select SAMSUNG_HRT help Support for S3C2442 Samsung Mobile CPU based systems. =20 @@ -78,6 +83,7 @@ config CPU_S3C2443 select S3C2443_COMMON select S3C2443_DMA if S3C24XX_DMA select SAMSUNG_CLKSRC + select SAMSUNG_HRT help Support for the S3C2443 SoC from the S3C24XX line =20 diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c2= 4xx/mach-amlm5900.c index f4ad99c..5d5a07c 100644 --- a/arch/arm/mach-s3c24xx/mach-amlm5900.c +++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c @@ -63,6 +63,8 @@ #include #include =20 +#include + #include "common.h" =20 static struct resource amlm5900_nor_resource =3D @@ -160,6 +162,7 @@ static void __init amlm5900_map_io(void) s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 #ifdef CONFIG_FB_S3C2410 diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24x= x/mach-anubis.c index 1ee8c46..7d323ed 100644 --- a/arch/arm/mach-s3c24xx/mach-anubis.c +++ b/arch/arm/mach-s3c24xx/mach-anubis.c @@ -54,6 +54,7 @@ #include #include #include +#include =20 #include "simtec.h" #include "common.h" @@ -414,6 +415,7 @@ static void __init anubis_map_io(void) s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); =20 /* check for the newer revision boards with large page nand */ =20 diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c= 24xx/mach-at2440evb.c index 00381fe..1e93cb3 100644 --- a/arch/arm/mach-s3c24xx/mach-at2440evb.c +++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c @@ -48,6 +48,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -192,6 +193,7 @@ static void __init at2440evb_map_io(void) s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); s3c24xx_init_clocks(16934400); s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs)= ); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init at2440evb_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/= mach-bast.c index 6a30ce7..be3cc7a 100644 --- a/arch/arm/mach-s3c24xx/mach-bast.c +++ b/arch/arm/mach-s3c24xx/mach-bast.c @@ -63,6 +63,7 @@ #include #include #include +#include =20 #include "simtec.h" #include "common.h" @@ -583,6 +584,7 @@ static void __init bast_map_io(void) s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init bast_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx= /mach-gta02.c index 4a96346..3f83412 100644 --- a/arch/arm/mach-s3c24xx/mach-gta02.c +++ b/arch/arm/mach-s3c24xx/mach-gta02.c @@ -88,6 +88,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -507,6 +508,7 @@ static void __init gta02_map_io(void) s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 =20 diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx= /mach-h1940.c index 63aaf07..1455779 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c @@ -67,6 +67,7 @@ #include #include #include +#include =20 #include =20 @@ -652,6 +653,7 @@ static void __init h1940_map_io(void) s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); =20 /* setup PM */ =20 diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/= mach-jive.c index c9954e2..9671c42 100644 --- a/arch/arm/mach-s3c24xx/mach-jive.c +++ b/arch/arm/mach-s3c24xx/mach-jive.c @@ -55,6 +55,7 @@ #include #include #include +#include =20 static struct map_desc jive_iodesc[] __initdata =3D { }; @@ -506,6 +507,7 @@ static void __init jive_map_io(void) s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void jive_power_off(void) diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c2= 4xx/mach-mini2440.c index 393c0f1..a96efcd 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c @@ -57,6 +57,7 @@ #include #include #include +#include =20 #include =20 @@ -527,6 +528,7 @@ static void __init mini2440_map_io(void) s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 /* @@ -689,6 +691,6 @@ MACHINE_START(MINI2440, "MINI2440") .map_io =3D mini2440_map_io, .init_machine =3D mini2440_init, .init_irq =3D s3c24xx_init_irq, - .timer =3D &s3c24xx_timer, + .timer =3D &samsung_timer, .restart =3D s3c244x_restart, MACHINE_END diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/m= ach-n30.c index c53a9bf..ea80658 100644 --- a/arch/arm/mach-s3c24xx/mach-n30.c +++ b/arch/arm/mach-s3c24xx/mach-n30.c @@ -50,6 +50,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -536,6 +537,7 @@ static void __init n30_map_io(void) n30_hwinit(); s3c24xx_init_clocks(0); s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 /* GPB3 is the line that controls the pull-up for the USB D+ line */ diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c2= 4xx/mach-nexcoder.c index a2b92b0..76acb5a 100644 --- a/arch/arm/mach-s3c24xx/mach-nexcoder.c +++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c @@ -46,6 +46,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -137,6 +138,7 @@ static void __init nexcoder_map_io(void) s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); =20 nexcoder_sensorboard_init(); } diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24x= x/mach-osiris.c index bb36d83..60a5f92 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris.c +++ b/arch/arm/mach-s3c24xx/mach-osiris.c @@ -53,6 +53,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -386,6 +387,7 @@ static void __init osiris_map_io(void) s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); =20 /* check for the newer revision boards with large page nand */ =20 diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/= mach-otom.c index bca39f0..24e7d70 100644 --- a/arch/arm/mach-s3c24xx/mach-otom.c +++ b/arch/arm/mach-s3c24xx/mach-otom.c @@ -37,6 +37,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -104,6 +105,7 @@ static void __init otom11_map_io(void) s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init otom11_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24x= x/mach-qt2410.c index 7b6ba13..b68ff2a 100644 --- a/arch/arm/mach-s3c24xx/mach-qt2410.c +++ b/arch/arm/mach-s3c24xx/mach-qt2410.c @@ -60,6 +60,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -304,6 +305,7 @@ static void __init qt2410_map_io(void) s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc)); s3c24xx_init_clocks(12*1000*1000); s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init qt2410_machine_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24x= x/mach-rx1950.c index 379fde5..fc03bb80 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c @@ -58,6 +58,7 @@ #include #include #include +#include =20 #include =20 @@ -743,6 +744,7 @@ static void __init rx1950_map_io(void) s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc)); s3c24xx_init_clocks(16934000); s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); =20 /* setup PM */ =20 diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24x= x/mach-rx3715.c index dacbb9a..772e275 100644 --- a/arch/arm/mach-s3c24xx/mach-rx3715.c +++ b/arch/arm/mach-s3c24xx/mach-rx3715.c @@ -50,6 +50,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -179,6 +180,7 @@ static void __init rx3715_map_io(void) s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc)); s3c24xx_init_clocks(16934000); s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 /* H1940 and RX3715 need to reserve this for suspend */ diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c2= 4xx/mach-smdk2410.c index 82796b9..76aa704 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2410.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c @@ -53,6 +53,7 @@ #include =20 #include +#include =20 #include "common.h" =20 @@ -101,6 +102,7 @@ static void __init smdk2410_map_io(void) s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init smdk2410_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c2= 4xx/mach-smdk2413.c index ce99fd8..128dc88 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2413.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c @@ -47,6 +47,7 @@ #include #include #include +#include =20 #include =20 @@ -107,6 +108,7 @@ static void __init smdk2413_map_io(void) s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init smdk2413_machine_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c2= 4xx/mach-smdk2416.c index f30d7fc..ee5fcaf 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c @@ -52,6 +52,7 @@ #include #include #include +#include =20 #include =20 @@ -222,6 +223,7 @@ static void __init smdk2416_map_io(void) s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init smdk2416_machine_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c2= 4xx/mach-smdk2440.c index b7ff882..bc443da 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2440.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c @@ -44,6 +44,7 @@ #include #include #include +#include =20 #include =20 @@ -164,6 +165,7 @@ static void __init smdk2440_map_io(void) s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); s3c24xx_init_clocks(16934400); s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init smdk2440_machine_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c2= 4xx/mach-smdk2443.c index 2568656..b5b128f 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2443.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c @@ -44,6 +44,7 @@ #include #include #include +#include =20 #include =20 @@ -123,6 +124,7 @@ static void __init smdk2443_map_io(void) s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init smdk2443_machine_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3= c24xx/mach-tct_hammer.c index 495bf5c..c6351a8 100644 --- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c +++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c @@ -53,6 +53,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -136,6 +137,7 @@ static void __init tct_hammer_map_io(void) s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfg= s)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init tct_hammer_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24x= x/mach-vr1000.c index 14d5b12..0c3d863 100644 --- a/arch/arm/mach-s3c24xx/mach-vr1000.c +++ b/arch/arm/mach-s3c24xx/mach-vr1000.c @@ -50,6 +50,7 @@ #include #include #include +#include =20 #include "simtec.h" #include "common.h" @@ -335,6 +336,7 @@ static void __init vr1000_map_io(void) s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init vr1000_init(void) diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx= /mach-vstms.c index f1d44ae..1741d00 100644 --- a/arch/arm/mach-s3c24xx/mach-vstms.c +++ b/arch/arm/mach-s3c24xx/mach-vstms.c @@ -47,7 +47,7 @@ #include #include #include - +#include =20 static struct map_desc vstms_iodesc[] __initdata =3D { }; @@ -144,6 +144,7 @@ static void __init vstms_map_io(void) s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init vstms_init(void) diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64= xx/mach-anw6410.c index 99e82ac..717daaa 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c @@ -51,6 +51,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -209,6 +210,7 @@ static void __init anw6410_map_io(void) s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); =20 anw6410_lcd_mode_set(); } diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c6= 4xx/mach-crag6410.c index 13b7eaa..0d41166 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -70,6 +70,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -704,6 +705,7 @@ static void __init crag6410_map_io(void) s3c64xx_init_io(NULL, 0); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); =20 /* LCD type and Bypass set by bootloader */ } diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/m= ach-hmt.c index 2b14489..30c0424 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c @@ -42,6 +42,7 @@ #include #include #include +#include =20 #include "common.h" =20 @@ -249,6 +250,7 @@ static void __init hmt_map_io(void) s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc)); s3c24xx_init_clocks(12000000); s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs)); + samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); } =20 static void __init hmt_machine_init(void) diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c6= 4xx/mach-mini6410.c index 07c349c..758f5708 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c @@ -44,6 +44,7 @@ =20 #include