Merge branch 'sh/driver-core'
[pandora-kernel.git] / arch / arm / mach-s5p6440 / init.c
1 /* linux/arch/arm/mach-s5p6440/init.c
2  *
3  * Copyright (c) 2009 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * S5P6440 - 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 <plat/cpu.h>
19 #include <plat/devs.h>
20 #include <plat/s5p6440.h>
21 #include <plat/regs-serial.h>
22
23 static struct s3c24xx_uart_clksrc s5p6440_serial_clocks[] = {
24         [0] = {
25                 .name           = "pclk_low",
26                 .divisor        = 1,
27                 .min_baud       = 0,
28                 .max_baud       = 0,
29         },
30         [1] = {
31                 .name           = "uclk1",
32                 .divisor        = 1,
33                 .min_baud       = 0,
34                 .max_baud       = 0,
35         },
36 };
37
38 /* uart registration process */
39 void __init s5p6440_common_init_uarts(struct s3c2410_uartcfg *cfg, int no)
40 {
41         struct s3c2410_uartcfg *tcfg = cfg;
42         u32 ucnt;
43
44         for (ucnt = 0; ucnt < no; ucnt++, tcfg++) {
45                 if (!tcfg->clocks) {
46                         tcfg->clocks = s5p6440_serial_clocks;
47                         tcfg->clocks_size = ARRAY_SIZE(s5p6440_serial_clocks);
48                 }
49         }
50
51         s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
52 }