Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Benjamin Herrenschmidt and committed by
Paul Mackerras
1be3770a 4c75a6f4

+4 -2
+4 -2
drivers/net/ibm_emac/ibm_emac_mal.h
··· 24 24 #include <linux/netdevice.h> 25 25 26 26 #include <asm/io.h> 27 + #include <asm/dcr.h> 27 28 28 29 /* 29 30 * These MAL "versions" probably aren't the real versions IBM uses for these ··· 192 191 193 192 struct ibm_ocp_mal { 194 193 int dcrbase; 194 + dcr_host_t dcrhost; 195 195 196 196 struct list_head poll_list; 197 197 struct net_device poll_dev; ··· 209 207 210 208 static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg) 211 209 { 212 - return mfdcr(mal->dcrbase + reg); 210 + return dcr_read(mal->dcrhost, mal->dcrbase + reg); 213 211 } 214 212 215 213 static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val) 216 214 { 217 - mtdcr(mal->dcrbase + reg, val); 215 + dcr_write(mal->dcrhost, mal->dcrbase + reg, val); 218 216 } 219 217 220 218 /* Register MAL devices */