aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-ixp4xx/common.c4
-rw-r--r--arch/arm/mach-pxa/devices.c15
-rw-r--r--arch/arm/mach-pxa/devices.h3
-rw-r--r--arch/arm/mach-pxa/pxa25x.c4
-rw-r--r--arch/arm/mach-pxa/pxa27x.c4
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c2
-rw-r--r--drivers/usb/gadget/Kconfig12
-rw-r--r--drivers/usb/gadget/Makefile2
-rw-r--r--drivers/usb/gadget/ether.c2
-rw-r--r--drivers/usb/gadget/gadget_chips.h4
-rw-r--r--drivers/usb/gadget/inode.c2
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c (renamed from drivers/usb/gadget/pxa2xx_udc.c)299
-rw-r--r--drivers/usb/gadget/pxa25x_udc.h (renamed from drivers/usb/gadget/pxa2xx_udc.h)29
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c4
14 files changed, 198 insertions, 188 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index f6d66dce6852..3781b3db9f49 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -326,11 +326,11 @@ static struct resource ixp4xx_udc_resources[] = {
326}; 326};
327 327
328/* 328/*
329 * USB device controller. The IXP4xx uses the same controller as PXA2XX, 329 * USB device controller. The IXP4xx uses the same controller as PXA25X,
330 * so we just use the same device. 330 * so we just use the same device.
331 */ 331 */
332static struct platform_device ixp4xx_udc_device = { 332static struct platform_device ixp4xx_udc_device = {
333 .name = "pxa2xx-udc", 333 .name = "pxa25x-udc",
334 .id = -1, 334 .id = -1,
335 .num_resources = 2, 335 .num_resources = 2,
336 .resource = ixp4xx_udc_resources, 336 .resource = ixp4xx_udc_resources,
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 4a1eebb42e49..123ee19ca795 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -93,8 +93,19 @@ static struct resource pxa2xx_udc_resources[] = {
93 93
94static u64 udc_dma_mask = ~(u32)0; 94static u64 udc_dma_mask = ~(u32)0;
95 95
96struct platform_device pxa_device_udc = { 96struct platform_device pxa25x_device_udc = {
97 .name = "pxa2xx-udc", 97 .name = "pxa25x-udc",
98 .id = -1,
99 .resource = pxa2xx_udc_resources,
100 .num_resources = ARRAY_SIZE(pxa2xx_udc_resources),
101 .dev = {
102 .platform_data = &pxa_udc_info,
103 .dma_mask = &udc_dma_mask,
104 }
105};
106
107struct platform_device pxa27x_device_udc = {
108 .name = "pxa27x-udc",
98 .id = -1, 109 .id = -1,
99 .resource = pxa2xx_udc_resources, 110 .resource = pxa2xx_udc_resources,
100 .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), 111 .num_resources = ARRAY_SIZE(pxa2xx_udc_resources),
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index e620a3373d42..881d1a7bf178 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -1,7 +1,8 @@
1extern struct platform_device pxa_device_mci; 1extern struct platform_device pxa_device_mci;
2extern struct platform_device pxa3xx_device_mci2; 2extern struct platform_device pxa3xx_device_mci2;
3extern struct platform_device pxa3xx_device_mci3; 3extern struct platform_device pxa3xx_device_mci3;
4extern struct platform_device pxa_device_udc; 4extern struct platform_device pxa25x_device_udc;
5extern struct platform_device pxa27x_device_udc;
5extern struct platform_device pxa_device_fb; 6extern struct platform_device pxa_device_fb;
6extern struct platform_device pxa_device_ffuart; 7extern struct platform_device pxa_device_ffuart;
7extern struct platform_device pxa_device_btuart; 8extern struct platform_device pxa_device_btuart;
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index a1a7dd23ce5a..4cd50e3005e9 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -127,7 +127,7 @@ static struct clk pxa25x_clks[] = {
127 INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev), 127 INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev),
128 INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), 128 INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
129 INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), 129 INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
130 INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev), 130 INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev),
131 INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), 131 INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
132 INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), 132 INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
133 133
@@ -267,7 +267,7 @@ void __init pxa25x_init_irq(void)
267} 267}
268 268
269static struct platform_device *pxa25x_devices[] __initdata = { 269static struct platform_device *pxa25x_devices[] __initdata = {
270 &pxa_device_udc, 270 &pxa25x_device_udc,
271 &pxa_device_ffuart, 271 &pxa_device_ffuart,
272 &pxa_device_btuart, 272 &pxa_device_btuart,
273 &pxa_device_stuart, 273 &pxa_device_stuart,
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 4d7afae352a1..d5d14ea33f27 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -146,7 +146,7 @@ static struct clk pxa27x_clks[] = {
146 146
147 INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev), 147 INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev),
148 INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), 148 INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
149 INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa_device_udc.dev), 149 INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa27x_device_udc.dev),
150 INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev), 150 INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev),
151 INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev), 151 INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev),
152 152
@@ -357,7 +357,7 @@ void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
357} 357}
358 358
359static struct platform_device *devices[] __initdata = { 359static struct platform_device *devices[] __initdata = {
360/* &pxa_device_udc, The UDC driver is PXA25x only */ 360 &pxa27x_device_udc,
361 &pxa_device_ffuart, 361 &pxa_device_ffuart,
362 &pxa_device_btuart, 362 &pxa_device_btuart,
363 &pxa_device_stuart, 363 &pxa_device_stuart,
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index d26a9b02a559..15685d2b8f8c 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -231,7 +231,7 @@ static struct clk pxa3xx_clks[] = {
231 PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL), 231 PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
232 232
233 PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), 233 PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
234 PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev), 234 PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa27x_device_udc.dev),
235 PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), 235 PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
236 PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), 236 PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
237 237
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 6e784d2db423..13dcec30457e 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -172,7 +172,7 @@ config USB_NET2280
172 default USB_GADGET 172 default USB_GADGET
173 select USB_GADGET_SELECTED 173 select USB_GADGET_SELECTED
174 174
175config USB_GADGET_PXA2XX 175config USB_GADGET_PXA25X
176 boolean "PXA 25x or IXP 4xx" 176 boolean "PXA 25x or IXP 4xx"
177 depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX 177 depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX
178 help 178 help
@@ -184,19 +184,19 @@ config USB_GADGET_PXA2XX
184 zero (for control transfers). 184 zero (for control transfers).
185 185
186 Say "y" to link the driver statically, or "m" to build a 186 Say "y" to link the driver statically, or "m" to build a
187 dynamically linked module called "pxa2xx_udc" and force all 187 dynamically linked module called "pxa25x_udc" and force all
188 gadget drivers to also be dynamically linked. 188 gadget drivers to also be dynamically linked.
189 189
190config USB_PXA2XX 190config USB_PXA25X
191 tristate 191 tristate
192 depends on USB_GADGET_PXA2XX 192 depends on USB_GADGET_PXA25X
193 default USB_GADGET 193 default USB_GADGET
194 select USB_GADGET_SELECTED 194 select USB_GADGET_SELECTED
195 195
196# if there's only one gadget driver, using only two bulk endpoints, 196# if there's only one gadget driver, using only two bulk endpoints,
197# don't waste memory for the other endpoints 197# don't waste memory for the other endpoints
198config USB_PXA2XX_SMALL 198config USB_PXA25X_SMALL
199 depends on USB_GADGET_PXA2XX 199 depends on USB_GADGET_PXA25X
200 bool 200 bool
201 default n if USB_ETH_RNDIS 201 default n if USB_ETH_RNDIS
202 default y if USB_ZERO 202 default y if USB_ZERO
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 12357255d740..e258afd25faf 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -8,7 +8,7 @@ endif
8obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o 8obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
9obj-$(CONFIG_USB_NET2280) += net2280.o 9obj-$(CONFIG_USB_NET2280) += net2280.o
10obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o 10obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o
11obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o 11obj-$(CONFIG_USB_PXA25X) += pxa25x_udc.o
12obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o 12obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o
13obj-$(CONFIG_USB_GOKU) += goku_udc.o 13obj-$(CONFIG_USB_GOKU) += goku_udc.o
14obj-$(CONFIG_USB_OMAP) += omap_udc.o 14obj-$(CONFIG_USB_OMAP) += omap_udc.o
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 8d61ea67a817..4ce3950b997f 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -262,7 +262,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
262/* For CDC-incapable hardware, choose the simple cdc subset. 262/* For CDC-incapable hardware, choose the simple cdc subset.
263 * Anything that talks bulk (without notable bugs) can do this. 263 * Anything that talks bulk (without notable bugs) can do this.
264 */ 264 */
265#ifdef CONFIG_USB_GADGET_PXA2XX 265#ifdef CONFIG_USB_GADGET_PXA25X
266#define DEV_CONFIG_SUBSET 266#define DEV_CONFIG_SUBSET
267#endif 267#endif
268 268
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index f7f159c1002b..ca5149ea7312 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -29,8 +29,8 @@
29#define gadget_is_dummy(g) 0 29#define gadget_is_dummy(g) 0
30#endif 30#endif
31 31
32#ifdef CONFIG_USB_GADGET_PXA2XX 32#ifdef CONFIG_USB_GADGET_PXA25X
33#define gadget_is_pxa(g) !strcmp("pxa2xx_udc", (g)->name) 33#define gadget_is_pxa(g) !strcmp("pxa25x_udc", (g)->name)
34#else 34#else
35#define gadget_is_pxa(g) 0 35#define gadget_is_pxa(g) 0
36#endif 36#endif
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 69b0a2754f2a..f132a9219e11 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -1501,7 +1501,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
1501 } 1501 }
1502 break; 1502 break;
1503 1503
1504#ifndef CONFIG_USB_GADGET_PXA2XX 1504#ifndef CONFIG_USB_GADGET_PXA25X
1505 /* PXA automagically handles this request too */ 1505 /* PXA automagically handles this request too */
1506 case USB_REQ_GET_CONFIGURATION: 1506 case USB_REQ_GET_CONFIGURATION:
1507 if (ctrl->bRequestType != 0x80) 1507 if (ctrl->bRequestType != 0x80)
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 63db96adc0b0..031dceb93023 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * linux/drivers/usb/gadget/pxa2xx_udc.c
3 * Intel PXA25x and IXP4xx on-chip full speed USB device controllers 2 * Intel PXA25x and IXP4xx on-chip full speed USB device controllers
4 * 3 *
5 * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker) 4 * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker)
@@ -97,7 +96,7 @@
97#define DRIVER_DESC "PXA 25x USB Device Controller driver" 96#define DRIVER_DESC "PXA 25x USB Device Controller driver"
98 97
99 98
100static const char driver_name [] = "pxa2xx_udc"; 99static const char driver_name [] = "pxa25x_udc";
101 100
102static const char ep0name [] = "ep0"; 101static const char ep0name [] = "ep0";
103 102
@@ -117,10 +116,10 @@ static const char ep0name [] = "ep0";
117 116
118#endif 117#endif
119 118
120#include "pxa2xx_udc.h" 119#include "pxa25x_udc.h"
121 120
122 121
123#ifdef CONFIG_USB_PXA2XX_SMALL 122#ifdef CONFIG_USB_PXA25X_SMALL
124#define SIZE_STR " (small)" 123#define SIZE_STR " (small)"
125#else 124#else
126#define SIZE_STR "" 125#define SIZE_STR ""
@@ -132,8 +131,8 @@ static const char ep0name [] = "ep0";
132 * --------------------------------------------------------------------------- 131 * ---------------------------------------------------------------------------
133 */ 132 */
134 133
135static void pxa2xx_ep_fifo_flush (struct usb_ep *ep); 134static void pxa25x_ep_fifo_flush (struct usb_ep *ep);
136static void nuke (struct pxa2xx_ep *, int status); 135static void nuke (struct pxa25x_ep *, int status);
137 136
138/* one GPIO should be used to detect VBUS from the host */ 137/* one GPIO should be used to detect VBUS from the host */
139static int is_vbus_present(void) 138static int is_vbus_present(void)
@@ -218,24 +217,24 @@ static inline void udc_ack_int_UDCCR(int mask)
218/* 217/*
219 * endpoint enable/disable 218 * endpoint enable/disable
220 * 219 *
221 * we need to verify the descriptors used to enable endpoints. since pxa2xx 220 * we need to verify the descriptors used to enable endpoints. since pxa25x
222 * endpoint configurations are fixed, and are pretty much always enabled, 221 * endpoint configurations are fixed, and are pretty much always enabled,
223 * there's not a lot to manage here. 222 * there's not a lot to manage here.
224 * 223 *
225 * because pxa2xx can't selectively initialize bulk (or interrupt) endpoints, 224 * because pxa25x can't selectively initialize bulk (or interrupt) endpoints,
226 * (resetting endpoint halt and toggle), SET_INTERFACE is unusable except 225 * (resetting endpoint halt and toggle), SET_INTERFACE is unusable except
227 * for a single interface (with only the default altsetting) and for gadget 226 * for a single interface (with only the default altsetting) and for gadget
228 * drivers that don't halt endpoints (not reset by set_interface). that also 227 * drivers that don't halt endpoints (not reset by set_interface). that also
229 * means that if you use ISO, you must violate the USB spec rule that all 228 * means that if you use ISO, you must violate the USB spec rule that all
230 * iso endpoints must be in non-default altsettings. 229 * iso endpoints must be in non-default altsettings.
231 */ 230 */
232static int pxa2xx_ep_enable (struct usb_ep *_ep, 231static int pxa25x_ep_enable (struct usb_ep *_ep,
233 const struct usb_endpoint_descriptor *desc) 232 const struct usb_endpoint_descriptor *desc)
234{ 233{
235 struct pxa2xx_ep *ep; 234 struct pxa25x_ep *ep;
236 struct pxa2xx_udc *dev; 235 struct pxa25x_udc *dev;
237 236
238 ep = container_of (_ep, struct pxa2xx_ep, ep); 237 ep = container_of (_ep, struct pxa25x_ep, ep);
239 if (!_ep || !desc || ep->desc || _ep->name == ep0name 238 if (!_ep || !desc || ep->desc || _ep->name == ep0name
240 || desc->bDescriptorType != USB_DT_ENDPOINT 239 || desc->bDescriptorType != USB_DT_ENDPOINT
241 || ep->bEndpointAddress != desc->bEndpointAddress 240 || ep->bEndpointAddress != desc->bEndpointAddress
@@ -274,7 +273,7 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
274 ep->ep.maxpacket = le16_to_cpu (desc->wMaxPacketSize); 273 ep->ep.maxpacket = le16_to_cpu (desc->wMaxPacketSize);
275 274
276 /* flush fifo (mostly for OUT buffers) */ 275 /* flush fifo (mostly for OUT buffers) */
277 pxa2xx_ep_fifo_flush (_ep); 276 pxa25x_ep_fifo_flush (_ep);
278 277
279 /* ... reset halt state too, if we could ... */ 278 /* ... reset halt state too, if we could ... */
280 279
@@ -282,12 +281,12 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
282 return 0; 281 return 0;
283} 282}
284 283
285static int pxa2xx_ep_disable (struct usb_ep *_ep) 284static int pxa25x_ep_disable (struct usb_ep *_ep)
286{ 285{
287 struct pxa2xx_ep *ep; 286 struct pxa25x_ep *ep;
288 unsigned long flags; 287 unsigned long flags;
289 288
290 ep = container_of (_ep, struct pxa2xx_ep, ep); 289 ep = container_of (_ep, struct pxa25x_ep, ep);
291 if (!_ep || !ep->desc) { 290 if (!_ep || !ep->desc) {
292 DMSG("%s, %s not enabled\n", __func__, 291 DMSG("%s, %s not enabled\n", __func__,
293 _ep ? ep->ep.name : NULL); 292 _ep ? ep->ep.name : NULL);
@@ -298,7 +297,7 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep)
298 nuke (ep, -ESHUTDOWN); 297 nuke (ep, -ESHUTDOWN);
299 298
300 /* flush fifo (mostly for IN buffers) */ 299 /* flush fifo (mostly for IN buffers) */
301 pxa2xx_ep_fifo_flush (_ep); 300 pxa25x_ep_fifo_flush (_ep);
302 301
303 ep->desc = NULL; 302 ep->desc = NULL;
304 ep->stopped = 1; 303 ep->stopped = 1;
@@ -310,18 +309,18 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep)
310 309
311/*-------------------------------------------------------------------------*/ 310/*-------------------------------------------------------------------------*/
312 311
313/* for the pxa2xx, these can just wrap kmalloc/kfree. gadget drivers 312/* for the pxa25x, these can just wrap kmalloc/kfree. gadget drivers
314 * must still pass correctly initialized endpoints, since other controller 313 * must still pass correctly initialized endpoints, since other controller
315 * drivers may care about how it's currently set up (dma issues etc). 314 * drivers may care about how it's currently set up (dma issues etc).
316 */ 315 */
317 316
318/* 317/*
319 * pxa2xx_ep_alloc_request - allocate a request data structure 318 * pxa25x_ep_alloc_request - allocate a request data structure
320 */ 319 */
321static struct usb_request * 320static struct usb_request *
322pxa2xx_ep_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags) 321pxa25x_ep_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
323{ 322{
324 struct pxa2xx_request *req; 323 struct pxa25x_request *req;
325 324
326 req = kzalloc(sizeof(*req), gfp_flags); 325 req = kzalloc(sizeof(*req), gfp_flags);
327 if (!req) 326 if (!req)
@@ -333,14 +332,14 @@ pxa2xx_ep_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
333 332
334 333
335/* 334/*
336 * pxa2xx_ep_free_request - deallocate a request data structure 335 * pxa25x_ep_free_request - deallocate a request data structure
337 */ 336 */
338static void 337static void
339pxa2xx_ep_free_request (struct usb_ep *_ep, struct usb_request *_req) 338pxa25x_ep_free_request (struct usb_ep *_ep, struct usb_request *_req)
340{ 339{
341 struct pxa2xx_request *req; 340 struct pxa25x_request *req;
342 341
343 req = container_of (_req, struct pxa2xx_request, req); 342 req = container_of (_req, struct pxa25x_request, req);
344 WARN_ON (!list_empty (&req->queue)); 343 WARN_ON (!list_empty (&req->queue));
345 kfree(req); 344 kfree(req);
346} 345}
@@ -350,7 +349,7 @@ pxa2xx_ep_free_request (struct usb_ep *_ep, struct usb_request *_req)
350/* 349/*
351 * done - retire a request; caller blocked irqs 350 * done - retire a request; caller blocked irqs
352 */ 351 */
353static void done(struct pxa2xx_ep *ep, struct pxa2xx_request *req, int status) 352static void done(struct pxa25x_ep *ep, struct pxa25x_request *req, int status)
354{ 353{
355 unsigned stopped = ep->stopped; 354 unsigned stopped = ep->stopped;
356 355
@@ -373,13 +372,13 @@ static void done(struct pxa2xx_ep *ep, struct pxa2xx_request *req, int status)
373} 372}
374 373
375 374
376static inline void ep0_idle (struct pxa2xx_udc *dev) 375static inline void ep0_idle (struct pxa25x_udc *dev)
377{ 376{
378 dev->ep0state = EP0_IDLE; 377 dev->ep0state = EP0_IDLE;
379} 378}
380 379
381static int 380static int
382write_packet(volatile u32 *uddr, struct pxa2xx_request *req, unsigned max) 381write_packet(volatile u32 *uddr, struct pxa25x_request *req, unsigned max)
383{ 382{
384 u8 *buf; 383 u8 *buf;
385 unsigned length, count; 384 unsigned length, count;
@@ -404,7 +403,7 @@ write_packet(volatile u32 *uddr, struct pxa2xx_request *req, unsigned max)
404 * caller guarantees at least one packet buffer is ready (or a zlp). 403 * caller guarantees at least one packet buffer is ready (or a zlp).
405 */ 404 */
406static int 405static int
407write_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req) 406write_fifo (struct pxa25x_ep *ep, struct pxa25x_request *req)
408{ 407{
409 unsigned max; 408 unsigned max;
410 409
@@ -461,7 +460,7 @@ write_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
461 * ep0 data stage. these chips want very simple state transitions. 460 * ep0 data stage. these chips want very simple state transitions.
462 */ 461 */
463static inline 462static inline
464void ep0start(struct pxa2xx_udc *dev, u32 flags, const char *tag) 463void ep0start(struct pxa25x_udc *dev, u32 flags, const char *tag)
465{ 464{
466 UDCCS0 = flags|UDCCS0_SA|UDCCS0_OPR; 465 UDCCS0 = flags|UDCCS0_SA|UDCCS0_OPR;
467 USIR0 = USIR0_IR0; 466 USIR0 = USIR0_IR0;
@@ -471,7 +470,7 @@ void ep0start(struct pxa2xx_udc *dev, u32 flags, const char *tag)
471} 470}
472 471
473static int 472static int
474write_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req) 473write_ep0_fifo (struct pxa25x_ep *ep, struct pxa25x_request *req)
475{ 474{
476 unsigned count; 475 unsigned count;
477 int is_short; 476 int is_short;
@@ -531,7 +530,7 @@ write_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
531 * request buffer having filled (and maybe overran till end-of-packet). 530 * request buffer having filled (and maybe overran till end-of-packet).
532 */ 531 */
533static int 532static int
534read_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req) 533read_fifo (struct pxa25x_ep *ep, struct pxa25x_request *req)
535{ 534{
536 for (;;) { 535 for (;;) {
537 u32 udccs; 536 u32 udccs;
@@ -608,7 +607,7 @@ read_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
608 * protocols do use them. 607 * protocols do use them.
609 */ 608 */
610static int 609static int
611read_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req) 610read_ep0_fifo (struct pxa25x_ep *ep, struct pxa25x_request *req)
612{ 611{
613 u8 *buf, byte; 612 u8 *buf, byte;
614 unsigned bufferspace; 613 unsigned bufferspace;
@@ -647,21 +646,21 @@ read_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
647/*-------------------------------------------------------------------------*/ 646/*-------------------------------------------------------------------------*/
648 647
649static int 648static int
650pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) 649pxa25x_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
651{ 650{
652 struct pxa2xx_request *req; 651 struct pxa25x_request *req;
653 struct pxa2xx_ep *ep; 652 struct pxa25x_ep *ep;
654 struct pxa2xx_udc *dev; 653 struct pxa25x_udc *dev;
655 unsigned long flags; 654 unsigned long flags;
656 655
657 req = container_of(_req, struct pxa2xx_request, req); 656 req = container_of(_req, struct pxa25x_request, req);
658 if (unlikely (!_req || !_req->complete || !_req->buf 657 if (unlikely (!_req || !_req->complete || !_req->buf
659 || !list_empty(&req->queue))) { 658 || !list_empty(&req->queue))) {
660 DMSG("%s, bad params\n", __func__); 659 DMSG("%s, bad params\n", __func__);
661 return -EINVAL; 660 return -EINVAL;
662 } 661 }
663 662
664 ep = container_of(_ep, struct pxa2xx_ep, ep); 663 ep = container_of(_ep, struct pxa25x_ep, ep);
665 if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { 664 if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) {
666 DMSG("%s, bad ep\n", __func__); 665 DMSG("%s, bad ep\n", __func__);
667 return -EINVAL; 666 return -EINVAL;
@@ -757,14 +756,14 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
757/* 756/*
758 * nuke - dequeue ALL requests 757 * nuke - dequeue ALL requests
759 */ 758 */
760static void nuke(struct pxa2xx_ep *ep, int status) 759static void nuke(struct pxa25x_ep *ep, int status)
761{ 760{
762 struct pxa2xx_request *req; 761 struct pxa25x_request *req;
763 762
764 /* called with irqs blocked */ 763 /* called with irqs blocked */
765 while (!list_empty(&ep->queue)) { 764 while (!list_empty(&ep->queue)) {
766 req = list_entry(ep->queue.next, 765 req = list_entry(ep->queue.next,
767 struct pxa2xx_request, 766 struct pxa25x_request,
768 queue); 767 queue);
769 done(ep, req, status); 768 done(ep, req, status);
770 } 769 }
@@ -774,13 +773,13 @@ static void nuke(struct pxa2xx_ep *ep, int status)
774 773
775 774
776/* dequeue JUST ONE request */ 775/* dequeue JUST ONE request */
777static int pxa2xx_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req) 776static int pxa25x_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
778{ 777{
779 struct pxa2xx_ep *ep; 778 struct pxa25x_ep *ep;
780 struct pxa2xx_request *req; 779 struct pxa25x_request *req;
781 unsigned long flags; 780 unsigned long flags;
782 781
783 ep = container_of(_ep, struct pxa2xx_ep, ep); 782 ep = container_of(_ep, struct pxa25x_ep, ep);
784 if (!_ep || ep->ep.name == ep0name) 783 if (!_ep || ep->ep.name == ep0name)
785 return -EINVAL; 784 return -EINVAL;
786 785
@@ -804,12 +803,12 @@ static int pxa2xx_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
804 803
805/*-------------------------------------------------------------------------*/ 804/*-------------------------------------------------------------------------*/
806 805
807static int pxa2xx_ep_set_halt(struct usb_ep *_ep, int value) 806static int pxa25x_ep_set_halt(struct usb_ep *_ep, int value)
808{ 807{
809 struct pxa2xx_ep *ep; 808 struct pxa25x_ep *ep;
810 unsigned long flags; 809 unsigned long flags;
811 810
812 ep = container_of(_ep, struct pxa2xx_ep, ep); 811 ep = container_of(_ep, struct pxa25x_ep, ep);
813 if (unlikely (!_ep 812 if (unlikely (!_ep
814 || (!ep->desc && ep->ep.name != ep0name)) 813 || (!ep->desc && ep->ep.name != ep0name))
815 || ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { 814 || ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
@@ -859,11 +858,11 @@ static int pxa2xx_ep_set_halt(struct usb_ep *_ep, int value)
859 return 0; 858 return 0;
860} 859}
861 860
862static int pxa2xx_ep_fifo_status(struct usb_ep *_ep) 861static int pxa25x_ep_fifo_status(struct usb_ep *_ep)
863{ 862{
864 struct pxa2xx_ep *ep; 863 struct pxa25x_ep *ep;
865 864
866 ep = container_of(_ep, struct pxa2xx_ep, ep); 865 ep = container_of(_ep, struct pxa25x_ep, ep);
867 if (!_ep) { 866 if (!_ep) {
868 DMSG("%s, bad ep\n", __func__); 867 DMSG("%s, bad ep\n", __func__);
869 return -ENODEV; 868 return -ENODEV;
@@ -878,11 +877,11 @@ static int pxa2xx_ep_fifo_status(struct usb_ep *_ep)
878 return (*ep->reg_ubcr & 0xfff) + 1; 877 return (*ep->reg_ubcr & 0xfff) + 1;
879} 878}
880 879
881static void pxa2xx_ep_fifo_flush(struct usb_ep *_ep) 880static void pxa25x_ep_fifo_flush(struct usb_ep *_ep)
882{ 881{
883 struct pxa2xx_ep *ep; 882 struct pxa25x_ep *ep;
884 883
885 ep = container_of(_ep, struct pxa2xx_ep, ep); 884 ep = container_of(_ep, struct pxa25x_ep, ep);
886 if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) { 885 if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) {
887 DMSG("%s, bad ep\n", __func__); 886 DMSG("%s, bad ep\n", __func__);
888 return; 887 return;
@@ -904,19 +903,19 @@ static void pxa2xx_ep_fifo_flush(struct usb_ep *_ep)
904} 903}
905 904
906 905
907static struct usb_ep_ops pxa2xx_ep_ops = { 906static struct usb_ep_ops pxa25x_ep_ops = {
908 .enable = pxa2xx_ep_enable, 907 .enable = pxa25x_ep_enable,
909 .disable = pxa2xx_ep_disable, 908 .disable = pxa25x_ep_disable,
910 909
911 .alloc_request = pxa2xx_ep_alloc_request, 910 .alloc_request = pxa25x_ep_alloc_request,
912 .free_request = pxa2xx_ep_free_request, 911 .free_request = pxa25x_ep_free_request,
913 912
914 .queue = pxa2xx_ep_queue, 913 .queue = pxa25x_ep_queue,
915 .dequeue = pxa2xx_ep_dequeue, 914 .dequeue = pxa25x_ep_dequeue,
916 915
917 .set_halt = pxa2xx_ep_set_halt, 916 .set_halt = pxa25x_ep_set_halt,
918 .fifo_status = pxa2xx_ep_fifo_status, 917 .fifo_status = pxa25x_ep_fifo_status,
919 .fifo_flush = pxa2xx_ep_fifo_flush, 918 .fifo_flush = pxa25x_ep_fifo_flush,
920}; 919};
921 920
922 921
@@ -925,12 +924,12 @@ static struct usb_ep_ops pxa2xx_ep_ops = {
925 * --------------------------------------------------------------------------- 924 * ---------------------------------------------------------------------------
926 */ 925 */
927 926
928static int pxa2xx_udc_get_frame(struct usb_gadget *_gadget) 927static int pxa25x_udc_get_frame(struct usb_gadget *_gadget)
929{ 928{
930 return ((UFNRH & 0x07) << 8) | (UFNRL & 0xff); 929 return ((UFNRH & 0x07) << 8) | (UFNRL & 0xff);
931} 930}
932 931
933static int pxa2xx_udc_wakeup(struct usb_gadget *_gadget) 932static int pxa25x_udc_wakeup(struct usb_gadget *_gadget)
934{ 933{
935 /* host may not have enabled remote wakeup */ 934 /* host may not have enabled remote wakeup */
936 if ((UDCCS0 & UDCCS0_DRWF) == 0) 935 if ((UDCCS0 & UDCCS0_DRWF) == 0)
@@ -939,14 +938,14 @@ static int pxa2xx_udc_wakeup(struct usb_gadget *_gadget)
939 return 0; 938 return 0;
940} 939}
941 940
942static void stop_activity(struct pxa2xx_udc *, struct usb_gadget_driver *); 941static void stop_activity(struct pxa25x_udc *, struct usb_gadget_driver *);
943static void udc_enable (struct pxa2xx_udc *); 942static void udc_enable (struct pxa25x_udc *);
944static void udc_disable(struct pxa2xx_udc *); 943static void udc_disable(struct pxa25x_udc *);
945 944
946/* We disable the UDC -- and its 48 MHz clock -- whenever it's not 945/* We disable the UDC -- and its 48 MHz clock -- whenever it's not
947 * in active use. 946 * in active use.
948 */ 947 */
949static int pullup(struct pxa2xx_udc *udc) 948static int pullup(struct pxa25x_udc *udc)
950{ 949{
951 int is_active = udc->vbus && udc->pullup && !udc->suspended; 950 int is_active = udc->vbus && udc->pullup && !udc->suspended;
952 DMSG("%s\n", is_active ? "active" : "inactive"); 951 DMSG("%s\n", is_active ? "active" : "inactive");
@@ -976,11 +975,11 @@ static int pullup(struct pxa2xx_udc *udc)
976} 975}
977 976
978/* VBUS reporting logically comes from a transceiver */ 977/* VBUS reporting logically comes from a transceiver */
979static int pxa2xx_udc_vbus_session(struct usb_gadget *_gadget, int is_active) 978static int pxa25x_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
980{ 979{
981 struct pxa2xx_udc *udc; 980 struct pxa25x_udc *udc;
982 981
983 udc = container_of(_gadget, struct pxa2xx_udc, gadget); 982 udc = container_of(_gadget, struct pxa25x_udc, gadget);
984 udc->vbus = (is_active != 0); 983 udc->vbus = (is_active != 0);
985 DMSG("vbus %s\n", is_active ? "supplied" : "inactive"); 984 DMSG("vbus %s\n", is_active ? "supplied" : "inactive");
986 pullup(udc); 985 pullup(udc);
@@ -988,11 +987,11 @@ static int pxa2xx_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
988} 987}
989 988
990/* drivers may have software control over D+ pullup */ 989/* drivers may have software control over D+ pullup */
991static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active) 990static int pxa25x_udc_pullup(struct usb_gadget *_gadget, int is_active)
992{ 991{
993 struct pxa2xx_udc *udc; 992 struct pxa25x_udc *udc;
994 993
995 udc = container_of(_gadget, struct pxa2xx_udc, gadget); 994 udc = container_of(_gadget, struct pxa25x_udc, gadget);
996 995
997 /* not all boards support pullup control */ 996 /* not all boards support pullup control */
998 if (!udc->mach->gpio_pullup && !udc->mach->udc_command) 997 if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
@@ -1003,11 +1002,11 @@ static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active)
1003 return 0; 1002 return 0;
1004} 1003}
1005 1004
1006static const struct usb_gadget_ops pxa2xx_udc_ops = { 1005static const struct usb_gadget_ops pxa25x_udc_ops = {
1007 .get_frame = pxa2xx_udc_get_frame, 1006 .get_frame = pxa25x_udc_get_frame,
1008 .wakeup = pxa2xx_udc_wakeup, 1007 .wakeup = pxa25x_udc_wakeup,
1009 .vbus_session = pxa2xx_udc_vbus_session, 1008 .vbus_session = pxa25x_udc_vbus_session,
1010 .pullup = pxa2xx_udc_pullup, 1009 .pullup = pxa25x_udc_pullup,
1011 1010
1012 // .vbus_draw ... boards may consume current from VBUS, up to 1011 // .vbus_draw ... boards may consume current from VBUS, up to
1013 // 100-500mA based on config. the 500uA suspend ceiling means 1012 // 100-500mA based on config. the 500uA suspend ceiling means
@@ -1021,7 +1020,7 @@ static const struct usb_gadget_ops pxa2xx_udc_ops = {
1021static int 1020static int
1022udc_seq_show(struct seq_file *m, void *_d) 1021udc_seq_show(struct seq_file *m, void *_d)
1023{ 1022{
1024 struct pxa2xx_udc *dev = m->private; 1023 struct pxa25x_udc *dev = m->private;
1025 unsigned long flags; 1024 unsigned long flags;
1026 int i; 1025 int i;
1027 u32 tmp; 1026 u32 tmp;
@@ -1082,8 +1081,8 @@ udc_seq_show(struct seq_file *m, void *_d)
1082 1081
1083 /* dump endpoint queues */ 1082 /* dump endpoint queues */
1084 for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) { 1083 for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
1085 struct pxa2xx_ep *ep = &dev->ep [i]; 1084 struct pxa25x_ep *ep = &dev->ep [i];
1086 struct pxa2xx_request *req; 1085 struct pxa25x_request *req;
1087 1086
1088 if (i != 0) { 1087 if (i != 0) {
1089 const struct usb_endpoint_descriptor *desc; 1088 const struct usb_endpoint_descriptor *desc;
@@ -1156,7 +1155,7 @@ static const struct file_operations debug_fops = {
1156/* 1155/*
1157 * udc_disable - disable USB device controller 1156 * udc_disable - disable USB device controller
1158 */ 1157 */
1159static void udc_disable(struct pxa2xx_udc *dev) 1158static void udc_disable(struct pxa25x_udc *dev)
1160{ 1159{
1161 /* block all irqs */ 1160 /* block all irqs */
1162 udc_set_mask_UDCCR(UDCCR_SRM|UDCCR_REM); 1161 udc_set_mask_UDCCR(UDCCR_SRM|UDCCR_REM);
@@ -1176,7 +1175,7 @@ static void udc_disable(struct pxa2xx_udc *dev)
1176/* 1175/*
1177 * udc_reinit - initialize software state 1176 * udc_reinit - initialize software state
1178 */ 1177 */
1179static void udc_reinit(struct pxa2xx_udc *dev) 1178static void udc_reinit(struct pxa25x_udc *dev)
1180{ 1179{
1181 u32 i; 1180 u32 i;
1182 1181
@@ -1187,7 +1186,7 @@ static void udc_reinit(struct pxa2xx_udc *dev)
1187 1186
1188 /* basic endpoint records init */ 1187 /* basic endpoint records init */
1189 for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) { 1188 for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
1190 struct pxa2xx_ep *ep = &dev->ep[i]; 1189 struct pxa25x_ep *ep = &dev->ep[i];
1191 1190
1192 if (i != 0) 1191 if (i != 0)
1193 list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list); 1192 list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list);
@@ -1204,7 +1203,7 @@ static void udc_reinit(struct pxa2xx_udc *dev)
1204/* until it's enabled, this UDC should be completely invisible 1203/* until it's enabled, this UDC should be completely invisible
1205 * to any USB host. 1204 * to any USB host.
1206 */ 1205 */
1207static void udc_enable (struct pxa2xx_udc *dev) 1206static void udc_enable (struct pxa25x_udc *dev)
1208{ 1207{
1209 udc_clear_mask_UDCCR(UDCCR_UDE); 1208 udc_clear_mask_UDCCR(UDCCR_UDE);
1210 1209
@@ -1260,7 +1259,7 @@ static void udc_enable (struct pxa2xx_udc *dev)
1260 */ 1259 */
1261int usb_gadget_register_driver(struct usb_gadget_driver *driver) 1260int usb_gadget_register_driver(struct usb_gadget_driver *driver)
1262{ 1261{
1263 struct pxa2xx_udc *dev = the_controller; 1262 struct pxa25x_udc *dev = the_controller;
1264 int retval; 1263 int retval;
1265 1264
1266 if (!driver 1265 if (!driver
@@ -1305,7 +1304,7 @@ fail:
1305EXPORT_SYMBOL(usb_gadget_register_driver); 1304EXPORT_SYMBOL(usb_gadget_register_driver);
1306 1305
1307static void 1306static void
1308stop_activity(struct pxa2xx_udc *dev, struct usb_gadget_driver *driver) 1307stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver)
1309{ 1308{
1310 int i; 1309 int i;
1311 1310
@@ -1316,7 +1315,7 @@ stop_activity(struct pxa2xx_udc *dev, struct usb_gadget_driver *driver)
1316 1315
1317 /* prevent new request submissions, kill any outstanding requests */ 1316 /* prevent new request submissions, kill any outstanding requests */
1318 for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) { 1317 for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
1319 struct pxa2xx_ep *ep = &dev->ep[i]; 1318 struct pxa25x_ep *ep = &dev->ep[i];
1320 1319
1321 ep->stopped = 1; 1320 ep->stopped = 1;
1322 nuke(ep, -ESHUTDOWN); 1321 nuke(ep, -ESHUTDOWN);
@@ -1333,7 +1332,7 @@ stop_activity(struct pxa2xx_udc *dev, struct usb_gadget_driver *driver)
1333 1332
1334int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) 1333int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
1335{ 1334{
1336 struct pxa2xx_udc *dev = the_controller; 1335 struct pxa25x_udc *dev = the_controller;
1337 1336
1338 if (!dev) 1337 if (!dev)
1339 return -ENODEV; 1338 return -ENODEV;
@@ -1370,7 +1369,7 @@ EXPORT_SYMBOL(usb_gadget_unregister_driver);
1370static irqreturn_t 1369static irqreturn_t
1371lubbock_vbus_irq(int irq, void *_dev) 1370lubbock_vbus_irq(int irq, void *_dev)
1372{ 1371{
1373 struct pxa2xx_udc *dev = _dev; 1372 struct pxa25x_udc *dev = _dev;
1374 int vbus; 1373 int vbus;
1375 1374
1376 dev->stats.irqs++; 1375 dev->stats.irqs++;
@@ -1389,7 +1388,7 @@ lubbock_vbus_irq(int irq, void *_dev)
1389 return IRQ_NONE; 1388 return IRQ_NONE;
1390 } 1389 }
1391 1390
1392 pxa2xx_udc_vbus_session(&dev->gadget, vbus); 1391 pxa25x_udc_vbus_session(&dev->gadget, vbus);
1393 return IRQ_HANDLED; 1392 return IRQ_HANDLED;
1394} 1393}
1395 1394
@@ -1397,20 +1396,20 @@ lubbock_vbus_irq(int irq, void *_dev)
1397 1396
1398static irqreturn_t udc_vbus_irq(int irq, void *_dev) 1397static irqreturn_t udc_vbus_irq(int irq, void *_dev)
1399{ 1398{
1400 struct pxa2xx_udc *dev = _dev; 1399 struct pxa25x_udc *dev = _dev;
1401 int vbus = gpio_get_value(dev->mach->gpio_vbus); 1400 int vbus = gpio_get_value(dev->mach->gpio_vbus);
1402 1401
1403 if (dev->mach->gpio_vbus_inverted) 1402 if (dev->mach->gpio_vbus_inverted)
1404 vbus = !vbus; 1403 vbus = !vbus;
1405 1404
1406 pxa2xx_udc_vbus_session(&dev->gadget, vbus); 1405 pxa25x_udc_vbus_session(&dev->gadget, vbus);
1407 return IRQ_HANDLED; 1406 return IRQ_HANDLED;
1408} 1407}
1409 1408
1410 1409
1411/*-------------------------------------------------------------------------*/ 1410/*-------------------------------------------------------------------------*/
1412 1411
1413static inline void clear_ep_state (struct pxa2xx_udc *dev) 1412static inline void clear_ep_state (struct pxa25x_udc *dev)
1414{ 1413{
1415 unsigned i; 1414 unsigned i;
1416 1415
@@ -1423,7 +1422,7 @@ static inline void clear_ep_state (struct pxa2xx_udc *dev)
1423 1422
1424static void udc_watchdog(unsigned long _dev) 1423static void udc_watchdog(unsigned long _dev)
1425{ 1424{
1426 struct pxa2xx_udc *dev = (void *)_dev; 1425 struct pxa25x_udc *dev = (void *)_dev;
1427 1426
1428 local_irq_disable(); 1427 local_irq_disable();
1429 if (dev->ep0state == EP0_STALL 1428 if (dev->ep0state == EP0_STALL
@@ -1436,11 +1435,11 @@ static void udc_watchdog(unsigned long _dev)
1436 local_irq_enable(); 1435 local_irq_enable();
1437} 1436}
1438 1437
1439static void handle_ep0 (struct pxa2xx_udc *dev) 1438static void handle_ep0 (struct pxa25x_udc *dev)
1440{ 1439{
1441 u32 udccs0 = UDCCS0; 1440 u32 udccs0 = UDCCS0;
1442 struct pxa2xx_ep *ep = &dev->ep [0]; 1441 struct pxa25x_ep *ep = &dev->ep [0];
1443 struct pxa2xx_request *req; 1442 struct pxa25x_request *req;
1444 union { 1443 union {
1445 struct usb_ctrlrequest r; 1444 struct usb_ctrlrequest r;
1446 u8 raw [8]; 1445 u8 raw [8];
@@ -1450,7 +1449,7 @@ static void handle_ep0 (struct pxa2xx_udc *dev)
1450 if (list_empty(&ep->queue)) 1449 if (list_empty(&ep->queue))
1451 req = NULL; 1450 req = NULL;
1452 else 1451 else
1453 req = list_entry(ep->queue.next, struct pxa2xx_request, queue); 1452 req = list_entry(ep->queue.next, struct pxa25x_request, queue);
1454 1453
1455 /* clear stall status */ 1454 /* clear stall status */
1456 if (udccs0 & UDCCS0_SST) { 1455 if (udccs0 & UDCCS0_SST) {
@@ -1660,9 +1659,9 @@ stall:
1660 USIR0 = USIR0_IR0; 1659 USIR0 = USIR0_IR0;
1661} 1660}
1662 1661
1663static void handle_ep(struct pxa2xx_ep *ep) 1662static void handle_ep(struct pxa25x_ep *ep)
1664{ 1663{
1665 struct pxa2xx_request *req; 1664 struct pxa25x_request *req;
1666 int is_in = ep->bEndpointAddress & USB_DIR_IN; 1665 int is_in = ep->bEndpointAddress & USB_DIR_IN;
1667 int completed; 1666 int completed;
1668 u32 udccs, tmp; 1667 u32 udccs, tmp;
@@ -1671,7 +1670,7 @@ static void handle_ep(struct pxa2xx_ep *ep)
1671 completed = 0; 1670 completed = 0;
1672 if (likely (!list_empty(&ep->queue))) 1671 if (likely (!list_empty(&ep->queue)))
1673 req = list_entry(ep->queue.next, 1672 req = list_entry(ep->queue.next,
1674 struct pxa2xx_request, queue); 1673 struct pxa25x_request, queue);
1675 else 1674 else
1676 req = NULL; 1675 req = NULL;
1677 1676
@@ -1708,16 +1707,16 @@ static void handle_ep(struct pxa2xx_ep *ep)
1708} 1707}
1709 1708
1710/* 1709/*
1711 * pxa2xx_udc_irq - interrupt handler 1710 * pxa25x_udc_irq - interrupt handler
1712 * 1711 *
1713 * avoid delays in ep0 processing. the control handshaking isn't always 1712 * avoid delays in ep0 processing. the control handshaking isn't always
1714 * under software control (pxa250c0 and the pxa255 are better), and delays 1713 * under software control (pxa250c0 and the pxa255 are better), and delays
1715 * could cause usb protocol errors. 1714 * could cause usb protocol errors.
1716 */ 1715 */
1717static irqreturn_t 1716static irqreturn_t
1718pxa2xx_udc_irq(int irq, void *_dev) 1717pxa25x_udc_irq(int irq, void *_dev)
1719{ 1718{
1720 struct pxa2xx_udc *dev = _dev; 1719 struct pxa25x_udc *dev = _dev;
1721 int handled; 1720 int handled;
1722 1721
1723 dev->stats.irqs++; 1722 dev->stats.irqs++;
@@ -1826,9 +1825,9 @@ static void nop_release (struct device *dev)
1826 * doing it at run-time) to save code, eliminate fault paths, and 1825 * doing it at run-time) to save code, eliminate fault paths, and
1827 * be more obviously correct. 1826 * be more obviously correct.
1828 */ 1827 */
1829static struct pxa2xx_udc memory = { 1828static struct pxa25x_udc memory = {
1830 .gadget = { 1829 .gadget = {
1831 .ops = &pxa2xx_udc_ops, 1830 .ops = &pxa25x_udc_ops,
1832 .ep0 = &memory.ep[0].ep, 1831 .ep0 = &memory.ep[0].ep,
1833 .name = driver_name, 1832 .name = driver_name,
1834 .dev = { 1833 .dev = {
@@ -1841,7 +1840,7 @@ static struct pxa2xx_udc memory = {
1841 .ep[0] = { 1840 .ep[0] = {
1842 .ep = { 1841 .ep = {
1843 .name = ep0name, 1842 .name = ep0name,
1844 .ops = &pxa2xx_ep_ops, 1843 .ops = &pxa25x_ep_ops,
1845 .maxpacket = EP0_FIFO_SIZE, 1844 .maxpacket = EP0_FIFO_SIZE,
1846 }, 1845 },
1847 .dev = &memory, 1846 .dev = &memory,
@@ -1853,7 +1852,7 @@ static struct pxa2xx_udc memory = {
1853 .ep[1] = { 1852 .ep[1] = {
1854 .ep = { 1853 .ep = {
1855 .name = "ep1in-bulk", 1854 .name = "ep1in-bulk",
1856 .ops = &pxa2xx_ep_ops, 1855 .ops = &pxa25x_ep_ops,
1857 .maxpacket = BULK_FIFO_SIZE, 1856 .maxpacket = BULK_FIFO_SIZE,
1858 }, 1857 },
1859 .dev = &memory, 1858 .dev = &memory,
@@ -1866,7 +1865,7 @@ static struct pxa2xx_udc memory = {
1866 .ep[2] = { 1865 .ep[2] = {
1867 .ep = { 1866 .ep = {
1868 .name = "ep2out-bulk", 1867 .name = "ep2out-bulk",
1869 .ops = &pxa2xx_ep_ops, 1868 .ops = &pxa25x_ep_ops,
1870 .maxpacket = BULK_FIFO_SIZE, 1869 .maxpacket = BULK_FIFO_SIZE,
1871 }, 1870 },
1872 .dev = &memory, 1871 .dev = &memory,
@@ -1877,11 +1876,11 @@ static struct pxa2xx_udc memory = {
1877 .reg_ubcr = &UBCR2, 1876 .reg_ubcr = &UBCR2,
1878 .reg_uddr = &UDDR2, 1877 .reg_uddr = &UDDR2,
1879 }, 1878 },
1880#ifndef CONFIG_USB_PXA2XX_SMALL 1879#ifndef CONFIG_USB_PXA25X_SMALL
1881 .ep[3] = { 1880 .ep[3] = {
1882 .ep = { 1881 .ep = {
1883 .name = "ep3in-iso", 1882 .name = "ep3in-iso",
1884 .ops = &pxa2xx_ep_ops, 1883 .ops = &pxa25x_ep_ops,
1885 .maxpacket = ISO_FIFO_SIZE, 1884 .maxpacket = ISO_FIFO_SIZE,
1886 }, 1885 },
1887 .dev = &memory, 1886 .dev = &memory,
@@ -1894,7 +1893,7 @@ static struct pxa2xx_udc memory = {
1894 .ep[4] = { 1893 .ep[4] = {
1895 .ep = { 1894 .ep = {
1896 .name = "ep4out-iso", 1895 .name = "ep4out-iso",
1897 .ops = &pxa2xx_ep_ops, 1896 .ops = &pxa25x_ep_ops,
1898 .maxpacket = ISO_FIFO_SIZE, 1897 .maxpacket = ISO_FIFO_SIZE,
1899 }, 1898 },
1900 .dev = &memory, 1899 .dev = &memory,
@@ -1908,7 +1907,7 @@ static struct pxa2xx_udc memory = {
1908 .ep[5] = { 1907 .ep[5] = {
1909 .ep = { 1908 .ep = {
1910 .name = "ep5in-int", 1909 .name = "ep5in-int",
1911 .ops = &pxa2xx_ep_ops, 1910 .ops = &pxa25x_ep_ops,
1912 .maxpacket = INT_FIFO_SIZE, 1911 .maxpacket = INT_FIFO_SIZE,
1913 }, 1912 },
1914 .dev = &memory, 1913 .dev = &memory,
@@ -1923,7 +1922,7 @@ static struct pxa2xx_udc memory = {
1923 .ep[6] = { 1922 .ep[6] = {
1924 .ep = { 1923 .ep = {
1925 .name = "ep6in-bulk", 1924 .name = "ep6in-bulk",
1926 .ops = &pxa2xx_ep_ops, 1925 .ops = &pxa25x_ep_ops,
1927 .maxpacket = BULK_FIFO_SIZE, 1926 .maxpacket = BULK_FIFO_SIZE,
1928 }, 1927 },
1929 .dev = &memory, 1928 .dev = &memory,
@@ -1936,7 +1935,7 @@ static struct pxa2xx_udc memory = {
1936 .ep[7] = { 1935 .ep[7] = {
1937 .ep = { 1936 .ep = {
1938 .name = "ep7out-bulk", 1937 .name = "ep7out-bulk",
1939 .ops = &pxa2xx_ep_ops, 1938 .ops = &pxa25x_ep_ops,
1940 .maxpacket = BULK_FIFO_SIZE, 1939 .maxpacket = BULK_FIFO_SIZE,
1941 }, 1940 },
1942 .dev = &memory, 1941 .dev = &memory,
@@ -1950,7 +1949,7 @@ static struct pxa2xx_udc memory = {
1950 .ep[8] = { 1949 .ep[8] = {
1951 .ep = { 1950 .ep = {
1952 .name = "ep8in-iso", 1951 .name = "ep8in-iso",
1953 .ops = &pxa2xx_ep_ops, 1952 .ops = &pxa25x_ep_ops,
1954 .maxpacket = ISO_FIFO_SIZE, 1953 .maxpacket = ISO_FIFO_SIZE,
1955 }, 1954 },
1956 .dev = &memory, 1955 .dev = &memory,
@@ -1963,7 +1962,7 @@ static struct pxa2xx_udc memory = {
1963 .ep[9] = { 1962 .ep[9] = {
1964 .ep = { 1963 .ep = {
1965 .name = "ep9out-iso", 1964 .name = "ep9out-iso",
1966 .ops = &pxa2xx_ep_ops, 1965 .ops = &pxa25x_ep_ops,
1967 .maxpacket = ISO_FIFO_SIZE, 1966 .maxpacket = ISO_FIFO_SIZE,
1968 }, 1967 },
1969 .dev = &memory, 1968 .dev = &memory,
@@ -1977,7 +1976,7 @@ static struct pxa2xx_udc memory = {
1977 .ep[10] = { 1976 .ep[10] = {
1978 .ep = { 1977 .ep = {
1979 .name = "ep10in-int", 1978 .name = "ep10in-int",
1980 .ops = &pxa2xx_ep_ops, 1979 .ops = &pxa25x_ep_ops,
1981 .maxpacket = INT_FIFO_SIZE, 1980 .maxpacket = INT_FIFO_SIZE,
1982 }, 1981 },
1983 .dev = &memory, 1982 .dev = &memory,
@@ -1992,7 +1991,7 @@ static struct pxa2xx_udc memory = {
1992 .ep[11] = { 1991 .ep[11] = {
1993 .ep = { 1992 .ep = {
1994 .name = "ep11in-bulk", 1993 .name = "ep11in-bulk",
1995 .ops = &pxa2xx_ep_ops, 1994 .ops = &pxa25x_ep_ops,
1996 .maxpacket = BULK_FIFO_SIZE, 1995 .maxpacket = BULK_FIFO_SIZE,
1997 }, 1996 },
1998 .dev = &memory, 1997 .dev = &memory,
@@ -2005,7 +2004,7 @@ static struct pxa2xx_udc memory = {
2005 .ep[12] = { 2004 .ep[12] = {
2006 .ep = { 2005 .ep = {
2007 .name = "ep12out-bulk", 2006 .name = "ep12out-bulk",
2008 .ops = &pxa2xx_ep_ops, 2007 .ops = &pxa25x_ep_ops,
2009 .maxpacket = BULK_FIFO_SIZE, 2008 .maxpacket = BULK_FIFO_SIZE,
2010 }, 2009 },
2011 .dev = &memory, 2010 .dev = &memory,
@@ -2019,7 +2018,7 @@ static struct pxa2xx_udc memory = {
2019 .ep[13] = { 2018 .ep[13] = {
2020 .ep = { 2019 .ep = {
2021 .name = "ep13in-iso", 2020 .name = "ep13in-iso",
2022 .ops = &pxa2xx_ep_ops, 2021 .ops = &pxa25x_ep_ops,
2023 .maxpacket = ISO_FIFO_SIZE, 2022 .maxpacket = ISO_FIFO_SIZE,
2024 }, 2023 },
2025 .dev = &memory, 2024 .dev = &memory,
@@ -2032,7 +2031,7 @@ static struct pxa2xx_udc memory = {
2032 .ep[14] = { 2031 .ep[14] = {
2033 .ep = { 2032 .ep = {
2034 .name = "ep14out-iso", 2033 .name = "ep14out-iso",
2035 .ops = &pxa2xx_ep_ops, 2034 .ops = &pxa25x_ep_ops,
2036 .maxpacket = ISO_FIFO_SIZE, 2035 .maxpacket = ISO_FIFO_SIZE,
2037 }, 2036 },
2038 .dev = &memory, 2037 .dev = &memory,
@@ -2046,7 +2045,7 @@ static struct pxa2xx_udc memory = {
2046 .ep[15] = { 2045 .ep[15] = {
2047 .ep = { 2046 .ep = {
2048 .name = "ep15in-int", 2047 .name = "ep15in-int",
2049 .ops = &pxa2xx_ep_ops, 2048 .ops = &pxa25x_ep_ops,
2050 .maxpacket = INT_FIFO_SIZE, 2049 .maxpacket = INT_FIFO_SIZE,
2051 }, 2050 },
2052 .dev = &memory, 2051 .dev = &memory,
@@ -2056,7 +2055,7 @@ static struct pxa2xx_udc memory = {
2056 .reg_udccs = &UDCCS15, 2055 .reg_udccs = &UDCCS15,
2057 .reg_uddr = &UDDR15, 2056 .reg_uddr = &UDDR15,
2058 }, 2057 },
2059#endif /* !CONFIG_USB_PXA2XX_SMALL */ 2058#endif /* !CONFIG_USB_PXA25X_SMALL */
2060}; 2059};
2061 2060
2062#define CP15R0_VENDOR_MASK 0xffffe000 2061#define CP15R0_VENDOR_MASK 0xffffe000
@@ -2096,9 +2095,9 @@ static struct pxa2xx_udc memory = {
2096/* 2095/*
2097 * probe - binds to the platform device 2096 * probe - binds to the platform device
2098 */ 2097 */
2099static int __init pxa2xx_udc_probe(struct platform_device *pdev) 2098static int __init pxa25x_udc_probe(struct platform_device *pdev)
2100{ 2099{
2101 struct pxa2xx_udc *dev = &memory; 2100 struct pxa25x_udc *dev = &memory;
2102 int retval, vbus_irq, irq; 2101 int retval, vbus_irq, irq;
2103 u32 chiprev; 2102 u32 chiprev;
2104 2103
@@ -2161,7 +2160,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev)
2161 2160
2162 if (dev->mach->gpio_vbus) { 2161 if (dev->mach->gpio_vbus) {
2163 if ((retval = gpio_request(dev->mach->gpio_vbus, 2162 if ((retval = gpio_request(dev->mach->gpio_vbus,
2164 "pxa2xx_udc GPIO VBUS"))) { 2163 "pxa25x_udc GPIO VBUS"))) {
2165 dev_dbg(&pdev->dev, 2164 dev_dbg(&pdev->dev,
2166 "can't get vbus gpio %d, err: %d\n", 2165 "can't get vbus gpio %d, err: %d\n",
2167 dev->mach->gpio_vbus, retval); 2166 dev->mach->gpio_vbus, retval);
@@ -2174,7 +2173,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev)
2174 2173
2175 if (dev->mach->gpio_pullup) { 2174 if (dev->mach->gpio_pullup) {
2176 if ((retval = gpio_request(dev->mach->gpio_pullup, 2175 if ((retval = gpio_request(dev->mach->gpio_pullup,
2177 "pca2xx_udc GPIO PULLUP"))) { 2176 "pca25x_udc GPIO PULLUP"))) {
2178 dev_dbg(&pdev->dev, 2177 dev_dbg(&pdev->dev,
2179 "can't get pullup gpio %d, err: %d\n", 2178 "can't get pullup gpio %d, err: %d\n",
2180 dev->mach->gpio_pullup, retval); 2179 dev->mach->gpio_pullup, retval);
@@ -2200,7 +2199,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev)
2200 dev->vbus = is_vbus_present(); 2199 dev->vbus = is_vbus_present();
2201 2200
2202 /* irq setup after old hardware state is cleaned up */ 2201 /* irq setup after old hardware state is cleaned up */
2203 retval = request_irq(irq, pxa2xx_udc_irq, 2202 retval = request_irq(irq, pxa25x_udc_irq,
2204 IRQF_DISABLED, driver_name, dev); 2203 IRQF_DISABLED, driver_name, dev);
2205 if (retval != 0) { 2204 if (retval != 0) {
2206 pr_err("%s: can't get irq %d, err %d\n", 2205 pr_err("%s: can't get irq %d, err %d\n",
@@ -2266,14 +2265,14 @@ lubbock_fail0:
2266 return retval; 2265 return retval;
2267} 2266}
2268 2267
2269static void pxa2xx_udc_shutdown(struct platform_device *_dev) 2268static void pxa25x_udc_shutdown(struct platform_device *_dev)
2270{ 2269{
2271 pullup_off(); 2270 pullup_off();
2272} 2271}
2273 2272
2274static int __exit pxa2xx_udc_remove(struct platform_device *pdev) 2273static int __exit pxa25x_udc_remove(struct platform_device *pdev)
2275{ 2274{
2276 struct pxa2xx_udc *dev = platform_get_drvdata(pdev); 2275 struct pxa25x_udc *dev = platform_get_drvdata(pdev);
2277 2276
2278 if (dev->driver) 2277 if (dev->driver)
2279 return -EBUSY; 2278 return -EBUSY;
@@ -2323,9 +2322,9 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
2323 * VBUS IRQs should probably be ignored so that the PXA device just acts 2322 * VBUS IRQs should probably be ignored so that the PXA device just acts
2324 * "dead" to USB hosts until system resume. 2323 * "dead" to USB hosts until system resume.
2325 */ 2324 */
2326static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state) 2325static int pxa25x_udc_suspend(struct platform_device *dev, pm_message_t state)
2327{ 2326{
2328 struct pxa2xx_udc *udc = platform_get_drvdata(dev); 2327 struct pxa25x_udc *udc = platform_get_drvdata(dev);
2329 unsigned long flags; 2328 unsigned long flags;
2330 2329
2331 if (!udc->mach->gpio_pullup && !udc->mach->udc_command) 2330 if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
@@ -2339,9 +2338,9 @@ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
2339 return 0; 2338 return 0;
2340} 2339}
2341 2340
2342static int pxa2xx_udc_resume(struct platform_device *dev) 2341static int pxa25x_udc_resume(struct platform_device *dev)
2343{ 2342{
2344 struct pxa2xx_udc *udc = platform_get_drvdata(dev); 2343 struct pxa25x_udc *udc = platform_get_drvdata(dev);
2345 unsigned long flags; 2344 unsigned long flags;
2346 2345
2347 udc->suspended = 0; 2346 udc->suspended = 0;
@@ -2353,27 +2352,27 @@ static int pxa2xx_udc_resume(struct platform_device *dev)
2353} 2352}
2354 2353
2355#else 2354#else
2356#define pxa2xx_udc_suspend NULL 2355#define pxa25x_udc_suspend NULL
2357#define pxa2xx_udc_resume NULL 2356#define pxa25x_udc_resume NULL
2358#endif 2357#endif
2359 2358
2360/*-------------------------------------------------------------------------*/ 2359/*-------------------------------------------------------------------------*/
2361 2360
2362static struct platform_driver udc_driver = { 2361static struct platform_driver udc_driver = {
2363 .shutdown = pxa2xx_udc_shutdown, 2362 .shutdown = pxa25x_udc_shutdown,
2364 .remove = __exit_p(pxa2xx_udc_remove), 2363 .remove = __exit_p(pxa25x_udc_remove),
2365 .suspend = pxa2xx_udc_suspend, 2364 .suspend = pxa25x_udc_suspend,
2366 .resume = pxa2xx_udc_resume, 2365 .resume = pxa25x_udc_resume,
2367 .driver = { 2366 .driver = {
2368 .owner = THIS_MODULE, 2367 .owner = THIS_MODULE,
2369 .name = "pxa2xx-udc", 2368 .name = "pxa25x-udc",
2370 }, 2369 },
2371}; 2370};
2372 2371
2373static int __init udc_init(void) 2372static int __init udc_init(void)
2374{ 2373{
2375 pr_info("%s: version %s\n", driver_name, DRIVER_VERSION); 2374 pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);
2376 return platform_driver_probe(&udc_driver, pxa2xx_udc_probe); 2375 return platform_driver_probe(&udc_driver, pxa25x_udc_probe);
2377} 2376}
2378module_init(udc_init); 2377module_init(udc_init);
2379 2378
@@ -2386,4 +2385,4 @@ module_exit(udc_exit);
2386MODULE_DESCRIPTION(DRIVER_DESC); 2385MODULE_DESCRIPTION(DRIVER_DESC);
2387MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); 2386MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");
2388MODULE_LICENSE("GPL"); 2387MODULE_LICENSE("GPL");
2389MODULE_ALIAS("platform:pxa2xx-udc"); 2388MODULE_ALIAS("platform:pxa25x-udc");
diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa25x_udc.h
index e2c19e88c875..4d11ece7c95f 100644
--- a/drivers/usb/gadget/pxa2xx_udc.h
+++ b/drivers/usb/gadget/pxa25x_udc.h
@@ -1,6 +1,5 @@
1/* 1/*
2 * linux/drivers/usb/gadget/pxa2xx_udc.h 2 * Intel PXA25x on-chip full speed USB device controller
3 * Intel PXA2xx on-chip full speed USB device controller
4 * 3 *
5 * Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix 4 * Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
6 * Copyright (C) 2003 David Brownell 5 * Copyright (C) 2003 David Brownell
@@ -21,14 +20,14 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 21 */
23 22
24#ifndef __LINUX_USB_GADGET_PXA2XX_H 23#ifndef __LINUX_USB_GADGET_PXA25X_H
25#define __LINUX_USB_GADGET_PXA2XX_H 24#define __LINUX_USB_GADGET_PXA25X_H
26 25
27#include <linux/types.h> 26#include <linux/types.h>
28 27
29/*-------------------------------------------------------------------------*/ 28/*-------------------------------------------------------------------------*/
30 29
31/* pxa2xx has this (move to include/asm-arm/arch-pxa/pxa-regs.h) */ 30/* pxa25x has this (move to include/asm-arm/arch-pxa/pxa-regs.h) */
32#define UFNRH_SIR (1 << 7) /* SOF interrupt request */ 31#define UFNRH_SIR (1 << 7) /* SOF interrupt request */
33#define UFNRH_SIM (1 << 6) /* SOF interrupt mask */ 32#define UFNRH_SIM (1 << 6) /* SOF interrupt mask */
34#define UFNRH_IPE14 (1 << 5) /* ISO packet error, ep14 */ 33#define UFNRH_IPE14 (1 << 5) /* ISO packet error, ep14 */
@@ -45,11 +44,11 @@
45 44
46/*-------------------------------------------------------------------------*/ 45/*-------------------------------------------------------------------------*/
47 46
48struct pxa2xx_udc; 47struct pxa25x_udc;
49 48
50struct pxa2xx_ep { 49struct pxa25x_ep {
51 struct usb_ep ep; 50 struct usb_ep ep;
52 struct pxa2xx_udc *dev; 51 struct pxa25x_udc *dev;
53 52
54 const struct usb_endpoint_descriptor *desc; 53 const struct usb_endpoint_descriptor *desc;
55 struct list_head queue; 54 struct list_head queue;
@@ -72,7 +71,7 @@ struct pxa2xx_ep {
72 volatile u32 *reg_uddr; 71 volatile u32 *reg_uddr;
73}; 72};
74 73
75struct pxa2xx_request { 74struct pxa25x_request {
76 struct usb_request req; 75 struct usb_request req;
77 struct list_head queue; 76 struct list_head queue;
78}; 77};
@@ -98,7 +97,7 @@ struct udc_stats {
98 unsigned long irqs; 97 unsigned long irqs;
99}; 98};
100 99
101#ifdef CONFIG_USB_PXA2XX_SMALL 100#ifdef CONFIG_USB_PXA25X_SMALL
102/* when memory's tight, SMALL config saves code+data. */ 101/* when memory's tight, SMALL config saves code+data. */
103#define PXA_UDC_NUM_ENDPOINTS 3 102#define PXA_UDC_NUM_ENDPOINTS 3
104#endif 103#endif
@@ -107,7 +106,7 @@ struct udc_stats {
107#define PXA_UDC_NUM_ENDPOINTS 16 106#define PXA_UDC_NUM_ENDPOINTS 16
108#endif 107#endif
109 108
110struct pxa2xx_udc { 109struct pxa25x_udc {
111 struct usb_gadget gadget; 110 struct usb_gadget gadget;
112 struct usb_gadget_driver *driver; 111 struct usb_gadget_driver *driver;
113 112
@@ -130,7 +129,7 @@ struct pxa2xx_udc {
130 struct clk *clk; 129 struct clk *clk;
131 struct pxa2xx_udc_mach_info *mach; 130 struct pxa2xx_udc_mach_info *mach;
132 u64 dma_mask; 131 u64 dma_mask;
133 struct pxa2xx_ep ep [PXA_UDC_NUM_ENDPOINTS]; 132 struct pxa25x_ep ep [PXA_UDC_NUM_ENDPOINTS];
134 133
135#ifdef CONFIG_USB_GADGET_DEBUG_FS 134#ifdef CONFIG_USB_GADGET_DEBUG_FS
136 struct dentry *debugfs_udc; 135 struct dentry *debugfs_udc;
@@ -144,7 +143,7 @@ struct pxa2xx_udc {
144/* lubbock can also report usb connect/disconnect irqs */ 143/* lubbock can also report usb connect/disconnect irqs */
145#endif 144#endif
146 145
147static struct pxa2xx_udc *the_controller; 146static struct pxa25x_udc *the_controller;
148 147
149/*-------------------------------------------------------------------------*/ 148/*-------------------------------------------------------------------------*/
150 149
@@ -209,7 +208,7 @@ dump_udccs0(const char *label)
209} 208}
210 209
211static void __maybe_unused 210static void __maybe_unused
212dump_state(struct pxa2xx_udc *dev) 211dump_state(struct pxa25x_udc *dev)
213{ 212{
214 u32 tmp; 213 u32 tmp;
215 unsigned i; 214 unsigned i;
@@ -264,4 +263,4 @@ dump_state(struct pxa2xx_udc *dev)
264#define INFO(stuff...) pr_info("udc: " stuff) 263#define INFO(stuff...) pr_info("udc: " stuff)
265 264
266 265
267#endif /* __LINUX_USB_GADGET_PXA2XX_H */ 266#endif /* __LINUX_USB_GADGET_PXA25X_H */
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 40d6b580f152..4771b1314d54 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -2367,11 +2367,11 @@ static int pxa_udc_resume(struct platform_device *_dev)
2367#endif 2367#endif
2368 2368
2369/* work with hotplug and coldplug */ 2369/* work with hotplug and coldplug */
2370MODULE_ALIAS("platform:pxa2xx-udc"); 2370MODULE_ALIAS("platform:pxa27x-udc");
2371 2371
2372static struct platform_driver udc_driver = { 2372static struct platform_driver udc_driver = {
2373 .driver = { 2373 .driver = {
2374 .name = "pxa2xx-udc", 2374 .name = "pxa27x-udc",
2375 .owner = THIS_MODULE, 2375 .owner = THIS_MODULE,
2376 }, 2376 },
2377 .remove = __exit_p(pxa_udc_remove), 2377 .remove = __exit_p(pxa_udc_remove),