[U-Boot] [PATCH v4 02/13] usb: use linux/usb/ch9.h instead of usbdescriptors.h
Linux usb/ch9.h seems to have all the same information (and more) as usbdescriptors.h so use the former instead of the later one. As a consequense of this change USB_SPEED_* values don't correspond directly to EHCI speed encoding anymore, I've added necessary recoding in EHCI driver. Also there is no point to put speed into pipe anymore so it's removed and a bunch of host drivers fixed to look at usb_device-speed instead. Old usbdescriptors.h included is not removed as it seems to be used by old USB device code. This makes usb.h and usbdevice.h incompatible. Fortunately the only place that tries to include both are the old MUSB code and it needs usb.h only for USB_DMA_MINALIGN used in aligned attribute on musb_regs structure but this attribute seems to be unneeded (old MUSB code doesn't support any DMA at all). Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com --- Changes in v4: - fix indent Changes in v3: - fix old MUSB code compilation arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c |2 +- arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c |2 +- arch/powerpc/cpu/mpc5xxx/usb_ohci.c |2 +- arch/powerpc/cpu/ppc4xx/usb_ohci.c|2 +- common/cmd_usb.c |2 +- common/usb.c |4 ++-- drivers/usb/host/ehci-hcd.c | 16 ++-- drivers/usb/host/isp116x-hcd.c|2 +- drivers/usb/host/ohci-hcd.c |2 +- drivers/usb/host/sl811-hcd.c |2 +- drivers/usb/musb/musb_core.h |3 +-- drivers/usb/musb/musb_hcd.c |5 +++-- include/usb.h | 15 +++ include/usb_defs.h|6 -- 14 files changed, 31 insertions(+), 34 deletions(-) diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c index 944bb32..3bca66a 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c @@ -620,7 +620,7 @@ static struct ed *ep_add_ed(struct usb_device *usb_dev, unsigned long pipe) | (usb_pipeisoc(pipe) ? 0x8000 : 0) | (usb_pipecontrol(pipe) ? 0 : (usb_pipeout(pipe) ? 0x800 : 0x1000)) - | usb_pipeslow(pipe) 13 | + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket(usb_dev, pipe) 16); return ed_ret; diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c index c747767..b9b0998 100644 --- a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c +++ b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c @@ -615,7 +615,7 @@ static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe) | usb_pipeendpoint (pipe) 7 | (usb_pipeisoc (pipe)? 0x8000: 0) | (usb_pipecontrol (pipe)? 0: (usb_pipeout (pipe)? 0x800: 0x1000)) - | usb_pipeslow (pipe) 13 + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket (usb_dev, pipe) 16); return ed_ret; diff --git a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c index 607034b..de07343 100644 --- a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c +++ b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c @@ -618,7 +618,7 @@ static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe) | usb_pipeendpoint (pipe) 7 | (usb_pipeisoc (pipe)? 0x8000: 0) | (usb_pipecontrol (pipe)? 0: (usb_pipeout (pipe)? 0x800: 0x1000)) - | usb_pipeslow (pipe) 13 + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket (usb_dev, pipe) 16); return ed_ret; diff --git a/arch/powerpc/cpu/ppc4xx/usb_ohci.c b/arch/powerpc/cpu/ppc4xx/usb_ohci.c index 4ce2726..f820c37 100644 --- a/arch/powerpc/cpu/ppc4xx/usb_ohci.c +++ b/arch/powerpc/cpu/ppc4xx/usb_ohci.c @@ -621,7 +621,7 @@ static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe) | usb_pipeendpoint (pipe) 7 | (usb_pipeisoc (pipe)? 0x8000: 0) | (usb_pipecontrol (pipe)? 0: (usb_pipeout (pipe)? 0x800: 0x1000)) - | usb_pipeslow (pipe) 13 + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket (usb_dev, pipe) 16); return ed_ret; diff --git a/common/cmd_usb.c b/common/cmd_usb.c index c128455..8be9952 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -192,7 +192,7 @@ void usb_display_desc(struct usb_device *dev) } -void usb_display_conf_desc(struct usb_configuration_descriptor *config,
[U-Boot] [PATCH v4 02/13] usb: use linux/usb/ch9.h instead of usbdescriptors.h
Linux usb/ch9.h seems to have all the same information (and more) as usbdescriptors.h so use the former instead of the later one. As a consequense of this change USB_SPEED_* values don't correspond directly to EHCI speed encoding anymore, I've added necessary recoding in EHCI driver. Also there is no point to put speed into pipe anymore so it's removed and a bunch of host drivers fixed to look at usb_device-speed instead. Old usbdescriptors.h included is not removed as it seems to be used by old USB device code. This makes usb.h and usbdevice.h incompatible. Fortunately the only place that tries to include both are the old MUSB code and it needs usb.h only for USB_DMA_MINALIGN used in aligned attribute on musb_regs structure but this attribute seems to be unneeded (old MUSB code doesn't support any DMA at all). Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com --- Changes in v4: - fix indent Changes in v3: - fix old MUSB code compilation arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c |2 +- arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c |2 +- arch/powerpc/cpu/mpc5xxx/usb_ohci.c |2 +- arch/powerpc/cpu/ppc4xx/usb_ohci.c|2 +- common/cmd_usb.c |2 +- common/usb.c |4 ++-- drivers/usb/host/ehci-hcd.c | 16 ++-- drivers/usb/host/isp116x-hcd.c|2 +- drivers/usb/host/ohci-hcd.c |2 +- drivers/usb/host/sl811-hcd.c |2 +- drivers/usb/musb/musb_core.h |3 +-- drivers/usb/musb/musb_hcd.c |5 +++-- include/usb.h | 15 +++ include/usb_defs.h|6 -- 14 files changed, 31 insertions(+), 34 deletions(-) diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c index 944bb32..3bca66a 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c @@ -620,7 +620,7 @@ static struct ed *ep_add_ed(struct usb_device *usb_dev, unsigned long pipe) | (usb_pipeisoc(pipe) ? 0x8000 : 0) | (usb_pipecontrol(pipe) ? 0 : (usb_pipeout(pipe) ? 0x800 : 0x1000)) - | usb_pipeslow(pipe) 13 | + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket(usb_dev, pipe) 16); return ed_ret; diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c index c747767..b9b0998 100644 --- a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c +++ b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c @@ -615,7 +615,7 @@ static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe) | usb_pipeendpoint (pipe) 7 | (usb_pipeisoc (pipe)? 0x8000: 0) | (usb_pipecontrol (pipe)? 0: (usb_pipeout (pipe)? 0x800: 0x1000)) - | usb_pipeslow (pipe) 13 + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket (usb_dev, pipe) 16); return ed_ret; diff --git a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c index 607034b..de07343 100644 --- a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c +++ b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c @@ -618,7 +618,7 @@ static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe) | usb_pipeendpoint (pipe) 7 | (usb_pipeisoc (pipe)? 0x8000: 0) | (usb_pipecontrol (pipe)? 0: (usb_pipeout (pipe)? 0x800: 0x1000)) - | usb_pipeslow (pipe) 13 + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket (usb_dev, pipe) 16); return ed_ret; diff --git a/arch/powerpc/cpu/ppc4xx/usb_ohci.c b/arch/powerpc/cpu/ppc4xx/usb_ohci.c index 4ce2726..f820c37 100644 --- a/arch/powerpc/cpu/ppc4xx/usb_ohci.c +++ b/arch/powerpc/cpu/ppc4xx/usb_ohci.c @@ -621,7 +621,7 @@ static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe) | usb_pipeendpoint (pipe) 7 | (usb_pipeisoc (pipe)? 0x8000: 0) | (usb_pipecontrol (pipe)? 0: (usb_pipeout (pipe)? 0x800: 0x1000)) - | usb_pipeslow (pipe) 13 + | (usb_dev-speed == USB_SPEED_LOW) 13 | usb_maxpacket (usb_dev, pipe) 16); return ed_ret; diff --git a/common/cmd_usb.c b/common/cmd_usb.c index c128455..8be9952 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -192,7 +192,7 @@ void usb_display_desc(struct usb_device *dev) } -void usb_display_conf_desc(struct usb_configuration_descriptor *config,