4d89bcd4e3343420e13041bd4ebbcf20c244ebec
[openwrt/svn-archive/archive.git] / target / linux / s3c24xx / patches-2.6.30 / 012-s3c-usb.patch
1 Index: linux-2.6.30-rc6/arch/arm/plat-s3c/dev-usb.c
2 ===================================================================
3 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
4 +++ linux-2.6.30-rc6/arch/arm/plat-s3c/dev-usb.c 2009-05-18 19:08:30.000000000 +0200
5 @@ -0,0 +1,50 @@
6 +/* linux/arch/arm/plat-s3c/dev-usb.c
7 + *
8 + * Copyright 2008 Simtec Electronics
9 + * Ben Dooks <ben@simtec.co.uk>
10 + * http://armlinux.simtec.co.uk/
11 + *
12 + * S3C series device definition for USB host
13 + *
14 + * This program is free software; you can redistribute it and/or modify
15 + * it under the terms of the GNU General Public License version 2 as
16 + * published by the Free Software Foundation.
17 +*/
18 +
19 +#include <linux/kernel.h>
20 +#include <linux/string.h>
21 +#include <linux/platform_device.h>
22 +
23 +#include <mach/irqs.h>
24 +#include <mach/map.h>
25 +
26 +#include <plat/devs.h>
27 +
28 +
29 +static struct resource s3c_usb_resource[] = {
30 + [0] = {
31 + .start = S3C24XX_PA_USBHOST,
32 + .end = S3C24XX_PA_USBHOST + 0x100 - 1,
33 + .flags = IORESOURCE_MEM,
34 + },
35 + [1] = {
36 + .start = IRQ_USBH,
37 + .end = IRQ_USBH,
38 + .flags = IORESOURCE_IRQ,
39 + }
40 +};
41 +
42 +static u64 s3c_device_usb_dmamask = 0xffffffffUL;
43 +
44 +struct platform_device s3c_device_usb = {
45 + .name = "s3c-ohci",
46 + .id = -1,
47 + .num_resources = ARRAY_SIZE(s3c_usb_resource),
48 + .resource = s3c_usb_resource,
49 + .dev = {
50 + .dma_mask = &s3c_device_usb_dmamask,
51 + .coherent_dma_mask = 0xffffffffUL
52 + }
53 +};
54 +
55 +EXPORT_SYMBOL(s3c_device_usb);
56 Index: linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/regs-usb-hs-otg.h
57 ===================================================================
58 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
59 +++ linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/regs-usb-hs-otg.h 2009-05-18 19:08:30.000000000 +0200
60 @@ -0,0 +1,360 @@
61 +/* linux/include/asm-arm/arch-s3c2410/regs-udc.h
62 + *
63 + * Copyright (C) 2008 Samsung Electronics
64 + * Copyright (C) 2004 Herbert Poetzl <herbert@13thfloor.at>
65 + *
66 + * This include file is free software; you can redistribute it and/or
67 + * modify it under the terms of the GNU General Public License as
68 + * published by the Free Software Foundation; either version 2 of
69 + * the License, or (at your option) any later version.
70 +*/
71 +
72 +#ifndef __ASM_ARCH_REGS_USB_HS_OTG_H
73 +#define __ASM_ARCH_REGS_USB_HS_OTG_H
74 +
75 +/* USB2.0 OTG Controller register */
76 +#define S3C_USBOTG_PHYREG(x) ((x) + 0x100000 /* S3C64XX_VA_OTGSFR */)
77 +#define S3C_USBOTG_PHYPWR S3C_USBOTG_PHYREG(0x0)
78 +#define S3C_USBOTG_PHYCLK S3C_USBOTG_PHYREG(0x4)
79 +#define S3C_USBOTG_RSTCON S3C_USBOTG_PHYREG(0x8)
80 +
81 +/* USB2.0 OTG Controller register */
82 +/* Core Global Registers */
83 +#define S3C_USBOTGREG(x) ((x) /*+ S3C64XX_VA_OTG */)
84 +/* OTG Control & Status */
85 +#define S3C_UDC_OTG_GOTGCTL S3C_USBOTGREG(0x000)
86 +/* OTG Interrupt */
87 +#define S3C_UDC_OTG_GOTGINT S3C_USBOTGREG(0x004)
88 +/* Core AHB Configuration */
89 +#define S3C_UDC_OTG_GAHBCFG S3C_USBOTGREG(0x008)
90 +/* Core USB Configuration */
91 +#define S3C_UDC_OTG_GUSBCFG S3C_USBOTGREG(0x00C)
92 +/* Core Reset */
93 +#define S3C_UDC_OTG_GRSTCTL S3C_USBOTGREG(0x010)
94 +/* Core Interrupt */
95 +#define S3C_UDC_OTG_GINTSTS S3C_USBOTGREG(0x014)
96 +/* Core Interrupt Mask */
97 +#define S3C_UDC_OTG_GINTMSK S3C_USBOTGREG(0x018)
98 +/* Receive Status Debug Read/Status Read */
99 +#define S3C_UDC_OTG_GRXSTSR S3C_USBOTGREG(0x01C)
100 +/* Receive Status Debug Pop/Status Pop */
101 +#define S3C_UDC_OTG_GRXSTSP S3C_USBOTGREG(0x020)
102 +/* Receive FIFO Size */
103 +#define S3C_UDC_OTG_GRXFSIZ S3C_USBOTGREG(0x024)
104 +/* Non-Periodic Transmit FIFO Size */
105 +#define S3C_UDC_OTG_GNPTXFSIZ S3C_USBOTGREG(0x028)
106 +/* Non-Periodic Transmit FIFO/Queue Status */
107 +#define S3C_UDC_OTG_GNPTXSTS S3C_USBOTGREG(0x02C)
108 +
109 +/* Host Periodic Transmit FIFO Size */
110 +#define S3C_UDC_OTG_HPTXFSIZ S3C_USBOTGREG(0x100)
111 +/* Device Periodic Transmit FIFO-1 Size */
112 +#define S3C_UDC_OTG_DPTXFSIZ1 S3C_USBOTGREG(0x104)
113 +/* Device Periodic Transmit FIFO-2 Size */
114 +#define S3C_UDC_OTG_DPTXFSIZ2 S3C_USBOTGREG(0x108)
115 +/* Device Periodic Transmit FIFO-3 Size */
116 +#define S3C_UDC_OTG_DPTXFSIZ3 S3C_USBOTGREG(0x10C)
117 +/* Device Periodic Transmit FIFO-4 Size */
118 +#define S3C_UDC_OTG_DPTXFSIZ4 S3C_USBOTGREG(0x110)
119 +/* Device Periodic Transmit FIFO-5 Size */
120 +#define S3C_UDC_OTG_DPTXFSIZ5 S3C_USBOTGREG(0x114)
121 +/* Device Periodic Transmit FIFO-6 Size */
122 +#define S3C_UDC_OTG_DPTXFSIZ6 S3C_USBOTGREG(0x118)
123 +/* Device Periodic Transmit FIFO-7 Size */
124 +#define S3C_UDC_OTG_DPTXFSIZ7 S3C_USBOTGREG(0x11C)
125 +/* Device Periodic Transmit FIFO-8 Size */
126 +#define S3C_UDC_OTG_DPTXFSIZ8 S3C_USBOTGREG(0x120)
127 +/* Device Periodic Transmit FIFO-9 Size */
128 +#define S3C_UDC_OTG_DPTXFSIZ9 S3C_USBOTGREG(0x124)
129 +/* Device Periodic Transmit FIFO-10 Size */
130 +#define S3C_UDC_OTG_DPTXFSIZ10 S3C_USBOTGREG(0x128)
131 +/* Device Periodic Transmit FIFO-11 Size */
132 +#define S3C_UDC_OTG_DPTXFSIZ11 S3C_USBOTGREG(0x12C)
133 +/* Device Periodic Transmit FIFO-12 Size */
134 +#define S3C_UDC_OTG_DPTXFSIZ12 S3C_USBOTGREG(0x130)
135 +/* Device Periodic Transmit FIFO-13 Size */
136 +#define S3C_UDC_OTG_DPTXFSIZ13 S3C_USBOTGREG(0x134)
137 +/* Device Periodic Transmit FIFO-14 Size */
138 +#define S3C_UDC_OTG_DPTXFSIZ14 S3C_USBOTGREG(0x138)
139 +/* Device Periodic Transmit FIFO-15 Size */
140 +#define S3C_UDC_OTG_DPTXFSIZ15 S3C_USBOTGREG(0x13C)
141 +
142 +/* Host Mode Registers
143 + * Host Global Registers */
144 +/* Host Configuration */
145 +#define S3C_UDC_OTG_HCFG S3C_USBOTGREG(0x400)
146 +/* Host Frame Interval */
147 +#define S3C_UDC_OTG_HFIR S3C_USBOTGREG(0x404)
148 +/* Host Frame Number/Frame Time Remaining */
149 +#define S3C_UDC_OTG_HFNUM S3C_USBOTGREG(0x408)
150 +/* Host Periodic Transmit FIFO/Queue Status */
151 +#define S3C_UDC_OTG_HPTXSTS S3C_USBOTGREG(0x410)
152 +/* Host All Channels Interrupt */
153 +#define S3C_UDC_OTG_HAINT S3C_USBOTGREG(0x414)
154 +/* Host All Channels Interrupt Mask */
155 +#define S3C_UDC_OTG_HAINTMSK S3C_USBOTGREG(0x418)
156 +
157 +/* Host Port Control & Status Registers */
158 +#define S3C_UDC_OTG_HPRT S3C_USBOTGREG(0x440)
159 +
160 +/* Host Channel-Specific Registers */
161 +/* Host Channel-0 Characteristics */
162 +#define S3C_UDC_OTG_HCCHAR0 S3C_USBOTGREG(0x500)
163 +/* Host Channel-0 Split Control */
164 +#define S3C_UDC_OTG_HCSPLT0 S3C_USBOTGREG(0x504)
165 +/* Host Channel-0 Interrupt */
166 +#define S3C_UDC_OTG_HCINT0 S3C_USBOTGREG(0x508)
167 +/* Host Channel-0 Interrupt Mask */
168 +#define S3C_UDC_OTG_HCINTMSK0 S3C_USBOTGREG(0x50C)
169 +/* Host Channel-0 Transfer Size */
170 +#define S3C_UDC_OTG_HCTSIZ0 S3C_USBOTGREG(0x510)
171 +/* Host Channel-0 DMA Address */
172 +#define S3C_UDC_OTG_HCDMA0 S3C_USBOTGREG(0x514)
173 +
174 +/* Device Mode Registers
175 + * Device Global Registers */
176 +/* Device Configuration */
177 +#define S3C_UDC_OTG_DCFG S3C_USBOTGREG(0x800)
178 +/* Device Control */
179 +#define S3C_UDC_OTG_DCTL S3C_USBOTGREG(0x804)
180 +/* Device Status */
181 +#define S3C_UDC_OTG_DSTS S3C_USBOTGREG(0x808)
182 +/* Device IN Endpoint Common Interrupt Mask */
183 +#define S3C_UDC_OTG_DIEPMSK S3C_USBOTGREG(0x810)
184 +/* Device OUT Endpoint Common Interrupt Mask */
185 +#define S3C_UDC_OTG_DOEPMSK S3C_USBOTGREG(0x814)
186 +/* Device All Endpoints Interrupt */
187 +#define S3C_UDC_OTG_DAINT S3C_USBOTGREG(0x818)
188 +/* Device All Endpoints Interrupt Mask */
189 +#define S3C_UDC_OTG_DAINTMSK S3C_USBOTGREG(0x81C)
190 +/* Device IN Token Sequence Learning Queue Read 1 */
191 +#define S3C_UDC_OTG_DTKNQR1 S3C_USBOTGREG(0x820)
192 +/* Device IN Token Sequence Learning Queue Read 2 */
193 +#define S3C_UDC_OTG_DTKNQR2 S3C_USBOTGREG(0x824)
194 +/* Device VBUS Discharge Time */
195 +#define S3C_UDC_OTG_DVBUSDIS S3C_USBOTGREG(0x828)
196 +/* Device VBUS Pulsing Time */
197 +#define S3C_UDC_OTG_DVBUSPULSE S3C_USBOTGREG(0x82C)
198 +/* Device IN Token Sequence Learning Queue Read 3 */
199 +#define S3C_UDC_OTG_DTKNQR3 S3C_USBOTGREG(0x830)
200 +/* Device IN Token Sequence Learning Queue Read 4 */
201 +#define S3C_UDC_OTG_DTKNQR4 S3C_USBOTGREG(0x834)
202 +
203 +/* Device Logical IN Endpoint-Specific Registers */
204 +/* Device IN Endpoint 0 Control */
205 +#define S3C_UDC_OTG_DIEPCTL0 S3C_USBOTGREG(0x900)
206 +/* Device IN Endpoint 0 Interrupt */
207 +#define S3C_UDC_OTG_DIEPINT0 S3C_USBOTGREG(0x908)
208 +/* Device IN Endpoint 0 Transfer Size */
209 +#define S3C_UDC_OTG_DIEPTSIZ0 S3C_USBOTGREG(0x910)
210 +/* Device IN Endpoint 0 DMA Address */
211 +#define S3C_UDC_OTG_DIEPDMA0 S3C_USBOTGREG(0x914)
212 +
213 +/* Device IN Endpoint 2 Control */
214 +#define S3C_UDC_OTG_DIEPCTL2 S3C_USBOTGREG(0x940)
215 +/* Device IN Endpoint 2 Interrupt */
216 +#define S3C_UDC_OTG_DIEPINT2 S3C_USBOTGREG(0x948)
217 +/* Device IN Endpoint 2 Transfer Size */
218 +#define S3C_UDC_OTG_DIEPTSIZ2 S3C_USBOTGREG(0x950)
219 +/* Device IN Endpoint 2 DMA Address */
220 +#define S3C_UDC_OTG_DIEPDMA2 S3C_USBOTGREG(0x954)
221 +
222 +/* Device IN Endpoint 3 Control */
223 +#define S3C_UDC_OTG_DIEPCTL3 S3C_USBOTGREG(0x960)
224 +/* Device IN Endpoint 3 Interrupt */
225 +#define S3C_UDC_OTG_DIEPINT3 S3C_USBOTGREG(0x968)
226 +/* Device IN Endpoint 3 Transfer Size */
227 +#define S3C_UDC_OTG_DIEPTSIZ3 S3C_USBOTGREG(0x970)
228 +/* Device IN Endpoint 3 DMA Address */
229 +#define S3C_UDC_OTG_DIEPDMA3 S3C_USBOTGREG(0x974)
230 +
231 +/* Device Logical OUT Endpoint-Specific Registers */
232 +/* Device OUT Endpoint 0 Control */
233 +#define S3C_UDC_OTG_DOEPCTL0 S3C_USBOTGREG(0xB00)
234 +/* Device OUT Endpoint 0 Interrupt */
235 +#define S3C_UDC_OTG_DOEPINT0 S3C_USBOTGREG(0xB08)
236 +/* Device OUT Endpoint 0 Transfer Size */
237 +#define S3C_UDC_OTG_DOEPTSIZ0 S3C_USBOTGREG(0xB10)
238 +/* Device OUT Endpoint 0 DMA Address */
239 +#define S3C_UDC_OTG_DOEPDMA0 S3C_USBOTGREG(0xB14)
240 +
241 +/* Device OUT Endpoint 1 Control */
242 +#define S3C_UDC_OTG_DOEPCTL1 S3C_USBOTGREG(0xB20)
243 +/* Device OUT Endpoint 1 Interrupt */
244 +#define S3C_UDC_OTG_DOEPINT1 S3C_USBOTGREG(0xB28)
245 +/* Device OUT Endpoint 1 Transfer Size */
246 +#define S3C_UDC_OTG_DOEPTSIZ1 S3C_USBOTGREG(0xB30)
247 +/* Device OUT Endpoint 1 DMA Address */
248 +#define S3C_UDC_OTG_DOEPDMA1 S3C_USBOTGREG(0xB34)
249 +
250 +/* Endpoint FIFO address */
251 +#define S3C_UDC_OTG_EP0_FIFO S3C_USBOTGREG(0x1000)
252 +#define S3C_UDC_OTG_EP1_FIFO S3C_USBOTGREG(0x2000)
253 +#define S3C_UDC_OTG_EP2_FIFO S3C_USBOTGREG(0x3000)
254 +#define S3C_UDC_OTG_EP3_FIFO S3C_USBOTGREG(0x4000)
255 +#define S3C_UDC_OTG_EP4_FIFO S3C_USBOTGREG(0x5000)
256 +#define S3C_UDC_OTG_EP5_FIFO S3C_USBOTGREG(0x6000)
257 +#define S3C_UDC_OTG_EP6_FIFO S3C_USBOTGREG(0x7000)
258 +#define S3C_UDC_OTG_EP7_FIFO S3C_USBOTGREG(0x8000)
259 +#define S3C_UDC_OTG_EP8_FIFO S3C_USBOTGREG(0x9000)
260 +
261 +/* S3C_USBOTG_PHYPWR */
262 +#define OTG_ENABLE (0x0<<4)
263 +#define OTG_DISABLE (0x1<<4)
264 +#define ANALOG_PWR_UP (0x0<<3)
265 +#define ANALOG_PWR_DOWN (0x1<<3)
266 +#define SUSPEND_DISABLE (0x0<<0)
267 +#define SUSPEND_ENABLE (0x1<<0)
268 +
269 +/* S3C_USBOTG_PHYCLK */
270 +#define REF_CLK_CRYSTAL (0x0<<5)
271 +#define REF_CLK_OSCC (0x1<<5)
272 +
273 +/* S3C_USBOTG_RSTCON */
274 +#define SW_RST_OFF (0x0<<0)
275 +#define SW_RST_ON (0x1<<0)
276 +
277 +/* S3C_UDC_OTG_GOTGCTL */
278 +#define B_SESSION_VALID (0x1<<19)
279 +#define A_SESSION_VALID (0x1<<18)
280 +
281 +/* S3C_UDC_OTG_GAHBCFG */
282 +#define PTXFE_HALF (0x0<<8)
283 +#define PTXFE_ZERO (0x1<<8)
284 +#define NPTXFE_HALF (0x0<<7)
285 +#define NPTXFE_ZERO (0x1<<7)
286 +#define MODE_SLAVE (0x0<<5)
287 +#define MODE_DMA (0x1<<5)
288 +#define BURST_SINGLE (0x0<<1)
289 +#define BURST_INCR (0x1<<1)
290 +#define BURST_INCR4 (0x3<<1)
291 +#define BURST_INCR8 (0x5<<1)
292 +#define BURST_INCR16 (0x7<<1)
293 +#define GBL_INT_UNMASK (0x1<<0)
294 +#define GBL_INT_MASK (0x0<<0)
295 +
296 +/* S3C_UDC_OTG_GUSBCFG */
297 +#define PHY_CLK_480M (0x0<<15)
298 +#define PHY_CLK_48M (0x1<<15)
299 +#define TXFIFO_RE_DIS (0x0<<14)
300 +#define TXFIFO_RE_EN (0x1<<14)
301 +#define TURN_AROUND (0x5<<10)
302 +#define HNP_DISABLE (0x0<<9)
303 +#define HNP_ENABLE (0x1<<9)
304 +#define SRP_DISABLE (0x0<<8)
305 +#define SRP_ENABLE (0x1<<8)
306 +#define ULPI_DDR (0x0<<7)
307 +#define HS_UTMI (0x0<<6)
308 +#define INTERF_UTMI (0x0<<4)
309 +#define INTERF_ULPI (0x1<<4)
310 +#define PHY_INTERF_8 (0x0<<3)
311 +#define PHY_INTERF_16 (0x1<<3)
312 +#define TIME_OUT_CAL (0x7<<0)
313 +
314 +/* S3C_UDC_OTG_GRSTCTL */
315 +#define AHB_MASTER_IDLE (1u<<31)
316 +#define CORE_SOFT_RESET (0x1<<0)
317 +
318 +/* S3C_UDC_OTG_GINTSTS/S3C_UDC_OTG_GINTMSK core interrupt register */
319 +#define INT_RESUME (0x1<<31)
320 +#define INT_DISCONN (0x1<<29)
321 +#define INT_CONN_CNG (0x1<<28)
322 +#define INT_OUT_EP (0x1<<19)
323 +#define INT_IN_EP (0x1<<18)
324 +#define INT_ENUMDONE (0x1<<13)
325 +#define INT_RESET (0x1<<12)
326 +#define INT_SUSPEND (0x1<<11)
327 +#define INT_EARLY_SUSPEND (0x1<<10)
328 +#define INT_TX_FIFO_EMPTY (0x1<<5)
329 +#define INT_RX_FIFO_NOT_EMPTY (0x1<<4)
330 +#define INT_SOF (0x1<<3)
331 +#define INT_DEV_MODE (0x0<<0)
332 +#define INT_HOST_MODE (0x1<<1)
333 +
334 +#define FULL_SPEED_CONTROL_PKT_SIZE 8
335 +#define FULL_SPEED_BULK_PKT_SIZE 64
336 +
337 +#define HIGH_SPEED_CONTROL_PKT_SIZE 64
338 +#define HIGH_SPEED_BULK_PKT_SIZE 512
339 +
340 +/* S3C_UDC_OTG_DSTS */
341 +#define RX_FIFO_SIZE (2048<<0)
342 +#define NPTX_FIFO_START_ADDR (RX_FIFO_SIZE<<0)
343 +#define NPTX_FIFO_SIZE (2048<<16)
344 +#define PTX_FIFO_SIZE (2048<<16)
345 +#define USB_HIGH_30_60MHZ (0x0<<1)
346 +#define USB_FULL_30_60MHZ (0x1<<1)
347 +#define USB_LOW_6MHZ (0x2<<1)
348 +#define USB_FULL_48MHZ (0x3<<1)
349 +
350 +/* S3C_UDC_OTG_GRXSTSP */
351 +#define BYTE_COUNT(x) ((x & (0x7FF<<4)) >> 4)
352 +#define PKT_STS(x) ((x & (0xF<<17)) >> 17)
353 +#define EP_NUM(x) (x & 0xF)
354 +
355 +#define OUT_PKT_RECEIVED (0x2)
356 +#define OUT_COMPLELTED (0x3)
357 +#define SETUP_COMPLETED (0x4)
358 +#define SETUP_PKT_RECEIVED (0x6)
359 +
360 +/* S3C_UDC_OTG_DCFG */
361 +#define EP_MIS_CNT(x) (x<<18)
362 +#define DEVICE_ADDR(x) (x<<4)
363 +#define SPEED_2_HIGH (0x0<<0)
364 +#define SPEED_2_FULL (0x1<<0)
365 +#define SPEED_1_LOW (0x2<<0)
366 +#define SPEED_1_FULL (0x3<<0)
367 +
368 +/* S3C_UDC_OTG_DCTL device control register */
369 +#define NORMAL_OPERATION (0x1<<0)
370 +#define SOFT_DISCONNECT (0x1<<1)
371 +
372 +/* S3C_UDC_OTG_DSTS */
373 +#define ENUM_SPEED(x) (x & (0x3<<1))
374 +#define FRAME_CNT(x) (x & (0x3ff<<8))
375 +
376 +/* S3C_UDC_OTG_DAINT device all endpoint interrupt register */
377 +#define S3C_UDC_INT_IN_EP0 (0x1<<0)
378 +#define S3C_UDC_INT_IN_EP2 (0x1<<2)
379 +#define S3C_UDC_INT_IN_EP3 (0x1<<3)
380 +#define S3C_UDC_INT_OUT_EP0 (0x1<<16)
381 +#define S3C_UDC_INT_OUT_EP1 (0x1<<17)
382 +#define S3C_UDC_INT_OUT_EP4 (0x1<<20)
383 +
384 +/* S3C_UDC_OTG_DIEPCTL0/DOEPCTL0 device control
385 + IN/OUT endpoint 0 control register */
386 +#define DEPCTL_EPENA (0x1<<31)
387 +#define DEPCTL_EPDIS (0x1<<30)
388 +#define DEPCTL_SNAK (0x1<<27)
389 +#define DEPCTL_CNAK (0x1<<26)
390 +#define DEPCTL_CTRL_TYPE (0x0<<18)
391 +#define DEPCTL_ISO_TYPE (0x1<<18)
392 +#define DEPCTL_BULK_TYPE (0x2<<18)
393 +#define DEPCTL_INTR_TYPE (0x3<<18)
394 +#define DEPCTL_USBACTEP (0x1<<15)
395 +#define DEPCTL0_MPS_64 (0x0<<0)
396 +#define DEPCTL0_MPS_32 (0x1<<0)
397 +#define DEPCTL0_MPS_16 (0x2<<0)
398 +#define DEPCTL0_MPS_8 (0x3<<0)
399 +
400 +/* S3C_UDC_OTG_DIEPINTn */
401 +#define IN_EP_NAK_EFF (0x1<<6)
402 +#define IN_TK_EPMIS (0x1<<5)
403 +#define IN_TK_TXFEMP (0x1<<4)
404 +#define IN_EP_TIMEOUT (0x1<<3)
405 +
406 +/* S3C_UDC_OTG_DOEPINTn */
407 +#define BACK2BACK_SETUP (0x1<<6)
408 +#define OUT_TK_EP_DIS (0x1<<4)
409 +#define SETUP_PHASE_DONE (0x1<<3)
410 +
411 +/* S3C_UDC_OTG_DIEPINTn/DOEPINTn */
412 +#define AHB_ERROR (0x1<<2)
413 +#define EPDISBLD (0x1<<1)
414 +#define TRANSFER_DONE (0x1<<0)
415 +
416 +/* S3C_UDC_OTG_DIEPTSIZn */
417 +#define PKT_CNT(x) (x<<19)
418 +#define XFERSIZE(x) (x<<0)
419 +
420 +#endif
421 Index: linux-2.6.30-rc6/arch/arm/plat-s3c/Kconfig
422 ===================================================================
423 --- linux-2.6.30-rc6.orig/arch/arm/plat-s3c/Kconfig 2009-05-18 19:08:30.000000000 +0200
424 +++ linux-2.6.30-rc6/arch/arm/plat-s3c/Kconfig 2009-05-18 19:08:30.000000000 +0200
425 @@ -184,4 +184,9 @@
426 help
427 Compile in platform device definition for framebuffer
428
429 +config S3C_DEV_USB_HOST
430 + bool
431 + help
432 + Compile in platform device definition for USB host.
433 +
434 endif
435 Index: linux-2.6.30-rc6/arch/arm/plat-s3c/Makefile
436 ===================================================================
437 --- linux-2.6.30-rc6.orig/arch/arm/plat-s3c/Makefile 2009-05-18 19:08:30.000000000 +0200
438 +++ linux-2.6.30-rc6/arch/arm/plat-s3c/Makefile 2009-05-18 19:08:30.000000000 +0200
439 @@ -35,6 +35,8 @@
440 obj-y += dev-i2c0.o
441 obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o
442 obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
443 +obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
444 +
445 obj-$(CONFIG_S3C_PWM) += pwm.o
446 obj-$(CONFIG_S3C_DMA) += dma.o
447
448 Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/devs.c
449 ===================================================================
450 --- linux-2.6.30-rc6.orig/arch/arm/plat-s3c24xx/devs.c 2009-05-16 06:12:57.000000000 +0200
451 +++ linux-2.6.30-rc6/arch/arm/plat-s3c24xx/devs.c 2009-05-18 19:08:30.000000000 +0200
452 @@ -136,36 +136,6 @@
453 struct platform_device *s3c24xx_uart_devs[4] = {
454 };
455
456 -/* USB Host Controller */
457 -
458 -static struct resource s3c_usb_resource[] = {
459 - [0] = {
460 - .start = S3C24XX_PA_USBHOST,
461 - .end = S3C24XX_PA_USBHOST + S3C24XX_SZ_USBHOST - 1,
462 - .flags = IORESOURCE_MEM,
463 - },
464 - [1] = {
465 - .start = IRQ_USBH,
466 - .end = IRQ_USBH,
467 - .flags = IORESOURCE_IRQ,
468 - }
469 -};
470 -
471 -static u64 s3c_device_usb_dmamask = 0xffffffffUL;
472 -
473 -struct platform_device s3c_device_usb = {
474 - .name = "s3c2410-ohci",
475 - .id = -1,
476 - .num_resources = ARRAY_SIZE(s3c_usb_resource),
477 - .resource = s3c_usb_resource,
478 - .dev = {
479 - .dma_mask = &s3c_device_usb_dmamask,
480 - .coherent_dma_mask = 0xffffffffUL
481 - }
482 -};
483 -
484 -EXPORT_SYMBOL(s3c_device_usb);
485 -
486 /* LCD Controller */
487
488 static struct resource s3c_lcd_resource[] = {