1 /* linux/arch/arm/mach-s5p64x0/init.c
3 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * S5P64X0 - Init support
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.
13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/init.h>
16 #include <linux/serial_core.h>
21 #include <plat/devs.h>
22 #include <plat/s5p6440.h>
23 #include <plat/s5p6450.h>
24 #include <plat/regs-serial.h>
26 static struct s3c24xx_uart_clksrc s5p64x0_serial_clocks
[] = {
41 /* uart registration process */
43 void __init
s5p64x0_common_init_uarts(struct s3c2410_uartcfg
*cfg
, int no
)
45 struct s3c2410_uartcfg
*tcfg
= cfg
;
48 for (ucnt
= 0; ucnt
< no
; ucnt
++, tcfg
++) {
50 tcfg
->clocks
= s5p64x0_serial_clocks
;
51 tcfg
->clocks_size
= ARRAY_SIZE(s5p64x0_serial_clocks
);
56 void __init
s5p6440_init_uarts(struct s3c2410_uartcfg
*cfg
, int no
)
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
;
65 s5p64x0_common_init_uarts(cfg
, no
);
66 s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources
, cfg
, no
);
69 void __init
s5p6450_init_uarts(struct s3c2410_uartcfg
*cfg
, int no
)
71 s5p64x0_common_init_uarts(cfg
, no
);
72 s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources
, cfg
, no
);