diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/irqs.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/regs-gpio.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/spi.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-s3c6410/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-s3c6410/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c6410/mach-hmt.c | 276 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/adc.h | 8 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/devs.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/hwmon.h | 41 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/adc.c | 64 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/devs.c | 52 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/fiq.h | 13 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/irq.c | 36 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c | 38 |
17 files changed, 579 insertions, 17 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h index 2a2384ffa7b1..6c12c6312ad8 100644 --- a/arch/arm/mach-s3c2410/include/mach/irqs.h +++ b/arch/arm/mach-s3c2410/include/mach/irqs.h | |||
@@ -164,6 +164,12 @@ | |||
164 | #define IRQ_S3CUART_TX3 IRQ_S3C2443_TX3 | 164 | #define IRQ_S3CUART_TX3 IRQ_S3C2443_TX3 |
165 | #define IRQ_S3CUART_ERR3 IRQ_S3C2443_ERR3 | 165 | #define IRQ_S3CUART_ERR3 IRQ_S3C2443_ERR3 |
166 | 166 | ||
167 | #ifdef CONFIG_CPU_S3C2440 | ||
168 | #define IRQ_S3C244x_AC97 IRQ_S3C2440_AC97 | ||
169 | #else | ||
170 | #define IRQ_S3C244x_AC97 IRQ_S3C2443_AC97 | ||
171 | #endif | ||
172 | |||
167 | /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ | 173 | /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ |
168 | #define FIQ_START IRQ_EINT0 | 174 | #define FIQ_START IRQ_EINT0 |
169 | 175 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h index b278d0c45ccf..f6e8eec879c8 100644 --- a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h +++ b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h | |||
@@ -328,13 +328,15 @@ | |||
328 | 328 | ||
329 | #define S3C2410_GPD8_VD16 (0x02 << 16) | 329 | #define S3C2410_GPD8_VD16 (0x02 << 16) |
330 | #define S3C2400_GPD8_TOUT3 (0x02 << 16) | 330 | #define S3C2400_GPD8_TOUT3 (0x02 << 16) |
331 | #define S3C2440_GPD8_SPIMISO1 (0x03 << 16) | ||
331 | 332 | ||
332 | #define S3C2410_GPD9_VD17 (0x02 << 18) | 333 | #define S3C2410_GPD9_VD17 (0x02 << 18) |
333 | #define S3C2400_GPD9_TCLK0 (0x02 << 18) | 334 | #define S3C2400_GPD9_TCLK0 (0x02 << 18) |
334 | #define S3C2410_GPD9_MASK (0x03 << 18) | 335 | #define S3C2440_GPD9_SPIMOSI1 (0x03 << 18) |
335 | 336 | ||
336 | #define S3C2410_GPD10_VD18 (0x02 << 20) | 337 | #define S3C2410_GPD10_VD18 (0x02 << 20) |
337 | #define S3C2400_GPD10_nWAIT (0x02 << 20) | 338 | #define S3C2400_GPD10_nWAIT (0x02 << 20) |
339 | #define S3C2440_GPD10_SPICLK1 (0x03 << 20) | ||
338 | 340 | ||
339 | #define S3C2410_GPD11_VD19 (0x02 << 22) | 341 | #define S3C2410_GPD11_VD19 (0x02 << 22) |
340 | 342 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/spi.h b/arch/arm/mach-s3c2410/include/mach/spi.h index 1d300fb112b1..193b39d654ed 100644 --- a/arch/arm/mach-s3c2410/include/mach/spi.h +++ b/arch/arm/mach-s3c2410/include/mach/spi.h | |||
@@ -30,4 +30,7 @@ extern void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi, | |||
30 | extern void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi, | 30 | extern void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi, |
31 | int enable); | 31 | int enable); |
32 | 32 | ||
33 | extern void s3c24xx_spi_gpiocfg_bus1_gpd8_9_10(struct s3c2410_spi_info *spi, | ||
34 | int enable); | ||
35 | |||
33 | #endif /* __ASM_ARCH_SPI_H */ | 36 | #endif /* __ASM_ARCH_SPI_H */ |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index d8a26ea92f24..647c9adb018f 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <mach/regs-mem.h> | 45 | #include <mach/regs-mem.h> |
46 | #include <mach/regs-lcd.h> | 46 | #include <mach/regs-lcd.h> |
47 | 47 | ||
48 | #include <plat/hwmon.h> | ||
48 | #include <plat/nand.h> | 49 | #include <plat/nand.h> |
49 | #include <plat/iic.h> | 50 | #include <plat/iic.h> |
50 | #include <mach/fb.h> | 51 | #include <mach/fb.h> |
@@ -548,7 +549,35 @@ static struct i2c_board_info bast_i2c_devs[] __initdata = { | |||
548 | }, | 549 | }, |
549 | }; | 550 | }; |
550 | 551 | ||
552 | static struct s3c_hwmon_pdata bast_hwmon_info = { | ||
553 | /* LCD contrast (0-6.6V) */ | ||
554 | .in[0] = &(struct s3c_hwmon_chcfg) { | ||
555 | .name = "lcd-contrast", | ||
556 | .mult = 3300, | ||
557 | .div = 512, | ||
558 | }, | ||
559 | /* LED current feedback */ | ||
560 | .in[1] = &(struct s3c_hwmon_chcfg) { | ||
561 | .name = "led-feedback", | ||
562 | .mult = 3300, | ||
563 | .div = 1024, | ||
564 | }, | ||
565 | /* LCD feedback (0-6.6V) */ | ||
566 | .in[2] = &(struct s3c_hwmon_chcfg) { | ||
567 | .name = "lcd-feedback", | ||
568 | .mult = 3300, | ||
569 | .div = 512, | ||
570 | }, | ||
571 | /* Vcore (1.8-2.0V), Vref 3.3V */ | ||
572 | .in[3] = &(struct s3c_hwmon_chcfg) { | ||
573 | .name = "vcore", | ||
574 | .mult = 3300, | ||
575 | .div = 1024, | ||
576 | }, | ||
577 | }; | ||
578 | |||
551 | /* Standard BAST devices */ | 579 | /* Standard BAST devices */ |
580 | // cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0 | ||
552 | 581 | ||
553 | static struct platform_device *bast_devices[] __initdata = { | 582 | static struct platform_device *bast_devices[] __initdata = { |
554 | &s3c_device_usb, | 583 | &s3c_device_usb, |
@@ -557,6 +586,8 @@ static struct platform_device *bast_devices[] __initdata = { | |||
557 | &s3c_device_i2c0, | 586 | &s3c_device_i2c0, |
558 | &s3c_device_rtc, | 587 | &s3c_device_rtc, |
559 | &s3c_device_nand, | 588 | &s3c_device_nand, |
589 | &s3c_device_adc, | ||
590 | &s3c_device_hwmon, | ||
560 | &bast_device_dm9k, | 591 | &bast_device_dm9k, |
561 | &bast_device_asix, | 592 | &bast_device_asix, |
562 | &bast_device_axpp, | 593 | &bast_device_axpp, |
@@ -595,6 +626,7 @@ static void __init bast_map_io(void) | |||
595 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); | 626 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); |
596 | 627 | ||
597 | s3c_device_nand.dev.platform_data = &bast_nand_info; | 628 | s3c_device_nand.dev.platform_data = &bast_nand_info; |
629 | s3c_device_hwmon.dev.platform_data = &bast_hwmon_info; | ||
598 | 630 | ||
599 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); | 631 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); |
600 | s3c24xx_init_clocks(0); | 632 | s3c24xx_init_clocks(0); |
diff --git a/arch/arm/mach-s3c6410/Kconfig b/arch/arm/mach-s3c6410/Kconfig index e63aac7f4e5a..f9d0f09f9761 100644 --- a/arch/arm/mach-s3c6410/Kconfig +++ b/arch/arm/mach-s3c6410/Kconfig | |||
@@ -97,3 +97,13 @@ config MACH_NCP | |||
97 | select S3C64XX_SETUP_I2C1 | 97 | select S3C64XX_SETUP_I2C1 |
98 | help | 98 | help |
99 | Machine support for the Samsung NCP | 99 | Machine support for the Samsung NCP |
100 | |||
101 | config MACH_HMT | ||
102 | bool "Airgoo HMT" | ||
103 | select CPU_S3C6410 | ||
104 | select S3C_DEV_FB | ||
105 | select S3C_DEV_USB_HOST | ||
106 | select S3C64XX_SETUP_FB_24BPP | ||
107 | select HAVE_PWM | ||
108 | help | ||
109 | Machine support for the Airgoo HMT | ||
diff --git a/arch/arm/mach-s3c6410/Makefile b/arch/arm/mach-s3c6410/Makefile index 6f9deac88612..3e48c3dbf973 100644 --- a/arch/arm/mach-s3c6410/Makefile +++ b/arch/arm/mach-s3c6410/Makefile | |||
@@ -23,5 +23,4 @@ obj-$(CONFIG_S3C6410_SETUP_SDHCI) += setup-sdhci.o | |||
23 | obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o | 23 | obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o |
24 | obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o | 24 | obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o |
25 | obj-$(CONFIG_MACH_NCP) += mach-ncp.o | 25 | obj-$(CONFIG_MACH_NCP) += mach-ncp.o |
26 | 26 | obj-$(CONFIG_MACH_HMT) += mach-hmt.o | |
27 | |||
diff --git a/arch/arm/mach-s3c6410/mach-hmt.c b/arch/arm/mach-s3c6410/mach-hmt.c new file mode 100644 index 000000000000..c5741056193f --- /dev/null +++ b/arch/arm/mach-s3c6410/mach-hmt.c | |||
@@ -0,0 +1,276 @@ | |||
1 | /* mach-hmt.c - Platform code for Airgoo HMT | ||
2 | * | ||
3 | * Copyright 2009 Peter Korsgaard <jacmet@sunsite.dk> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/serial_core.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/i2c.h> | ||
17 | #include <linux/fb.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/delay.h> | ||
20 | #include <linux/leds.h> | ||
21 | #include <linux/pwm_backlight.h> | ||
22 | #include <linux/mtd/mtd.h> | ||
23 | #include <linux/mtd/partitions.h> | ||
24 | |||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <asm/mach/irq.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <mach/regs-fb.h> | ||
31 | #include <mach/map.h> | ||
32 | |||
33 | #include <asm/irq.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | |||
36 | #include <plat/regs-serial.h> | ||
37 | #include <plat/iic.h> | ||
38 | #include <plat/fb.h> | ||
39 | #include <plat/nand.h> | ||
40 | |||
41 | #include <plat/s3c6410.h> | ||
42 | #include <plat/clock.h> | ||
43 | #include <plat/devs.h> | ||
44 | #include <plat/cpu.h> | ||
45 | |||
46 | #define UCON S3C2410_UCON_DEFAULT | ||
47 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) | ||
48 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) | ||
49 | |||
50 | static struct s3c2410_uartcfg hmt_uartcfgs[] __initdata = { | ||
51 | [0] = { | ||
52 | .hwport = 0, | ||
53 | .flags = 0, | ||
54 | .ucon = UCON, | ||
55 | .ulcon = ULCON, | ||
56 | .ufcon = UFCON, | ||
57 | }, | ||
58 | [1] = { | ||
59 | .hwport = 1, | ||
60 | .flags = 0, | ||
61 | .ucon = UCON, | ||
62 | .ulcon = ULCON, | ||
63 | .ufcon = UFCON, | ||
64 | }, | ||
65 | [2] = { | ||
66 | .hwport = 2, | ||
67 | .flags = 0, | ||
68 | .ucon = UCON, | ||
69 | .ulcon = ULCON, | ||
70 | .ufcon = UFCON, | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static int hmt_bl_init(struct device *dev) | ||
75 | { | ||
76 | int ret; | ||
77 | |||
78 | ret = gpio_request(S3C64XX_GPB(4), "lcd backlight enable"); | ||
79 | if (!ret) | ||
80 | ret = gpio_direction_output(S3C64XX_GPB(4), 0); | ||
81 | |||
82 | return ret; | ||
83 | } | ||
84 | |||
85 | static int hmt_bl_notify(int brightness) | ||
86 | { | ||
87 | /* | ||
88 | * translate from CIELUV/CIELAB L*->brightness, E.G. from | ||
89 | * perceived luminance to light output. Assumes range 0..25600 | ||
90 | */ | ||
91 | if (brightness < 0x800) { | ||
92 | /* Y = Yn * L / 903.3 */ | ||
93 | brightness = (100*256 * brightness + 231245/2) / 231245; | ||
94 | } else { | ||
95 | /* Y = Yn * ((L + 16) / 116 )^3 */ | ||
96 | int t = (brightness*4 + 16*1024 + 58)/116; | ||
97 | brightness = 25 * ((t * t * t + 0x100000/2) / 0x100000); | ||
98 | } | ||
99 | |||
100 | gpio_set_value(S3C64XX_GPB(4), brightness); | ||
101 | |||
102 | return brightness; | ||
103 | } | ||
104 | |||
105 | static void hmt_bl_exit(struct device *dev) | ||
106 | { | ||
107 | gpio_free(S3C64XX_GPB(4)); | ||
108 | } | ||
109 | |||
110 | static struct platform_pwm_backlight_data hmt_backlight_data = { | ||
111 | .pwm_id = 1, | ||
112 | .max_brightness = 100 * 256, | ||
113 | .dft_brightness = 40 * 256, | ||
114 | .pwm_period_ns = 1000000000 / (100 * 256 * 20), | ||
115 | .init = hmt_bl_init, | ||
116 | .notify = hmt_bl_notify, | ||
117 | .exit = hmt_bl_exit, | ||
118 | |||
119 | }; | ||
120 | |||
121 | static struct platform_device hmt_backlight_device = { | ||
122 | .name = "pwm-backlight", | ||
123 | .dev = { | ||
124 | .parent = &s3c_device_timer[1].dev, | ||
125 | .platform_data = &hmt_backlight_data, | ||
126 | }, | ||
127 | }; | ||
128 | |||
129 | static struct s3c_fb_pd_win hmt_fb_win0 = { | ||
130 | .win_mode = { | ||
131 | .pixclock = 41094, | ||
132 | .left_margin = 8, | ||
133 | .right_margin = 13, | ||
134 | .upper_margin = 7, | ||
135 | .lower_margin = 5, | ||
136 | .hsync_len = 3, | ||
137 | .vsync_len = 1, | ||
138 | .xres = 800, | ||
139 | .yres = 480, | ||
140 | }, | ||
141 | .max_bpp = 32, | ||
142 | .default_bpp = 16, | ||
143 | }; | ||
144 | |||
145 | /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ | ||
146 | static struct s3c_fb_platdata hmt_lcd_pdata __initdata = { | ||
147 | .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, | ||
148 | .win[0] = &hmt_fb_win0, | ||
149 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
150 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
151 | }; | ||
152 | |||
153 | static struct mtd_partition hmt_nand_part[] = { | ||
154 | [0] = { | ||
155 | .name = "uboot", | ||
156 | .size = SZ_512K, | ||
157 | .offset = 0, | ||
158 | }, | ||
159 | [1] = { | ||
160 | .name = "uboot-env1", | ||
161 | .size = SZ_256K, | ||
162 | .offset = SZ_512K, | ||
163 | }, | ||
164 | [2] = { | ||
165 | .name = "uboot-env2", | ||
166 | .size = SZ_256K, | ||
167 | .offset = SZ_512K + SZ_256K, | ||
168 | }, | ||
169 | [3] = { | ||
170 | .name = "kernel", | ||
171 | .size = SZ_2M, | ||
172 | .offset = SZ_1M, | ||
173 | }, | ||
174 | [4] = { | ||
175 | .name = "rootfs", | ||
176 | .size = MTDPART_SIZ_FULL, | ||
177 | .offset = SZ_1M + SZ_2M, | ||
178 | }, | ||
179 | }; | ||
180 | |||
181 | static struct s3c2410_nand_set hmt_nand_sets[] = { | ||
182 | [0] = { | ||
183 | .name = "nand", | ||
184 | .nr_chips = 1, | ||
185 | .nr_partitions = ARRAY_SIZE(hmt_nand_part), | ||
186 | .partitions = hmt_nand_part, | ||
187 | }, | ||
188 | }; | ||
189 | |||
190 | static struct s3c2410_platform_nand hmt_nand_info = { | ||
191 | .tacls = 25, | ||
192 | .twrph0 = 55, | ||
193 | .twrph1 = 40, | ||
194 | .nr_sets = ARRAY_SIZE(hmt_nand_sets), | ||
195 | .sets = hmt_nand_sets, | ||
196 | }; | ||
197 | |||
198 | static struct gpio_led hmt_leds[] = { | ||
199 | { /* left function keys */ | ||
200 | .name = "left:blue", | ||
201 | .gpio = S3C64XX_GPO(12), | ||
202 | .default_trigger = "default-on", | ||
203 | }, | ||
204 | { /* right function keys - red */ | ||
205 | .name = "right:red", | ||
206 | .gpio = S3C64XX_GPO(13), | ||
207 | }, | ||
208 | { /* right function keys - green */ | ||
209 | .name = "right:green", | ||
210 | .gpio = S3C64XX_GPO(14), | ||
211 | }, | ||
212 | { /* right function keys - blue */ | ||
213 | .name = "right:blue", | ||
214 | .gpio = S3C64XX_GPO(15), | ||
215 | .default_trigger = "default-on", | ||
216 | }, | ||
217 | }; | ||
218 | |||
219 | static struct gpio_led_platform_data hmt_led_data = { | ||
220 | .num_leds = ARRAY_SIZE(hmt_leds), | ||
221 | .leds = hmt_leds, | ||
222 | }; | ||
223 | |||
224 | static struct platform_device hmt_leds_device = { | ||
225 | .name = "leds-gpio", | ||
226 | .id = -1, | ||
227 | .dev.platform_data = &hmt_led_data, | ||
228 | }; | ||
229 | |||
230 | static struct map_desc hmt_iodesc[] = {}; | ||
231 | |||
232 | static struct platform_device *hmt_devices[] __initdata = { | ||
233 | &s3c_device_i2c0, | ||
234 | &s3c_device_nand, | ||
235 | &s3c_device_fb, | ||
236 | &s3c_device_usb, | ||
237 | &s3c_device_timer[1], | ||
238 | &hmt_backlight_device, | ||
239 | &hmt_leds_device, | ||
240 | }; | ||
241 | |||
242 | static void __init hmt_map_io(void) | ||
243 | { | ||
244 | s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc)); | ||
245 | s3c24xx_init_clocks(12000000); | ||
246 | s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs)); | ||
247 | } | ||
248 | |||
249 | static void __init hmt_machine_init(void) | ||
250 | { | ||
251 | s3c_i2c0_set_platdata(NULL); | ||
252 | s3c_fb_set_platdata(&hmt_lcd_pdata); | ||
253 | s3c_device_nand.dev.platform_data = &hmt_nand_info; | ||
254 | |||
255 | gpio_request(S3C64XX_GPC(7), "usb power"); | ||
256 | gpio_direction_output(S3C64XX_GPC(7), 0); | ||
257 | gpio_request(S3C64XX_GPM(0), "usb power"); | ||
258 | gpio_direction_output(S3C64XX_GPM(0), 1); | ||
259 | gpio_request(S3C64XX_GPK(7), "usb power"); | ||
260 | gpio_direction_output(S3C64XX_GPK(7), 1); | ||
261 | gpio_request(S3C64XX_GPF(13), "usb power"); | ||
262 | gpio_direction_output(S3C64XX_GPF(13), 1); | ||
263 | |||
264 | platform_add_devices(hmt_devices, ARRAY_SIZE(hmt_devices)); | ||
265 | } | ||
266 | |||
267 | MACHINE_START(HMT, "Airgoo-HMT") | ||
268 | /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */ | ||
269 | .phys_io = S3C_PA_UART & 0xfff00000, | ||
270 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | ||
271 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | ||
272 | .init_irq = s3c6410_init_irq, | ||
273 | .map_io = hmt_map_io, | ||
274 | .init_machine = hmt_machine_init, | ||
275 | .timer = &s3c24xx_timer, | ||
276 | MACHINE_END | ||
diff --git a/arch/arm/plat-s3c/include/plat/adc.h b/arch/arm/plat-s3c/include/plat/adc.h index d847bd476b6c..5f3b1cd53b90 100644 --- a/arch/arm/plat-s3c/include/plat/adc.h +++ b/arch/arm/plat-s3c/include/plat/adc.h | |||
@@ -19,10 +19,14 @@ struct s3c_adc_client; | |||
19 | extern int s3c_adc_start(struct s3c_adc_client *client, | 19 | extern int s3c_adc_start(struct s3c_adc_client *client, |
20 | unsigned int channel, unsigned int nr_samples); | 20 | unsigned int channel, unsigned int nr_samples); |
21 | 21 | ||
22 | extern int s3c_adc_read(struct s3c_adc_client *client, unsigned int ch); | ||
23 | |||
22 | extern struct s3c_adc_client * | 24 | extern struct s3c_adc_client * |
23 | s3c_adc_register(struct platform_device *pdev, | 25 | s3c_adc_register(struct platform_device *pdev, |
24 | void (*select)(unsigned selected), | 26 | void (*select)(struct s3c_adc_client *client, |
25 | void (*conv)(unsigned d0, unsigned d1, | 27 | unsigned selected), |
28 | void (*conv)(struct s3c_adc_client *client, | ||
29 | unsigned d0, unsigned d1, | ||
26 | unsigned *samples_left), | 30 | unsigned *samples_left), |
27 | unsigned int is_ts); | 31 | unsigned int is_ts); |
28 | 32 | ||
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h index 2e170827e0b0..0f540ea1e999 100644 --- a/arch/arm/plat-s3c/include/plat/devs.h +++ b/arch/arm/plat-s3c/include/plat/devs.h | |||
@@ -46,6 +46,8 @@ extern struct platform_device s3c_device_hsmmc2; | |||
46 | extern struct platform_device s3c_device_spi0; | 46 | extern struct platform_device s3c_device_spi0; |
47 | extern struct platform_device s3c_device_spi1; | 47 | extern struct platform_device s3c_device_spi1; |
48 | 48 | ||
49 | extern struct platform_device s3c_device_hwmon; | ||
50 | |||
49 | extern struct platform_device s3c_device_nand; | 51 | extern struct platform_device s3c_device_nand; |
50 | 52 | ||
51 | extern struct platform_device s3c_device_usbgadget; | 53 | extern struct platform_device s3c_device_usbgadget; |
@@ -56,5 +58,6 @@ extern struct platform_device s3c_device_usb_hsotg; | |||
56 | #ifdef CONFIG_CPU_S3C2440 | 58 | #ifdef CONFIG_CPU_S3C2440 |
57 | 59 | ||
58 | extern struct platform_device s3c_device_camif; | 60 | extern struct platform_device s3c_device_camif; |
61 | extern struct platform_device s3c_device_ac97; | ||
59 | 62 | ||
60 | #endif | 63 | #endif |
diff --git a/arch/arm/plat-s3c/include/plat/hwmon.h b/arch/arm/plat-s3c/include/plat/hwmon.h new file mode 100644 index 000000000000..1ba88ea0aa31 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/hwmon.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/hwmon.h | ||
2 | * | ||
3 | * Copyright 2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C - HWMon interface for ADC | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_ADC_HWMON_H | ||
15 | #define __ASM_ARCH_ADC_HWMON_H __FILE__ | ||
16 | |||
17 | /** | ||
18 | * s3c_hwmon_chcfg - channel configuration | ||
19 | * @name: The name to give this channel. | ||
20 | * @mult: Multiply the ADC value read by this. | ||
21 | * @div: Divide the value from the ADC by this. | ||
22 | * | ||
23 | * The value read from the ADC is converted to a value that | ||
24 | * hwmon expects (mV) by result = (value_read * @mult) / @div. | ||
25 | */ | ||
26 | struct s3c_hwmon_chcfg { | ||
27 | const char *name; | ||
28 | unsigned int mult; | ||
29 | unsigned int div; | ||
30 | }; | ||
31 | |||
32 | /** | ||
33 | * s3c_hwmon_pdata - HWMON platform data | ||
34 | * @in: One configuration for each possible channel used. | ||
35 | */ | ||
36 | struct s3c_hwmon_pdata { | ||
37 | struct s3c_hwmon_chcfg *in[8]; | ||
38 | }; | ||
39 | |||
40 | #endif /* __ASM_ARCH_ADC_HWMON_H */ | ||
41 | |||
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig index f0b9c73fe008..2f9145683596 100644 --- a/arch/arm/plat-s3c24xx/Kconfig +++ b/arch/arm/plat-s3c24xx/Kconfig | |||
@@ -139,6 +139,12 @@ config S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7 | |||
139 | SPI GPIO configuration code for BUS 1 when connected to | 139 | SPI GPIO configuration code for BUS 1 when connected to |
140 | GPG5, GPG6 and GPG7. | 140 | GPG5, GPG6 and GPG7. |
141 | 141 | ||
142 | config S3C24XX_SPI_BUS1_GPD8_GPD9_GPD10 | ||
143 | bool | ||
144 | help | ||
145 | SPI GPIO configuration code for BUS 1 when connected to | ||
146 | GPD8, GPD9 and GPD10. | ||
147 | |||
142 | # common code for s3c24xx based machines, such as the SMDKs. | 148 | # common code for s3c24xx based machines, such as the SMDKs. |
143 | 149 | ||
144 | # cpu frequency items common between s3c2410 and s3c2440/s3c2442 | 150 | # cpu frequency items common between s3c2410 and s3c2440/s3c2442 |
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile index f34937515804..651315c95ec4 100644 --- a/arch/arm/plat-s3c24xx/Makefile +++ b/arch/arm/plat-s3c24xx/Makefile | |||
@@ -51,6 +51,7 @@ obj-$(CONFIG_ARCH_S3C2410) += setup-i2c.o | |||
51 | 51 | ||
52 | obj-$(CONFIG_S3C24XX_SPI_BUS0_GPE11_GPE12_GPE13) += spi-bus0-gpe11_12_13.o | 52 | obj-$(CONFIG_S3C24XX_SPI_BUS0_GPE11_GPE12_GPE13) += spi-bus0-gpe11_12_13.o |
53 | obj-$(CONFIG_S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7) += spi-bus1-gpg5_6_7.o | 53 | obj-$(CONFIG_S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7) += spi-bus1-gpg5_6_7.o |
54 | obj-$(CONFIG_S3C24XX_SPI_BUS1_GPD8_GPD9_GPD10) += spi-bus1-gpd8_9_10.o | ||
54 | 55 | ||
55 | # machine common support | 56 | # machine common support |
56 | 57 | ||
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c index ee1baf11ad9e..11117a7ba911 100644 --- a/arch/arm/plat-s3c24xx/adc.c +++ b/arch/arm/plat-s3c24xx/adc.c | |||
@@ -39,13 +39,16 @@ | |||
39 | struct s3c_adc_client { | 39 | struct s3c_adc_client { |
40 | struct platform_device *pdev; | 40 | struct platform_device *pdev; |
41 | struct list_head pend; | 41 | struct list_head pend; |
42 | wait_queue_head_t *wait; | ||
42 | 43 | ||
43 | unsigned int nr_samples; | 44 | unsigned int nr_samples; |
45 | int result; | ||
44 | unsigned char is_ts; | 46 | unsigned char is_ts; |
45 | unsigned char channel; | 47 | unsigned char channel; |
46 | 48 | ||
47 | void (*select_cb)(unsigned selected); | 49 | void (*select_cb)(struct s3c_adc_client *c, unsigned selected); |
48 | void (*convert_cb)(unsigned val1, unsigned val2, | 50 | void (*convert_cb)(struct s3c_adc_client *c, |
51 | unsigned val1, unsigned val2, | ||
49 | unsigned *samples_left); | 52 | unsigned *samples_left); |
50 | }; | 53 | }; |
51 | 54 | ||
@@ -81,7 +84,7 @@ static inline void s3c_adc_select(struct adc_device *adc, | |||
81 | { | 84 | { |
82 | unsigned con = readl(adc->regs + S3C2410_ADCCON); | 85 | unsigned con = readl(adc->regs + S3C2410_ADCCON); |
83 | 86 | ||
84 | client->select_cb(1); | 87 | client->select_cb(client, 1); |
85 | 88 | ||
86 | con &= ~S3C2410_ADCCON_MUXMASK; | 89 | con &= ~S3C2410_ADCCON_MUXMASK; |
87 | con &= ~S3C2410_ADCCON_STDBM; | 90 | con &= ~S3C2410_ADCCON_STDBM; |
@@ -153,25 +156,61 @@ int s3c_adc_start(struct s3c_adc_client *client, | |||
153 | } | 156 | } |
154 | EXPORT_SYMBOL_GPL(s3c_adc_start); | 157 | EXPORT_SYMBOL_GPL(s3c_adc_start); |
155 | 158 | ||
156 | static void s3c_adc_default_select(unsigned select) | 159 | static void s3c_convert_done(struct s3c_adc_client *client, |
160 | unsigned v, unsigned u, unsigned *left) | ||
161 | { | ||
162 | client->result = v; | ||
163 | wake_up(client->wait); | ||
164 | } | ||
165 | |||
166 | int s3c_adc_read(struct s3c_adc_client *client, unsigned int ch) | ||
167 | { | ||
168 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wake); | ||
169 | int ret; | ||
170 | |||
171 | client->convert_cb = s3c_convert_done; | ||
172 | client->wait = &wake; | ||
173 | client->result = -1; | ||
174 | |||
175 | ret = s3c_adc_start(client, ch, 1); | ||
176 | if (ret < 0) | ||
177 | goto err; | ||
178 | |||
179 | ret = wait_event_timeout(wake, client->result >= 0, HZ / 2); | ||
180 | if (client->result < 0) { | ||
181 | ret = -ETIMEDOUT; | ||
182 | goto err; | ||
183 | } | ||
184 | |||
185 | client->convert_cb = NULL; | ||
186 | return client->result; | ||
187 | |||
188 | err: | ||
189 | return ret; | ||
190 | } | ||
191 | EXPORT_SYMBOL_GPL(s3c_adc_convert); | ||
192 | |||
193 | static void s3c_adc_default_select(struct s3c_adc_client *client, | ||
194 | unsigned select) | ||
157 | { | 195 | { |
158 | } | 196 | } |
159 | 197 | ||
160 | struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev, | 198 | struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev, |
161 | void (*select)(unsigned int selected), | 199 | void (*select)(struct s3c_adc_client *client, |
162 | void (*conv)(unsigned d0, unsigned d1, | 200 | unsigned int selected), |
201 | void (*conv)(struct s3c_adc_client *client, | ||
202 | unsigned d0, unsigned d1, | ||
163 | unsigned *samples_left), | 203 | unsigned *samples_left), |
164 | unsigned int is_ts) | 204 | unsigned int is_ts) |
165 | { | 205 | { |
166 | struct s3c_adc_client *client; | 206 | struct s3c_adc_client *client; |
167 | 207 | ||
168 | WARN_ON(!pdev); | 208 | WARN_ON(!pdev); |
169 | WARN_ON(!conv); | ||
170 | 209 | ||
171 | if (!select) | 210 | if (!select) |
172 | select = s3c_adc_default_select; | 211 | select = s3c_adc_default_select; |
173 | 212 | ||
174 | if (!conv || !pdev) | 213 | if (!pdev) |
175 | return ERR_PTR(-EINVAL); | 214 | return ERR_PTR(-EINVAL); |
176 | 215 | ||
177 | client = kzalloc(sizeof(struct s3c_adc_client), GFP_KERNEL); | 216 | client = kzalloc(sizeof(struct s3c_adc_client), GFP_KERNEL); |
@@ -230,16 +269,19 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw) | |||
230 | adc_dbg(adc, "read %d: 0x%04x, 0x%04x\n", client->nr_samples, data0, data1); | 269 | adc_dbg(adc, "read %d: 0x%04x, 0x%04x\n", client->nr_samples, data0, data1); |
231 | 270 | ||
232 | client->nr_samples--; | 271 | client->nr_samples--; |
233 | (client->convert_cb)(data0 & 0x3ff, data1 & 0x3ff, &client->nr_samples); | 272 | |
273 | if (client->convert_cb) | ||
274 | (client->convert_cb)(client, data0 & 0x3ff, data1 & 0x3ff, | ||
275 | &client->nr_samples); | ||
234 | 276 | ||
235 | if (client->nr_samples > 0) { | 277 | if (client->nr_samples > 0) { |
236 | /* fire another conversion for this */ | 278 | /* fire another conversion for this */ |
237 | 279 | ||
238 | client->select_cb(1); | 280 | client->select_cb(client, 1); |
239 | s3c_adc_convert(adc); | 281 | s3c_adc_convert(adc); |
240 | } else { | 282 | } else { |
241 | local_irq_save(flags); | 283 | local_irq_save(flags); |
242 | (client->select_cb)(0); | 284 | (client->select_cb)(client, 0); |
243 | adc->cur = NULL; | 285 | adc->cur = NULL; |
244 | 286 | ||
245 | s3c_adc_try(adc); | 287 | s3c_adc_try(adc); |
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 4eb378c89a39..656b375db46f 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <asm/mach/irq.h> | 26 | #include <asm/mach/irq.h> |
27 | #include <mach/fb.h> | 27 | #include <mach/fb.h> |
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/dma.h> | ||
30 | #include <mach/irqs.h> | ||
29 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
30 | 32 | ||
31 | #include <plat/regs-serial.h> | 33 | #include <plat/regs-serial.h> |
@@ -348,7 +350,7 @@ struct platform_device s3c_device_adc = { | |||
348 | /* HWMON */ | 350 | /* HWMON */ |
349 | 351 | ||
350 | struct platform_device s3c_device_hwmon = { | 352 | struct platform_device s3c_device_hwmon = { |
351 | .name = "s3c24xx-hwmon", | 353 | .name = "s3c-hwmon", |
352 | .id = -1, | 354 | .id = -1, |
353 | .dev.parent = &s3c_device_adc.dev, | 355 | .dev.parent = &s3c_device_adc.dev, |
354 | }; | 356 | }; |
@@ -473,4 +475,52 @@ struct platform_device s3c_device_camif = { | |||
473 | 475 | ||
474 | EXPORT_SYMBOL(s3c_device_camif); | 476 | EXPORT_SYMBOL(s3c_device_camif); |
475 | 477 | ||
478 | /* AC97 */ | ||
479 | |||
480 | static struct resource s3c_ac97_resource[] = { | ||
481 | [0] = { | ||
482 | .start = S3C2440_PA_AC97, | ||
483 | .end = S3C2440_PA_AC97 + S3C2440_SZ_AC97 -1, | ||
484 | .flags = IORESOURCE_MEM, | ||
485 | }, | ||
486 | [1] = { | ||
487 | .start = IRQ_S3C244x_AC97, | ||
488 | .end = IRQ_S3C244x_AC97, | ||
489 | .flags = IORESOURCE_IRQ, | ||
490 | }, | ||
491 | [2] = { | ||
492 | .name = "PCM out", | ||
493 | .start = DMACH_PCM_OUT, | ||
494 | .end = DMACH_PCM_OUT, | ||
495 | .flags = IORESOURCE_DMA, | ||
496 | }, | ||
497 | [3] = { | ||
498 | .name = "PCM in", | ||
499 | .start = DMACH_PCM_IN, | ||
500 | .end = DMACH_PCM_IN, | ||
501 | .flags = IORESOURCE_DMA, | ||
502 | }, | ||
503 | [4] = { | ||
504 | .name = "Mic in", | ||
505 | .start = DMACH_MIC_IN, | ||
506 | .end = DMACH_MIC_IN, | ||
507 | .flags = IORESOURCE_DMA, | ||
508 | }, | ||
509 | }; | ||
510 | |||
511 | static u64 s3c_device_ac97_dmamask = 0xffffffffUL; | ||
512 | |||
513 | struct platform_device s3c_device_ac97 = { | ||
514 | .name = "s3c-ac97", | ||
515 | .id = -1, | ||
516 | .num_resources = ARRAY_SIZE(s3c_ac97_resource), | ||
517 | .resource = s3c_ac97_resource, | ||
518 | .dev = { | ||
519 | .dma_mask = &s3c_device_ac97_dmamask, | ||
520 | .coherent_dma_mask = 0xffffffffUL | ||
521 | } | ||
522 | }; | ||
523 | |||
524 | EXPORT_SYMBOL(s3c_device_ac97); | ||
525 | |||
476 | #endif // CONFIG_CPU_S32440 | 526 | #endif // CONFIG_CPU_S32440 |
diff --git a/arch/arm/plat-s3c24xx/include/plat/fiq.h b/arch/arm/plat-s3c24xx/include/plat/fiq.h new file mode 100644 index 000000000000..8521b8372c5f --- /dev/null +++ b/arch/arm/plat-s3c24xx/include/plat/fiq.h | |||
@@ -0,0 +1,13 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/fiq.h | ||
2 | * | ||
3 | * Copyright (c) 2009 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C24XX CPU FIQ support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | extern int s3c24xx_set_fiq(unsigned int irq, bool on); | ||
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index 958737775ad2..d02f5f02045e 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c | |||
@@ -493,6 +493,38 @@ s3c_irq_demux_extint4t7(unsigned int irq, | |||
493 | } | 493 | } |
494 | } | 494 | } |
495 | 495 | ||
496 | #ifdef CONFIG_FIQ | ||
497 | /** | ||
498 | * s3c24xx_set_fiq - set the FIQ routing | ||
499 | * @irq: IRQ number to route to FIQ on processor. | ||
500 | * @on: Whether to route @irq to the FIQ, or to remove the FIQ routing. | ||
501 | * | ||
502 | * Change the state of the IRQ to FIQ routing depending on @irq and @on. If | ||
503 | * @on is true, the @irq is checked to see if it can be routed and the | ||
504 | * interrupt controller updated to route the IRQ. If @on is false, the FIQ | ||
505 | * routing is cleared, regardless of which @irq is specified. | ||
506 | */ | ||
507 | int s3c24xx_set_fiq(unsigned int irq, bool on) | ||
508 | { | ||
509 | u32 intmod; | ||
510 | unsigned offs; | ||
511 | |||
512 | if (on) { | ||
513 | offs = irq - FIQ_START; | ||
514 | if (offs > 31) | ||
515 | return -EINVAL; | ||
516 | |||
517 | intmod = 1 << offs; | ||
518 | } else { | ||
519 | intmod = 0; | ||
520 | } | ||
521 | |||
522 | __raw_writel(intmod, S3C2410_INTMOD); | ||
523 | return 0; | ||
524 | } | ||
525 | #endif | ||
526 | |||
527 | |||
496 | /* s3c24xx_init_irq | 528 | /* s3c24xx_init_irq |
497 | * | 529 | * |
498 | * Initialise S3C2410 IRQ system | 530 | * Initialise S3C2410 IRQ system |
@@ -505,6 +537,10 @@ void __init s3c24xx_init_irq(void) | |||
505 | int irqno; | 537 | int irqno; |
506 | int i; | 538 | int i; |
507 | 539 | ||
540 | #ifdef CONFIG_FIQ | ||
541 | init_FIQ(); | ||
542 | #endif | ||
543 | |||
508 | irqdbf("s3c2410_init_irq: clearing interrupt status flags\n"); | 544 | irqdbf("s3c2410_init_irq: clearing interrupt status flags\n"); |
509 | 545 | ||
510 | /* first, clear all interrupts pending... */ | 546 | /* first, clear all interrupts pending... */ |
diff --git a/arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c b/arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c new file mode 100644 index 000000000000..89fcf5308cf6 --- /dev/null +++ b/arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c | |||
@@ -0,0 +1,38 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/spi-bus0-gpd8_9_10.c | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C24XX SPI - gpio configuration for bus 1 on gpd8,9,10 | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/gpio.h> | ||
16 | |||
17 | #include <mach/spi.h> | ||
18 | #include <mach/regs-gpio.h> | ||
19 | |||
20 | void s3c24xx_spi_gpiocfg_bus1_gpd8_9_10(struct s3c2410_spi_info *spi, | ||
21 | int enable) | ||
22 | { | ||
23 | |||
24 | printk(KERN_INFO "%s(%d)\n", __func__, enable); | ||
25 | if (enable) { | ||
26 | s3c2410_gpio_cfgpin(S3C2410_GPD(10), S3C2440_GPD10_SPICLK1); | ||
27 | s3c2410_gpio_cfgpin(S3C2410_GPD(9), S3C2440_GPD9_SPIMOSI1); | ||
28 | s3c2410_gpio_cfgpin(S3C2410_GPD(8), S3C2440_GPD8_SPIMISO1); | ||
29 | s3c2410_gpio_pullup(S3C2410_GPD(10), 0); | ||
30 | s3c2410_gpio_pullup(S3C2410_GPD(9), 0); | ||
31 | } else { | ||
32 | s3c2410_gpio_cfgpin(S3C2410_GPD(8), S3C2410_GPIO_INPUT); | ||
33 | s3c2410_gpio_cfgpin(S3C2410_GPD(9), S3C2410_GPIO_INPUT); | ||
34 | s3c2410_gpio_pullup(S3C2410_GPD(10), 1); | ||
35 | s3c2410_gpio_pullup(S3C2410_GPD(9), 1); | ||
36 | s3c2410_gpio_pullup(S3C2410_GPD(8), 1); | ||
37 | } | ||
38 | } | ||