]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/ibm_emac/ibm_emac_mal.h
Pull output-switch into test branch
[linux-2.6-omap-h63xx.git] / drivers / net / ibm_emac / ibm_emac_mal.h
index 15b0bdae26acfcbd125386810d0e5cd5910004f7..407d2acbf7c79c057e18810c89254ee86b1699a3 100644 (file)
 #ifndef __IBM_EMAC_MAL_H_
 #define __IBM_EMAC_MAL_H_
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/list.h>
 #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 
  * reflect the fact that 40x and 44x have slightly different MALs. --ebs
  */
 #if defined(CONFIG_405GP) || defined(CONFIG_405GPR) || defined(CONFIG_405EP) || \
-    defined(CONFIG_440EP) || defined(CONFIG_NP405H)
+    defined(CONFIG_440EP) || defined(CONFIG_440GR) || defined(CONFIG_NP405H)
 #define MAL_VERSION            1
-#elif defined(CONFIG_440GP) || defined(CONFIG_440GX) || defined(CONFIG_440SP)
+#elif defined(CONFIG_440GP) || defined(CONFIG_440GX) || defined(CONFIG_440SP) || \
+      defined(CONFIG_440SPE)
 #define MAL_VERSION            2
 #else
 #error "Unknown SoC, please check chip manual and choose MAL 'version'"
@@ -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 */