summaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_emac
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-11-11 07:24:54 +0100
committerPaul Mackerras <paulus@samba.org>2006-12-04 06:08:31 +0100
commit1be3770aa9220324e54851d1be7c879942f79620 (patch)
treeb5b34748ca3d0ba3d09e804af183b6328cc6ee9f /drivers/net/ibm_emac
parent[POWERPC] Generic DCR infrastructure (diff)
downloadlinux-1be3770aa9220324e54851d1be7c879942f79620.tar.xz
linux-1be3770aa9220324e54851d1be7c879942f79620.zip
[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/net/ibm_emac')
-rw-r--r--drivers/net/ibm_emac/ibm_emac_mal.h6
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 @@
#include <linux/netdevice.h>
#include <asm/io.h>
+#include <asm/dcr.h>
/*
* These MAL "versions" probably aren't the real versions IBM uses for these
@@ -191,6 +192,7 @@ struct mal_commac {
struct ibm_ocp_mal {
int dcrbase;
+ dcr_host_t dcrhost;
struct list_head poll_list;
struct net_device poll_dev;
@@ -207,12 +209,12 @@ struct ibm_ocp_mal {
static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg)
{
- return mfdcr(mal->dcrbase + reg);
+ return dcr_read(mal->dcrhost, mal->dcrbase + reg);
}
static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val)
{
- mtdcr(mal->dcrbase + reg, val);
+ dcr_write(mal->dcrhost, mal->dcrbase + reg, val);
}
/* Register MAL devices */