Merge remote-tracking branch 's5p/for-next'
[linux-2.6/next.git] / arch / arm / mach-s5pv210 / mach-smdkc110.c
blob6c412c8ceccc2949ec71d15fecc39125643a7927
1 /* linux/arch/arm/mach-s5pv210/mach-smdkc110.c
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
11 #include <linux/kernel.h>
12 #include <linux/types.h>
13 #include <linux/init.h>
14 #include <linux/serial_core.h>
15 #include <linux/i2c.h>
16 #include <linux/sysdev.h>
18 #include <asm/mach/arch.h>
19 #include <asm/mach/map.h>
20 #include <asm/setup.h>
21 #include <asm/mach-types.h>
23 #include <mach/map.h>
24 #include <mach/regs-clock.h>
26 #include <plat/regs-serial.h>
27 #include <plat/s5pv210.h>
28 #include <plat/devs.h>
29 #include <plat/cpu.h>
30 #include <plat/ata.h>
31 #include <plat/iic.h>
32 #include <plat/pm.h>
33 #include <plat/s5p-time.h>
35 /* Following are default values for UCON, ULCON and UFCON UART registers */
36 #define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
37 S3C2410_UCON_RXILEVEL | \
38 S3C2410_UCON_TXIRQMODE | \
39 S3C2410_UCON_RXIRQMODE | \
40 S3C2410_UCON_RXFIFO_TOI | \
41 S3C2443_UCON_RXERR_IRQEN)
43 #define SMDKC110_ULCON_DEFAULT S3C2410_LCON_CS8
45 #define SMDKC110_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
46 S5PV210_UFCON_TXTRIG4 | \
47 S5PV210_UFCON_RXTRIG4)
49 static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
50 [0] = {
51 .hwport = 0,
52 .flags = 0,
53 .ucon = SMDKC110_UCON_DEFAULT,
54 .ulcon = SMDKC110_ULCON_DEFAULT,
55 .ufcon = SMDKC110_UFCON_DEFAULT,
57 [1] = {
58 .hwport = 1,
59 .flags = 0,
60 .ucon = SMDKC110_UCON_DEFAULT,
61 .ulcon = SMDKC110_ULCON_DEFAULT,
62 .ufcon = SMDKC110_UFCON_DEFAULT,
64 [2] = {
65 .hwport = 2,
66 .flags = 0,
67 .ucon = SMDKC110_UCON_DEFAULT,
68 .ulcon = SMDKC110_ULCON_DEFAULT,
69 .ufcon = SMDKC110_UFCON_DEFAULT,
71 [3] = {
72 .hwport = 3,
73 .flags = 0,
74 .ucon = SMDKC110_UCON_DEFAULT,
75 .ulcon = SMDKC110_ULCON_DEFAULT,
76 .ufcon = SMDKC110_UFCON_DEFAULT,
80 static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = {
81 .setup_gpio = s5pv210_ide_setup_gpio,
84 static struct platform_device *smdkc110_devices[] __initdata = {
85 &samsung_asoc_dma,
86 &s5pv210_device_iis0,
87 &s5pv210_device_ac97,
88 &s5pv210_device_spdif,
89 &s3c_device_cfcon,
90 &s3c_device_i2c0,
91 &s3c_device_i2c1,
92 &s3c_device_i2c2,
93 &s3c_device_rtc,
94 &s3c_device_wdt,
97 static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = {
98 { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */
99 { I2C_BOARD_INFO("wm8580", 0x1b), },
102 static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = {
103 /* To Be Updated */
106 static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = {
107 /* To Be Updated */
110 static void __init smdkc110_map_io(void)
112 s5p_init_io(NULL, 0, S5P_VA_CHIPID);
113 s3c24xx_init_clocks(24000000);
114 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
115 s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
118 static void __init smdkc110_machine_init(void)
120 s3c_pm_init();
122 s3c_i2c0_set_platdata(NULL);
123 s3c_i2c1_set_platdata(NULL);
124 s3c_i2c2_set_platdata(NULL);
125 i2c_register_board_info(0, smdkc110_i2c_devs0,
126 ARRAY_SIZE(smdkc110_i2c_devs0));
127 i2c_register_board_info(1, smdkc110_i2c_devs1,
128 ARRAY_SIZE(smdkc110_i2c_devs1));
129 i2c_register_board_info(2, smdkc110_i2c_devs2,
130 ARRAY_SIZE(smdkc110_i2c_devs2));
132 s3c_ide_set_platdata(&smdkc110_ide_pdata);
134 platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
137 MACHINE_START(SMDKC110, "SMDKC110")
138 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
139 .boot_params = S5P_PA_SDRAM + 0x100,
140 .init_irq = s5pv210_init_irq,
141 .map_io = smdkc110_map_io,
142 .init_machine = smdkc110_machine_init,
143 .timer = &s5p_timer,
144 MACHINE_END