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.
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/device.h>
18 #include <asm/hardware/vic.h>
19 #include <asm/mach/arch.h>
20 #include <asm/mach/map.h>
21 #include <asm/setup.h>
22 #include <asm/mach-types.h>
25 #include <mach/regs-clock.h>
27 #include <plat/regs-serial.h>
28 #include <plat/devs.h>
33 #include <plat/s5p-time.h>
37 /* Following are default values for UCON, ULCON and UFCON UART registers */
38 #define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
39 S3C2410_UCON_RXILEVEL | \
40 S3C2410_UCON_TXIRQMODE | \
41 S3C2410_UCON_RXIRQMODE | \
42 S3C2410_UCON_RXFIFO_TOI | \
43 S3C2443_UCON_RXERR_IRQEN)
45 #define SMDKC110_ULCON_DEFAULT S3C2410_LCON_CS8
47 #define SMDKC110_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
48 S5PV210_UFCON_TXTRIG4 | \
49 S5PV210_UFCON_RXTRIG4)
51 static struct s3c2410_uartcfg smdkv210_uartcfgs
[] __initdata
= {
55 .ucon
= SMDKC110_UCON_DEFAULT
,
56 .ulcon
= SMDKC110_ULCON_DEFAULT
,
57 .ufcon
= SMDKC110_UFCON_DEFAULT
,
62 .ucon
= SMDKC110_UCON_DEFAULT
,
63 .ulcon
= SMDKC110_ULCON_DEFAULT
,
64 .ufcon
= SMDKC110_UFCON_DEFAULT
,
69 .ucon
= SMDKC110_UCON_DEFAULT
,
70 .ulcon
= SMDKC110_ULCON_DEFAULT
,
71 .ufcon
= SMDKC110_UFCON_DEFAULT
,
76 .ucon
= SMDKC110_UCON_DEFAULT
,
77 .ulcon
= SMDKC110_ULCON_DEFAULT
,
78 .ufcon
= SMDKC110_UFCON_DEFAULT
,
82 static struct s3c_ide_platdata smdkc110_ide_pdata __initdata
= {
83 .setup_gpio
= s5pv210_ide_setup_gpio
,
86 static struct platform_device
*smdkc110_devices
[] __initdata
= {
90 &s5pv210_device_spdif
,
99 static struct i2c_board_info smdkc110_i2c_devs0
[] __initdata
= {
100 { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */
101 { I2C_BOARD_INFO("wm8580", 0x1b), },
104 static struct i2c_board_info smdkc110_i2c_devs1
[] __initdata
= {
108 static struct i2c_board_info smdkc110_i2c_devs2
[] __initdata
= {
112 static void __init
smdkc110_map_io(void)
114 s5pv210_init_io(NULL
, 0);
115 s3c24xx_init_clocks(24000000);
116 s3c24xx_init_uarts(smdkv210_uartcfgs
, ARRAY_SIZE(smdkv210_uartcfgs
));
117 s5p_set_timer_source(S5P_PWM3
, S5P_PWM4
);
120 static void __init
smdkc110_machine_init(void)
124 s3c_i2c0_set_platdata(NULL
);
125 s3c_i2c1_set_platdata(NULL
);
126 s3c_i2c2_set_platdata(NULL
);
127 i2c_register_board_info(0, smdkc110_i2c_devs0
,
128 ARRAY_SIZE(smdkc110_i2c_devs0
));
129 i2c_register_board_info(1, smdkc110_i2c_devs1
,
130 ARRAY_SIZE(smdkc110_i2c_devs1
));
131 i2c_register_board_info(2, smdkc110_i2c_devs2
,
132 ARRAY_SIZE(smdkc110_i2c_devs2
));
134 s3c_ide_set_platdata(&smdkc110_ide_pdata
);
136 platform_add_devices(smdkc110_devices
, ARRAY_SIZE(smdkc110_devices
));
139 MACHINE_START(SMDKC110
, "SMDKC110")
140 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
141 .atag_offset
= 0x100,
142 .init_irq
= s5pv210_init_irq
,
143 .handle_irq
= vic_handle_irq
,
144 .map_io
= smdkc110_map_io
,
145 .init_machine
= smdkc110_machine_init
,
147 .restart
= s5pv210_restart
,