• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/arm/mach-s5pv210/
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>
15#include <linux/i2c.h>
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>
29#include <plat/ata.h>
30#include <plat/iic.h>
31
32/* Following are default values for UCON, ULCON and UFCON UART registers */
33#define SMDKC110_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
34				 S3C2410_UCON_RXILEVEL |	\
35				 S3C2410_UCON_TXIRQMODE |	\
36				 S3C2410_UCON_RXIRQMODE |	\
37				 S3C2410_UCON_RXFIFO_TOI |	\
38				 S3C2443_UCON_RXERR_IRQEN)
39
40#define SMDKC110_ULCON_DEFAULT	S3C2410_LCON_CS8
41
42#define SMDKC110_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
43				 S5PV210_UFCON_TXTRIG4 |	\
44				 S5PV210_UFCON_RXTRIG4)
45
46static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
47	[0] = {
48		.hwport		= 0,
49		.flags		= 0,
50		.ucon		= SMDKC110_UCON_DEFAULT,
51		.ulcon		= SMDKC110_ULCON_DEFAULT,
52		.ufcon		= SMDKC110_UFCON_DEFAULT,
53	},
54	[1] = {
55		.hwport		= 1,
56		.flags		= 0,
57		.ucon		= SMDKC110_UCON_DEFAULT,
58		.ulcon		= SMDKC110_ULCON_DEFAULT,
59		.ufcon		= SMDKC110_UFCON_DEFAULT,
60	},
61	[2] = {
62		.hwport		= 2,
63		.flags		= 0,
64		.ucon		= SMDKC110_UCON_DEFAULT,
65		.ulcon		= SMDKC110_ULCON_DEFAULT,
66		.ufcon		= SMDKC110_UFCON_DEFAULT,
67	},
68	[3] = {
69		.hwport		= 3,
70		.flags		= 0,
71		.ucon		= SMDKC110_UCON_DEFAULT,
72		.ulcon		= SMDKC110_ULCON_DEFAULT,
73		.ufcon		= SMDKC110_UFCON_DEFAULT,
74	},
75};
76
77static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = {
78	.setup_gpio	= s5pv210_ide_setup_gpio,
79};
80
81static struct platform_device *smdkc110_devices[] __initdata = {
82	&s5pv210_device_iis0,
83	&s5pv210_device_ac97,
84	&s3c_device_cfcon,
85	&s3c_device_i2c0,
86	&s3c_device_i2c1,
87	&s3c_device_i2c2,
88	&s3c_device_rtc,
89	&s3c_device_wdt,
90};
91
92static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = {
93	{ I2C_BOARD_INFO("24c08", 0x50), },     /* Samsung S524AD0XD1 */
94};
95
96static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = {
97	/* To Be Updated */
98};
99
100static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = {
101	/* To Be Updated */
102};
103
104static void __init smdkc110_map_io(void)
105{
106	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
107	s3c24xx_init_clocks(24000000);
108	s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
109}
110
111static void __init smdkc110_machine_init(void)
112{
113	s3c_i2c0_set_platdata(NULL);
114	s3c_i2c1_set_platdata(NULL);
115	s3c_i2c2_set_platdata(NULL);
116	i2c_register_board_info(0, smdkc110_i2c_devs0,
117			ARRAY_SIZE(smdkc110_i2c_devs0));
118	i2c_register_board_info(1, smdkc110_i2c_devs1,
119			ARRAY_SIZE(smdkc110_i2c_devs1));
120	i2c_register_board_info(2, smdkc110_i2c_devs2,
121			ARRAY_SIZE(smdkc110_i2c_devs2));
122
123	s3c_ide_set_platdata(&smdkc110_ide_pdata);
124
125	platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
126}
127
128MACHINE_START(SMDKC110, "SMDKC110")
129	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
130	.phys_io	= S3C_PA_UART & 0xfff00000,
131	.io_pg_offst	= (((u32)S3C_VA_UART) >> 18) & 0xfffc,
132	.boot_params	= S5P_PA_SDRAM + 0x100,
133	.init_irq	= s5pv210_init_irq,
134	.map_io		= smdkc110_map_io,
135	.init_machine	= smdkc110_machine_init,
136	.timer		= &s3c24xx_timer,
137MACHINE_END
138