]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Make EMAC use generic DCR access methods
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sat, 11 Nov 2006 06:24:54 +0000 (17:24 +1100)
committerPaul Mackerras <paulus@samba.org>
Mon, 4 Dec 2006 05:08:31 +0000 (16:08 +1100)
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>
drivers/net/ibm_emac/ibm_emac_mal.h

index f73f10a0a56217c13f378dd5466209f33e2d73d4..407d2acbf7c79c057e18810c89254ee86b1699a3 100644 (file)
@@ -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 */