diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-11-11 01:24:54 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 00:08:31 -0500 |
commit | 1be3770aa9220324e54851d1be7c879942f79620 (patch) | |
tree | b5b34748ca3d0ba3d09e804af183b6328cc6ee9f /drivers | |
parent | 4c75a6f441cdd1c69a6c173bc7944e12c2ba6f84 (diff) |
[POWERPC] Make EMAC use generic DCR access methods
This patch makes the EMAC driver use the new DCR access methods. It
doesn't yet uses dcr_map() and thus still only work with real DCRs.
This will be fixed in a later patch
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ibm_emac/ibm_emac_mal.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h index f73f10a0a562..407d2acbf7c7 100644 --- a/drivers/net/ibm_emac/ibm_emac_mal.h +++ b/drivers/net/ibm_emac/ibm_emac_mal.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
25 | 25 | ||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/dcr.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * These MAL "versions" probably aren't the real versions IBM uses for these | 30 | * These MAL "versions" probably aren't the real versions IBM uses for these |
@@ -191,6 +192,7 @@ struct mal_commac { | |||
191 | 192 | ||
192 | struct ibm_ocp_mal { | 193 | struct ibm_ocp_mal { |
193 | int dcrbase; | 194 | int dcrbase; |
195 | dcr_host_t dcrhost; | ||
194 | 196 | ||
195 | struct list_head poll_list; | 197 | struct list_head poll_list; |
196 | struct net_device poll_dev; | 198 | struct net_device poll_dev; |
@@ -207,12 +209,12 @@ struct ibm_ocp_mal { | |||
207 | 209 | ||
208 | static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg) | 210 | static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg) |
209 | { | 211 | { |
210 | return mfdcr(mal->dcrbase + reg); | 212 | return dcr_read(mal->dcrhost, mal->dcrbase + reg); |
211 | } | 213 | } |
212 | 214 | ||
213 | static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val) | 215 | static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val) |
214 | { | 216 | { |
215 | mtdcr(mal->dcrbase + reg, val); | 217 | dcr_write(mal->dcrhost, mal->dcrbase + reg, val); |
216 | } | 218 | } |
217 | 219 | ||
218 | /* Register MAL devices */ | 220 | /* Register MAL devices */ |