summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyzee119 <[email protected]>2022-06-04 13:44:22 +0930
committerRyan Wendland <[email protected]>2023-02-18 10:24:21 +1030
commitd367e8f8a8acd82c89ba3c029495b9404c3b7fdb (patch)
tree6ea3267a118f1a199d4e70e44218fe8e16315b52 /src
parent334263523756bf6539546bd11915299704034a39 (diff)
ohci: Expand roothub descriptors into unions
Diffstat (limited to 'src')
-rw-r--r--src/portable/ohci/ohci.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/portable/ohci/ohci.h b/src/portable/ohci/ohci.h
index f40ae24cc..c42db141a 100644
--- a/src/portable/ohci/ohci.h
+++ b/src/portable/ohci/ohci.h
@@ -230,8 +230,27 @@ typedef volatile struct
uint32_t periodic_start;
uint32_t lowspeed_threshold;
- uint32_t rh_descriptorA;
- uint32_t rh_descriptorB;
+ union {
+ uint32_t rh_descriptorA;
+ struct {
+ uint32_t number_downstream_ports : 8;
+ uint32_t power_switching_mode : 1;
+ uint32_t no_power_switching : 1;
+ uint32_t device_type : 1;
+ uint32_t overcurrent_protection_mode : 1;
+ uint32_t no_over_current_protection : 1;
+ uint32_t reserved : 11;
+ uint32_t power_on_to_good_time : 8;
+ } rh_descriptorA_bit;
+ };
+
+ union {
+ uint32_t rh_descriptorB;
+ struct {
+ uint32_t device_removable : 16;
+ uint32_t port_power_control_mask : 16;
+ } rh_descriptorB_bit;
+ };
union {
uint32_t rh_status;