revert between 56095 -> 55830 in arch
[AROS.git] / arch / arm-native / soc / broadcom / 2708 / usb / usb2otg / usb2otg_hub.h
blob38584784c8dfac9a14cefa99ccff658b3b051211
1 /*
2 Copyright © 2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <devices/usb_hub.h>
8 #if AROS_BIG_ENDIAN
9 #define LE16(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
10 #define BE16(x) (x)
11 #else
12 #define LE16(x) (x)
13 #define BE16(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
14 #endif
16 /* Root hub data */
17 const struct UsbStdDevDesc OTGRootHubDevDesc = {
18 sizeof(struct UsbStdDevDesc),
19 UDT_DEVICE,
20 LE16(0x0200),
21 HUB_CLASSCODE,
25 LE16(0x0000),
26 LE16(0x0000),
27 LE16(0x0100),
34 struct OTGHubCfg
36 struct UsbStdCfgDesc HubCfgDesc;
37 struct UsbStdIfDesc HubIfDesc;
38 struct UsbStdEPDesc HubEPDesc;
39 } __attribute__((packed));
41 const struct OTGHubCfg OTGRootHubCfg =
43 .HubCfgDesc = {
44 sizeof(struct UsbStdCfgDesc),
45 UDT_CONFIGURATION,
46 LE16(sizeof(struct OTGHubCfg)),
50 USCAF_ONE|USCAF_SELF_POWERED,
54 .HubIfDesc = {
55 sizeof(struct UsbStdIfDesc),
56 UDT_INTERFACE,
60 HUB_CLASSCODE,
66 .HubEPDesc = {
67 sizeof(struct UsbStdEPDesc),
68 UDT_ENDPOINT,
69 URTF_IN|1,
70 USEAF_INTERRUPT,
71 LE16(8),
72 255
76 const struct UsbHubDesc OTGRootHubDesc = {
77 9, // 0 Number of bytes in this descriptor, including this byte
78 UDT_HUB, // 1 Descriptor Type, value: 29H for hub descriptor
79 1, // 2 Number of downstream facing ports that this hub supports
80 0, // 3 wHubCharacteristics
81 0, // 5 bPwrOn2PwrGood
82 0, // 6 bHubContrCurrent
83 1, // 7 DeviceRemovable (size is variable)
84 0xFF // x PortPwrCtrlMask (size is variable)
87 static const CONST_STRPTR OTGRootHubStrings[] =
89 "The AROS Dev Team",
90 "BCM2708 OTG2USB Root Hub",
91 "Standard Config",
92 "Hub interface"