From: Albert H. <he...@us...> - 2009-12-09 18:45:04
|
Update of /cvsroot/gc-linux/linux/drivers/usb/host In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22540/drivers/usb/host Modified Files: Kconfig Makefile ehci-hcd.c ehci.h ohci-hcd.c ohci-q.c ohci.h Log Message: Merge v2.6.32. Index: ohci-q.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/ohci-q.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ohci-q.c 9 Dec 2009 18:40:10 -0000 1.6 --- ohci-q.c 9 Dec 2009 18:44:55 -0000 1.7 *************** *** 619,622 **** --- 619,625 ---- /* FALLTHROUGH */ case PIPE_BULK: + if (ohci->flags & OHCI_QUIRK_WII) + ohci_hlwd_bulk_quirk(ohci); + info = is_out ? TD_T_TOGGLE | TD_CC | TD_DP_OUT *************** *** 650,653 **** --- 653,659 ---- */ case PIPE_CONTROL: + if (ohci->flags & OHCI_QUIRK_WII) + ohci_hlwd_control_quirk(ohci); + info = TD_CC | TD_DP_SETUP | TD_T_DATA0; td_fill (ohci, info, urb->setup_dma, 8, urb, cnt++); Index: ehci.h =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/ehci.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ehci.h 9 Dec 2009 18:40:10 -0000 1.7 --- ehci.h 9 Dec 2009 18:44:55 -0000 1.8 *************** *** 600,603 **** --- 600,621 ---- #endif + #ifdef CONFIG_USB_EHCI_HCD_HLWD + + #include <asm/starlet-mini.h> + + static inline unsigned int ehci_readl(const struct ehci_hcd *ehci, + __u32 __iomem *regs) + { + return in_be32(regs); + } + + static inline void ehci_writel(const struct ehci_hcd *ehci, + const unsigned int val, __u32 __iomem *regs) + { + out_be32(regs, val); + } + + #else + /* * Big-endian read/write functions are arch-specific. *************** *** 633,636 **** --- 651,656 ---- } + #endif /* CONFIG_USB_EHCI_HCD_HLWD */ + /* * On certain ppc-44x SoC there is a HW issue, that could only worked around with Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/Kconfig,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Kconfig 9 Dec 2009 18:40:10 -0000 1.14 --- Kconfig 9 Dec 2009 18:44:55 -0000 1.15 *************** *** 114,117 **** --- 114,125 ---- OpenFirmware platform bus. + config USB_EHCI_HCD_HLWD + bool "Nintendo Wii (Hollywood) EHCI USB controller support" + depends on USB_EHCI_HCD && STARLET_MINI + default y + ---help--- + Say Y here to support the EHCI USB controller found in the + Hollywood chipset of the Nintendo Wii video game console. + config USB_W90X900_EHCI bool "W90X900(W90P910) EHCI support" *************** *** 222,225 **** --- 230,242 ---- default USB_OHCI_HCD_PPC_OF_BE || USB_OHCI_HCD_PPC_OF_LE + config USB_OHCI_HCD_HLWD + bool "Nintendo Wii (Hollywood) OHCI USB controller support" + depends on USB_OHCI_HCD && STARLET_MINI + select USB_OHCI_LITTLE_ENDIAN + default y + ---help--- + Say Y here to support the OHCI USB controller found in the + Hollywood chipset of the Nintendo Wii video game console. + config USB_OHCI_HCD_PCI bool "OHCI support for PCI-bus USB controllers" *************** *** 355,358 **** --- 372,394 ---- module will be called r8a66597-hcd. + config USB_WII_HCD + tristate "Nintendo Wii HCD support" + depends on USB && STARLET_IOS && !HIGHMEM && EXPERIMENTAL + help + The Nintendo Wii includes a USB 1.1 host controller that can be + accessed through the API provided by the starlet subsystem. + + Enable this option if you plan to use the internal Nintendo Wii + bluetooth dongle or any USB peripheral connected to the external + ports. + + USB devices using isochronous transfers are not supported. + Use of USB hubs is partially supported. + + Use completely at you own risk. If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called rvl-sthcd. + config USB_WHCI_HCD tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)" Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile 9 Dec 2009 18:40:10 -0000 1.11 --- Makefile 9 Dec 2009 18:44:55 -0000 1.12 *************** *** 32,34 **** --- 32,35 ---- obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o obj-$(CONFIG_USB_ISP1760_HCD) += isp1760.o + obj-$(CONFIG_USB_WII_HCD) += rvl-sthcd.o obj-$(CONFIG_USB_HWA_HCD) += hwa-hc.o Index: ohci.h =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/ohci.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ohci.h 9 Dec 2009 18:40:10 -0000 1.6 --- ohci.h 9 Dec 2009 18:44:55 -0000 1.7 *************** *** 17,20 **** --- 17,42 ---- /* + * Some platforms have weird constraints when accessing memory. + * + * For example, the Nintendo Wii video game console is unable to perform + * non-32 bit writes to non-cached memory for its second block of 64MB of RAM. + * As this platform also requires CONFIG_NOT_COHERENT_CACHE, all memory + * allocated using the dma memory allocation functions can only be written + * using 32-bit accesses. + * + * Because of this constraint, as a workaround, we make sure that all + * fields in struct ed and td (which are allocated from dma pools) are + * always 32 bit fields. + * Note that the remaining structs allocated from dma-able memory are already + * 32 bit fields. + */ + #ifdef CONFIG_USB_OHCI_HCD_HLWD + #define ohci_fld(type) u32 + #else + #define ohci_fld(type) type + #endif + + + /* * OHCI Endpoint Descriptor (ED) ... holds TD queue * See OHCI spec, section 4.2 *************** *** 52,70 **** * usually: OPER --> UNLINK --> (IDLE | OPER) --> ... */ ! u8 state; /* ED_{IDLE,UNLINK,OPER} */ #define ED_IDLE 0x00 /* NOT linked to HC */ #define ED_UNLINK 0x01 /* being unlinked from hc */ #define ED_OPER 0x02 /* IS linked to hc */ ! u8 type; /* PIPE_{BULK,...} */ /* periodic scheduling params (for intr and iso) */ ! u8 branch; ! u16 interval; ! u16 load; ! u16 last_iso; /* iso only */ /* HC may see EDs on rm_list until next frame (frame_no == tick) */ ! u16 tick; } __attribute__ ((aligned(16))); --- 74,92 ---- * usually: OPER --> UNLINK --> (IDLE | OPER) --> ... */ ! ohci_fld(u8) state; /* ED_{IDLE,UNLINK,OPER} */ #define ED_IDLE 0x00 /* NOT linked to HC */ #define ED_UNLINK 0x01 /* being unlinked from hc */ #define ED_OPER 0x02 /* IS linked to hc */ ! ohci_fld(u8) type; /* PIPE_{BULK,...} */ /* periodic scheduling params (for intr and iso) */ ! ohci_fld(u8) branch; ! ohci_fld(u16) interval; ! ohci_fld(u16) load; ! ohci_fld(u16) last_iso; /* iso only */ /* HC may see EDs on rm_list until next frame (frame_no == tick) */ ! ohci_fld(u16) tick; } __attribute__ ((aligned(16))); *************** *** 119,123 **** /* rest are purely for the driver's use */ ! __u8 index; struct ed *ed; struct td *td_hash; /* dma-->td hashtable */ --- 141,145 ---- /* rest are purely for the driver's use */ ! ohci_fld(__u8) index; struct ed *ed; struct td *td_hash; /* dma-->td hashtable */ *************** *** 404,407 **** --- 426,430 ---- #define OHCI_QUIRK_AMD_ISO 0x200 /* ISO transfers*/ #define OHCI_QUIRK_AMD_PREFETCH 0x400 /* pre-fetch for ISO transfer */ + #define OHCI_QUIRK_WII 0x800 /* Hollywood chipset */ // there are also chip quirks/bugs in init logic *************** *** 546,549 **** --- 569,603 ---- #endif + #ifdef CONFIG_USB_OHCI_HCD_HLWD + + #include <asm/starlet-mini.h> + + static inline unsigned int _ohci_readl(const struct ohci_hcd *ohci, + __hc32 __iomem *regs) + { + return in_be32(regs); + } + + static inline void _ohci_writel(const struct ohci_hcd *ohci, + const unsigned int val, __hc32 __iomem *regs) + { + out_be32(regs, val); + } + + extern void ohci_hlwd_control_quirk(struct ohci_hcd *ohci); + extern void ohci_hlwd_bulk_quirk(struct ohci_hcd *ohci); + + #else + + static inline void ohci_hlwd_control_quirk(struct ohci_hcd *ohci) + { + return; + } + + static inline void ohci_hlwd_bulk_quirk(struct ohci_hcd *ohci) + { + return; + } + /* * Big-endian read/write functions are arch-specific. *************** *** 575,578 **** --- 629,634 ---- } + #endif /* CONFIG_USB_OHCI_HCD_HLWD */ + #ifdef CONFIG_ARCH_LH7A404 /* Marc Singer: at the time this code was written, the LH7A404 Index: ohci-hcd.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/ohci-hcd.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ohci-hcd.c 9 Dec 2009 18:40:10 -0000 1.7 --- ohci-hcd.c 9 Dec 2009 18:44:55 -0000 1.8 *************** *** 1066,1069 **** --- 1066,1074 ---- #endif + #ifdef CONFIG_USB_OHCI_HCD_HLWD + #include "ohci-hlwd.c" + #define OF_PLATFORM_DRIVER ohci_hcd_hlwd_driver + #endif + #ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" Index: ehci-hcd.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/ehci-hcd.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ehci-hcd.c 9 Dec 2009 18:40:10 -0000 1.7 --- ehci-hcd.c 9 Dec 2009 18:44:55 -0000 1.8 *************** *** 1121,1124 **** --- 1121,1129 ---- #endif + #ifdef CONFIG_USB_EHCI_HCD_HLWD + #include "ehci-hlwd.c" + #define OF_PLATFORM_DRIVER ehci_hcd_hlwd_driver + #endif + #ifdef CONFIG_PLAT_ORION #include "ehci-orion.c" |