Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163465
b: refs/heads/master
c: f8f8c07
h: refs/heads/master
i:
  163463: e75f2a7
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Aug 20, 2009
1 parent 9bff82b commit 88ad91b
Show file tree
Hide file tree
Showing 2 changed files with 34 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: 5a1c4cb5bc228662bfb116f1e07ad658915a5742
refs/heads/master: f8f8c0797d73624d6e81dbb9c9e8f85005500ebc
33 changes: 33 additions & 0 deletions trunk/arch/sh/boards/mach-se/7724/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,35 @@ static struct platform_device sh7724_usb0_host_device = {
.resource = sh7724_usb0_host_resources,
};

static struct r8a66597_platdata sh7724_usb1_gadget_data = {
.on_chip = 1,
};

static struct resource sh7724_usb1_gadget_resources[] = {
[0] = {
.start = 0xa4d90000,
.end = 0xa4d90123,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 66,
.end = 66,
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
},
};

static struct platform_device sh7724_usb1_gadget_device = {
.name = "r8a66597_udc",
.id = 1, /* USB1 */
.dev = {
.dma_mask = NULL, /* not use dma */
.coherent_dma_mask = 0xffffffff,
.platform_data = &sh7724_usb1_gadget_data,
},
.num_resources = ARRAY_SIZE(sh7724_usb1_gadget_resources),
.resource = sh7724_usb1_gadget_resources,
};

static struct platform_device *ms7724se_devices[] __initdata = {
&heartbeat_device,
&smc91x_eth_device,
Expand All @@ -351,6 +380,7 @@ static struct platform_device *ms7724se_devices[] __initdata = {
&keysc_device,
&sh_eth_device,
&sh7724_usb0_host_device,
&sh7724_usb1_gadget_device,
};

#define EEPROM_OP 0xBA206000
Expand Down Expand Up @@ -459,6 +489,9 @@ static int __init devices_setup(void)
/* enable USB0 port */
ctrl_outw(0x0600, 0xa40501d4);

/* enable USB1 port */
ctrl_outw(0x0600, 0xa4050192);

/* enable IRQ 0,1,2 */
gpio_request(GPIO_FN_INTC_IRQ0, NULL);
gpio_request(GPIO_FN_INTC_IRQ1, NULL);
Expand Down

0 comments on commit 88ad91b

Please sign in to comment.