blob: 496f018fb5a23a532d8c7b50ad8d2e5c2371fde9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2/*
3 *
Joe Perches475be4d2012-02-19 19:52:38 -08004 Copyright (c) Eicon Networks, 2002.
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
Joe Perches475be4d2012-02-19 19:52:38 -08006 This source file is supplied for the use with
7 Eicon Networks range of DIVA Server Adapters.
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 *
Joe Perches475be4d2012-02-19 19:52:38 -08009 Eicon File Revision : 2.1
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 *
Joe Perches475be4d2012-02-19 19:52:38 -080011 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
14 any later version.
Linus Torvalds1da177e2005-04-16 15:20:36 -070015 *
Joe Perches475be4d2012-02-19 19:52:38 -080016 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
18 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 See the GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 *
Joe Perches475be4d2012-02-19 19:52:38 -080021 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 *
25 */
26#ifdef PLATFORM_GT_32BIT
27/* #define POINTER_32BIT byte * __ptr32 */
Joe Perches475be4d2012-02-19 19:52:38 -080028#define POINTER_32BIT dword
Linus Torvalds1da177e2005-04-16 15:20:36 -070029#else
30#define POINTER_32BIT byte *
31#endif
32#if !defined(MIPS_SCOM)
33#define BUFFER_SZ 48
34#define MAINT_OFFS 0x380
35#else
36#define BUFFER_SZ 128
37#if defined(PRI)
38#define MAINT_OFFS 0xef00
39#else
40#define MAINT_OFFS 0xff00
41#endif
42#endif
43#define MIPS_BUFFER_SZ 128
44#if defined(PRI)
45#define MIPS_MAINT_OFFS 0xef00
46#else
47#define MIPS_MAINT_OFFS 0xff00
48#endif
49#define LOG 1
50#define MEMR 2
51#define MEMW 3
52#define IOR 4
53#define IOW 5
54#define B1TEST 6
55#define B2TEST 7
56#define BTESTOFF 8
57#define DSIG_STATS 9
58#define B_CH_STATS 10
59#define D_CH_STATS 11
60#define BL1_STATS 12
61#define BL1_STATS_C 13
62#define GET_VERSION 14
63#define OS_STATS 15
64#define XLOG_SET_MASK 16
65#define XLOG_GET_MASK 17
66#define DSP_READ 20
67#define DSP_WRITE 21
68#define OK 0xff
69#define MORE_EVENTS 0xfe
70#define NO_EVENT 1
71struct DSigStruc
72{
Joe Perches475be4d2012-02-19 19:52:38 -080073 byte Id;
74 byte u;
75 byte listen;
76 byte active;
77 byte sin[3];
78 byte bc[6];
79 byte llc[6];
80 byte hlc[6];
81 byte oad[20];
Linus Torvalds1da177e2005-04-16 15:20:36 -070082};
83struct BL1Struc {
Joe Perches475be4d2012-02-19 19:52:38 -080084 dword cx_b1;
85 dword cx_b2;
86 dword cr_b1;
87 dword cr_b2;
88 dword px_b1;
89 dword px_b2;
90 dword pr_b1;
91 dword pr_b2;
92 word er_b1;
93 word er_b2;
Linus Torvalds1da177e2005-04-16 15:20:36 -070094};
95struct L2Struc {
Joe Perches475be4d2012-02-19 19:52:38 -080096 dword XTotal;
97 dword RTotal;
98 word XError;
99 word RError;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100};
101struct OSStruc {
Joe Perches475be4d2012-02-19 19:52:38 -0800102 dword free_n;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103};
104typedef union
105{
Joe Perches475be4d2012-02-19 19:52:38 -0800106 struct DSigStruc DSigStats;
107 struct BL1Struc BL1Stats;
108 struct L2Struc L2Stats;
109 struct OSStruc OSStats;
110 byte b[BUFFER_SZ];
111 word w[BUFFER_SZ >> 1];
112 word l[BUFFER_SZ >> 2]; /* word is wrong, do not use! Use 'd' instead. */
113 dword d[BUFFER_SZ >> 2];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114} BUFFER;
115typedef union
116{
Joe Perches475be4d2012-02-19 19:52:38 -0800117 struct DSigStruc DSigStats;
118 struct BL1Struc BL1Stats;
119 struct L2Struc L2Stats;
120 struct OSStruc OSStats;
121 byte b[MIPS_BUFFER_SZ];
122 word w[MIPS_BUFFER_SZ >> 1];
123 word l[BUFFER_SZ >> 2]; /* word is wrong, do not use! Use 'd' instead. */
124 dword d[MIPS_BUFFER_SZ >> 2];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125} MIPS_BUFFER;
126#if !defined(MIPS_SCOM)
127struct pc_maint
128{
Joe Perches475be4d2012-02-19 19:52:38 -0800129 byte req;
130 byte rc;
131 POINTER_32BIT mem;
132 short length;
133 word port;
134 byte fill[6];
135 BUFFER data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136};
137#else
138struct pc_maint
139{
Joe Perches475be4d2012-02-19 19:52:38 -0800140 byte req;
141 byte rc;
142 byte reserved[2]; /* R3000 alignment ... */
143 POINTER_32BIT mem;
144 short length;
145 word port;
146 byte fill[4]; /* data at offset 16 */
147 BUFFER data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148};
149#endif
150struct mi_pc_maint
151{
Joe Perches475be4d2012-02-19 19:52:38 -0800152 byte req;
153 byte rc;
154 byte reserved[2]; /* R3000 alignment ... */
155 POINTER_32BIT mem;
156 short length;
157 word port;
158 byte fill[4]; /* data at offset 16 */
159 MIPS_BUFFER data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160};