aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/mach-smdkc110.c
diff options
context:
space:
mode:
authorNaveen Krishna Ch <ch.naveen@samsung.com>2010-07-20 23:51:56 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-08-05 05:36:22 -0400
commit170d7415db431801baf5105298cf73131cc6d4f2 (patch)
tree006a7d3f6e451f38a794fb41e86ac691cf6522ef /arch/arm/mach-s5pv210/mach-smdkc110.c
parent4550ee20c8d1c280bd26ec3afbcf636ae2897486 (diff)
ARM: S5PV210: Add support for I2C devices on SMDKV210 and SMDKC110
This patch adds support I2C-0/1/2 devices to the SMDKV210/SMDKC110. Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com> [kgene.kim@samsung.com: Fixes wrong name] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/mach-smdkc110.c')
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkc110.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c
index 4816facce63c..9f4f0bdd2cc3 100644
--- a/arch/arm/mach-s5pv210/mach-smdkc110.c
+++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
@@ -12,6 +12,7 @@
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/serial_core.h> 14#include <linux/serial_core.h>
15#include <linux/i2c.h>
15 16
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 18#include <asm/mach/map.h>
@@ -26,6 +27,7 @@
26#include <plat/devs.h> 27#include <plat/devs.h>
27#include <plat/cpu.h> 28#include <plat/cpu.h>
28#include <plat/ata.h> 29#include <plat/ata.h>
30#include <plat/iic.h>
29 31
30/* Following are default values for UCON, ULCON and UFCON UART registers */ 32/* Following are default values for UCON, ULCON and UFCON UART registers */
31#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 33#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -72,7 +74,7 @@ static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
72 }, 74 },
73}; 75};
74 76
75static struct s3c_ide_platdata smdkv210_ide_pdata __initdata = { 77static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = {
76 .setup_gpio = s5pv210_ide_setup_gpio, 78 .setup_gpio = s5pv210_ide_setup_gpio,
77}; 79};
78 80
@@ -80,10 +82,25 @@ static struct platform_device *smdkc110_devices[] __initdata = {
80 &s5pv210_device_iis0, 82 &s5pv210_device_iis0,
81 &s5pv210_device_ac97, 83 &s5pv210_device_ac97,
82 &s3c_device_cfcon, 84 &s3c_device_cfcon,
85 &s3c_device_i2c0,
86 &s3c_device_i2c1,
87 &s3c_device_i2c2,
83 &s3c_device_rtc, 88 &s3c_device_rtc,
84 &s3c_device_wdt, 89 &s3c_device_wdt,
85}; 90};
86 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
87static void __init smdkc110_map_io(void) 104static void __init smdkc110_map_io(void)
88{ 105{
89 s5p_init_io(NULL, 0, S5P_VA_CHIPID); 106 s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -93,7 +110,17 @@ static void __init smdkc110_map_io(void)
93 110
94static void __init smdkc110_machine_init(void) 111static void __init smdkc110_machine_init(void)
95{ 112{
96 s3c_ide_set_platdata(&smdkv210_ide_pdata); 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);
97 124
98 platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices)); 125 platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
99} 126}