diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-18 05:29:51 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-18 05:29:51 -0400 |
commit | a2e0d6249fa866ce7f5a8fe08a4d75511e4701c6 (patch) | |
tree | 9ff61cc5edcc4f59f2f170d390c174a7a50a12fa /arch/arm/mach-s5p64x0/init.c | |
parent | 49b7a491b797305a0dc373e7f7a5d2a87955c819 (diff) |
ARM: S5P64X0: Add S5P64X0(S5P6440 and S5P6450) initialization support
This patch adds ARCH_S5P64X0 which can support S5P6440 and S5P6450 with
one kernel image. So moved some files of mach-s5p6440 into the new ARCH
directory mach-s5p64x0.
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5p64x0/init.c')
-rw-r--r-- | arch/arm/mach-s5p64x0/init.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/arch/arm/mach-s5p64x0/init.c b/arch/arm/mach-s5p64x0/init.c new file mode 100644 index 000000000000..79833caf8165 --- /dev/null +++ b/arch/arm/mach-s5p64x0/init.c | |||
@@ -0,0 +1,73 @@ | |||
1 | /* linux/arch/arm/mach-s5p64x0/init.c | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5P64X0 - Init support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/serial_core.h> | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | |||
20 | #include <plat/cpu.h> | ||
21 | #include <plat/devs.h> | ||
22 | #include <plat/s5p6440.h> | ||
23 | #include <plat/s5p6450.h> | ||
24 | #include <plat/regs-serial.h> | ||
25 | |||
26 | static struct s3c24xx_uart_clksrc s5p64x0_serial_clocks[] = { | ||
27 | [0] = { | ||
28 | .name = "pclk_low", | ||
29 | .divisor = 1, | ||
30 | .min_baud = 0, | ||
31 | .max_baud = 0, | ||
32 | }, | ||
33 | [1] = { | ||
34 | .name = "uclk1", | ||
35 | .divisor = 1, | ||
36 | .min_baud = 0, | ||
37 | .max_baud = 0, | ||
38 | }, | ||
39 | }; | ||
40 | |||
41 | /* uart registration process */ | ||
42 | |||
43 | void __init s5p64x0_common_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
44 | { | ||
45 | struct s3c2410_uartcfg *tcfg = cfg; | ||
46 | u32 ucnt; | ||
47 | |||
48 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { | ||
49 | if (!tcfg->clocks) { | ||
50 | tcfg->clocks = s5p64x0_serial_clocks; | ||
51 | tcfg->clocks_size = ARRAY_SIZE(s5p64x0_serial_clocks); | ||
52 | } | ||
53 | } | ||
54 | } | ||
55 | |||
56 | void __init s5p6440_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
57 | { | ||
58 | int uart; | ||
59 | |||
60 | for (uart = 0; uart < no; uart++) { | ||
61 | s5p_uart_resources[uart].resources->start = S5P6440_PA_UART(uart); | ||
62 | s5p_uart_resources[uart].resources->end = S5P6440_PA_UART(uart) + S5P_SZ_UART; | ||
63 | } | ||
64 | |||
65 | s5p64x0_common_init_uarts(cfg, no); | ||
66 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); | ||
67 | } | ||
68 | |||
69 | void __init s5p6450_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
70 | { | ||
71 | s5p64x0_common_init_uarts(cfg, no); | ||
72 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); | ||
73 | } | ||