1
2
3
4
5
6
7
8
9
10#ifndef __CROSSBAR_H__
11#define __CROSSBAR_H__
12
13
14
15
16typedef struct xbs {
17 u32 prs1;
18 u32 res1[3];
19 u32 crs1;
20 u32 res2[187];
21
22 u32 prs4;
23 u32 res3[3];
24 u32 crs4;
25 u32 res4[123];
26
27 u32 prs6;
28 u32 res5[3];
29 u32 crs6;
30 u32 res6[59];
31
32 u32 prs7;
33 u32 res7[3];
34 u32 crs7;
35} xbs_t;
36
37
38#define XBS_PRS_M0(x) (((x)&0x00000007))
39#define XBS_PRS_M1(x) (((x)&0x00000007)<<4)
40#define XBS_PRS_M2(x) (((x)&0x00000007)<<8)
41#define XBS_PRS_M3(x) (((x)&0x00000007)<<12)
42#define XBS_PRS_M5(x) (((x)&0x00000007)<<20)
43#define XBS_PRS_M6(x) (((x)&0x00000007)<<24)
44#define XBS_PRS_M7(x) (((x)&0x00000007)<<28)
45
46
47#define XBS_CRS_PARK(x) (((x)&0x00000007))
48#define XBS_CRS_PCTL(x) (((x)&0x00000003)<<4)
49#define XBS_CRS_ARB (0x00000100)
50#define XBS_CRS_RO (0x80000000)
51
52#define XBS_CRS_PCTL_PARK_FIELD (0)
53#define XBS_CRS_PCTL_PARK_ON_LAST (1)
54#define XBS_CRS_PCTL_PARK_NONE (2)
55#define XBS_CRS_PCTL_PARK_CORE (0)
56#define XBS_CRS_PCTL_PARK_EDMA (1)
57#define XBS_CRS_PCTL_PARK_FEC0 (2)
58#define XBS_CRS_PCTL_PARK_FEC1 (3)
59#define XBS_CRS_PCTL_PARK_PCI (5)
60#define XBS_CRS_PCTL_PARK_USB (6)
61#define XBS_CRS_PCTL_PARK_SBF (7)
62
63#endif
64