/* * Copyright (C) 2013-2014 Renesas Electronics Europe Ltd. * Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. */#include<linux/bitmap.h>#include<linux/bitops.h>#include<linux/clk.h>#include<linux/dma-mapping.h>#include<linux/dmaengine.h>#include<linux/err.h>#include<linux/interrupt.h>#include<linux/io.h>#include<linux/log2.h>#include<linux/module.h>#include<linux/of.h>#include<linux/of_device.h>#include<linux/of_dma.h>#include<linux/platform_device.h>#include<linux/slab.h>#include<dt-bindings/dma/nbpfaxi.h>#include"dmaengine.h"#define NBPF_REG_CHAN_OFFSET 0#define NBPF_REG_CHAN_SIZE 0x40/* Channel Current Transaction Byte register */#define NBPF_CHAN_CUR_TR_BYTE 0x20/* Channel Status register */#define NBPF_CHAN_STAT 0x24#define NBPF_CHAN_STAT_EN 1#define NBPF_CHAN_STAT_TACT 4#define NBPF_CHAN_STAT_ERR 0x10#define NBPF_CHAN_STAT_END 0x20#define NBPF_CHAN_STAT_TC 0x40#define NBPF_CHAN_STAT_DER 0x400/* Channel Control register */#define NBPF_CHAN_CTRL 0x28#define NBPF_CHAN_CTRL_SETEN 1