[PATCH] zd1211rw: Add another ID for Linksys WUSBF54G
[powerpc.git] / drivers / net / fs_enet / mac-fec.c
index c2c5fd4..cdcfb96 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/ptrace.h>
 #include <linux/errno.h>
@@ -104,9 +103,9 @@ static int do_pd_setup(struct fs_enet_private *fep)
        fep->interrupt = platform_get_irq_byname(pdev,"interrupt");
        if (fep->interrupt < 0)
                return -EINVAL;
-       
+
        r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
-       fep->fec.fecp =(void*)r->start;
+       fep->fec.fecp = ioremap(r->start, r->end - r->start + 1);
 
        if(fep->fec.fecp == NULL)
                return -EINVAL;
@@ -319,11 +318,14 @@ static void restart(struct net_device *dev)
         * Clear any outstanding interrupt.
         */
        FW(fecp, ievent, 0xffc0);
+#ifndef CONFIG_PPC_MERGE
        FW(fecp, ivec, (fep->interrupt / 2) << 29);
-       
+#else
+       FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29);
+#endif
 
        /*
-        * adjust to speed (only for DUET & RMII) 
+        * adjust to speed (only for DUET & RMII)
         */
 #ifdef CONFIG_DUET
        if (fpi->use_rmii) {
@@ -418,6 +420,7 @@ static void stop(struct net_device *dev)
 
 static void pre_request_irq(struct net_device *dev, int irq)
 {
+#ifndef CONFIG_PPC_MERGE
        immap_t *immap = fs_enet_immap;
        u32 siel;
 
@@ -431,6 +434,7 @@ static void pre_request_irq(struct net_device *dev, int irq)
                        siel &= ~(0x80000000 >> (irq & ~1));
                out_be32(&immap->im_siu_conf.sc_siel, siel);
        }
+#endif
 }
 
 static void post_free_irq(struct net_device *dev, int irq)