EHCI support for the AU1200
Subsystems (4)
PATCH 1/1 EHCI support for the AU1200
This is the re-send and fixed up version of the patch I sent out a few weeks ago, to be applied against latest linux-mips GIT. Unless somebody finds something horrible, I think these are ready to go into Greg's tree and sent on upstream.
Here is the changelog:
* All OTG references are removed and moved to their own patch (which will be forthcoming soon).
* Fixed up some coding issues with the move from PCI, including the mapping of EHCI capability and operations registers (causing the bugs that were posted here).
* Cached the cap register for speed
* Au1200 init and remove routines were in the wrong place
* reboot_notifier was registered twice
Jordan
ALCHEMY: Add EHCI support for AU1200
---
arch/mips/au1000/common/cputable.c | 2 arch/mips/au1000/common/platform.c | 4 drivers/usb/Kconfig | 8 - drivers/usb/host/Kconfig | 2 drivers/usb/host/ehci-au1xxx.c | 299 ++++++++++++++++++++ drivers/usb/host/ehci-hcd.c | 8 - drivers/usb/host/ohci-au1xxx.c | 105 ++++++- include/asm-mips/mach-mips/cpu-feature-overrides.h | 4 8 files changed, 405 insertions(+), 27 deletions(-)
arch/mips/au1000/common/cputable.c +1 -1
@@ -38,7 +38,7 @@ struct cpu_spec cpu_specs[] = { { 0xffffffff, 0x02030204, "Au1100 BE", 0, 1 }, { 0xffffffff, 0x03030200, "Au1550 AA", 0, 1 }, { 0xffffffff, 0x04030200, "Au1200 AB", 0, 0 }, - { 0xffffffff, 0x04030201, "Au1200 AC", 0, 1 }, + { 0xffffffff, 0x04030201, "Au1200 AC", 1, 0 }, { 0x00000000, 0x00000000, "Unknown Au1xxx", 1, 0 }, };
arch/mips/au1000/common/platform.c +1 -3
@@ -20,7 +20,7 @@static struct resource au1xxx_usb_ohci_resources[] = { [0 ] = { .start =USB_OHCI_BASE , - .end =USB_OHCI_BASE +USB_OHCI_LEN , + .end =USB_OHCI_BASE +USB_OHCI_LEN -1 , .flags =IORESOURCE_MEM , }, [1 ] = {
@@ -278,9 +278,7 @@ static struct platform_device *au1xxx_pl &au1100_lcd_device,#endif #ifdef CONFIG_SOC_AU1200 -#if 0 /* fixme */ &au1xxx_usb_ehci_device, -#endif &au1xxx_usb_gdt_device, &au1xxx_usb_otg_device, &au1200_lcd_device,
drivers/usb/Kconfig +7 -1
@@ -9,10 +9,16 @@ menu "USB support" # NOTE: SL-811 option should be board-specific ... config USB_ARCH_HAS_HCD boolean - default y if USB_ARCH_HAS_OHCI + default y if USB_ARCH_HAS_OHCI || USB_ARCH_HAS_EHCI default y if ARM # SL-811 default PCI +# some non-PCI hcds implement EHCI +config USB_ARCH_HAS_EHCI + boolean + default y if SOC_AU1200 + default PCI + # many non-PCI SOC chips embed OHCI config USB_ARCH_HAS_OHCI boolean
drivers/usb/host/Kconfig +1 -1
@@ -6,7 +6,7 @@ comment "USB Host Controller Drivers" config USB_EHCI_HCD tristate "EHCI HCD (USB 2.0) support" - depends on USB && PCI + depends on USB && USB_ARCH_HAS_EHCI ---help--- The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
drivers/usb/host/ehci-au1xxx.c new file +299 -0
299 lines not on this page · raw message
drivers/usb/host/ehci-hcd.c +4 -4
@@ -894,10 +894,10 @@ MODULE_DESCRIPTION (DRIVER_INFO);MODULE_AUTHOR (DRIVER_AUTHOR );MODULE_LICENSE ("GPL" ); -#ifdef CONFIG_PCI +#if defined(CONFIG_SOC_AU1X00 ) +#include "ehci-au1xxx.c" +#elif defined(CONFIG_PCI )#include "ehci-pci.c" -#endif - -#if !defined(CONFIG_PCI ) +#else #error "missing bus glue for ehci-hcd"#endif
drivers/usb/host/ohci-au1xxx.c +88 -17
206 lines not on this page · raw message
include/asm-mips/mach-mips/cpu-feature-overrides.h +4 -0
@@ -29,7 +29,11 @@/* #define cpu_has_prefetch ? */ #define cpu_has_mcheck 1/* #define cpu_has_ejtag ? */ +#ifdef CONFIG_CPU_HAS_LLSC #define cpu_has_llsc 1 +#else +#define cpu_has_llsc 0 +#endif /* #define cpu_has_vtag_icache ? */ /* #define cpu_has_dc_aliases ? */ /* #define cpu_has_ic_fills_f_dc ? */
Quoted 1 line · Jordan Crouse
ALCHEMY: Add EHCI support for AU1200
Unfortunately it doesn't apply to my current tree, and I see that you were reverting some of the updates in current kernel GIT ...
Please let me know if the updated version I'm posting does not behave for you.
- Dave
Quoted 5 lines · David Brownell
Quoted 1 line · Jordan Crouse
ALCHEMY: ?Add EHCI support for AU1200
Unfortunately it doesn't apply to my current tree, and I see that you were reverting some of the updates in current kernel GIT ...
Doh - reverting changes is wicked bad - I must have screwed up the merge somewhere along the line.
Quoted 2 lines
Please let me know if the updated version I'm posting does not behave for you.
Will do.
Jordan
Signature · 4 lines
Jordan Crouse Senior Linux Engineer AMD - Personal Connectivity Solutions Group <www.amd.com/embeddedprocessors>