diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-10-29 04:15:43 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-11-08 03:52:04 -0500 |
commit | ac7c4ea037e376a89a37f4f8f9e315cdff364648 (patch) | |
tree | a8c56aab6cec6944221c663282a11b69a5079a7a /arch | |
parent | 94e1f7fbe0478f00ccbdb22d9b269943e1daeba6 (diff) |
ARM: shmobile: marzen: add USB OHCI driver support
This patch supports CN21/CN22 USB 1.x (port 0/1/2),
and enable input event on defconfig
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/marzen_defconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 57 |
3 files changed, 61 insertions, 2 deletions
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 6540dfba1c1..728a43c446f 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
@@ -61,9 +61,8 @@ CONFIG_SMSC911X=y | |||
61 | # CONFIG_NET_VENDOR_STMICRO is not set | 61 | # CONFIG_NET_VENDOR_STMICRO is not set |
62 | # CONFIG_WLAN is not set | 62 | # CONFIG_WLAN is not set |
63 | # CONFIG_INPUT_MOUSEDEV is not set | 63 | # CONFIG_INPUT_MOUSEDEV is not set |
64 | # CONFIG_INPUT_KEYBOARD is not set | 64 | CONFIG_INPUT_EVDEV=y |
65 | # CONFIG_INPUT_MOUSE is not set | 65 | # CONFIG_INPUT_MOUSE is not set |
66 | # CONFIG_SERIO is not set | ||
67 | # CONFIG_VT is not set | 66 | # CONFIG_VT is not set |
68 | # CONFIG_LEGACY_PTYS is not set | 67 | # CONFIG_LEGACY_PTYS is not set |
69 | # CONFIG_DEVKMEM is not set | 68 | # CONFIG_DEVKMEM is not set |
@@ -86,6 +85,8 @@ CONFIG_MMC=y | |||
86 | CONFIG_MMC_SDHI=y | 85 | CONFIG_MMC_SDHI=y |
87 | CONFIG_USB=y | 86 | CONFIG_USB=y |
88 | CONFIG_USB_EHCI_HCD=y | 87 | CONFIG_USB_EHCI_HCD=y |
88 | CONFIG_USB_OHCI_HCD=y | ||
89 | CONFIG_USB_OHCI_HCD_PLATFORM=y | ||
89 | CONFIG_USB_EHCI_HCD_PLATFORM=y | 90 | CONFIG_USB_EHCI_HCD_PLATFORM=y |
90 | CONFIG_USB_STORAGE=y | 91 | CONFIG_USB_STORAGE=y |
91 | CONFIG_UIO=y | 92 | CONFIG_UIO=y |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 4eae11cdf10..9255546e7bf 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -30,6 +30,7 @@ config ARCH_R8A7779 | |||
30 | select CPU_V7 | 30 | select CPU_V7 |
31 | select SH_CLK_CPG | 31 | select SH_CLK_CPG |
32 | select USB_ARCH_HAS_EHCI | 32 | select USB_ARCH_HAS_EHCI |
33 | select USB_ARCH_HAS_OHCI | ||
33 | 34 | ||
34 | config ARCH_EMEV2 | 35 | config ARCH_EMEV2 |
35 | bool "Emma Mobile EV2" | 36 | bool "Emma Mobile EV2" |
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index 707b3bdaee8..449f9289567 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/mfd/tmio.h> | 36 | #include <linux/mfd/tmio.h> |
37 | #include <linux/usb/otg.h> | 37 | #include <linux/usb/otg.h> |
38 | #include <linux/usb/ehci_pdriver.h> | 38 | #include <linux/usb/ehci_pdriver.h> |
39 | #include <linux/usb/ohci_pdriver.h> | ||
39 | #include <linux/pm_runtime.h> | 40 | #include <linux/pm_runtime.h> |
40 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
41 | #include <mach/r8a7779.h> | 42 | #include <mach/r8a7779.h> |
@@ -255,9 +256,65 @@ static struct platform_device ehci1_device = { | |||
255 | .resource = ehci1_resources, | 256 | .resource = ehci1_resources, |
256 | }; | 257 | }; |
257 | 258 | ||
259 | static struct usb_ohci_pdata ohcix_pdata = { | ||
260 | .power_on = usb_power_on, | ||
261 | .power_off = usb_power_off, | ||
262 | .power_suspend = usb_power_off, | ||
263 | }; | ||
264 | |||
265 | static struct resource ohci0_resources[] = { | ||
266 | [0] = { | ||
267 | .start = 0xffe70400, | ||
268 | .end = 0xffe70800 - 1, | ||
269 | .flags = IORESOURCE_MEM, | ||
270 | }, | ||
271 | [1] = { | ||
272 | .start = gic_spi(44), | ||
273 | .flags = IORESOURCE_IRQ, | ||
274 | }, | ||
275 | }; | ||
276 | |||
277 | static struct platform_device ohci0_device = { | ||
278 | .name = "ohci-platform", | ||
279 | .id = 0, | ||
280 | .dev = { | ||
281 | .dma_mask = &ohci0_device.dev.coherent_dma_mask, | ||
282 | .coherent_dma_mask = 0xffffffff, | ||
283 | .platform_data = &ohcix_pdata, | ||
284 | }, | ||
285 | .num_resources = ARRAY_SIZE(ohci0_resources), | ||
286 | .resource = ohci0_resources, | ||
287 | }; | ||
288 | |||
289 | static struct resource ohci1_resources[] = { | ||
290 | [0] = { | ||
291 | .start = 0xfff70400, | ||
292 | .end = 0xfff70800 - 1, | ||
293 | .flags = IORESOURCE_MEM, | ||
294 | }, | ||
295 | [1] = { | ||
296 | .start = gic_spi(45), | ||
297 | .flags = IORESOURCE_IRQ, | ||
298 | }, | ||
299 | }; | ||
300 | |||
301 | static struct platform_device ohci1_device = { | ||
302 | .name = "ohci-platform", | ||
303 | .id = 1, | ||
304 | .dev = { | ||
305 | .dma_mask = &ohci1_device.dev.coherent_dma_mask, | ||
306 | .coherent_dma_mask = 0xffffffff, | ||
307 | .platform_data = &ohcix_pdata, | ||
308 | }, | ||
309 | .num_resources = ARRAY_SIZE(ohci1_resources), | ||
310 | .resource = ohci1_resources, | ||
311 | }; | ||
312 | |||
258 | static struct platform_device *marzen_late_devices[] __initdata = { | 313 | static struct platform_device *marzen_late_devices[] __initdata = { |
259 | &ehci0_device, | 314 | &ehci0_device, |
260 | &ehci1_device, | 315 | &ehci1_device, |
316 | &ohci0_device, | ||
317 | &ohci1_device, | ||
261 | }; | 318 | }; |
262 | 319 | ||
263 | void __init marzen_init_late(void) | 320 | void __init marzen_init_late(void) |