aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-15 02:08:18 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-06-16 02:05:42 -0400
commitfb2e73947461d55a3166f94a8a545b78d6635262 (patch)
treef7fb4daa21566ee05cff81fb8e66e570dfb7adac
parent201fbceb258650157fcc4fd746abcdd3a571eada (diff)
sh: ecovec: Add renesas_usbhs support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 3a32741cc0ac..513cb1a2e6c8 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -20,6 +20,7 @@
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/usb/r8a66597.h> 22#include <linux/usb/r8a66597.h>
23#include <linux/usb/renesas_usbhs.h>
23#include <linux/i2c.h> 24#include <linux/i2c.h>
24#include <linux/i2c/tsc2007.h> 25#include <linux/i2c/tsc2007.h>
25#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
@@ -232,6 +233,52 @@ static struct platform_device usb1_common_device = {
232 .resource = usb1_common_resources, 233 .resource = usb1_common_resources,
233}; 234};
234 235
236/*
237 * USBHS
238 */
239static int usbhs_get_id(struct platform_device *pdev)
240{
241 return gpio_get_value(GPIO_PTB3);
242}
243
244static struct renesas_usbhs_platform_info usbhs_info = {
245 .platform_callback = {
246 .get_id = usbhs_get_id,
247 },
248 .driver_param = {
249 .buswait_bwait = 4,
250 .detection_delay = 5,
251 },
252};
253
254static struct resource usbhs_resources[] = {
255 [0] = {
256 .start = 0xa4d90000,
257 .end = 0xa4d90124 - 1,
258 .flags = IORESOURCE_MEM,
259 },
260 [1] = {
261 .start = 66,
262 .end = 66,
263 .flags = IORESOURCE_IRQ,
264 },
265};
266
267static struct platform_device usbhs_device = {
268 .name = "renesas_usbhs",
269 .id = 1,
270 .dev = {
271 .dma_mask = NULL, /* not use dma */
272 .coherent_dma_mask = 0xffffffff,
273 .platform_data = &usbhs_info,
274 },
275 .num_resources = ARRAY_SIZE(usbhs_resources),
276 .resource = usbhs_resources,
277 .archdata = {
278 .hwblk_id = HWBLK_USB1,
279 },
280};
281
235/* LCDC */ 282/* LCDC */
236const static struct fb_videomode ecovec_lcd_modes[] = { 283const static struct fb_videomode ecovec_lcd_modes[] = {
237 { 284 {
@@ -897,6 +944,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
897 &sh_eth_device, 944 &sh_eth_device,
898 &usb0_host_device, 945 &usb0_host_device,
899 &usb1_common_device, 946 &usb1_common_device,
947 &usbhs_device,
900 &lcdc_device, 948 &lcdc_device,
901 &ceu0_device, 949 &ceu0_device,
902 &ceu1_device, 950 &ceu1_device,