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