1 /*-
2 * Copyright 2007-2013 Solarflare Communications Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26 #ifndef _SYS_MAX6647_IMPL_H
27 #define _SYS_MAX6647_IMPL_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #if EFSYS_OPT_MON_MAX6647 || EFSYS_OPT_PHY_SFX7101
34
35 #define RLTS_REG 0x00
36
37 #define RRTE_REG 0x01
38
39 #define RSL_REG 0x02
40 #define BUSY_LBN 7
41 #define BUSY_WIDTH 1
42 #define LHIGH_LBN 6
43 #define LHIGH_WIDTH 1
44 #define LLOW_LBN 5
45 #define LLOW_WIDTH 1
46 #define RHIGH_LBN 4
47 #define RHIGH_WIDTH 1
48 #define RLOW_LBN 3
49 #define RLOW_WIDTH 1
50 #define FAULT_LBN 2
51 #define FAULT_WIDTH 1
52 #define EOT_LBN 1
53 #define EOT_WIDTH 1
54 #define IOT_LBN 0
55 #define IOT_WIDTH 1
56
57 #define RCL_REG 0x03
58 #define MASK_LBN 7
59 #define MASK_WIDTH 1
60 #define NRUN_LBN 6
61 #define NRUN_WIDTH 1
62
63 #define RCRA_REG 0x04
64
65 #define RLHN_REG 0x05
66
67 #define RLLI_REG 0x06
68
69 #define RRHI_REG 0x07
70
71 #define RRLS_REG 0x08
72
73 #define WCA_REG 0x09
74
75 #define WCRW_REG 0x0a
76
77 #define WLHO_REG 0x0b
78
79 #define WRHA_REG 0x0c
80
81 #define WRLN_REG 0x0e
82
83 #define OSHT_REG 0x0f
84
85 #define REET_REG 0x10
86
87 #define RIET_REG 0x11
88
89 #define RWOE_REG 0x19
90
91 #define RWOI_REG 0x20
92
93 #define HYS_REG 0x21
94
95 #define QUEUE_REG 0x22
96
97 #define MFID_REG 0xfe
98 #define MFID_DECODE 0x4d
99
100 #define REVID_REG 0xff
101 #define REVID_DECODE 0x59
102
103 #endif /* EFSYS_OPT_MON_MAX6647 || EFSYS_OPT_PHY_SFX7101 */
104
105 #ifdef __cplusplus
106 }
107 #endif
108
109 #endif /* _SYS_MAX6647_IMPL_H */