aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_newemac/emac.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ibm_newemac/emac.h')
-rw-r--r--drivers/net/ibm_newemac/emac.h101
1 files changed, 69 insertions, 32 deletions
diff --git a/drivers/net/ibm_newemac/emac.h b/drivers/net/ibm_newemac/emac.h
index 91cb096ab405..0afc2cf5c52b 100644
--- a/drivers/net/ibm_newemac/emac.h
+++ b/drivers/net/ibm_newemac/emac.h
@@ -27,37 +27,80 @@
27 27
28#include <linux/types.h> 28#include <linux/types.h>
29 29
30/* EMAC registers Write Access rules */ 30/* EMAC registers Write Access rules */
31struct emac_regs { 31struct emac_regs {
32 u32 mr0; /* special */ 32 /* Common registers across all EMAC implementations. */
33 u32 mr1; /* Reset */ 33 u32 mr0; /* Special */
34 u32 tmr0; /* special */ 34 u32 mr1; /* Reset */
35 u32 tmr1; /* special */ 35 u32 tmr0; /* Special */
36 u32 rmr; /* Reset */ 36 u32 tmr1; /* Special */
37 u32 isr; /* Always */ 37 u32 rmr; /* Reset */
38 u32 iser; /* Reset */ 38 u32 isr; /* Always */
39 u32 iahr; /* Reset, R, T */ 39 u32 iser; /* Reset */
40 u32 ialr; /* Reset, R, T */ 40 u32 iahr; /* Reset, R, T */
41 u32 vtpid; /* Reset, R, T */ 41 u32 ialr; /* Reset, R, T */
42 u32 vtci; /* Reset, R, T */ 42 u32 vtpid; /* Reset, R, T */
43 u32 ptr; /* Reset, T */ 43 u32 vtci; /* Reset, R, T */
44 u32 iaht1; /* Reset, R */ 44 u32 ptr; /* Reset, T */
45 u32 iaht2; /* Reset, R */ 45 union {
46 u32 iaht3; /* Reset, R */ 46 /* Registers unique to EMAC4 implementations */
47 u32 iaht4; /* Reset, R */ 47 struct {
48 u32 gaht1; /* Reset, R */ 48 u32 iaht1; /* Reset, R */
49 u32 gaht2; /* Reset, R */ 49 u32 iaht2; /* Reset, R */
50 u32 gaht3; /* Reset, R */ 50 u32 iaht3; /* Reset, R */
51 u32 gaht4; /* Reset, R */ 51 u32 iaht4; /* Reset, R */
52 u32 gaht1; /* Reset, R */
53 u32 gaht2; /* Reset, R */
54 u32 gaht3; /* Reset, R */
55 u32 gaht4; /* Reset, R */
56 } emac4;
57 /* Registers unique to EMAC4SYNC implementations */
58 struct {
59 u32 mahr; /* Reset, R, T */
60 u32 malr; /* Reset, R, T */
61 u32 mmahr; /* Reset, R, T */
62 u32 mmalr; /* Reset, R, T */
63 u32 rsvd0[4];
64 } emac4sync;
65 } u0;
66 /* Common registers across all EMAC implementations. */
52 u32 lsah; 67 u32 lsah;
53 u32 lsal; 68 u32 lsal;
54 u32 ipgvr; /* Reset, T */ 69 u32 ipgvr; /* Reset, T */
55 u32 stacr; /* special */ 70 u32 stacr; /* Special */
56 u32 trtr; /* special */ 71 u32 trtr; /* Special */
57 u32 rwmr; /* Reset */ 72 u32 rwmr; /* Reset */
58 u32 octx; 73 u32 octx;
59 u32 ocrx; 74 u32 ocrx;
60 u32 ipcr; 75 union {
76 /* Registers unique to EMAC4 implementations */
77 struct {
78 u32 ipcr;
79 } emac4;
80 /* Registers unique to EMAC4SYNC implementations */
81 struct {
82 u32 rsvd1;
83 u32 revid;
84 u32 rsvd2[2];
85 u32 iaht1; /* Reset, R */
86 u32 iaht2; /* Reset, R */
87 u32 iaht3; /* Reset, R */
88 u32 iaht4; /* Reset, R */
89 u32 iaht5; /* Reset, R */
90 u32 iaht6; /* Reset, R */
91 u32 iaht7; /* Reset, R */
92 u32 iaht8; /* Reset, R */
93 u32 gaht1; /* Reset, R */
94 u32 gaht2; /* Reset, R */
95 u32 gaht3; /* Reset, R */
96 u32 gaht4; /* Reset, R */
97 u32 gaht5; /* Reset, R */
98 u32 gaht6; /* Reset, R */
99 u32 gaht7; /* Reset, R */
100 u32 gaht8; /* Reset, R */
101 u32 tpc; /* Reset, T */
102 } emac4sync;
103 } u1;
61}; 104};
62 105
63/* 106/*
@@ -73,12 +116,6 @@ struct emac_regs {
73#define PHY_MODE_RTBI 7 116#define PHY_MODE_RTBI 7
74#define PHY_MODE_SGMII 8 117#define PHY_MODE_SGMII 8
75 118
76
77#define EMAC_ETHTOOL_REGS_VER 0
78#define EMAC_ETHTOOL_REGS_SIZE (sizeof(struct emac_regs) - sizeof(u32))
79#define EMAC4_ETHTOOL_REGS_VER 1
80#define EMAC4_ETHTOOL_REGS_SIZE sizeof(struct emac_regs)
81
82/* EMACx_MR0 */ 119/* EMACx_MR0 */
83#define EMAC_MR0_RXI 0x80000000 120#define EMAC_MR0_RXI 0x80000000
84#define EMAC_MR0_TXI 0x40000000 121#define EMAC_MR0_TXI 0x40000000