aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-10-24 05:47:46 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-12-22 20:06:56 -0500
commit5f5a7a5578c5885201cf9c85856f023fe8b81765 (patch)
tree2145b345f6980d7ce94a6c7145b83be79921fb93 /arch/arm/plat-samsung
parent046c217c65a7670b4ee1aecdb9854284e32b2d6c (diff)
serial: samsung: switch to clkdev based clock lookup
Instead of using clock names supplied in platform data, use a generic clock name 'clk_uart_baud' to look up clocks. The platform code should register clocks with the name 'clk_uart_baud' which can be used by the baud rate generator. The clock lookup and selection of the best clock as baud rate clock is reworked. Platform code can specify the clocks that can be used as source for the baud clock (as supported previously by passing names of clocks). A new member is added to the platform data 'clk_sel' which holds a bit-field value with each bit representing a baud source clock. If a bit at any bit position is set, that clock is looked up to participate in the selection of the baud clock source. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-serial.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h
index 720734847027..b493d8d0cc0c 100644
--- a/arch/arm/plat-samsung/include/plat/regs-serial.h
+++ b/arch/arm/plat-samsung/include/plat/regs-serial.h
@@ -222,6 +222,10 @@
222#define S5PV210_UFSTAT_RXSHIFT (0) 222#define S5PV210_UFSTAT_RXSHIFT (0)
223 223
224#define NO_NEED_CHECK_CLKSRC 1 224#define NO_NEED_CHECK_CLKSRC 1
225#define S3C2410_UCON_CLKSEL0 (1 << 0)
226#define S3C2410_UCON_CLKSEL1 (1 << 1)
227#define S3C2410_UCON_CLKSEL2 (1 << 2)
228#define S3C2410_UCON_CLKSEL3 (1 << 3)
225 229
226#ifndef __ASSEMBLY__ 230#ifndef __ASSEMBLY__
227 231
@@ -257,6 +261,7 @@ struct s3c2410_uartcfg {
257 unsigned char unused; 261 unsigned char unused;
258 unsigned short flags; 262 unsigned short flags;
259 upf_t uart_flags; /* default uart flags */ 263 upf_t uart_flags; /* default uart flags */
264 unsigned int clk_sel;
260 265
261 unsigned int has_fracval; 266 unsigned int has_fracval;
262 267