#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)
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 */
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;
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;
/* 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)