Commit 7a857620 authored by Philipp Zabel's avatar Philipp Zabel Committed by Russell King

[ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers

The pxa2xx_udc.c driver is renamed to pxa25x_udc.c (the platform
driver name changes from pxa2xx-udc to pxa25x-udc) and the
platform driver name of pxa27x_udc.c is fixed to pxa27x-udc.
pxa_device_udc in devices.c is split into pxa25x and pxa27x flavors
and the pxa27x_device_udc is enabled in pxa27x.c.
Signed-off-by: default avatarPhilipp Zabel <philipp.zabel@gmail.com>
Acked-by: default avatarNicolas Pitre <nico@cam.org>
Acked-by: default avatarEric Miao <eric.miao@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>

Including from Ian Molton:

Fixes for mistakes left over from the PXA2{5,7}X UDC split.
Signed-off-by: default avatarIan Molton <spyro@f2s.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 73d1a2c4
...@@ -326,11 +326,11 @@ static struct resource ixp4xx_udc_resources[] = { ...@@ -326,11 +326,11 @@ static struct resource ixp4xx_udc_resources[] = {
}; };
/* /*
* USB device controller. The IXP4xx uses the same controller as PXA2XX, * USB device controller. The IXP4xx uses the same controller as PXA25X,
* so we just use the same device. * so we just use the same device.
*/ */
static struct platform_device ixp4xx_udc_device = { static struct platform_device ixp4xx_udc_device = {
.name = "pxa2xx-udc", .name = "pxa25x-udc",
.id = -1, .id = -1,
.num_resources = 2, .num_resources = 2,
.resource = ixp4xx_udc_resources, .resource = ixp4xx_udc_resources,
......
...@@ -93,8 +93,19 @@ static struct resource pxa2xx_udc_resources[] = { ...@@ -93,8 +93,19 @@ static struct resource pxa2xx_udc_resources[] = {
static u64 udc_dma_mask = ~(u32)0; static u64 udc_dma_mask = ~(u32)0;
struct platform_device pxa_device_udc = { struct platform_device pxa25x_device_udc = {
.name = "pxa2xx-udc", .name = "pxa25x-udc",
.id = -1,
.resource = pxa2xx_udc_resources,
.num_resources = ARRAY_SIZE(pxa2xx_udc_resources),
.dev = {
.platform_data = &pxa_udc_info,
.dma_mask = &udc_dma_mask,
}
};
struct platform_device pxa27x_device_udc = {
.name = "pxa27x-udc",
.id = -1, .id = -1,
.resource = pxa2xx_udc_resources, .resource = pxa2xx_udc_resources,
.num_resources = ARRAY_SIZE(pxa2xx_udc_resources), .num_resources = ARRAY_SIZE(pxa2xx_udc_resources),
......
extern struct platform_device pxa_device_mci; extern struct platform_device pxa_device_mci;
extern struct platform_device pxa3xx_device_mci2; extern struct platform_device pxa3xx_device_mci2;
extern struct platform_device pxa3xx_device_mci3; extern struct platform_device pxa3xx_device_mci3;
extern struct platform_device pxa_device_udc; extern struct platform_device pxa25x_device_udc;
extern struct platform_device pxa27x_device_udc;
extern struct platform_device pxa_device_fb; extern struct platform_device pxa_device_fb;
extern struct platform_device pxa_device_ffuart; extern struct platform_device pxa_device_ffuart;
extern struct platform_device pxa_device_btuart; extern struct platform_device pxa_device_btuart;
......
...@@ -127,7 +127,7 @@ static struct clk pxa25x_clks[] = { ...@@ -127,7 +127,7 @@ static struct clk pxa25x_clks[] = {
INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev), INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev),
INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev), INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev),
INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
...@@ -267,7 +267,7 @@ void __init pxa25x_init_irq(void) ...@@ -267,7 +267,7 @@ void __init pxa25x_init_irq(void)
} }
static struct platform_device *pxa25x_devices[] __initdata = { static struct platform_device *pxa25x_devices[] __initdata = {
&pxa_device_udc, &pxa25x_device_udc,
&pxa_device_ffuart, &pxa_device_ffuart,
&pxa_device_btuart, &pxa_device_btuart,
&pxa_device_stuart, &pxa_device_stuart,
......
...@@ -146,7 +146,7 @@ static struct clk pxa27x_clks[] = { ...@@ -146,7 +146,7 @@ static struct clk pxa27x_clks[] = {
INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev), INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev),
INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa_device_udc.dev), INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa27x_device_udc.dev),
INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev), INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev),
INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev), INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev),
...@@ -357,7 +357,7 @@ void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info) ...@@ -357,7 +357,7 @@ void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
} }
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
/* &pxa_device_udc, The UDC driver is PXA25x only */ &pxa27x_device_udc,
&pxa_device_ffuart, &pxa_device_ffuart,
&pxa_device_btuart, &pxa_device_btuart,
&pxa_device_stuart, &pxa_device_stuart,
......
...@@ -231,7 +231,7 @@ static struct clk pxa3xx_clks[] = { ...@@ -231,7 +231,7 @@ static struct clk pxa3xx_clks[] = {
PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL), PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev), PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa27x_device_udc.dev),
PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
......
...@@ -172,7 +172,7 @@ config USB_NET2280 ...@@ -172,7 +172,7 @@ config USB_NET2280
default USB_GADGET default USB_GADGET
select USB_GADGET_SELECTED select USB_GADGET_SELECTED
config USB_GADGET_PXA2XX config USB_GADGET_PXA25X
boolean "PXA 25x or IXP 4xx" boolean "PXA 25x or IXP 4xx"
depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX
help help
...@@ -184,19 +184,19 @@ config USB_GADGET_PXA2XX ...@@ -184,19 +184,19 @@ config USB_GADGET_PXA2XX
zero (for control transfers). zero (for control transfers).
Say "y" to link the driver statically, or "m" to build a Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "pxa2xx_udc" and force all dynamically linked module called "pxa25x_udc" and force all
gadget drivers to also be dynamically linked. gadget drivers to also be dynamically linked.
config USB_PXA2XX config USB_PXA25X
tristate tristate
depends on USB_GADGET_PXA2XX depends on USB_GADGET_PXA25X
default USB_GADGET default USB_GADGET
select USB_GADGET_SELECTED select USB_GADGET_SELECTED
# if there's only one gadget driver, using only two bulk endpoints, # if there's only one gadget driver, using only two bulk endpoints,
# don't waste memory for the other endpoints # don't waste memory for the other endpoints
config USB_PXA2XX_SMALL config USB_PXA25X_SMALL
depends on USB_GADGET_PXA2XX depends on USB_GADGET_PXA25X
bool bool
default n if USB_ETH_RNDIS default n if USB_ETH_RNDIS
default y if USB_ZERO default y if USB_ZERO
......
...@@ -8,7 +8,7 @@ endif ...@@ -8,7 +8,7 @@ endif
obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
obj-$(CONFIG_USB_NET2280) += net2280.o obj-$(CONFIG_USB_NET2280) += net2280.o
obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o
obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o obj-$(CONFIG_USB_PXA25X) += pxa25x_udc.o
obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o
obj-$(CONFIG_USB_GOKU) += goku_udc.o obj-$(CONFIG_USB_GOKU) += goku_udc.o
obj-$(CONFIG_USB_OMAP) += omap_udc.o obj-$(CONFIG_USB_OMAP) += omap_udc.o
......
...@@ -262,7 +262,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); ...@@ -262,7 +262,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
/* For CDC-incapable hardware, choose the simple cdc subset. /* For CDC-incapable hardware, choose the simple cdc subset.
* Anything that talks bulk (without notable bugs) can do this. * Anything that talks bulk (without notable bugs) can do this.
*/ */
#ifdef CONFIG_USB_GADGET_PXA2XX #ifdef CONFIG_USB_GADGET_PXA25X
#define DEV_CONFIG_SUBSET #define DEV_CONFIG_SUBSET
#endif #endif
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#define gadget_is_dummy(g) 0 #define gadget_is_dummy(g) 0
#endif #endif
#ifdef CONFIG_USB_GADGET_PXA2XX #ifdef CONFIG_USB_GADGET_PXA25X
#define gadget_is_pxa(g) !strcmp("pxa2xx_udc", (g)->name) #define gadget_is_pxa(g) !strcmp("pxa25x_udc", (g)->name)
#else #else
#define gadget_is_pxa(g) 0 #define gadget_is_pxa(g) 0
#endif #endif
......
...@@ -1501,7 +1501,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) ...@@ -1501,7 +1501,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
} }
break; break;
#ifndef CONFIG_USB_GADGET_PXA2XX #ifndef CONFIG_USB_GADGET_PXA25X
/* PXA automagically handles this request too */ /* PXA automagically handles this request too */
case USB_REQ_GET_CONFIGURATION: case USB_REQ_GET_CONFIGURATION:
if (ctrl->bRequestType != 0x80) if (ctrl->bRequestType != 0x80)
......
/* /*
* linux/drivers/usb/gadget/pxa2xx_udc.h * Intel PXA25x on-chip full speed USB device controller
* Intel PXA2xx on-chip full speed USB device controller
* *
* Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix * Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
* Copyright (C) 2003 David Brownell * Copyright (C) 2003 David Brownell
...@@ -21,14 +20,14 @@ ...@@ -21,14 +20,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __LINUX_USB_GADGET_PXA2XX_H #ifndef __LINUX_USB_GADGET_PXA25X_H
#define __LINUX_USB_GADGET_PXA2XX_H #define __LINUX_USB_GADGET_PXA25X_H
#include <linux/types.h> #include <linux/types.h>
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* pxa2xx has this (move to include/asm-arm/arch-pxa/pxa-regs.h) */ /* pxa25x has this (move to include/asm-arm/arch-pxa/pxa-regs.h) */
#define UFNRH_SIR (1 << 7) /* SOF interrupt request */ #define UFNRH_SIR (1 << 7) /* SOF interrupt request */
#define UFNRH_SIM (1 << 6) /* SOF interrupt mask */ #define UFNRH_SIM (1 << 6) /* SOF interrupt mask */
#define UFNRH_IPE14 (1 << 5) /* ISO packet error, ep14 */ #define UFNRH_IPE14 (1 << 5) /* ISO packet error, ep14 */
...@@ -45,11 +44,11 @@ ...@@ -45,11 +44,11 @@
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
struct pxa2xx_udc; struct pxa25x_udc;
struct pxa2xx_ep { struct pxa25x_ep {
struct usb_ep ep; struct usb_ep ep;
struct pxa2xx_udc *dev; struct pxa25x_udc *dev;
const struct usb_endpoint_descriptor *desc; const struct usb_endpoint_descriptor *desc;
struct list_head queue; struct list_head queue;
...@@ -72,7 +71,7 @@ struct pxa2xx_ep { ...@@ -72,7 +71,7 @@ struct pxa2xx_ep {
volatile u32 *reg_uddr; volatile u32 *reg_uddr;
}; };
struct pxa2xx_request { struct pxa25x_request {
struct usb_request req; struct usb_request req;
struct list_head queue; struct list_head queue;
}; };
...@@ -98,7 +97,7 @@ struct udc_stats { ...@@ -98,7 +97,7 @@ struct udc_stats {
unsigned long irqs; unsigned long irqs;
}; };
#ifdef CONFIG_USB_PXA2XX_SMALL #ifdef CONFIG_USB_PXA25X_SMALL
/* when memory's tight, SMALL config saves code+data. */ /* when memory's tight, SMALL config saves code+data. */
#define PXA_UDC_NUM_ENDPOINTS 3 #define PXA_UDC_NUM_ENDPOINTS 3
#endif #endif
...@@ -107,7 +106,7 @@ struct udc_stats { ...@@ -107,7 +106,7 @@ struct udc_stats {
#define PXA_UDC_NUM_ENDPOINTS 16 #define PXA_UDC_NUM_ENDPOINTS 16
#endif #endif
struct pxa2xx_udc { struct pxa25x_udc {
struct usb_gadget gadget; struct usb_gadget gadget;
struct usb_gadget_driver *driver; struct usb_gadget_driver *driver;
...@@ -130,7 +129,7 @@ struct pxa2xx_udc { ...@@ -130,7 +129,7 @@ struct pxa2xx_udc {
struct clk *clk; struct clk *clk;
struct pxa2xx_udc_mach_info *mach; struct pxa2xx_udc_mach_info *mach;
u64 dma_mask; u64 dma_mask;
struct pxa2xx_ep ep [PXA_UDC_NUM_ENDPOINTS]; struct pxa25x_ep ep [PXA_UDC_NUM_ENDPOINTS];
#ifdef CONFIG_USB_GADGET_DEBUG_FS #ifdef CONFIG_USB_GADGET_DEBUG_FS
struct dentry *debugfs_udc; struct dentry *debugfs_udc;
...@@ -144,7 +143,7 @@ struct pxa2xx_udc { ...@@ -144,7 +143,7 @@ struct pxa2xx_udc {
/* lubbock can also report usb connect/disconnect irqs */ /* lubbock can also report usb connect/disconnect irqs */
#endif #endif
static struct pxa2xx_udc *the_controller; static struct pxa25x_udc *the_controller;
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -209,7 +208,7 @@ dump_udccs0(const char *label) ...@@ -209,7 +208,7 @@ dump_udccs0(const char *label)
} }
static void __maybe_unused static void __maybe_unused
dump_state(struct pxa2xx_udc *dev) dump_state(struct pxa25x_udc *dev)
{ {
u32 tmp; u32 tmp;
unsigned i; unsigned i;
...@@ -264,4 +263,4 @@ dump_state(struct pxa2xx_udc *dev) ...@@ -264,4 +263,4 @@ dump_state(struct pxa2xx_udc *dev)
#define INFO(stuff...) pr_info("udc: " stuff) #define INFO(stuff...) pr_info("udc: " stuff)
#endif /* __LINUX_USB_GADGET_PXA2XX_H */ #endif /* __LINUX_USB_GADGET_PXA25X_H */
...@@ -2367,11 +2367,11 @@ static int pxa_udc_resume(struct platform_device *_dev) ...@@ -2367,11 +2367,11 @@ static int pxa_udc_resume(struct platform_device *_dev)
#endif #endif
/* work with hotplug and coldplug */ /* work with hotplug and coldplug */
MODULE_ALIAS("platform:pxa2xx-udc"); MODULE_ALIAS("platform:pxa27x-udc");
static struct platform_driver udc_driver = { static struct platform_driver udc_driver = {
.driver = { .driver = {
.name = "pxa2xx-udc", .name = "pxa27x-udc",
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.remove = __exit_p(pxa_udc_remove), .remove = __exit_p(pxa_udc_remove),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment