ARM: S5P6450: Add missing virtual ASoC DMA device
[deliverable/linux.git] / arch / arm / mach-s5pv210 / mach-smdkc110.c
CommitLineData
d515ec33
KK
1/* linux/arch/arm/mach-s5pv210/mach-smdkc110.c
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
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*/
10
11#include <linux/kernel.h>
12#include <linux/types.h>
13#include <linux/init.h>
14#include <linux/serial_core.h>
170d7415 15#include <linux/i2c.h>
9adf262a 16#include <linux/sysdev.h>
d515ec33
KK
17
18#include <asm/mach/arch.h>
19#include <asm/mach/map.h>
20#include <asm/setup.h>
21#include <asm/mach-types.h>
22
23#include <mach/map.h>
24#include <mach/regs-clock.h>
25
26#include <plat/regs-serial.h>
27#include <plat/s5pv210.h>
28#include <plat/devs.h>
29#include <plat/cpu.h>
4b9a5ad5 30#include <plat/ata.h>
170d7415 31#include <plat/iic.h>
ea31fd43 32#include <plat/pm.h>
d515ec33
KK
33
34/* Following are default values for UCON, ULCON and UFCON UART registers */
c8def085 35#define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
d515ec33
KK
36 S3C2410_UCON_RXILEVEL | \
37 S3C2410_UCON_TXIRQMODE | \
38 S3C2410_UCON_RXIRQMODE | \
39 S3C2410_UCON_RXFIFO_TOI | \
40 S3C2443_UCON_RXERR_IRQEN)
41
c8def085 42#define SMDKC110_ULCON_DEFAULT S3C2410_LCON_CS8
d515ec33 43
c8def085 44#define SMDKC110_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
d515ec33
KK
45 S5PV210_UFCON_TXTRIG4 | \
46 S5PV210_UFCON_RXTRIG4)
47
48static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
49 [0] = {
50 .hwport = 0,
51 .flags = 0,
c8def085
KK
52 .ucon = SMDKC110_UCON_DEFAULT,
53 .ulcon = SMDKC110_ULCON_DEFAULT,
54 .ufcon = SMDKC110_UFCON_DEFAULT,
d515ec33
KK
55 },
56 [1] = {
57 .hwport = 1,
58 .flags = 0,
c8def085
KK
59 .ucon = SMDKC110_UCON_DEFAULT,
60 .ulcon = SMDKC110_ULCON_DEFAULT,
61 .ufcon = SMDKC110_UFCON_DEFAULT,
d515ec33
KK
62 },
63 [2] = {
64 .hwport = 2,
65 .flags = 0,
c8def085
KK
66 .ucon = SMDKC110_UCON_DEFAULT,
67 .ulcon = SMDKC110_ULCON_DEFAULT,
68 .ufcon = SMDKC110_UFCON_DEFAULT,
d515ec33
KK
69 },
70 [3] = {
71 .hwport = 3,
72 .flags = 0,
c8def085
KK
73 .ucon = SMDKC110_UCON_DEFAULT,
74 .ulcon = SMDKC110_ULCON_DEFAULT,
75 .ufcon = SMDKC110_UFCON_DEFAULT,
d515ec33
KK
76 },
77};
78
170d7415 79static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = {
4b9a5ad5
AK
80 .setup_gpio = s5pv210_ide_setup_gpio,
81};
82
d515ec33 83static struct platform_device *smdkc110_devices[] __initdata = {
95fa6e6c
JB
84 &s5pv210_device_iis0,
85 &s5pv210_device_ac97,
494edadd 86 &s5pv210_device_spdif,
4b9a5ad5 87 &s3c_device_cfcon,
170d7415
NKC
88 &s3c_device_i2c0,
89 &s3c_device_i2c1,
90 &s3c_device_i2c2,
f5807269 91 &s3c_device_rtc,
5b7d7b22 92 &s3c_device_wdt,
d515ec33
KK
93};
94
170d7415
NKC
95static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = {
96 { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */
0031e9d9 97 { I2C_BOARD_INFO("wm8580", 0x1b), },
170d7415
NKC
98};
99
100static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = {
101 /* To Be Updated */
102};
103
104static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = {
105 /* To Be Updated */
106};
107
d515ec33
KK
108static void __init smdkc110_map_io(void)
109{
110 s5p_init_io(NULL, 0, S5P_VA_CHIPID);
111 s3c24xx_init_clocks(24000000);
112 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
113}
114
115static void __init smdkc110_machine_init(void)
116{
ea31fd43
JL
117 s3c_pm_init();
118
170d7415
NKC
119 s3c_i2c0_set_platdata(NULL);
120 s3c_i2c1_set_platdata(NULL);
121 s3c_i2c2_set_platdata(NULL);
122 i2c_register_board_info(0, smdkc110_i2c_devs0,
123 ARRAY_SIZE(smdkc110_i2c_devs0));
124 i2c_register_board_info(1, smdkc110_i2c_devs1,
125 ARRAY_SIZE(smdkc110_i2c_devs1));
126 i2c_register_board_info(2, smdkc110_i2c_devs2,
127 ARRAY_SIZE(smdkc110_i2c_devs2));
128
129 s3c_ide_set_platdata(&smdkc110_ide_pdata);
4b9a5ad5 130
d515ec33
KK
131 platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
132}
133
134MACHINE_START(SMDKC110, "SMDKC110")
135 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
d515ec33
KK
136 .boot_params = S5P_PA_SDRAM + 0x100,
137 .init_irq = s5pv210_init_irq,
138 .map_io = smdkc110_map_io,
139 .init_machine = smdkc110_machine_init,
140 .timer = &s3c24xx_timer,
141MACHINE_END
This page took 0.06501 seconds and 5 git commands to generate.