This source file includes following definitions.
- mxcc_set_stream_src
- mxcc_set_stream_dst
1
2
3
4
5
6
7 #ifndef _SPARC_MXCC_H
8 #define _SPARC_MXCC_H
9
10
11 #define MXCC_DATSTREAM 0x1C00000
12 #define MXCC_SRCSTREAM 0x1C00100
13 #define MXCC_DESSTREAM 0x1C00200
14 #define MXCC_RMCOUNT 0x1C00300
15 #define MXCC_STEST 0x1C00804
16 #define MXCC_CREG 0x1C00A04
17 #define MXCC_SREG 0x1C00B00
18 #define MXCC_RREG 0x1C00C04
19 #define MXCC_EREG 0x1C00E00
20 #define MXCC_PREG 0x1C00F04
21
22
23 #define MXCC_STREAM_SIZE 0x20
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 #define MXCC_CTL_RRC 0x00000200
41 #define MXCC_CTL_PRE 0x00000020
42 #define MXCC_CTL_MCE 0x00000010
43 #define MXCC_CTL_PARE 0x00000008
44 #define MXCC_CTL_ECE 0x00000004
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65 #define MXCC_ERR_ME 0x80000000
66 #define MXCC_ERR_CE 0x20000000
67 #define MXCC_ERR_PEW 0x10000000
68 #define MXCC_ERR_PEE 0x08000000
69 #define MXCC_ERR_ASE 0x04000000
70 #define MXCC_ERR_EIV 0x02000000
71 #define MXCC_ERR_MOPC 0x01FF8000
72 #define MXCC_ERR_ECODE 0x00007F80
73 #define MXCC_ERR_PRIV 0x00000040
74 #define MXCC_ERR_HPADDR 0x0000000f
75
76
77
78
79
80
81
82
83
84
85
86 extern inline void mxcc_set_stream_src(unsigned long *paddr)
87 {
88 unsigned long data0 = paddr[0];
89 unsigned long data1 = paddr[1];
90
91 __asm__ __volatile__ ("or %%g0, %0, %%g2\n\t"
92 "or %%g0, %1, %%g3\n\t"
93 "stda %%g2, [%2] %3\n\t" : :
94 "r" (data0), "r" (data1),
95 "r" (MXCC_SRCSTREAM),
96 "i" (ASI_M_MXCC) : "g2", "g3");
97 }
98
99 extern inline void mxcc_set_stream_dst(unsigned long *paddr)
100 {
101 unsigned long data0 = paddr[0];
102 unsigned long data1 = paddr[1];
103
104 __asm__ __volatile__ ("or %%g0, %0, %%g2\n\t"
105 "or %%g0, %1, %%g3\n\t"
106 "stda %%g2, [%2] %3\n\t" : :
107 "r" (data0), "r" (data1),
108 "r" (MXCC_DESSTREAM),
109 "i" (ASI_M_MXCC) : "g2", "g3");
110 }
111
112 #endif