1
2
3
4
5
6
7
8
9
10#ifndef _FUSBH200_H
11#define _FUSBH200_H
12
13struct fusbh200_regs {
14 struct {
15 uint32_t data[4];
16 } hccr;
17 struct {
18 uint32_t data[9];
19 } hcor;
20 uint32_t easstr;
21 uint32_t rsvd[2];
22 uint32_t bmcsr;
23 uint32_t bmisr;
24 uint32_t bmier;
25};
26
27
28#define EASSTR_RUNNING (1 << 6)
29#define EASSTR_SUSPEND (0 << 6)
30#define EASSTR_EOF2(x) (((x) & 0x3) << 4)
31#define EASSTR_EOF1(x) (((x) & 0x3) << 2)
32#define EASSTR_ASST(x) (((x) & 0x3) << 0)
33
34
35#define BMCSR_SPD_HIGH (2 << 9)
36#define BMCSR_SPD_LOW (1 << 9)
37#define BMCSR_SPD_FULL (0 << 9)
38#define BMCSR_SPD_MASK (3 << 9)
39#define BMCSR_SPD_SHIFT 9
40#define BMCSR_SPD(x) ((x >> 9) & 0x03)
41#define BMCSR_VBUS (1 << 8)
42#define BMCSR_VBUS_OFF (1 << 4)
43#define BMCSR_VBUS_ON (0 << 4)
44#define BMCSR_IRQLH (1 << 3)
45#define BMCSR_IRQLL (0 << 3)
46#define BMCSR_HALFSPD (1 << 2)
47#define BMCSR_HFT_LONG (1 << 1)
48#define BMCSR_HFT (0 << 1)
49#define BMCSR_VFT_LONG (1 << 1)
50#define BMCSR_VFT (0 << 1)
51
52
53
54#define BMISR_DMAERR (1 << 4)
55#define BMISR_DMA (1 << 3)
56#define BMISR_DEVRM (1 << 2)
57#define BMISR_OVD (1 << 1)
58#define BMISR_VBUSERR (1 << 0)
59
60#endif
61