ARM: vt8500: Add support for UHCI companion controller
Subsystems (5)
PATCH v3 2/2 ARM: vt8500: Add support for UHCI companion controller
Add support for a generic non-pci UHCI companion controller. Existing board files for arch-vt8500 updated to include UHCI support.
Signed-off-by Tony Prisk <[email protected]>
---
V3:
Added the missing commits for the board files.
arch/arm/mach-vt8500/bv07.c | 1 + arch/arm/mach-vt8500/devices-vt8500.c | 5 + arch/arm/mach-vt8500/devices-wm8505.c | 4 + arch/arm/mach-vt8500/devices.c | 11 +++ arch/arm/mach-vt8500/devices.h | 1 + arch/arm/mach-vt8500/wm8505_7in.c | 1 + drivers/usb/host/Kconfig | 12 ++- drivers/usb/host/uhci-hcd.c | 5 + drivers/usb/host/uhci-platform.c | 157 +++++++++++++++++++++++++++++++++ 9 files changed, 195 insertions(+), 2 deletions(-) create mode 100644 drivers/usb/host/uhci-platform.c
arch/arm/mach-vt8500/bv07.c +1 -0
@@ -32,6 +32,7 @@ static struct platform_device *devices[] __initdata = { &vt8500_device_uart0, &vt8500_device_lcdc, &vt8500_device_ehci, + &vt8500_device_uhci, &vt8500_device_ge_rops, &vt8500_device_pwm, &vt8500_device_pwmbl,
arch/arm/mach-vt8500/devices-vt8500.c +5 -0
@@ -48,6 +48,11 @@ void __init vt8500_set_resources(void) tmp[1 ] =wmt_irq_res (IRQ_EHCI );wmt_res_add (&vt8500_device_ehci, tmp,2 ); +/* vt8500 uses a single IRQ for both EHCI and UHCI controllers */ + tmp[0 ] =wmt_mmio_res (VT8500_UHCI_BASE ,SZ_512 ); + tmp[1 ] =wmt_irq_res (IRQ_EHCI ); +wmt_res_add (&vt8500_device_uhci, tmp,2 ); + tmp[0 ] =wmt_mmio_res (VT8500_GEGEA_BASE ,SZ_256 );wmt_res_add (&vt8500_device_ge_rops, tmp,1 );
arch/arm/mach-vt8500/devices-wm8505.c +4 -0
@@ -55,6 +55,10 @@ void __init wm8505_set_resources(void) tmp[1 ] =wmt_irq_res (IRQ_EHCI );wmt_res_add (&vt8500_device_ehci, tmp,2 ); + tmp[0 ] =wmt_mmio_res (WM8505_UHCI_BASE ,SZ_512 ); + tmp[1 ] =wmt_irq_res (IRQ_UHCI ); +wmt_res_add (&vt8500_device_uhci, tmp,2 ); + tmp[0 ] =wmt_mmio_res (WM8505_GEGEA_BASE ,SZ_256 );wmt_res_add (&vt8500_device_ge_rops, tmp,1 );
arch/arm/mach-vt8500/devices.c +11 -0
@@ -204,6 +204,17 @@ struct platform_device vt8500_device_ehci = { }, }; +static u64 uhci_dma_mask =DMA_BIT_MASK (32 ); + +struct platform_device vt8500_device_uhci = { + .name ="platform-uhci" , + .id =0 , + .dev = { + .dma_mask = &uhci_dma_mask, + .coherent_dma_mask =DMA_BIT_MASK (32 ), + }, +}; +struct platform_device vt8500_device_ge_rops = { .name ="wmt_ge_rops" , .id =-1 ,
arch/arm/mach-vt8500/devices.h +1 -0
@@ -81,6 +81,7 @@ extern struct platform_device vt8500_device_uart5;extern struct platform_device vt8500_device_lcdc;extern struct platform_device vt8500_device_wm8505_fb;extern struct platform_device vt8500_device_ehci; +extern struct platform_device vt8500_device_uhci;extern struct platform_device vt8500_device_ge_rops;extern struct platform_device vt8500_device_pwm;extern struct platform_device vt8500_device_pwmbl;
arch/arm/mach-vt8500/wm8505_7in.c +1 -0
@@ -31,6 +31,7 @@ static void __iomem *pmc_hiber;static struct platform_device *devices[]__initdata = { &vt8500_device_uart0, &vt8500_device_ehci, + &vt8500_device_uhci, &vt8500_device_wm8505_fb, &vt8500_device_ge_rops, &vt8500_device_pwm,
drivers/usb/host/Kconfig +10 -2
@@ -450,7 +450,7 @@ config USB_OHCI_LITTLE_ENDIAN config USB_UHCI_HCD tristate "UHCI HCD (most Intel and VIA) support" - depends on USB && (PCI || SPARC_LEON) + depends on USB && (PCI || SPARC_LEON || ARCH_VT8500) ---help--- The Universal Host Controller Interface is a standard by Intel for accessing the USB hardware in the PC (which is also called the USB
@@ -468,7 +468,15 @@ config USB_UHCI_HCD config USB_UHCI_SUPPORT_NON_PCI_HC bool depends on USB_UHCI_HCD - default y if SPARC_LEON + default y if (SPARC_LEON || ARCH_VT8500) + +config USB_UHCI_PLATFORM + bool "Generic UHCI Platform Driver support" + depends on USB_UHCI_SUPPORT_NON_PCI_HC + default y if ARCH_VT8500 + ---help--- + Enable support for generic UHCI platform devices that require no + additional configuration. config USB_UHCI_BIG_ENDIAN_MMIO bool
drivers/usb/host/uhci-hcd.c +5 -0
@@ -846,6 +846,11 @@ static const char hcd_name[] = "uhci_hcd";#define PLATFORM_DRIVER uhci_grlib_driver#endif +#ifdef CONFIG_USB_UHCI_PLATFORM +#include "uhci-platform.c" +#define PLATFORM_DRIVER uhci_platform_driver +#endif +#if !defined(PCI_DRIVER ) && !defined(PLATFORM_DRIVER )#error "missing bus glue for uhci-hcd"#endif
drivers/usb/host/uhci-platform.c new file +157 -0
157 lines not on this page · raw message
Signature · 1 line
1.7.2.5