diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 11:12:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 11:12:43 -0500 |
commit | 79c9601c2e0dbbe69895d302de4d19f3a31fbd30 (patch) | |
tree | 78d4be2df851b2b4106adcfd736622a90cecf9e9 /arch/arm/mach-s5pc100/mach-smdkc100.c | |
parent | 41440ffe21f29bdb985cab76b2d0b06d83e63b19 (diff) | |
parent | 3d14b5beba35250c548d3851a2b84fce742d8311 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (272 commits)
Fix soc_common PCMCIA configuration
ARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request
ARM: 5826/1: SA1100: h3100/h3600: always build htc-egpio driver
ARM: 5825/1: SA1100: h3600: update defconfig
ARM: 5824/1: SA1100: reuse h3600 PCMCIA driver on h3100
ARM: 5823/1: SA1100: h3100/h3600: add support for gpio-keys
ARM: 5822/1: SA1100: h3100/h3600: clean up #includes
ARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates
ARM: 5820/1: SA1100: h3100/h3600: split h3600.c
ARM: 5819/1: SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h
ARM: 5818/1: SA1100: h3100/h3600: drop old GPIO definitions
ARM: 5817/1: SA1100: h3100/h3600: configure all unused gpios as inputs
ARM: 5816/1: SA1100: h3600: remove IRQ_GPIO_* definitions
ARM: 5815/1: SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers
ARM: 5814/1: SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib
ARM: 5813/1: SA1100: h3100/h3600: add htc-egpio driver
ARM: 5812/1: SA1100: h3100/h3600: separate machine-specific LCD helpers
ARM: 5811/2: pcmcia: convert sa1100_h3600 driver to gpiolib
ARM: 5799/1: SA1100: h3600: stop setting direction for LCD pins
ARM: 5798/1: SA1100: h3600: remove unused cruft from h3600.h
...
Diffstat (limited to 'arch/arm/mach-s5pc100/mach-smdkc100.c')
-rw-r--r-- | arch/arm/mach-s5pc100/mach-smdkc100.c | 89 |
1 files changed, 88 insertions, 1 deletions
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 214093cd7632..ae3c52cd0ebb 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -27,16 +27,22 @@ | |||
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | 28 | ||
29 | #include <mach/map.h> | 29 | #include <mach/map.h> |
30 | #include <mach/regs-fb.h> | ||
31 | #include <video/platform_lcd.h> | ||
30 | 32 | ||
31 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
32 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
33 | 35 | ||
34 | #include <plat/regs-serial.h> | 36 | #include <plat/regs-serial.h> |
37 | #include <plat/gpio-cfg.h> | ||
38 | #include <plat/regs-gpio.h> | ||
35 | 39 | ||
36 | #include <plat/clock.h> | 40 | #include <plat/clock.h> |
37 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
38 | #include <plat/cpu.h> | 42 | #include <plat/cpu.h> |
39 | #include <plat/s5pc100.h> | 43 | #include <plat/s5pc100.h> |
44 | #include <plat/fb.h> | ||
45 | #include <plat/iic.h> | ||
40 | 46 | ||
41 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) | 47 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) |
42 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) | 48 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) |
@@ -73,9 +79,78 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = { | |||
73 | }, | 79 | }, |
74 | }; | 80 | }; |
75 | 81 | ||
82 | /* I2C0 */ | ||
83 | static struct i2c_board_info i2c_devs0[] __initdata = { | ||
84 | }; | ||
85 | |||
86 | /* I2C1 */ | ||
87 | static struct i2c_board_info i2c_devs1[] __initdata = { | ||
88 | }; | ||
89 | |||
90 | /* LCD power controller */ | ||
91 | static void smdkc100_lcd_power_set(struct plat_lcd_data *pd, | ||
92 | unsigned int power) | ||
93 | { | ||
94 | /* backlight */ | ||
95 | gpio_direction_output(S5PC100_GPD(0), power); | ||
96 | |||
97 | if (power) { | ||
98 | /* module reset */ | ||
99 | gpio_direction_output(S5PC100_GPH0(6), 1); | ||
100 | mdelay(100); | ||
101 | gpio_direction_output(S5PC100_GPH0(6), 0); | ||
102 | mdelay(10); | ||
103 | gpio_direction_output(S5PC100_GPH0(6), 1); | ||
104 | mdelay(10); | ||
105 | } | ||
106 | } | ||
107 | |||
108 | static struct plat_lcd_data smdkc100_lcd_power_data = { | ||
109 | .set_power = smdkc100_lcd_power_set, | ||
110 | }; | ||
111 | |||
112 | static struct platform_device smdkc100_lcd_powerdev = { | ||
113 | .name = "platform-lcd", | ||
114 | .dev.parent = &s3c_device_fb.dev, | ||
115 | .dev.platform_data = &smdkc100_lcd_power_data, | ||
116 | }; | ||
117 | |||
118 | /* Frame Buffer */ | ||
119 | static struct s3c_fb_pd_win smdkc100_fb_win0 = { | ||
120 | /* this is to ensure we use win0 */ | ||
121 | .win_mode = { | ||
122 | .refresh = 70, | ||
123 | .pixclock = (8+13+3+800)*(7+5+1+480), | ||
124 | .left_margin = 8, | ||
125 | .right_margin = 13, | ||
126 | .upper_margin = 7, | ||
127 | .lower_margin = 5, | ||
128 | .hsync_len = 3, | ||
129 | .vsync_len = 1, | ||
130 | .xres = 800, | ||
131 | .yres = 480, | ||
132 | }, | ||
133 | .max_bpp = 32, | ||
134 | .default_bpp = 16, | ||
135 | }; | ||
136 | |||
137 | static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = { | ||
138 | .win[0] = &smdkc100_fb_win0, | ||
139 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
140 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
141 | .setup_gpio = s5pc100_fb_gpio_setup_24bpp, | ||
142 | }; | ||
143 | |||
76 | static struct map_desc smdkc100_iodesc[] = {}; | 144 | static struct map_desc smdkc100_iodesc[] = {}; |
77 | 145 | ||
78 | static struct platform_device *smdkc100_devices[] __initdata = { | 146 | static struct platform_device *smdkc100_devices[] __initdata = { |
147 | &s3c_device_i2c0, | ||
148 | &s3c_device_i2c1, | ||
149 | &s3c_device_fb, | ||
150 | &s3c_device_hsmmc0, | ||
151 | &s3c_device_hsmmc1, | ||
152 | &s3c_device_hsmmc2, | ||
153 | &smdkc100_lcd_powerdev, | ||
79 | }; | 154 | }; |
80 | 155 | ||
81 | static void __init smdkc100_map_io(void) | 156 | static void __init smdkc100_map_io(void) |
@@ -87,12 +162,24 @@ static void __init smdkc100_map_io(void) | |||
87 | 162 | ||
88 | static void __init smdkc100_machine_init(void) | 163 | static void __init smdkc100_machine_init(void) |
89 | { | 164 | { |
165 | /* I2C */ | ||
166 | s3c_i2c0_set_platdata(NULL); | ||
167 | s3c_i2c1_set_platdata(NULL); | ||
168 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); | ||
169 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | ||
170 | |||
171 | s3c_fb_set_platdata(&smdkc100_lcd_pdata); | ||
172 | |||
173 | /* LCD init */ | ||
174 | gpio_request(S5PC100_GPD(0), "GPD"); | ||
175 | gpio_request(S5PC100_GPH0(6), "GPH0"); | ||
176 | smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); | ||
90 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); | 177 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); |
91 | } | 178 | } |
92 | 179 | ||
93 | MACHINE_START(SMDKC100, "SMDKC100") | 180 | MACHINE_START(SMDKC100, "SMDKC100") |
94 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ | 181 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ |
95 | .phys_io = S5PC1XX_PA_UART & 0xfff00000, | 182 | .phys_io = S5PC100_PA_UART & 0xfff00000, |
96 | .io_pg_offst = (((u32)S5PC1XX_VA_UART) >> 18) & 0xfffc, | 183 | .io_pg_offst = (((u32)S5PC1XX_VA_UART) >> 18) & 0xfffc, |
97 | .boot_params = S5PC100_PA_SDRAM + 0x100, | 184 | .boot_params = S5PC100_PA_SDRAM + 0x100, |
98 | 185 | ||