1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use cratecreate_cluster;
use crateResult;
// cap: the only register cluster with a fixed offset (zero offset from xhci base)
// op: dynamically defined by the cap.hc_capbase register value
// run: dynamically defined by the cap.run_regs_off register value
//
// because `op` and `run` are dynamically defined per-platform,
// statically defining them will require:
//
// - getting the value from the board
// - defining the values in the DTS somehow
// - require users of new boards/SoCs to repeat the process
// - is there a way to define "floating" registers like this in SVD?
// - probably not
// - may be better to define the skeleton structures, and fill in the address in HAL/BSP crates
//
// defined by `struct xhci_cap_regs` in Linux
// defined by `struct xhci_op_regs` in Linux
//pub mod op;
// defined by `struct xhci_run_regs` in Linux
//pub mod run;
/// Creates Cadence USB3 XHCI register definitions.
///
/// Based on the register definitions from the Linux driver:
///
/// - <https://elixir.bootlin.com/linux/latest/source/drivers/usb/host/xhci.h>
///
/// Original Author(s):
///
/// - Sarah Sharp <sarah.a.sharp@linux.intel.com>
/// - Matt Evans <matt@ozlabs.org>
/// - Andiry Xu <andiry.xu@amd.com>
/// - Lu Baolu <baolu.lu@linux.intel.com>
/// - Mathias Nyman <mathias.nyman@linux.intel.com>