Skip to content

Commit

Permalink
[ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27…
Browse files Browse the repository at this point in the history
…x 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: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell 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: Ian Molton <spyro@f2s.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Philipp Zabel authored and Russell King committed Jul 9, 2008
1 parent 73d1a2c commit 7a85762
Show file tree
Hide file tree
Showing 14 changed files with 198 additions and 188 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-ixp4xx/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
static struct platform_device ixp4xx_udc_device = {
.name = "pxa2xx-udc",
.name = "pxa25x-udc",
.id = -1,
.num_resources = 2,
.resource = ixp4xx_udc_resources,
Expand Down
15 changes: 13 additions & 2 deletions arch/arm/mach-pxa/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,19 @@ static struct resource pxa2xx_udc_resources[] = {

static u64 udc_dma_mask = ~(u32)0;

struct platform_device pxa_device_udc = {
.name = "pxa2xx-udc",
struct platform_device pxa25x_device_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,
.resource = pxa2xx_udc_resources,
.num_resources = ARRAY_SIZE(pxa2xx_udc_resources),
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-pxa/devices.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
extern struct platform_device pxa_device_mci;
extern struct platform_device pxa3xx_device_mci2;
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_ffuart;
extern struct platform_device pxa_device_btuart;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-pxa/pxa25x.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static struct clk pxa25x_clks[] = {
INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev),
INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
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("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),

Expand Down Expand Up @@ -267,7 +267,7 @@ void __init pxa25x_init_irq(void)
}

static struct platform_device *pxa25x_devices[] __initdata = {
&pxa_device_udc,
&pxa25x_device_udc,
&pxa_device_ffuart,
&pxa_device_btuart,
&pxa_device_stuart,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-pxa/pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static struct clk pxa27x_clks[] = {

INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.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("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev),

Expand Down Expand Up @@ -357,7 +357,7 @@ void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
}

static struct platform_device *devices[] __initdata = {
/* &pxa_device_udc, The UDC driver is PXA25x only */
&pxa27x_device_udc,
&pxa_device_ffuart,
&pxa_device_btuart,
&pxa_device_stuart,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/pxa3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static struct clk pxa3xx_clks[] = {
PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL),

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("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),

Expand Down
12 changes: 6 additions & 6 deletions drivers/usb/gadget/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ config USB_NET2280
default USB_GADGET
select USB_GADGET_SELECTED

config USB_GADGET_PXA2XX
config USB_GADGET_PXA25X
boolean "PXA 25x or IXP 4xx"
depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX
help
Expand All @@ -184,19 +184,19 @@ config USB_GADGET_PXA2XX
zero (for control transfers).

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.

config USB_PXA2XX
config USB_PXA25X
tristate
depends on USB_GADGET_PXA2XX
depends on USB_GADGET_PXA25X
default USB_GADGET
select USB_GADGET_SELECTED

# if there's only one gadget driver, using only two bulk endpoints,
# don't waste memory for the other endpoints
config USB_PXA2XX_SMALL
depends on USB_GADGET_PXA2XX
config USB_PXA25X_SMALL
depends on USB_GADGET_PXA25X
bool
default n if USB_ETH_RNDIS
default y if USB_ZERO
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif
obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
obj-$(CONFIG_USB_NET2280) += net2280.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_GOKU) += goku_udc.o
obj-$(CONFIG_USB_OMAP) += omap_udc.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
/* For CDC-incapable hardware, choose the simple cdc subset.
* Anything that talks bulk (without notable bugs) can do this.
*/
#ifdef CONFIG_USB_GADGET_PXA2XX
#ifdef CONFIG_USB_GADGET_PXA25X
#define DEV_CONFIG_SUBSET
#endif

Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/gadget/gadget_chips.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#define gadget_is_dummy(g) 0
#endif

#ifdef CONFIG_USB_GADGET_PXA2XX
#define gadget_is_pxa(g) !strcmp("pxa2xx_udc", (g)->name)
#ifdef CONFIG_USB_GADGET_PXA25X
#define gadget_is_pxa(g) !strcmp("pxa25x_udc", (g)->name)
#else
#define gadget_is_pxa(g) 0
#endif
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
}
break;

#ifndef CONFIG_USB_GADGET_PXA2XX
#ifndef CONFIG_USB_GADGET_PXA25X
/* PXA automagically handles this request too */
case USB_REQ_GET_CONFIGURATION:
if (ctrl->bRequestType != 0x80)
Expand Down
Loading

0 comments on commit 7a85762

Please sign in to comment.