Commit c0d297946fd2540c8057eb1589429978da888dbb
Exists in
v2017.01-smarct4x
and in
48 other branches
Merge branch 'master' of git://git.denx.de/u-boot-usb
Showing 12 changed files Side-by-side Diff
- arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c
- arch/powerpc/cpu/mpc5xxx/usb_ohci.c
- arch/powerpc/cpu/ppc4xx/usb_ohci.c
- arch/sparc/cpu/leon3/usb_uhci.c
- board/mpl/common/usb_uhci.c
- drivers/usb/host/ehci-hcd.c
- drivers/usb/host/isp116x-hcd.c
- drivers/usb/host/ohci-hcd.c
- drivers/usb/host/ohci-s3c24xx.c
- drivers/usb/host/r8a66597-hcd.c
- drivers/usb/musb/musb_hcd.c
- include/usbroothubdes.h
arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c
... | ... | @@ -839,104 +839,7 @@ |
839 | 839 | * Virtual Root Hub |
840 | 840 | *-------------------------------------------------------------------------*/ |
841 | 841 | |
842 | -/* Device descriptor */ | |
843 | -static __u8 root_hub_dev_des[] = | |
844 | -{ | |
845 | - 0x12, /* __u8 bLength; */ | |
846 | - 0x01, /* __u8 bDescriptorType; Device */ | |
847 | - 0x10, /* __u16 bcdUSB; v1.1 */ | |
848 | - 0x01, | |
849 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
850 | - 0x00, /* __u8 bDeviceSubClass; */ | |
851 | - 0x00, /* __u8 bDeviceProtocol; */ | |
852 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
853 | - 0x00, /* __u16 idVendor; */ | |
854 | - 0x00, | |
855 | - 0x00, /* __u16 idProduct; */ | |
856 | - 0x00, | |
857 | - 0x00, /* __u16 bcdDevice; */ | |
858 | - 0x00, | |
859 | - 0x00, /* __u8 iManufacturer; */ | |
860 | - 0x01, /* __u8 iProduct; */ | |
861 | - 0x00, /* __u8 iSerialNumber; */ | |
862 | - 0x01 /* __u8 bNumConfigurations; */ | |
863 | -}; | |
864 | - | |
865 | - | |
866 | -/* Configuration descriptor */ | |
867 | -static __u8 root_hub_config_des[] = | |
868 | -{ | |
869 | - 0x09, /* __u8 bLength; */ | |
870 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
871 | - 0x19, /* __u16 wTotalLength; */ | |
872 | - 0x00, | |
873 | - 0x01, /* __u8 bNumInterfaces; */ | |
874 | - 0x01, /* __u8 bConfigurationValue; */ | |
875 | - 0x00, /* __u8 iConfiguration; */ | |
876 | - 0x40, /* __u8 bmAttributes; | |
877 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
878 | - 0x00, /* __u8 MaxPower; */ | |
879 | - | |
880 | - /* interface */ | |
881 | - 0x09, /* __u8 if_bLength; */ | |
882 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
883 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
884 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
885 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
886 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
887 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
888 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
889 | - 0x00, /* __u8 if_iInterface; */ | |
890 | - | |
891 | - /* endpoint */ | |
892 | - 0x07, /* __u8 ep_bLength; */ | |
893 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
894 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
895 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
896 | - 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
897 | - 0x00, | |
898 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
899 | -}; | |
900 | - | |
901 | -static unsigned char root_hub_str_index0[] = | |
902 | -{ | |
903 | - 0x04, /* __u8 bLength; */ | |
904 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
905 | - 0x09, /* __u8 lang ID */ | |
906 | - 0x04, /* __u8 lang ID */ | |
907 | -}; | |
908 | - | |
909 | -static unsigned char root_hub_str_index1[] = | |
910 | -{ | |
911 | - 28, /* __u8 bLength; */ | |
912 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
913 | - 'O', /* __u8 Unicode */ | |
914 | - 0, /* __u8 Unicode */ | |
915 | - 'H', /* __u8 Unicode */ | |
916 | - 0, /* __u8 Unicode */ | |
917 | - 'C', /* __u8 Unicode */ | |
918 | - 0, /* __u8 Unicode */ | |
919 | - 'I', /* __u8 Unicode */ | |
920 | - 0, /* __u8 Unicode */ | |
921 | - ' ', /* __u8 Unicode */ | |
922 | - 0, /* __u8 Unicode */ | |
923 | - 'R', /* __u8 Unicode */ | |
924 | - 0, /* __u8 Unicode */ | |
925 | - 'o', /* __u8 Unicode */ | |
926 | - 0, /* __u8 Unicode */ | |
927 | - 'o', /* __u8 Unicode */ | |
928 | - 0, /* __u8 Unicode */ | |
929 | - 't', /* __u8 Unicode */ | |
930 | - 0, /* __u8 Unicode */ | |
931 | - ' ', /* __u8 Unicode */ | |
932 | - 0, /* __u8 Unicode */ | |
933 | - 'H', /* __u8 Unicode */ | |
934 | - 0, /* __u8 Unicode */ | |
935 | - 'u', /* __u8 Unicode */ | |
936 | - 0, /* __u8 Unicode */ | |
937 | - 'b', /* __u8 Unicode */ | |
938 | - 0, /* __u8 Unicode */ | |
939 | -}; | |
842 | +#include <usbroothubdes.h> | |
940 | 843 | |
941 | 844 | /* Hub class-specific descriptor is constructed dynamically */ |
942 | 845 |
arch/powerpc/cpu/mpc5xxx/usb_ohci.c
... | ... | @@ -842,104 +842,7 @@ |
842 | 842 | * Virtual Root Hub |
843 | 843 | *-------------------------------------------------------------------------*/ |
844 | 844 | |
845 | -/* Device descriptor */ | |
846 | -static __u8 root_hub_dev_des[] = | |
847 | -{ | |
848 | - 0x12, /* __u8 bLength; */ | |
849 | - 0x01, /* __u8 bDescriptorType; Device */ | |
850 | - 0x10, /* __u16 bcdUSB; v1.1 */ | |
851 | - 0x01, | |
852 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
853 | - 0x00, /* __u8 bDeviceSubClass; */ | |
854 | - 0x00, /* __u8 bDeviceProtocol; */ | |
855 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
856 | - 0x00, /* __u16 idVendor; */ | |
857 | - 0x00, | |
858 | - 0x00, /* __u16 idProduct; */ | |
859 | - 0x00, | |
860 | - 0x00, /* __u16 bcdDevice; */ | |
861 | - 0x00, | |
862 | - 0x00, /* __u8 iManufacturer; */ | |
863 | - 0x01, /* __u8 iProduct; */ | |
864 | - 0x00, /* __u8 iSerialNumber; */ | |
865 | - 0x01 /* __u8 bNumConfigurations; */ | |
866 | -}; | |
867 | - | |
868 | - | |
869 | -/* Configuration descriptor */ | |
870 | -static __u8 root_hub_config_des[] = | |
871 | -{ | |
872 | - 0x09, /* __u8 bLength; */ | |
873 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
874 | - 0x19, /* __u16 wTotalLength; */ | |
875 | - 0x00, | |
876 | - 0x01, /* __u8 bNumInterfaces; */ | |
877 | - 0x01, /* __u8 bConfigurationValue; */ | |
878 | - 0x00, /* __u8 iConfiguration; */ | |
879 | - 0x40, /* __u8 bmAttributes; | |
880 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
881 | - 0x00, /* __u8 MaxPower; */ | |
882 | - | |
883 | - /* interface */ | |
884 | - 0x09, /* __u8 if_bLength; */ | |
885 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
886 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
887 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
888 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
889 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
890 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
891 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
892 | - 0x00, /* __u8 if_iInterface; */ | |
893 | - | |
894 | - /* endpoint */ | |
895 | - 0x07, /* __u8 ep_bLength; */ | |
896 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
897 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
898 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
899 | - 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
900 | - 0x00, | |
901 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
902 | -}; | |
903 | - | |
904 | -static unsigned char root_hub_str_index0[] = | |
905 | -{ | |
906 | - 0x04, /* __u8 bLength; */ | |
907 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
908 | - 0x09, /* __u8 lang ID */ | |
909 | - 0x04, /* __u8 lang ID */ | |
910 | -}; | |
911 | - | |
912 | -static unsigned char root_hub_str_index1[] = | |
913 | -{ | |
914 | - 28, /* __u8 bLength; */ | |
915 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
916 | - 'O', /* __u8 Unicode */ | |
917 | - 0, /* __u8 Unicode */ | |
918 | - 'H', /* __u8 Unicode */ | |
919 | - 0, /* __u8 Unicode */ | |
920 | - 'C', /* __u8 Unicode */ | |
921 | - 0, /* __u8 Unicode */ | |
922 | - 'I', /* __u8 Unicode */ | |
923 | - 0, /* __u8 Unicode */ | |
924 | - ' ', /* __u8 Unicode */ | |
925 | - 0, /* __u8 Unicode */ | |
926 | - 'R', /* __u8 Unicode */ | |
927 | - 0, /* __u8 Unicode */ | |
928 | - 'o', /* __u8 Unicode */ | |
929 | - 0, /* __u8 Unicode */ | |
930 | - 'o', /* __u8 Unicode */ | |
931 | - 0, /* __u8 Unicode */ | |
932 | - 't', /* __u8 Unicode */ | |
933 | - 0, /* __u8 Unicode */ | |
934 | - ' ', /* __u8 Unicode */ | |
935 | - 0, /* __u8 Unicode */ | |
936 | - 'H', /* __u8 Unicode */ | |
937 | - 0, /* __u8 Unicode */ | |
938 | - 'u', /* __u8 Unicode */ | |
939 | - 0, /* __u8 Unicode */ | |
940 | - 'b', /* __u8 Unicode */ | |
941 | - 0, /* __u8 Unicode */ | |
942 | -}; | |
845 | +#include <usbroothubdes.h> | |
943 | 846 | |
944 | 847 | /* Hub class-specific descriptor is constructed dynamically */ |
945 | 848 |
arch/powerpc/cpu/ppc4xx/usb_ohci.c
... | ... | @@ -847,104 +847,7 @@ |
847 | 847 | * Virtual Root Hub |
848 | 848 | *-------------------------------------------------------------------------*/ |
849 | 849 | |
850 | -/* Device descriptor */ | |
851 | -static __u8 root_hub_dev_des[] = | |
852 | -{ | |
853 | - 0x12, /* __u8 bLength; */ | |
854 | - 0x01, /* __u8 bDescriptorType; Device */ | |
855 | - 0x10, /* __u16 bcdUSB; v1.1 */ | |
856 | - 0x01, | |
857 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
858 | - 0x00, /* __u8 bDeviceSubClass; */ | |
859 | - 0x00, /* __u8 bDeviceProtocol; */ | |
860 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
861 | - 0x00, /* __u16 idVendor; */ | |
862 | - 0x00, | |
863 | - 0x00, /* __u16 idProduct; */ | |
864 | - 0x00, | |
865 | - 0x00, /* __u16 bcdDevice; */ | |
866 | - 0x00, | |
867 | - 0x00, /* __u8 iManufacturer; */ | |
868 | - 0x01, /* __u8 iProduct; */ | |
869 | - 0x00, /* __u8 iSerialNumber; */ | |
870 | - 0x01 /* __u8 bNumConfigurations; */ | |
871 | -}; | |
872 | - | |
873 | - | |
874 | -/* Configuration descriptor */ | |
875 | -static __u8 root_hub_config_des[] = | |
876 | -{ | |
877 | - 0x09, /* __u8 bLength; */ | |
878 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
879 | - 0x19, /* __u16 wTotalLength; */ | |
880 | - 0x00, | |
881 | - 0x01, /* __u8 bNumInterfaces; */ | |
882 | - 0x01, /* __u8 bConfigurationValue; */ | |
883 | - 0x00, /* __u8 iConfiguration; */ | |
884 | - 0x40, /* __u8 bmAttributes; | |
885 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
886 | - 0x00, /* __u8 MaxPower; */ | |
887 | - | |
888 | - /* interface */ | |
889 | - 0x09, /* __u8 if_bLength; */ | |
890 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
891 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
892 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
893 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
894 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
895 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
896 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
897 | - 0x00, /* __u8 if_iInterface; */ | |
898 | - | |
899 | - /* endpoint */ | |
900 | - 0x07, /* __u8 ep_bLength; */ | |
901 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
902 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
903 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
904 | - 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
905 | - 0x00, | |
906 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
907 | -}; | |
908 | - | |
909 | -static unsigned char root_hub_str_index0[] = | |
910 | -{ | |
911 | - 0x04, /* __u8 bLength; */ | |
912 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
913 | - 0x09, /* __u8 lang ID */ | |
914 | - 0x04, /* __u8 lang ID */ | |
915 | -}; | |
916 | - | |
917 | -static unsigned char root_hub_str_index1[] = | |
918 | -{ | |
919 | - 28, /* __u8 bLength; */ | |
920 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
921 | - 'O', /* __u8 Unicode */ | |
922 | - 0, /* __u8 Unicode */ | |
923 | - 'H', /* __u8 Unicode */ | |
924 | - 0, /* __u8 Unicode */ | |
925 | - 'C', /* __u8 Unicode */ | |
926 | - 0, /* __u8 Unicode */ | |
927 | - 'I', /* __u8 Unicode */ | |
928 | - 0, /* __u8 Unicode */ | |
929 | - ' ', /* __u8 Unicode */ | |
930 | - 0, /* __u8 Unicode */ | |
931 | - 'R', /* __u8 Unicode */ | |
932 | - 0, /* __u8 Unicode */ | |
933 | - 'o', /* __u8 Unicode */ | |
934 | - 0, /* __u8 Unicode */ | |
935 | - 'o', /* __u8 Unicode */ | |
936 | - 0, /* __u8 Unicode */ | |
937 | - 't', /* __u8 Unicode */ | |
938 | - 0, /* __u8 Unicode */ | |
939 | - ' ', /* __u8 Unicode */ | |
940 | - 0, /* __u8 Unicode */ | |
941 | - 'H', /* __u8 Unicode */ | |
942 | - 0, /* __u8 Unicode */ | |
943 | - 'u', /* __u8 Unicode */ | |
944 | - 0, /* __u8 Unicode */ | |
945 | - 'b', /* __u8 Unicode */ | |
946 | - 0, /* __u8 Unicode */ | |
947 | -}; | |
850 | +#include <usbroothubdes.h> | |
948 | 851 | |
949 | 852 | /* Hub class-specific descriptor is constructed dynamically */ |
950 | 853 |
arch/sparc/cpu/leon3/usb_uhci.c
... | ... | @@ -757,110 +757,9 @@ |
757 | 757 | } |
758 | 758 | #endif |
759 | 759 | |
760 | -static unsigned char root_hub_dev_des[] = { | |
761 | - 0x12, /* __u8 bLength; */ | |
762 | - 0x01, /* __u8 bDescriptorType; Device */ | |
763 | - 0x00, /* __u16 bcdUSB; v1.0 */ | |
764 | - 0x01, | |
765 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
766 | - 0x00, /* __u8 bDeviceSubClass; */ | |
767 | - 0x00, /* __u8 bDeviceProtocol; */ | |
768 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
769 | - 0x00, /* __u16 idVendor; */ | |
770 | - 0x00, | |
771 | - 0x00, /* __u16 idProduct; */ | |
772 | - 0x00, | |
773 | - 0x00, /* __u16 bcdDevice; */ | |
774 | - 0x00, | |
775 | - 0x01, /* __u8 iManufacturer; */ | |
776 | - 0x00, /* __u8 iProduct; */ | |
777 | - 0x00, /* __u8 iSerialNumber; */ | |
778 | - 0x01 /* __u8 bNumConfigurations; */ | |
779 | -}; | |
780 | - | |
781 | -/* Configuration descriptor */ | |
782 | -static unsigned char root_hub_config_des[] = { | |
783 | - 0x09, /* __u8 bLength; */ | |
784 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
785 | - 0x19, /* __u16 wTotalLength; */ | |
786 | - 0x00, | |
787 | - 0x01, /* __u8 bNumInterfaces; */ | |
788 | - 0x01, /* __u8 bConfigurationValue; */ | |
789 | - 0x00, /* __u8 iConfiguration; */ | |
790 | - 0x40, /* __u8 bmAttributes; | |
791 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
792 | - 0x00, /* __u8 MaxPower; */ | |
793 | - | |
794 | - /* interface */ | |
795 | - 0x09, /* __u8 if_bLength; */ | |
796 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
797 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
798 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
799 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
800 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
801 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
802 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
803 | - 0x00, /* __u8 if_iInterface; */ | |
804 | - | |
805 | - /* endpoint */ | |
806 | - 0x07, /* __u8 ep_bLength; */ | |
807 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
808 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
809 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
810 | - 0x08, /* __u16 ep_wMaxPacketSize; 8 Bytes */ | |
811 | - 0x00, | |
812 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
813 | -}; | |
814 | - | |
815 | -static unsigned char root_hub_hub_des[] = { | |
816 | - 0x09, /* __u8 bLength; */ | |
817 | - 0x29, /* __u8 bDescriptorType; Hub-descriptor */ | |
818 | - 0x02, /* __u8 bNbrPorts; */ | |
819 | - 0x00, /* __u16 wHubCharacteristics; */ | |
820 | - 0x00, | |
821 | - 0x01, /* __u8 bPwrOn2pwrGood; 2ms */ | |
822 | - 0x00, /* __u8 bHubContrCurrent; 0 mA */ | |
823 | - 0x00, /* __u8 DeviceRemovable; *** 7 Ports max *** */ | |
824 | - 0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */ | |
825 | -}; | |
826 | - | |
827 | -static unsigned char root_hub_str_index0[] = { | |
828 | - 0x04, /* __u8 bLength; */ | |
829 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
830 | - 0x09, /* __u8 lang ID */ | |
831 | - 0x04, /* __u8 lang ID */ | |
832 | -}; | |
833 | - | |
834 | -static unsigned char root_hub_str_index1[] = { | |
835 | - 28, /* __u8 bLength; */ | |
836 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
837 | - 'U', /* __u8 Unicode */ | |
838 | - 0, /* __u8 Unicode */ | |
839 | - 'H', /* __u8 Unicode */ | |
840 | - 0, /* __u8 Unicode */ | |
841 | - 'C', /* __u8 Unicode */ | |
842 | - 0, /* __u8 Unicode */ | |
843 | - 'I', /* __u8 Unicode */ | |
844 | - 0, /* __u8 Unicode */ | |
845 | - ' ', /* __u8 Unicode */ | |
846 | - 0, /* __u8 Unicode */ | |
847 | - 'R', /* __u8 Unicode */ | |
848 | - 0, /* __u8 Unicode */ | |
849 | - 'o', /* __u8 Unicode */ | |
850 | - 0, /* __u8 Unicode */ | |
851 | - 'o', /* __u8 Unicode */ | |
852 | - 0, /* __u8 Unicode */ | |
853 | - 't', /* __u8 Unicode */ | |
854 | - 0, /* __u8 Unicode */ | |
855 | - ' ', /* __u8 Unicode */ | |
856 | - 0, /* __u8 Unicode */ | |
857 | - 'H', /* __u8 Unicode */ | |
858 | - 0, /* __u8 Unicode */ | |
859 | - 'u', /* __u8 Unicode */ | |
860 | - 0, /* __u8 Unicode */ | |
861 | - 'b', /* __u8 Unicode */ | |
862 | - 0, /* __u8 Unicode */ | |
863 | -}; | |
760 | +#define WANT_USB_ROOT_HUB_HUB_DES | |
761 | +#include <usbroothubdes.h> | |
762 | +#undef WANT_USB_ROOT_HUB_HUB_DES | |
864 | 763 | |
865 | 764 | /* |
866 | 765 | * Root Hub Control Pipe (interrupt Pipes are not supported) |
board/mpl/common/usb_uhci.c
... | ... | @@ -640,118 +640,9 @@ |
640 | 640 | static void usb_display_Req(unsigned short req) {} |
641 | 641 | #endif |
642 | 642 | |
643 | -static unsigned char root_hub_dev_des[] = | |
644 | -{ | |
645 | - 0x12, /* __u8 bLength; */ | |
646 | - 0x01, /* __u8 bDescriptorType; Device */ | |
647 | - 0x00, /* __u16 bcdUSB; v1.0 */ | |
648 | - 0x01, | |
649 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
650 | - 0x00, /* __u8 bDeviceSubClass; */ | |
651 | - 0x00, /* __u8 bDeviceProtocol; */ | |
652 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
653 | - 0x00, /* __u16 idVendor; */ | |
654 | - 0x00, | |
655 | - 0x00, /* __u16 idProduct; */ | |
656 | - 0x00, | |
657 | - 0x00, /* __u16 bcdDevice; */ | |
658 | - 0x00, | |
659 | - 0x01, /* __u8 iManufacturer; */ | |
660 | - 0x00, /* __u8 iProduct; */ | |
661 | - 0x00, /* __u8 iSerialNumber; */ | |
662 | - 0x01 /* __u8 bNumConfigurations; */ | |
663 | -}; | |
664 | - | |
665 | - | |
666 | -/* Configuration descriptor */ | |
667 | -static unsigned char root_hub_config_des[] = | |
668 | -{ | |
669 | - 0x09, /* __u8 bLength; */ | |
670 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
671 | - 0x19, /* __u16 wTotalLength; */ | |
672 | - 0x00, | |
673 | - 0x01, /* __u8 bNumInterfaces; */ | |
674 | - 0x01, /* __u8 bConfigurationValue; */ | |
675 | - 0x00, /* __u8 iConfiguration; */ | |
676 | - 0x40, /* __u8 bmAttributes; | |
677 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
678 | - 0x00, /* __u8 MaxPower; */ | |
679 | - | |
680 | - /* interface */ | |
681 | - 0x09, /* __u8 if_bLength; */ | |
682 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
683 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
684 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
685 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
686 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
687 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
688 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
689 | - 0x00, /* __u8 if_iInterface; */ | |
690 | - | |
691 | - /* endpoint */ | |
692 | - 0x07, /* __u8 ep_bLength; */ | |
693 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
694 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
695 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
696 | - 0x08, /* __u16 ep_wMaxPacketSize; 8 Bytes */ | |
697 | - 0x00, | |
698 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
699 | -}; | |
700 | - | |
701 | - | |
702 | -static unsigned char root_hub_hub_des[] = | |
703 | -{ | |
704 | - 0x09, /* __u8 bLength; */ | |
705 | - 0x29, /* __u8 bDescriptorType; Hub-descriptor */ | |
706 | - 0x02, /* __u8 bNbrPorts; */ | |
707 | - 0x00, /* __u16 wHubCharacteristics; */ | |
708 | - 0x00, | |
709 | - 0x01, /* __u8 bPwrOn2pwrGood; 2ms */ | |
710 | - 0x00, /* __u8 bHubContrCurrent; 0 mA */ | |
711 | - 0x00, /* __u8 DeviceRemovable; *** 7 Ports max *** */ | |
712 | - 0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */ | |
713 | -}; | |
714 | - | |
715 | -static unsigned char root_hub_str_index0[] = | |
716 | -{ | |
717 | - 0x04, /* __u8 bLength; */ | |
718 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
719 | - 0x09, /* __u8 lang ID */ | |
720 | - 0x04, /* __u8 lang ID */ | |
721 | -}; | |
722 | - | |
723 | -static unsigned char root_hub_str_index1[] = | |
724 | -{ | |
725 | - 28, /* __u8 bLength; */ | |
726 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
727 | - 'U', /* __u8 Unicode */ | |
728 | - 0, /* __u8 Unicode */ | |
729 | - 'H', /* __u8 Unicode */ | |
730 | - 0, /* __u8 Unicode */ | |
731 | - 'C', /* __u8 Unicode */ | |
732 | - 0, /* __u8 Unicode */ | |
733 | - 'I', /* __u8 Unicode */ | |
734 | - 0, /* __u8 Unicode */ | |
735 | - ' ', /* __u8 Unicode */ | |
736 | - 0, /* __u8 Unicode */ | |
737 | - 'R', /* __u8 Unicode */ | |
738 | - 0, /* __u8 Unicode */ | |
739 | - 'o', /* __u8 Unicode */ | |
740 | - 0, /* __u8 Unicode */ | |
741 | - 'o', /* __u8 Unicode */ | |
742 | - 0, /* __u8 Unicode */ | |
743 | - 't', /* __u8 Unicode */ | |
744 | - 0, /* __u8 Unicode */ | |
745 | - ' ', /* __u8 Unicode */ | |
746 | - 0, /* __u8 Unicode */ | |
747 | - 'H', /* __u8 Unicode */ | |
748 | - 0, /* __u8 Unicode */ | |
749 | - 'u', /* __u8 Unicode */ | |
750 | - 0, /* __u8 Unicode */ | |
751 | - 'b', /* __u8 Unicode */ | |
752 | - 0, /* __u8 Unicode */ | |
753 | -}; | |
754 | - | |
643 | +#define WANT_USB_ROOT_HUB_HUB_DES | |
644 | +#include <usbroothubdes.h> | |
645 | +#undef WANT_USB_ROOT_HUB_HUB_DES | |
755 | 646 | |
756 | 647 | /* |
757 | 648 | * Root Hub Control Pipe (interrupt Pipes are not supported) |
drivers/usb/host/ehci-hcd.c
... | ... | @@ -395,6 +395,7 @@ |
395 | 395 | QH_ENDPT2_UFCMASK(0) | QH_ENDPT2_UFSMASK(0); |
396 | 396 | qh->qh_endpt2 = cpu_to_hc32(endpt); |
397 | 397 | qh->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE); |
398 | + qh->qh_overlay.qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE); | |
398 | 399 | |
399 | 400 | tdp = &qh->qh_overlay.qt_next; |
400 | 401 | |
401 | 402 | |
... | ... | @@ -1161,14 +1162,16 @@ |
1161 | 1162 | debug("ehci intr queue: out of memory\n"); |
1162 | 1163 | goto fail1; |
1163 | 1164 | } |
1164 | - result->first = memalign(32, sizeof(struct QH) * queuesize); | |
1165 | + result->first = memalign(USB_DMA_MINALIGN, | |
1166 | + sizeof(struct QH) * queuesize); | |
1165 | 1167 | if (!result->first) { |
1166 | 1168 | debug("ehci intr queue: out of memory\n"); |
1167 | 1169 | goto fail2; |
1168 | 1170 | } |
1169 | 1171 | result->current = result->first; |
1170 | 1172 | result->last = result->first + queuesize - 1; |
1171 | - result->tds = memalign(32, sizeof(struct qTD) * queuesize); | |
1173 | + result->tds = memalign(USB_DMA_MINALIGN, | |
1174 | + sizeof(struct qTD) * queuesize); | |
1172 | 1175 | if (!result->tds) { |
1173 | 1176 | debug("ehci intr queue: out of memory\n"); |
1174 | 1177 | goto fail3; |
... | ... | @@ -1186,6 +1189,7 @@ |
1186 | 1189 | qh->qh_link = QH_LINK_TERMINATE; |
1187 | 1190 | |
1188 | 1191 | qh->qh_overlay.qt_next = (uint32_t)td; |
1192 | + qh->qh_overlay.qt_altnext = QT_NEXT_TERMINATE; | |
1189 | 1193 | qh->qh_endpt1 = (0 << 28) | /* No NAK reload (ehci 4.9) */ |
1190 | 1194 | (usb_maxpacket(dev, pipe) << 16) | /* MPS */ |
1191 | 1195 | (1 << 14) | |
drivers/usb/host/isp116x-hcd.c
... | ... | @@ -254,105 +254,7 @@ |
254 | 254 | |
255 | 255 | /* --- Virtual Root Hub ---------------------------------------------------- */ |
256 | 256 | |
257 | -/* Device descriptor */ | |
258 | -static __u8 root_hub_dev_des[] = { | |
259 | - 0x12, /* __u8 bLength; */ | |
260 | - 0x01, /* __u8 bDescriptorType; Device */ | |
261 | - 0x10, /* __u16 bcdUSB; v1.1 */ | |
262 | - 0x01, | |
263 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
264 | - 0x00, /* __u8 bDeviceSubClass; */ | |
265 | - 0x00, /* __u8 bDeviceProtocol; */ | |
266 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
267 | - 0x00, /* __u16 idVendor; */ | |
268 | - 0x00, | |
269 | - 0x00, /* __u16 idProduct; */ | |
270 | - 0x00, | |
271 | - 0x00, /* __u16 bcdDevice; */ | |
272 | - 0x00, | |
273 | - 0x00, /* __u8 iManufacturer; */ | |
274 | - 0x01, /* __u8 iProduct; */ | |
275 | - 0x00, /* __u8 iSerialNumber; */ | |
276 | - 0x01 /* __u8 bNumConfigurations; */ | |
277 | -}; | |
278 | - | |
279 | -/* Configuration descriptor */ | |
280 | -static __u8 root_hub_config_des[] = { | |
281 | - 0x09, /* __u8 bLength; */ | |
282 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
283 | - 0x19, /* __u16 wTotalLength; */ | |
284 | - 0x00, | |
285 | - 0x01, /* __u8 bNumInterfaces; */ | |
286 | - 0x01, /* __u8 bConfigurationValue; */ | |
287 | - 0x00, /* __u8 iConfiguration; */ | |
288 | - 0x40, /* __u8 bmAttributes; | |
289 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
290 | - 0x00, /* __u8 MaxPower; */ | |
291 | - | |
292 | - /* interface */ | |
293 | - 0x09, /* __u8 if_bLength; */ | |
294 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
295 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
296 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
297 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
298 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
299 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
300 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
301 | - 0x00, /* __u8 if_iInterface; */ | |
302 | - | |
303 | - /* endpoint */ | |
304 | - 0x07, /* __u8 ep_bLength; */ | |
305 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
306 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
307 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
308 | - 0x00, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
309 | - 0x02, | |
310 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
311 | -}; | |
312 | - | |
313 | -static unsigned char root_hub_str_index0[] = { | |
314 | - 0x04, /* __u8 bLength; */ | |
315 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
316 | - 0x09, /* __u8 lang ID */ | |
317 | - 0x04, /* __u8 lang ID */ | |
318 | -}; | |
319 | - | |
320 | -static unsigned char root_hub_str_index1[] = { | |
321 | - 0x22, /* __u8 bLength; */ | |
322 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
323 | - 'I', /* __u8 Unicode */ | |
324 | - 0, /* __u8 Unicode */ | |
325 | - 'S', /* __u8 Unicode */ | |
326 | - 0, /* __u8 Unicode */ | |
327 | - 'P', /* __u8 Unicode */ | |
328 | - 0, /* __u8 Unicode */ | |
329 | - '1', /* __u8 Unicode */ | |
330 | - 0, /* __u8 Unicode */ | |
331 | - '1', /* __u8 Unicode */ | |
332 | - 0, /* __u8 Unicode */ | |
333 | - '6', /* __u8 Unicode */ | |
334 | - 0, /* __u8 Unicode */ | |
335 | - 'x', /* __u8 Unicode */ | |
336 | - 0, /* __u8 Unicode */ | |
337 | - ' ', /* __u8 Unicode */ | |
338 | - 0, /* __u8 Unicode */ | |
339 | - 'R', /* __u8 Unicode */ | |
340 | - 0, /* __u8 Unicode */ | |
341 | - 'o', /* __u8 Unicode */ | |
342 | - 0, /* __u8 Unicode */ | |
343 | - 'o', /* __u8 Unicode */ | |
344 | - 0, /* __u8 Unicode */ | |
345 | - 't', /* __u8 Unicode */ | |
346 | - 0, /* __u8 Unicode */ | |
347 | - ' ', /* __u8 Unicode */ | |
348 | - 0, /* __u8 Unicode */ | |
349 | - 'H', /* __u8 Unicode */ | |
350 | - 0, /* __u8 Unicode */ | |
351 | - 'u', /* __u8 Unicode */ | |
352 | - 0, /* __u8 Unicode */ | |
353 | - 'b', /* __u8 Unicode */ | |
354 | - 0, /* __u8 Unicode */ | |
355 | -}; | |
257 | +#include <usbroothubdes.h> | |
356 | 258 | |
357 | 259 | /* |
358 | 260 | * Hub class-specific descriptor is constructed dynamically |
drivers/usb/host/ohci-hcd.c
... | ... | @@ -1094,103 +1094,7 @@ |
1094 | 1094 | * Virtual Root Hub |
1095 | 1095 | *-------------------------------------------------------------------------*/ |
1096 | 1096 | |
1097 | -/* Device descriptor */ | |
1098 | -static __u8 root_hub_dev_des[] = | |
1099 | -{ | |
1100 | - 0x12, /* __u8 bLength; */ | |
1101 | - 0x01, /* __u8 bDescriptorType; Device */ | |
1102 | - 0x10, /* __u16 bcdUSB; v1.1 */ | |
1103 | - 0x01, | |
1104 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
1105 | - 0x00, /* __u8 bDeviceSubClass; */ | |
1106 | - 0x00, /* __u8 bDeviceProtocol; */ | |
1107 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
1108 | - 0x00, /* __u16 idVendor; */ | |
1109 | - 0x00, | |
1110 | - 0x00, /* __u16 idProduct; */ | |
1111 | - 0x00, | |
1112 | - 0x00, /* __u16 bcdDevice; */ | |
1113 | - 0x00, | |
1114 | - 0x00, /* __u8 iManufacturer; */ | |
1115 | - 0x01, /* __u8 iProduct; */ | |
1116 | - 0x00, /* __u8 iSerialNumber; */ | |
1117 | - 0x01 /* __u8 bNumConfigurations; */ | |
1118 | -}; | |
1119 | - | |
1120 | -/* Configuration descriptor */ | |
1121 | -static __u8 root_hub_config_des[] = | |
1122 | -{ | |
1123 | - 0x09, /* __u8 bLength; */ | |
1124 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
1125 | - 0x19, /* __u16 wTotalLength; */ | |
1126 | - 0x00, | |
1127 | - 0x01, /* __u8 bNumInterfaces; */ | |
1128 | - 0x01, /* __u8 bConfigurationValue; */ | |
1129 | - 0x00, /* __u8 iConfiguration; */ | |
1130 | - 0x40, /* __u8 bmAttributes; | |
1131 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
1132 | - 0x00, /* __u8 MaxPower; */ | |
1133 | - | |
1134 | - /* interface */ | |
1135 | - 0x09, /* __u8 if_bLength; */ | |
1136 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
1137 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
1138 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
1139 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
1140 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
1141 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
1142 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
1143 | - 0x00, /* __u8 if_iInterface; */ | |
1144 | - | |
1145 | - /* endpoint */ | |
1146 | - 0x07, /* __u8 ep_bLength; */ | |
1147 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
1148 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
1149 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
1150 | - 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
1151 | - 0x00, | |
1152 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
1153 | -}; | |
1154 | - | |
1155 | -static unsigned char root_hub_str_index0[] = | |
1156 | -{ | |
1157 | - 0x04, /* __u8 bLength; */ | |
1158 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
1159 | - 0x09, /* __u8 lang ID */ | |
1160 | - 0x04, /* __u8 lang ID */ | |
1161 | -}; | |
1162 | - | |
1163 | -static unsigned char root_hub_str_index1[] = | |
1164 | -{ | |
1165 | - 28, /* __u8 bLength; */ | |
1166 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
1167 | - 'O', /* __u8 Unicode */ | |
1168 | - 0, /* __u8 Unicode */ | |
1169 | - 'H', /* __u8 Unicode */ | |
1170 | - 0, /* __u8 Unicode */ | |
1171 | - 'C', /* __u8 Unicode */ | |
1172 | - 0, /* __u8 Unicode */ | |
1173 | - 'I', /* __u8 Unicode */ | |
1174 | - 0, /* __u8 Unicode */ | |
1175 | - ' ', /* __u8 Unicode */ | |
1176 | - 0, /* __u8 Unicode */ | |
1177 | - 'R', /* __u8 Unicode */ | |
1178 | - 0, /* __u8 Unicode */ | |
1179 | - 'o', /* __u8 Unicode */ | |
1180 | - 0, /* __u8 Unicode */ | |
1181 | - 'o', /* __u8 Unicode */ | |
1182 | - 0, /* __u8 Unicode */ | |
1183 | - 't', /* __u8 Unicode */ | |
1184 | - 0, /* __u8 Unicode */ | |
1185 | - ' ', /* __u8 Unicode */ | |
1186 | - 0, /* __u8 Unicode */ | |
1187 | - 'H', /* __u8 Unicode */ | |
1188 | - 0, /* __u8 Unicode */ | |
1189 | - 'u', /* __u8 Unicode */ | |
1190 | - 0, /* __u8 Unicode */ | |
1191 | - 'b', /* __u8 Unicode */ | |
1192 | - 0, /* __u8 Unicode */ | |
1193 | -}; | |
1097 | +#include <usbroothubdes.h> | |
1194 | 1098 | |
1195 | 1099 | /* Hub class-specific descriptor is constructed dynamically */ |
1196 | 1100 |
drivers/usb/host/ohci-s3c24xx.c
... | ... | @@ -873,100 +873,7 @@ |
873 | 873 | * Virtual Root Hub |
874 | 874 | *-------------------------------------------------------------------------*/ |
875 | 875 | |
876 | -/* Device descriptor */ | |
877 | -static __u8 root_hub_dev_des[] = { | |
878 | - 0x12, /* __u8 bLength; */ | |
879 | - 0x01, /* __u8 bDescriptorType; Device */ | |
880 | - 0x10, /* __u16 bcdUSB; v1.1 */ | |
881 | - 0x01, | |
882 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
883 | - 0x00, /* __u8 bDeviceSubClass; */ | |
884 | - 0x00, /* __u8 bDeviceProtocol; */ | |
885 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
886 | - 0x00, /* __u16 idVendor; */ | |
887 | - 0x00, | |
888 | - 0x00, /* __u16 idProduct; */ | |
889 | - 0x00, | |
890 | - 0x00, /* __u16 bcdDevice; */ | |
891 | - 0x00, | |
892 | - 0x00, /* __u8 iManufacturer; */ | |
893 | - 0x01, /* __u8 iProduct; */ | |
894 | - 0x00, /* __u8 iSerialNumber; */ | |
895 | - 0x01 /* __u8 bNumConfigurations; */ | |
896 | -}; | |
897 | - | |
898 | -/* Configuration descriptor */ | |
899 | -static __u8 root_hub_config_des[] = { | |
900 | - 0x09, /* __u8 bLength; */ | |
901 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
902 | - 0x19, /* __u16 wTotalLength; */ | |
903 | - 0x00, | |
904 | - 0x01, /* __u8 bNumInterfaces; */ | |
905 | - 0x01, /* __u8 bConfigurationValue; */ | |
906 | - 0x00, /* __u8 iConfiguration; */ | |
907 | - 0x40, /* __u8 bmAttributes; | |
908 | - Bit 7: Bus-powered, 6: Self-powered, | |
909 | - 5 Remote-wakwup, 4..0: resvd */ | |
910 | - 0x00, /* __u8 MaxPower; */ | |
911 | - | |
912 | - /* interface */ | |
913 | - 0x09, /* __u8 if_bLength; */ | |
914 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
915 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
916 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
917 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
918 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
919 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
920 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
921 | - 0x00, /* __u8 if_iInterface; */ | |
922 | - | |
923 | - /* endpoint */ | |
924 | - 0x07, /* __u8 ep_bLength; */ | |
925 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
926 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
927 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
928 | - 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
929 | - 0x00, | |
930 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
931 | -}; | |
932 | - | |
933 | -static unsigned char root_hub_str_index0[] = { | |
934 | - 0x04, /* __u8 bLength; */ | |
935 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
936 | - 0x09, /* __u8 lang ID */ | |
937 | - 0x04, /* __u8 lang ID */ | |
938 | -}; | |
939 | - | |
940 | -static unsigned char root_hub_str_index1[] = { | |
941 | - 28, /* __u8 bLength; */ | |
942 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
943 | - 'O', /* __u8 Unicode */ | |
944 | - 0, /* __u8 Unicode */ | |
945 | - 'H', /* __u8 Unicode */ | |
946 | - 0, /* __u8 Unicode */ | |
947 | - 'C', /* __u8 Unicode */ | |
948 | - 0, /* __u8 Unicode */ | |
949 | - 'I', /* __u8 Unicode */ | |
950 | - 0, /* __u8 Unicode */ | |
951 | - ' ', /* __u8 Unicode */ | |
952 | - 0, /* __u8 Unicode */ | |
953 | - 'R', /* __u8 Unicode */ | |
954 | - 0, /* __u8 Unicode */ | |
955 | - 'o', /* __u8 Unicode */ | |
956 | - 0, /* __u8 Unicode */ | |
957 | - 'o', /* __u8 Unicode */ | |
958 | - 0, /* __u8 Unicode */ | |
959 | - 't', /* __u8 Unicode */ | |
960 | - 0, /* __u8 Unicode */ | |
961 | - ' ', /* __u8 Unicode */ | |
962 | - 0, /* __u8 Unicode */ | |
963 | - 'H', /* __u8 Unicode */ | |
964 | - 0, /* __u8 Unicode */ | |
965 | - 'u', /* __u8 Unicode */ | |
966 | - 0, /* __u8 Unicode */ | |
967 | - 'b', /* __u8 Unicode */ | |
968 | - 0, /* __u8 Unicode */ | |
969 | -}; | |
876 | +#include <usbroothubdes.h> | |
970 | 877 | |
971 | 878 | /* Hub class-specific descriptor is constructed dynamically */ |
972 | 879 |
drivers/usb/host/r8a66597-hcd.c
... | ... | @@ -557,109 +557,7 @@ |
557 | 557 | * Virtual Root Hub |
558 | 558 | *-------------------------------------------------------------------------*/ |
559 | 559 | |
560 | -/* Device descriptor */ | |
561 | -static __u8 root_hub_dev_des[] = | |
562 | -{ | |
563 | - 0x12, /* __u8 bLength; */ | |
564 | - 0x01, /* __u8 bDescriptorType; Device */ | |
565 | - 0x10, /* __u16 bcdUSB; v1.1 */ | |
566 | - 0x01, | |
567 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
568 | - 0x00, /* __u8 bDeviceSubClass; */ | |
569 | - 0x00, /* __u8 bDeviceProtocol; */ | |
570 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
571 | - 0x00, /* __u16 idVendor; */ | |
572 | - 0x00, | |
573 | - 0x00, /* __u16 idProduct; */ | |
574 | - 0x00, | |
575 | - 0x00, /* __u16 bcdDevice; */ | |
576 | - 0x00, | |
577 | - 0x00, /* __u8 iManufacturer; */ | |
578 | - 0x01, /* __u8 iProduct; */ | |
579 | - 0x00, /* __u8 iSerialNumber; */ | |
580 | - 0x01 /* __u8 bNumConfigurations; */ | |
581 | -}; | |
582 | - | |
583 | -/* Configuration descriptor */ | |
584 | -static __u8 root_hub_config_des[] = | |
585 | -{ | |
586 | - 0x09, /* __u8 bLength; */ | |
587 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
588 | - 0x19, /* __u16 wTotalLength; */ | |
589 | - 0x00, | |
590 | - 0x01, /* __u8 bNumInterfaces; */ | |
591 | - 0x01, /* __u8 bConfigurationValue; */ | |
592 | - 0x00, /* __u8 iConfiguration; */ | |
593 | - 0x40, /* __u8 bmAttributes; */ | |
594 | - | |
595 | - 0x00, /* __u8 MaxPower; */ | |
596 | - | |
597 | - /* interface */ | |
598 | - 0x09, /* __u8 if_bLength; */ | |
599 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
600 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
601 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
602 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
603 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
604 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
605 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
606 | - 0x00, /* __u8 if_iInterface; */ | |
607 | - | |
608 | - /* endpoint */ | |
609 | - 0x07, /* __u8 ep_bLength; */ | |
610 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
611 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
612 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
613 | - 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
614 | - 0x00, | |
615 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
616 | -}; | |
617 | - | |
618 | -static unsigned char root_hub_str_index0[] = | |
619 | -{ | |
620 | - 0x04, /* __u8 bLength; */ | |
621 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
622 | - 0x09, /* __u8 lang ID */ | |
623 | - 0x04, /* __u8 lang ID */ | |
624 | -}; | |
625 | - | |
626 | -static unsigned char root_hub_str_index1[] = | |
627 | -{ | |
628 | - 34, /* __u8 bLength; */ | |
629 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
630 | - 'R', /* __u8 Unicode */ | |
631 | - 0, /* __u8 Unicode */ | |
632 | - '8', /* __u8 Unicode */ | |
633 | - 0, /* __u8 Unicode */ | |
634 | - 'A', /* __u8 Unicode */ | |
635 | - 0, /* __u8 Unicode */ | |
636 | - '6', /* __u8 Unicode */ | |
637 | - 0, /* __u8 Unicode */ | |
638 | - '6', /* __u8 Unicode */ | |
639 | - 0, /* __u8 Unicode */ | |
640 | - '5', /* __u8 Unicode */ | |
641 | - 0, /* __u8 Unicode */ | |
642 | - '9', /* __u8 Unicode */ | |
643 | - 0, /* __u8 Unicode */ | |
644 | - '7', /* __u8 Unicode */ | |
645 | - 0, /* __u8 Unicode */ | |
646 | - ' ', /* __u8 Unicode */ | |
647 | - 0, /* __u8 Unicode */ | |
648 | - 'R', /* __u8 Unicode */ | |
649 | - 0, /* __u8 Unicode */ | |
650 | - 'o', /* __u8 Unicode */ | |
651 | - 0, /* __u8 Unicode */ | |
652 | - 'o', /* __u8 Unicode */ | |
653 | - 0, /* __u8 Unicode */ | |
654 | - 't', /* __u8 Unicode */ | |
655 | - 0, /* __u8 Unicode */ | |
656 | - 'H', /* __u8 Unicode */ | |
657 | - 0, /* __u8 Unicode */ | |
658 | - 'u', /* __u8 Unicode */ | |
659 | - 0, /* __u8 Unicode */ | |
660 | - 'b', /* __u8 Unicode */ | |
661 | - 0, /* __u8 Unicode */ | |
662 | -}; | |
560 | +#include <usbroothubdes.h> | |
663 | 561 | |
664 | 562 | static int r8a66597_submit_rh_msg(struct usb_device *dev, unsigned long pipe, |
665 | 563 | void *buffer, int transfer_len, struct devrequest *cmd) |
drivers/usb/musb/musb_hcd.c
... | ... | @@ -28,99 +28,8 @@ |
28 | 28 | static int rh_devnum; |
29 | 29 | static u32 port_status; |
30 | 30 | |
31 | -/* Device descriptor */ | |
32 | -static const u8 root_hub_dev_des[] = { | |
33 | - 0x12, /* __u8 bLength; */ | |
34 | - 0x01, /* __u8 bDescriptorType; Device */ | |
35 | - 0x00, /* __u16 bcdUSB; v1.1 */ | |
36 | - 0x02, | |
37 | - 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
38 | - 0x00, /* __u8 bDeviceSubClass; */ | |
39 | - 0x00, /* __u8 bDeviceProtocol; */ | |
40 | - 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
41 | - 0x00, /* __u16 idVendor; */ | |
42 | - 0x00, | |
43 | - 0x00, /* __u16 idProduct; */ | |
44 | - 0x00, | |
45 | - 0x00, /* __u16 bcdDevice; */ | |
46 | - 0x00, | |
47 | - 0x00, /* __u8 iManufacturer; */ | |
48 | - 0x01, /* __u8 iProduct; */ | |
49 | - 0x00, /* __u8 iSerialNumber; */ | |
50 | - 0x01 /* __u8 bNumConfigurations; */ | |
51 | -}; | |
31 | +#include <usbroothubdes.h> | |
52 | 32 | |
53 | -/* Configuration descriptor */ | |
54 | -static const u8 root_hub_config_des[] = { | |
55 | - 0x09, /* __u8 bLength; */ | |
56 | - 0x02, /* __u8 bDescriptorType; Configuration */ | |
57 | - 0x19, /* __u16 wTotalLength; */ | |
58 | - 0x00, | |
59 | - 0x01, /* __u8 bNumInterfaces; */ | |
60 | - 0x01, /* __u8 bConfigurationValue; */ | |
61 | - 0x00, /* __u8 iConfiguration; */ | |
62 | - 0x40, /* __u8 bmAttributes; | |
63 | - Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */ | |
64 | - 0x00, /* __u8 MaxPower; */ | |
65 | - | |
66 | - /* interface */ | |
67 | - 0x09, /* __u8 if_bLength; */ | |
68 | - 0x04, /* __u8 if_bDescriptorType; Interface */ | |
69 | - 0x00, /* __u8 if_bInterfaceNumber; */ | |
70 | - 0x00, /* __u8 if_bAlternateSetting; */ | |
71 | - 0x01, /* __u8 if_bNumEndpoints; */ | |
72 | - 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
73 | - 0x00, /* __u8 if_bInterfaceSubClass; */ | |
74 | - 0x00, /* __u8 if_bInterfaceProtocol; */ | |
75 | - 0x00, /* __u8 if_iInterface; */ | |
76 | - | |
77 | - /* endpoint */ | |
78 | - 0x07, /* __u8 ep_bLength; */ | |
79 | - 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
80 | - 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
81 | - 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
82 | - 0x00, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
83 | - 0x02, | |
84 | - 0xff /* __u8 ep_bInterval; 255 ms */ | |
85 | -}; | |
86 | - | |
87 | -static const unsigned char root_hub_str_index0[] = { | |
88 | - 0x04, /* __u8 bLength; */ | |
89 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
90 | - 0x09, /* __u8 lang ID */ | |
91 | - 0x04, /* __u8 lang ID */ | |
92 | -}; | |
93 | - | |
94 | -static const unsigned char root_hub_str_index1[] = { | |
95 | - 0x1c, /* __u8 bLength; */ | |
96 | - 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
97 | - 'M', /* __u8 Unicode */ | |
98 | - 0, /* __u8 Unicode */ | |
99 | - 'U', /* __u8 Unicode */ | |
100 | - 0, /* __u8 Unicode */ | |
101 | - 'S', /* __u8 Unicode */ | |
102 | - 0, /* __u8 Unicode */ | |
103 | - 'B', /* __u8 Unicode */ | |
104 | - 0, /* __u8 Unicode */ | |
105 | - ' ', /* __u8 Unicode */ | |
106 | - 0, /* __u8 Unicode */ | |
107 | - 'R', /* __u8 Unicode */ | |
108 | - 0, /* __u8 Unicode */ | |
109 | - 'o', /* __u8 Unicode */ | |
110 | - 0, /* __u8 Unicode */ | |
111 | - 'o', /* __u8 Unicode */ | |
112 | - 0, /* __u8 Unicode */ | |
113 | - 't', /* __u8 Unicode */ | |
114 | - 0, /* __u8 Unicode */ | |
115 | - ' ', /* __u8 Unicode */ | |
116 | - 0, /* __u8 Unicode */ | |
117 | - 'H', /* __u8 Unicode */ | |
118 | - 0, /* __u8 Unicode */ | |
119 | - 'u', /* __u8 Unicode */ | |
120 | - 0, /* __u8 Unicode */ | |
121 | - 'b', /* __u8 Unicode */ | |
122 | - 0, /* __u8 Unicode */ | |
123 | -}; | |
124 | 33 | #endif |
125 | 34 | |
126 | 35 | /* |
include/usbroothubdes.h
1 | +/* | |
2 | + * USB virtual root hub descriptors | |
3 | + * | |
4 | + * (C) Copyright 2014 | |
5 | + * Stephen Warren swarren@wwwdotorg.org | |
6 | + * | |
7 | + * Based on ohci-hcd.c | |
8 | + * | |
9 | + * SPDX-License-Identifier: GPL-2.0+ | |
10 | + */ | |
11 | + | |
12 | +#ifndef __USBROOTHUBDES_H__ | |
13 | +#define __USBROOTHUBDES_H__ | |
14 | + | |
15 | +/* Device descriptor */ | |
16 | +static __u8 root_hub_dev_des[] = { | |
17 | + 0x12, /* __u8 bLength; */ | |
18 | + 0x01, /* __u8 bDescriptorType; Device */ | |
19 | + 0x10, /* __u16 bcdUSB; v1.1 */ | |
20 | + 0x01, | |
21 | + 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ | |
22 | + 0x00, /* __u8 bDeviceSubClass; */ | |
23 | + 0x00, /* __u8 bDeviceProtocol; */ | |
24 | + 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ | |
25 | + 0x00, /* __u16 idVendor; */ | |
26 | + 0x00, | |
27 | + 0x00, /* __u16 idProduct; */ | |
28 | + 0x00, | |
29 | + 0x00, /* __u16 bcdDevice; */ | |
30 | + 0x00, | |
31 | + 0x00, /* __u8 iManufacturer; */ | |
32 | + 0x01, /* __u8 iProduct; */ | |
33 | + 0x00, /* __u8 iSerialNumber; */ | |
34 | + 0x01, /* __u8 bNumConfigurations; */ | |
35 | +}; | |
36 | + | |
37 | +/* Configuration descriptor */ | |
38 | +static __u8 root_hub_config_des[] = { | |
39 | + 0x09, /* __u8 bLength; */ | |
40 | + 0x02, /* __u8 bDescriptorType; Configuration */ | |
41 | + 0x19, /* __u16 wTotalLength; */ | |
42 | + 0x00, | |
43 | + 0x01, /* __u8 bNumInterfaces; */ | |
44 | + 0x01, /* __u8 bConfigurationValue; */ | |
45 | + 0x00, /* __u8 iConfiguration; */ | |
46 | + 0x40, /* __u8 bmAttributes; | |
47 | + * Bit 7: Bus-powered | |
48 | + * 6: Self-powered, | |
49 | + * 5 Remote-wakwup, | |
50 | + * 4..0: resvd | |
51 | + */ | |
52 | + 0x00, /* __u8 MaxPower; */ | |
53 | + /* interface */ | |
54 | + 0x09, /* __u8 if_bLength; */ | |
55 | + 0x04, /* __u8 if_bDescriptorType; Interface */ | |
56 | + 0x00, /* __u8 if_bInterfaceNumber; */ | |
57 | + 0x00, /* __u8 if_bAlternateSetting; */ | |
58 | + 0x01, /* __u8 if_bNumEndpoints; */ | |
59 | + 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ | |
60 | + 0x00, /* __u8 if_bInterfaceSubClass; */ | |
61 | + 0x00, /* __u8 if_bInterfaceProtocol; */ | |
62 | + 0x00, /* __u8 if_iInterface; */ | |
63 | + /* endpoint */ | |
64 | + 0x07, /* __u8 ep_bLength; */ | |
65 | + 0x05, /* __u8 ep_bDescriptorType; Endpoint */ | |
66 | + 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ | |
67 | + 0x03, /* __u8 ep_bmAttributes; Interrupt */ | |
68 | + 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */ | |
69 | + 0x00, | |
70 | + 0xff, /* __u8 ep_bInterval; 255 ms */ | |
71 | +}; | |
72 | + | |
73 | +#ifdef WANT_USB_ROOT_HUB_HUB_DES | |
74 | +static unsigned char root_hub_hub_des[] = { | |
75 | + 0x09, /* __u8 bLength; */ | |
76 | + 0x29, /* __u8 bDescriptorType; Hub-descriptor */ | |
77 | + 0x02, /* __u8 bNbrPorts; */ | |
78 | + 0x00, /* __u16 wHubCharacteristics; */ | |
79 | + 0x00, | |
80 | + 0x01, /* __u8 bPwrOn2pwrGood; 2ms */ | |
81 | + 0x00, /* __u8 bHubContrCurrent; 0 mA */ | |
82 | + 0x00, /* __u8 DeviceRemovable; *** 7 Ports max *** */ | |
83 | + 0xff, /* __u8 PortPwrCtrlMask; *** 7 ports max *** */ | |
84 | +}; | |
85 | +#endif | |
86 | + | |
87 | +static unsigned char root_hub_str_index0[] = { | |
88 | + 0x04, /* __u8 bLength; */ | |
89 | + 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
90 | + 0x09, /* __u8 lang ID */ | |
91 | + 0x04, /* __u8 lang ID */ | |
92 | +}; | |
93 | + | |
94 | +static unsigned char root_hub_str_index1[] = { | |
95 | + 32, /* __u8 bLength; */ | |
96 | + 0x03, /* __u8 bDescriptorType; String-descriptor */ | |
97 | + 'U', /* __u8 Unicode */ | |
98 | + 0, /* __u8 Unicode */ | |
99 | + '-', /* __u8 Unicode */ | |
100 | + 0, /* __u8 Unicode */ | |
101 | + 'B', /* __u8 Unicode */ | |
102 | + 0, /* __u8 Unicode */ | |
103 | + 'o', /* __u8 Unicode */ | |
104 | + 0, /* __u8 Unicode */ | |
105 | + 'o', /* __u8 Unicode */ | |
106 | + 0, /* __u8 Unicode */ | |
107 | + 't', /* __u8 Unicode */ | |
108 | + 0, /* __u8 Unicode */ | |
109 | + ' ', /* __u8 Unicode */ | |
110 | + 0, /* __u8 Unicode */ | |
111 | + 'R', /* __u8 Unicode */ | |
112 | + 0, /* __u8 Unicode */ | |
113 | + 'o', /* __u8 Unicode */ | |
114 | + 0, /* __u8 Unicode */ | |
115 | + 'o', /* __u8 Unicode */ | |
116 | + 0, /* __u8 Unicode */ | |
117 | + 't', /* __u8 Unicode */ | |
118 | + 0, /* __u8 Unicode */ | |
119 | + ' ', /* __u8 Unicode */ | |
120 | + 0, /* __u8 Unicode */ | |
121 | + 'H', /* __u8 Unicode */ | |
122 | + 0, /* __u8 Unicode */ | |
123 | + 'u', /* __u8 Unicode */ | |
124 | + 0, /* __u8 Unicode */ | |
125 | + 'b', /* __u8 Unicode */ | |
126 | + 0, /* __u8 Unicode */ | |
127 | +}; | |
128 | + | |
129 | +#endif |