Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git] / arch / ppc / 8260_io / enet.c
index 6df3811..a6056c2 100644 (file)
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/spinlock.h>
+#include <linux/bitops.h>
 
 #include <asm/immap_cpm2.h>
 #include <asm/pgtable.h>
 #include <asm/mpc8260.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 #include <asm/cpm2.h>
 #include <asm/irq.h>
@@ -122,7 +122,7 @@ struct scc_enet_private {
 static int scc_enet_open(struct net_device *dev);
 static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static int scc_enet_rx(struct net_device *dev);
-static irqreturn_t scc_enet_interrupt(int irq, void *dev_id, struct pt_regs *);
+static irqreturn_t scc_enet_interrupt(int irq, void *dev_id);
 static int scc_enet_close(struct net_device *dev);
 static struct net_device_stats *scc_enet_get_stats(struct net_device *dev);
 static void set_multicast_list(struct net_device *dev);
@@ -273,7 +273,7 @@ scc_enet_timeout(struct net_device *dev)
  * This is called from the CPM handler, not the MPC core interrupt.
  */
 static irqreturn_t
-scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+scc_enet_interrupt(int irq, void * dev_id)
 {
        struct  net_device *dev = dev_id;
        volatile struct scc_enet_private *cep;
@@ -613,7 +613,7 @@ static int __init scc_enet_init(void)
        struct net_device *dev;
        struct scc_enet_private *cep;
        int i, j, err;
-       void * dpaddr;
+       uint dp_offset;
        unsigned char   *eap;
        unsigned long   mem_addr;
        bd_t            *bd;
@@ -681,13 +681,13 @@ static int __init scc_enet_init(void)
         * These are relative offsets in the DP ram address space.
         * Initialize base addresses for the buffer descriptors.
         */
-       dpaddr = cpm2_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
-       ep->sen_genscc.scc_rbase = cpm2_dpram_offset(dpaddr);
-       cep->rx_bd_base = (cbd_t *)dpaddr;
+       dp_offset = cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
+       ep->sen_genscc.scc_rbase = dp_offset;
+       cep->rx_bd_base = (cbd_t *)cpm_dpram_addr(dp_offset);
 
-       dpaddr = cpm2_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
-       ep->sen_genscc.scc_tbase = cpm2_dpram_offset(dpaddr);
-       cep->tx_bd_base = (cbd_t *)dpaddr;
+       dp_offset = cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
+       ep->sen_genscc.scc_tbase = dp_offset;
+       cep->tx_bd_base = (cbd_t *)cpm_dpram_addr(dp_offset);
 
        cep->dirty_tx = cep->cur_tx = cep->tx_bd_base;
        cep->cur_rx = cep->rx_bd_base;