Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43390
b: refs/heads/master
c: e520a36
h: refs/heads/master
v: v3
  • Loading branch information
Milan Svoboda authored and Russell King committed Dec 1, 2006
1 parent 06ef602 commit 6c4239b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2024c39dbba4d036f0b16daf530ad5f4416fb344
refs/heads/master: e520a36de2f7985df5ef2e84a9f6d2608ecc6f25
41 changes: 41 additions & 0 deletions trunk/arch/arm/mach-ixp4xx/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/timex.h>
#include <linux/clocksource.h>

#include <asm/arch/udc.h>
#include <asm/hardware.h>
#include <asm/uaccess.h>
#include <asm/io.h>
Expand Down Expand Up @@ -286,6 +287,44 @@ struct sys_timer ixp4xx_timer = {
.init = ixp4xx_timer_init,
};

static struct pxa2xx_udc_mach_info ixp4xx_udc_info;

void __init ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info)
{
memcpy(&ixp4xx_udc_info, info, sizeof *info);
}

static struct resource ixp4xx_udc_resources[] = {
[0] = {
.start = 0xc800b000,
.end = 0xc800bfff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_IXP4XX_USB,
.end = IRQ_IXP4XX_USB,
.flags = IORESOURCE_IRQ,
},
};

/*
* USB device controller. The IXP4xx uses the same controller as PXA2XX,
* so we just use the same device.
*/
static struct platform_device ixp4xx_udc_device = {
.name = "pxa2xx-udc",
.id = -1,
.num_resources = 2,
.resource = ixp4xx_udc_resources,
.dev = {
.platform_data = &ixp4xx_udc_info,
},
};

static struct platform_device *ixp4xx_devices[] __initdata = {
&ixp4xx_udc_device,
};

static struct resource ixp46x_i2c_resources[] = {
[0] = {
.start = 0xc8011000,
Expand Down Expand Up @@ -321,6 +360,8 @@ void __init ixp4xx_sys_init(void)
{
ixp4xx_exp_bus_size = SZ_16M;

platform_add_devices(ixp4xx_devices, ARRAY_SIZE(ixp4xx_devices));

if (cpu_is_ixp46x()) {
int region;

Expand Down
8 changes: 8 additions & 0 deletions trunk/include/asm-arm/arch-ixp4xx/udc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* linux/include/asm-arm/arch-ixp4xx/udc.h
*
*/
#include <asm/mach/udc_pxa2xx.h>

extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);

0 comments on commit 6c4239b

Please sign in to comment.