]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/fs_enet/mac-fec.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / fs_enet / mac-fec.c
index 8a311d1e435b131a202588d903f557368fbe60f2..14e575313c89c85c9573a85359368e0e320725a5 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/bitops.h>
 #include <linux/fs.h>
 #include <linux/platform_device.h>
+#include <linux/of_device.h>
 
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/cpm1.h>
 #endif
 
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
-#include <asm/of_device.h>
-#endif
-
 #include "fs_enet.h"
 #include "fec.h"
 
@@ -99,7 +96,6 @@ static int whack_reset(fec_t __iomem *fecp)
 
 static int do_pd_setup(struct fs_enet_private *fep)
 {
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
        struct of_device *ofdev = to_of_device(fep->dev);
 
        fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL);
@@ -111,23 +107,6 @@ static int do_pd_setup(struct fs_enet_private *fep)
                return -EINVAL;
 
        return 0;
-#else
-       struct platform_device *pdev = to_platform_device(fep->dev);
-       struct resource *r;
-
-       /* Fill out IRQ field */
-       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 = ioremap(r->start, r->end - r->start + 1);
-
-       if(fep->fec.fecp == NULL)
-               return -EINVAL;
-
-       return 0;
-#endif
 }
 
 #define FEC_NAPI_RX_EVENT_MSK  (FEC_ENET_RXF | FEC_ENET_RXB)
@@ -334,11 +313,7 @@ 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)
@@ -434,30 +409,6 @@ 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;
-
-       /* SIU interrupt */
-       if (irq >= SIU_IRQ0 && irq < SIU_LEVEL7) {
-
-               siel = in_be32(&immap->im_siu_conf.sc_siel);
-               if ((irq & 1) == 0)
-                       siel |= (0x80000000 >> irq);
-               else
-                       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)
-{
-       /* nothing */
-}
-
 static void napi_clear_rx_event(struct net_device *dev)
 {
        struct fs_enet_private *fep = netdev_priv(dev);
@@ -550,8 +501,6 @@ const struct fs_ops fs_fec_ops = {
        .set_multicast_list     = set_multicast_list,
        .restart                = restart,
        .stop                   = stop,
-       .pre_request_irq        = pre_request_irq,
-       .post_free_irq          = post_free_irq,
        .napi_clear_rx_event    = napi_clear_rx_event,
        .napi_enable_rx         = napi_enable_rx,
        .napi_disable_rx        = napi_disable_rx,