Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: ecovec: Add renesas_usbhs support

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Kuninori Morimoto and committed by
Paul Mundt
fb2e7394 201fbceb

+48
+48
arch/sh/boards/mach-ecovec24/setup.c
··· 20 20 #include <linux/io.h> 21 21 #include <linux/delay.h> 22 22 #include <linux/usb/r8a66597.h> 23 + #include <linux/usb/renesas_usbhs.h> 23 24 #include <linux/i2c.h> 24 25 #include <linux/i2c/tsc2007.h> 25 26 #include <linux/spi/spi.h> ··· 231 230 }, 232 231 .num_resources = ARRAY_SIZE(usb1_common_resources), 233 232 .resource = usb1_common_resources, 233 + }; 234 + 235 + /* 236 + * USBHS 237 + */ 238 + static int usbhs_get_id(struct platform_device *pdev) 239 + { 240 + return gpio_get_value(GPIO_PTB3); 241 + } 242 + 243 + static struct renesas_usbhs_platform_info usbhs_info = { 244 + .platform_callback = { 245 + .get_id = usbhs_get_id, 246 + }, 247 + .driver_param = { 248 + .buswait_bwait = 4, 249 + .detection_delay = 5, 250 + }, 251 + }; 252 + 253 + static struct resource usbhs_resources[] = { 254 + [0] = { 255 + .start = 0xa4d90000, 256 + .end = 0xa4d90124 - 1, 257 + .flags = IORESOURCE_MEM, 258 + }, 259 + [1] = { 260 + .start = 66, 261 + .end = 66, 262 + .flags = IORESOURCE_IRQ, 263 + }, 264 + }; 265 + 266 + static struct platform_device usbhs_device = { 267 + .name = "renesas_usbhs", 268 + .id = 1, 269 + .dev = { 270 + .dma_mask = NULL, /* not use dma */ 271 + .coherent_dma_mask = 0xffffffff, 272 + .platform_data = &usbhs_info, 273 + }, 274 + .num_resources = ARRAY_SIZE(usbhs_resources), 275 + .resource = usbhs_resources, 276 + .archdata = { 277 + .hwblk_id = HWBLK_USB1, 278 + }, 234 279 }; 235 280 236 281 /* LCDC */ ··· 944 897 &sh_eth_device, 945 898 &usb0_host_device, 946 899 &usb1_common_device, 900 + &usbhs_device, 947 901 &lcdc_device, 948 902 &ceu0_device, 949 903 &ceu1_device,