diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-10-23 04:30:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-24 07:27:04 -0400 |
commit | 12d00cadcc45382fc127712aa35bd0c96cbf81d9 (patch) | |
tree | 96239fbc49d4907fd1677b9d9a2558525673c11e /drivers/net/sfc/falcon_gmac.c | |
parent | 3e6c4538542ab2103ab7c01f4458bc2e21b672a1 (diff) |
sfc: Rename register I/O header and functions used by both Falcon and Siena
While we're at it, use type suffixes of 'd', 'q' and 'o', consistent
with register type names.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_gmac.c')
-rw-r--r-- | drivers/net/sfc/falcon_gmac.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/sfc/falcon_gmac.c b/drivers/net/sfc/falcon_gmac.c index 0d156c88ca4..8a1b80d1ff2 100644 --- a/drivers/net/sfc/falcon_gmac.c +++ b/drivers/net/sfc/falcon_gmac.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include "falcon.h" | 14 | #include "falcon.h" |
15 | #include "mac.h" | 15 | #include "mac.h" |
16 | #include "regs.h" | 16 | #include "regs.h" |
17 | #include "falcon_io.h" | 17 | #include "io.h" |
18 | 18 | ||
19 | /************************************************************************** | 19 | /************************************************************************** |
20 | * | 20 | * |
@@ -41,7 +41,7 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx) | |||
41 | FRF_AB_GM_TX_FC_EN, tx_fc, | 41 | FRF_AB_GM_TX_FC_EN, tx_fc, |
42 | FRF_AB_GM_RX_EN, 1, | 42 | FRF_AB_GM_RX_EN, 1, |
43 | FRF_AB_GM_RX_FC_EN, rx_fc); | 43 | FRF_AB_GM_RX_FC_EN, rx_fc); |
44 | falcon_write(efx, ®, FR_AB_GM_CFG1); | 44 | efx_writeo(efx, ®, FR_AB_GM_CFG1); |
45 | udelay(10); | 45 | udelay(10); |
46 | 46 | ||
47 | /* Configuration register 2 */ | 47 | /* Configuration register 2 */ |
@@ -53,13 +53,13 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx) | |||
53 | FRF_AB_GM_FD, efx->link_fd, | 53 | FRF_AB_GM_FD, efx->link_fd, |
54 | FRF_AB_GM_PAMBL_LEN, 0x7/*datasheet recommended */); | 54 | FRF_AB_GM_PAMBL_LEN, 0x7/*datasheet recommended */); |
55 | 55 | ||
56 | falcon_write(efx, ®, FR_AB_GM_CFG2); | 56 | efx_writeo(efx, ®, FR_AB_GM_CFG2); |
57 | udelay(10); | 57 | udelay(10); |
58 | 58 | ||
59 | /* Max frame len register */ | 59 | /* Max frame len register */ |
60 | max_frame_len = EFX_MAX_FRAME_LEN(efx->net_dev->mtu); | 60 | max_frame_len = EFX_MAX_FRAME_LEN(efx->net_dev->mtu); |
61 | EFX_POPULATE_OWORD_1(reg, FRF_AB_GM_MAX_FLEN, max_frame_len); | 61 | EFX_POPULATE_OWORD_1(reg, FRF_AB_GM_MAX_FLEN, max_frame_len); |
62 | falcon_write(efx, ®, FR_AB_GM_MAX_FLEN); | 62 | efx_writeo(efx, ®, FR_AB_GM_MAX_FLEN); |
63 | udelay(10); | 63 | udelay(10); |
64 | 64 | ||
65 | /* FIFO configuration register 0 */ | 65 | /* FIFO configuration register 0 */ |
@@ -69,42 +69,42 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx) | |||
69 | FRF_AB_GMF_FRFENREQ, 1, | 69 | FRF_AB_GMF_FRFENREQ, 1, |
70 | FRF_AB_GMF_SRFENREQ, 1, | 70 | FRF_AB_GMF_SRFENREQ, 1, |
71 | FRF_AB_GMF_WTMENREQ, 1); | 71 | FRF_AB_GMF_WTMENREQ, 1); |
72 | falcon_write(efx, ®, FR_AB_GMF_CFG0); | 72 | efx_writeo(efx, ®, FR_AB_GMF_CFG0); |
73 | udelay(10); | 73 | udelay(10); |
74 | 74 | ||
75 | /* FIFO configuration register 1 */ | 75 | /* FIFO configuration register 1 */ |
76 | EFX_POPULATE_OWORD_2(reg, | 76 | EFX_POPULATE_OWORD_2(reg, |
77 | FRF_AB_GMF_CFGFRTH, 0x12, | 77 | FRF_AB_GMF_CFGFRTH, 0x12, |
78 | FRF_AB_GMF_CFGXOFFRTX, 0xffff); | 78 | FRF_AB_GMF_CFGXOFFRTX, 0xffff); |
79 | falcon_write(efx, ®, FR_AB_GMF_CFG1); | 79 | efx_writeo(efx, ®, FR_AB_GMF_CFG1); |
80 | udelay(10); | 80 | udelay(10); |
81 | 81 | ||
82 | /* FIFO configuration register 2 */ | 82 | /* FIFO configuration register 2 */ |
83 | EFX_POPULATE_OWORD_2(reg, | 83 | EFX_POPULATE_OWORD_2(reg, |
84 | FRF_AB_GMF_CFGHWM, 0x3f, | 84 | FRF_AB_GMF_CFGHWM, 0x3f, |
85 | FRF_AB_GMF_CFGLWM, 0xa); | 85 | FRF_AB_GMF_CFGLWM, 0xa); |
86 | falcon_write(efx, ®, FR_AB_GMF_CFG2); | 86 | efx_writeo(efx, ®, FR_AB_GMF_CFG2); |
87 | udelay(10); | 87 | udelay(10); |
88 | 88 | ||
89 | /* FIFO configuration register 3 */ | 89 | /* FIFO configuration register 3 */ |
90 | EFX_POPULATE_OWORD_2(reg, | 90 | EFX_POPULATE_OWORD_2(reg, |
91 | FRF_AB_GMF_CFGHWMFT, 0x1c, | 91 | FRF_AB_GMF_CFGHWMFT, 0x1c, |
92 | FRF_AB_GMF_CFGFTTH, 0x08); | 92 | FRF_AB_GMF_CFGFTTH, 0x08); |
93 | falcon_write(efx, ®, FR_AB_GMF_CFG3); | 93 | efx_writeo(efx, ®, FR_AB_GMF_CFG3); |
94 | udelay(10); | 94 | udelay(10); |
95 | 95 | ||
96 | /* FIFO configuration register 4 */ | 96 | /* FIFO configuration register 4 */ |
97 | EFX_POPULATE_OWORD_1(reg, FRF_AB_GMF_HSTFLTRFRM_PAUSE, 1); | 97 | EFX_POPULATE_OWORD_1(reg, FRF_AB_GMF_HSTFLTRFRM_PAUSE, 1); |
98 | falcon_write(efx, ®, FR_AB_GMF_CFG4); | 98 | efx_writeo(efx, ®, FR_AB_GMF_CFG4); |
99 | udelay(10); | 99 | udelay(10); |
100 | 100 | ||
101 | /* FIFO configuration register 5 */ | 101 | /* FIFO configuration register 5 */ |
102 | falcon_read(efx, ®, FR_AB_GMF_CFG5); | 102 | efx_reado(efx, ®, FR_AB_GMF_CFG5); |
103 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_CFGBYTMODE, bytemode); | 103 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_CFGBYTMODE, bytemode); |
104 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_CFGHDPLX, !efx->link_fd); | 104 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_CFGHDPLX, !efx->link_fd); |
105 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_HSTDRPLT64, !efx->link_fd); | 105 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_HSTDRPLT64, !efx->link_fd); |
106 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_HSTFLTRFRMDC_PAUSE, 0); | 106 | EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_HSTFLTRFRMDC_PAUSE, 0); |
107 | falcon_write(efx, ®, FR_AB_GMF_CFG5); | 107 | efx_writeo(efx, ®, FR_AB_GMF_CFG5); |
108 | udelay(10); | 108 | udelay(10); |
109 | 109 | ||
110 | /* MAC address */ | 110 | /* MAC address */ |
@@ -113,12 +113,12 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx) | |||
113 | FRF_AB_GM_ADR_B1, efx->net_dev->dev_addr[4], | 113 | FRF_AB_GM_ADR_B1, efx->net_dev->dev_addr[4], |
114 | FRF_AB_GM_ADR_B2, efx->net_dev->dev_addr[3], | 114 | FRF_AB_GM_ADR_B2, efx->net_dev->dev_addr[3], |
115 | FRF_AB_GM_ADR_B3, efx->net_dev->dev_addr[2]); | 115 | FRF_AB_GM_ADR_B3, efx->net_dev->dev_addr[2]); |
116 | falcon_write(efx, ®, FR_AB_GM_ADR1); | 116 | efx_writeo(efx, ®, FR_AB_GM_ADR1); |
117 | udelay(10); | 117 | udelay(10); |
118 | EFX_POPULATE_OWORD_2(reg, | 118 | EFX_POPULATE_OWORD_2(reg, |
119 | FRF_AB_GM_ADR_B4, efx->net_dev->dev_addr[1], | 119 | FRF_AB_GM_ADR_B4, efx->net_dev->dev_addr[1], |
120 | FRF_AB_GM_ADR_B5, efx->net_dev->dev_addr[0]); | 120 | FRF_AB_GM_ADR_B5, efx->net_dev->dev_addr[0]); |
121 | falcon_write(efx, ®, FR_AB_GM_ADR2); | 121 | efx_writeo(efx, ®, FR_AB_GM_ADR2); |
122 | udelay(10); | 122 | udelay(10); |
123 | 123 | ||
124 | falcon_reconfigure_mac_wrapper(efx); | 124 | falcon_reconfigure_mac_wrapper(efx); |