diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:18:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:18:39 -0500 |
commit | 59b8175c771040afcd4ad67022b0cc80c216b866 (patch) | |
tree | 4ef5935bee1e342716d49b9d4b99e3fa835526e6 /arch/arm/mach-s3c2410/mach-h1940.c | |
parent | 920841d8d1d61bc12b43f95a579a5374f6d98f81 (diff) | |
parent | 3b0eb4a195a124567cd0dd6f700f8388def542c6 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (117 commits)
[ARM] 4058/2: iop32x: set ->broken_parity_status on n2100 onboard r8169 ports
[ARM] 4140/1: AACI stability add ac97 timeout and retries
[ARM] 4139/1: AACI record support
[ARM] 4138/1: AACI: multiple channel support for IRQ handling
[ARM] 4211/1: Provide a defconfig for ns9xxx
[ARM] 4210/1: base for new machine type "NetSilicon NS9360"
[ARM] 4222/1: S3C2443: Remove reference to missing S3C2443_PM
[ARM] 4221/1: S3C2443: DMA support
[ARM] 4220/1: S3C24XX: DMA system initialised from sysdev
[ARM] 4219/1: S3C2443: DMA source definitions
[ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443
[ARM] 4217/1: S3C24XX: remove the dma channel show at startup
[ARM] 4090/2: avoid clash between PXA and SA1111 defines
[ARM] 4216/1: add .gitignore entries for ARM specific files
[ARM] 4214/2: S3C2410: Add Armzone QT2410
[ARM] 4215/1: s3c2410 usb device: per-platform vbus_draw
[ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST
[ARM] 4098/1: ARM: rtc_lock only used with rtc_cmos
[ARM] 4137/1: Add kexec support
[ARM] 4201/1: SMP barriers pair needed for the secondary boot process
...
Fix up conflict due to typedef removal in sound/arm/aaci.h
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-h1940.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 64 |
1 files changed, 57 insertions, 7 deletions
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 15b625eae499..01c60d0923cd 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -25,23 +25,24 @@ | |||
25 | #include <asm/mach/irq.h> | 25 | #include <asm/mach/irq.h> |
26 | 26 | ||
27 | #include <asm/hardware.h> | 27 | #include <asm/hardware.h> |
28 | #include <asm/hardware/iomd.h> | ||
29 | #include <asm/io.h> | 28 | #include <asm/io.h> |
30 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
31 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
32 | 31 | ||
33 | |||
34 | #include <asm/arch/regs-serial.h> | 32 | #include <asm/arch/regs-serial.h> |
35 | #include <asm/arch/regs-lcd.h> | 33 | #include <asm/arch/regs-lcd.h> |
34 | #include <asm/arch/regs-gpio.h> | ||
35 | #include <asm/arch/regs-clock.h> | ||
36 | 36 | ||
37 | #include <asm/arch/h1940.h> | 37 | #include <asm/arch/h1940.h> |
38 | #include <asm/arch/h1940-latch.h> | 38 | #include <asm/arch/h1940-latch.h> |
39 | #include <asm/arch/fb.h> | 39 | #include <asm/arch/fb.h> |
40 | #include <asm/arch/udc.h> | ||
40 | 41 | ||
41 | #include "clock.h" | 42 | #include <asm/plat-s3c24xx/clock.h> |
42 | #include "devs.h" | 43 | #include <asm/plat-s3c24xx/devs.h> |
43 | #include "cpu.h" | 44 | #include <asm/plat-s3c24xx/cpu.h> |
44 | #include "pm.h" | 45 | #include <asm/plat-s3c24xx/pm.h> |
45 | 46 | ||
46 | static struct map_desc h1940_iodesc[] __initdata = { | 47 | static struct map_desc h1940_iodesc[] __initdata = { |
47 | [0] = { | 48 | [0] = { |
@@ -102,6 +103,32 @@ void h1940_latch_control(unsigned int clear, unsigned int set) | |||
102 | 103 | ||
103 | EXPORT_SYMBOL_GPL(h1940_latch_control); | 104 | EXPORT_SYMBOL_GPL(h1940_latch_control); |
104 | 105 | ||
106 | static void h1940_udc_pullup(enum s3c2410_udc_cmd_e cmd) | ||
107 | { | ||
108 | printk(KERN_DEBUG "udc: pullup(%d)\n",cmd); | ||
109 | |||
110 | switch (cmd) | ||
111 | { | ||
112 | case S3C2410_UDC_P_ENABLE : | ||
113 | h1940_latch_control(0, H1940_LATCH_USB_DP); | ||
114 | break; | ||
115 | case S3C2410_UDC_P_DISABLE : | ||
116 | h1940_latch_control(H1940_LATCH_USB_DP, 0); | ||
117 | break; | ||
118 | case S3C2410_UDC_P_RESET : | ||
119 | break; | ||
120 | default: | ||
121 | break; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = { | ||
126 | .udc_command = h1940_udc_pullup, | ||
127 | .vbus_pin = S3C2410_GPG5, | ||
128 | .vbus_pin_inverted = 1, | ||
129 | }; | ||
130 | |||
131 | |||
105 | 132 | ||
106 | /** | 133 | /** |
107 | * Set lcd on or off | 134 | * Set lcd on or off |
@@ -146,12 +173,19 @@ static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = { | |||
146 | .bpp= {16,16,16}, | 173 | .bpp= {16,16,16}, |
147 | }; | 174 | }; |
148 | 175 | ||
176 | static struct platform_device s3c_device_leds = { | ||
177 | .name = "h1940-leds", | ||
178 | .id = -1, | ||
179 | }; | ||
180 | |||
149 | static struct platform_device *h1940_devices[] __initdata = { | 181 | static struct platform_device *h1940_devices[] __initdata = { |
150 | &s3c_device_usb, | 182 | &s3c_device_usb, |
151 | &s3c_device_lcd, | 183 | &s3c_device_lcd, |
152 | &s3c_device_wdt, | 184 | &s3c_device_wdt, |
153 | &s3c_device_i2c, | 185 | &s3c_device_i2c, |
154 | &s3c_device_iis, | 186 | &s3c_device_iis, |
187 | &s3c_device_usbgadget, | ||
188 | &s3c_device_leds, | ||
155 | }; | 189 | }; |
156 | 190 | ||
157 | static struct s3c24xx_board h1940_board __initdata = { | 191 | static struct s3c24xx_board h1940_board __initdata = { |
@@ -179,7 +213,23 @@ static void __init h1940_init_irq(void) | |||
179 | 213 | ||
180 | static void __init h1940_init(void) | 214 | static void __init h1940_init(void) |
181 | { | 215 | { |
216 | u32 tmp; | ||
217 | |||
182 | s3c24xx_fb_set_platdata(&h1940_lcdcfg); | 218 | s3c24xx_fb_set_platdata(&h1940_lcdcfg); |
219 | s3c24xx_udc_set_platdata(&h1940_udc_cfg); | ||
220 | |||
221 | /* Turn off suspend on both USB ports, and switch the | ||
222 | * selectable USB port to USB device mode. */ | ||
223 | |||
224 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | | ||
225 | S3C2410_MISCCR_USBSUSPND0 | | ||
226 | S3C2410_MISCCR_USBSUSPND1, 0x0); | ||
227 | |||
228 | tmp = ( | ||
229 | 0x78 << S3C2410_PLLCON_MDIVSHIFT) | ||
230 | | (0x02 << S3C2410_PLLCON_PDIVSHIFT) | ||
231 | | (0x03 << S3C2410_PLLCON_SDIVSHIFT); | ||
232 | writel(tmp, S3C2410_UPLLCON); | ||
183 | } | 233 | } |
184 | 234 | ||
185 | MACHINE_START(H1940, "IPAQ-H1940") | 235 | MACHINE_START(H1940, "IPAQ-H1940") |
@@ -189,6 +239,6 @@ MACHINE_START(H1940, "IPAQ-H1940") | |||
189 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 239 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
190 | .map_io = h1940_map_io, | 240 | .map_io = h1940_map_io, |
191 | .init_irq = h1940_init_irq, | 241 | .init_irq = h1940_init_irq, |
192 | .init_machine = h1940_init, | 242 | .init_machine = h1940_init, |
193 | .timer = &s3c24xx_timer, | 243 | .timer = &s3c24xx_timer, |
194 | MACHINE_END | 244 | MACHINE_END |