diff options
author | Shimoda, Yoshihiro <yoshihiro.shimoda.uh@renesas.com> | 2012-01-05 00:08:12 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-01-08 21:13:37 -0500 |
commit | 7afb4e9a92e42e66124b7043405bbca82680aa96 (patch) | |
tree | a769e0122c0a145cfde72ce03ccb7c1f6b5307cd /arch | |
parent | 1760e371a9038329190f0fdd051776ae76aca083 (diff) |
sh: add platform_device for renesas_usbhs in board-sh7757lcr
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/boards/board-sh7757lcr.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c index 895e337c79b6..0838154dd216 100644 --- a/arch/sh/boards/board-sh7757lcr.c +++ b/arch/sh/boards/board-sh7757lcr.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mmc/sh_mmcif.h> | 19 | #include <linux/mmc/sh_mmcif.h> |
20 | #include <linux/mmc/sh_mobile_sdhi.h> | 20 | #include <linux/mmc/sh_mobile_sdhi.h> |
21 | #include <linux/sh_eth.h> | 21 | #include <linux/sh_eth.h> |
22 | #include <linux/usb/renesas_usbhs.h> | ||
22 | #include <cpu/sh7757.h> | 23 | #include <cpu/sh7757.h> |
23 | #include <asm/heartbeat.h> | 24 | #include <asm/heartbeat.h> |
24 | 25 | ||
@@ -264,6 +265,43 @@ static struct platform_device sdhi_device = { | |||
264 | }, | 265 | }, |
265 | }; | 266 | }; |
266 | 267 | ||
268 | static int usbhs0_get_id(struct platform_device *pdev) | ||
269 | { | ||
270 | return USBHS_GADGET; | ||
271 | } | ||
272 | |||
273 | static struct renesas_usbhs_platform_info usb0_data = { | ||
274 | .platform_callback = { | ||
275 | .get_id = usbhs0_get_id, | ||
276 | }, | ||
277 | .driver_param = { | ||
278 | .buswait_bwait = 5, | ||
279 | } | ||
280 | }; | ||
281 | |||
282 | static struct resource usb0_resources[] = { | ||
283 | [0] = { | ||
284 | .start = 0xfe450000, | ||
285 | .end = 0xfe4501ff, | ||
286 | .flags = IORESOURCE_MEM, | ||
287 | }, | ||
288 | [1] = { | ||
289 | .start = 50, | ||
290 | .end = 50, | ||
291 | .flags = IORESOURCE_IRQ, | ||
292 | }, | ||
293 | }; | ||
294 | |||
295 | static struct platform_device usb0_device = { | ||
296 | .name = "renesas_usbhs", | ||
297 | .id = 0, | ||
298 | .dev = { | ||
299 | .platform_data = &usb0_data, | ||
300 | }, | ||
301 | .num_resources = ARRAY_SIZE(usb0_resources), | ||
302 | .resource = usb0_resources, | ||
303 | }; | ||
304 | |||
267 | static struct platform_device *sh7757lcr_devices[] __initdata = { | 305 | static struct platform_device *sh7757lcr_devices[] __initdata = { |
268 | &heartbeat_device, | 306 | &heartbeat_device, |
269 | &sh7757_eth0_device, | 307 | &sh7757_eth0_device, |
@@ -272,6 +310,7 @@ static struct platform_device *sh7757lcr_devices[] __initdata = { | |||
272 | &sh7757_eth_giga1_device, | 310 | &sh7757_eth_giga1_device, |
273 | &sh_mmcif_device, | 311 | &sh_mmcif_device, |
274 | &sdhi_device, | 312 | &sdhi_device, |
313 | &usb0_device, | ||
275 | }; | 314 | }; |
276 | 315 | ||
277 | static struct flash_platform_data spi_flash_data = { | 316 | static struct flash_platform_data spi_flash_data = { |