]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/irda/omap-ir.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / drivers / net / irda / omap-ir.c
index 562c8768a0b0662e1a2e6f3e51b2df2bfa8c4739..b706253aae0ca7e2acb629e43ceb7f454b87fcf2 100644 (file)
@@ -54,6 +54,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
+#include <linux/workqueue.h>
 
 #include <net/irda/irda.h>
 #include <net/irda/irmod.h>
 
 #include <asm/irq.h>
 #include <asm/io.h>
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/serial.h>
 #include <asm/mach-types.h>
 #include <asm/dma.h>
-#include <asm/arch/mux.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/irda.h>
+#include <mach/mux.h>
+#include <mach/gpio.h>
+#include <mach/irda.h>
 
 #define UART3_EFR_EN                   (1 << 4)
 #define UART3_MCR_EN_TCR_TLR           (1 << 6)
@@ -377,12 +378,8 @@ omap_irda_irq(int irq, void *dev_id)
 
                skb_reserve(skb, 1);
 
-               w = OMAP_DMA_CDAC_REG(omap_ir->rx_dma_channel);
-
-               if (cpu_is_omap16xx())
-                       w -= OMAP1_DMA_CDSA_L_REG(omap_ir->rx_dma_channel);
-               if (cpu_is_omap24xx())
-                       w -= OMAP2_DMA_CDSA_REG(omap_ir->rx_dma_channel);
+               w = omap_get_dma_dst_pos(omap_ir->rx_dma_channel) -
+                                               omap_ir->rx_buf_dma_phys;
 
                if (!IS_FIR(omap_ir))
                        /* Copy DMA buffer to skb */
@@ -394,7 +391,7 @@ omap_irda_irq(int irq, void *dev_id)
                                        w - 4);
 
                skb->dev = dev;
-               skb->mac.raw = skb->data;
+               skb_reset_mac_header(skb);
                skb->protocol = htons(ETH_P_IRDA);
                omap_ir->stats.rx_packets++;
                omap_ir->stats.rx_bytes += skb->len;
@@ -443,7 +440,7 @@ static int omap_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
        netif_stop_queue(dev);
 
        /* Copy skb data to DMA buffer */
-       memcpy(omap_ir->tx_buf_dma_virt, skb->data, skb->len);
+       skb_copy_from_linear_data(skb, omap_ir->tx_buf_dma_virt, skb->len);
 
        /* Copy skb data to DMA buffer */
        omap_ir->stats.tx_bytes += skb->len;
@@ -849,7 +846,7 @@ static int omap_irda_probe(struct platform_device *pdev)
 
        /* Any better way to avoid this? No. */
        if (machine_is_omap_h3() || machine_is_omap_h4())
-               INIT_WORK(&omap_ir->pdata->gpio_expa, NULL, NULL);
+               INIT_DELAYED_WORK(&omap_ir->pdata->gpio_expa, NULL);
 
        err = register_netdev(dev);
        if (!err)