linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Miscellaneous s3c64xx fixes.
@ 2011-07-29 15:50 Tomasz Figa
  2011-07-29 16:05 ` [PATCH 1/5] ARM: s3c64xx: PM: Mask and acknowledge all UART interrupts during core resume Tomasz Figa
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Tomasz Figa @ 2011-07-29 15:50 UTC (permalink / raw)
  To: linux-arm-kernel



^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH 5/5] ARM: s3c64xx: Add support for synchronous clock operation.
@ 2011-07-28 12:34 Tomasz Figa
  0 siblings, 0 replies; 16+ messages in thread
From: Tomasz Figa @ 2011-07-28 12:34 UTC (permalink / raw)
  To: linux-arm-kernel

Some boards based on S3C6410 use synchronous clocking, which means that HCLKx2
and other system clocks are generated from APLL instead of MPLL.

This patch adds support for such boards, by calculating hclk2 depending on
the status of S3C_OTHERS_SYNCMUXSEL_SYNC bit in S3C_OTHERS registers.

---
 arch/arm/mach-s3c64xx/clock.c                   |    8 +++++++-
 arch/arm/mach-s3c64xx/include/mach/regs-clock.h |    4 ++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index fdfc4d5..56421ab 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -780,7 +780,13 @@ void __init_or_cpufreq s3c6400_setup_clocks(void)
 	printk(KERN_INFO "S3C64XX: PLL settings, A=%ld, M=%ld, E=%ld\n",
 	       apll, mpll, epll);
 
-	hclk2 = mpll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2);
+	if(__raw_readl(S3C_OTHERS) & S3C_OTHERS_SYNCMUXSEL_SYNC)
+		/* Synchronous mode */
+		hclk2 = apll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2);
+	else
+		/* Asynchronous mode */
+		hclk2 = mpll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2);
+
 	hclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK);
 	pclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_PCLK);
 
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h b/arch/arm/mach-s3c64xx/include/mach/regs-clock.h
index 05332b9..ac2202f 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h
+++ b/arch/arm/mach-s3c64xx/include/mach/regs-clock.h
@@ -35,6 +35,7 @@
 #define S3C_MEM0_GATE		S3C_CLKREG(0x3C)
 #define S3C6410_CLK_SRC2	S3C_CLKREG(0x10C)
 #define S3C_MEM_SYS_CFG		S3C_CLKREG(0x120)
+#define S3C_OTHERS		S3C_CLKREG(0x900)
 
 /* CLKDIV0 */
 #define S3C6400_CLKDIV0_PCLK_MASK	(0xf << 12)
@@ -159,4 +160,7 @@
 #define MEM_SYS_CFG_INDEP_CF		0x4000
 #define MEM_SYS_CFG_EBI_FIX_PRI_CFCON	0x30
 
+/* OTHERS */
+#define S3C_OTHERS_SYNCMUXSEL_SYNC	(1<<6)
+
 #endif /* _PLAT_REGS_CLOCK_H */
-- 
1.7.6

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-08-19  9:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-29 15:50 [PATCH 0/5] Miscellaneous s3c64xx fixes Tomasz Figa
2011-07-29 16:05 ` [PATCH 1/5] ARM: s3c64xx: PM: Mask and acknowledge all UART interrupts during core resume Tomasz Figa
2011-08-13 11:44   ` Tomasz Figa
2011-08-19  5:24     ` Kukjin Kim
2011-07-29 16:05 ` [PATCH 2/5] ARM: s3c64xx: DMA: Use S3C64XX_SDMA_SEL register name instead of numeric address Tomasz Figa
2011-07-29 16:06 ` [PATCH 3/5] ARM: s3c64xx: Save/restore S3C64XX_SDMA_SEL on suspend/resume Tomasz Figa
2011-07-29 16:07 ` [PATCH 4/5] ARM: s3c64xx: Save/restore S3C64XX_MODEM_MIFPCON on suspend/resume to preserve LCD bypass state Tomasz Figa
2011-07-29 16:07 ` [PATCH 5/5] ARM: s3c64xx: Add support for synchronous clock operation Tomasz Figa
2011-08-19  5:24   ` Kukjin Kim
2011-08-19  9:12     ` Tomasz Figa
2011-08-12 12:09 ` [PATCH 0/5] Miscellaneous s3c64xx fixes Tomasz Figa
2011-08-13  4:15   ` Kukjin Kim
2011-08-13 10:14     ` Tomasz Figa
2011-08-19  5:24       ` Kukjin Kim
2011-08-19  9:26         ` Tomasz Figa
  -- strict thread matches above, loose matches on Subject: below --
2011-07-28 12:34 [PATCH 5/5] ARM: s3c64xx: Add support for synchronous clock operation Tomasz Figa

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).