lkml.org 
[lkml]   [2016]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/12] dma: Flexcard DMA ringbuffer demux driver
On Wed, Dec 14, 2016 at 01:11:53AM +0100, Holger Dengler wrote:
> The Flexcard interface design split packet receive and transmit. All
> received packets and card status information are multiplexed with a
> Flexcard specific protocol and handled through a DMA capable ringbuffer.
> The TX path has to poke each available component separate.
>
> Add a Flexcard DMA ringbuffer driver and packet demultiplexer.

so the dma driver should only provide service and not do demuxing...

> +config FLEXCARD_DMA
> + tristate "DMA support for Eberspaecher Flexcard PMC II Carrier Board"
> + depends on MFD_FLEXCARD
> + help
> + The Eberspaecher Flexcard PMC (PCI Mezzanine Card) II carrier
> + board support one DMA capable receive ringbuffer for all devices.
> + A card specific protocol is used to multiplex the received packets
> + through the ringbuffer. Enable DMA and Packet parser.
> +

This file is sorted alphabetically, so please add it it relavant place

> +#define DMA_TOTAL_BUF_SIZE (2*FLEXCARD_DMA_BUF_SIZE)

space around * pls

> +#define FLEXCARD_DMA_BUF_SIZE 0x200000
> +#define FLEXCARD_DMA_BUF_MASK (FLEXCARD_DMA_BUF_SIZE - 1)
> +
> +#define FLEXCARD_DMA_CTRL_DMA_ENA (1 << 0)
> +#define FLEXCARD_DMA_CTRL_MAN_ENA (1 << 1)
> +#define FLEXCARD_DMA_CTRL_STOP_REQ (1 << 16)
> +#define FLEXCARD_DMA_CTRL_DMA_IDLE (1 << 17)
> +#define FLEXCARD_DMA_CTRL_RST_DMA (1 << 31)

BIT() and friends please

> +
> +#define FLEXCARD_DMA_STAT_BUSY (1 << 15)
> +#define FLEXCARD_DMA_STAT_OFL (1 << 31)
> +
> +#define FLEXCARD_MAX_PAKET_SIZE 0x200
> +
> +#define FLEXCARD_BUF_HEADER_LEN_SHIFT 15
> +#define FLEXCARD_BUF_HEADER_LEN_MASK 0xfe
> +
> +#define FLEXCARD_CANIF_OFFSET 0x20

Okay I have skipped over the parser and other stuff and still looking for
the dmaengine APIs.

This driver _doesn't_ do that, and am not sure why.

Anyway, if this driver doesnt need dmaengine APIs it doesnt belong in
drivers/dma/. Otherwise please port to dmanegine APIs, possibly use parser
as a client. You cna use virt-channels as well for managing the transfers.

So I am not considering this submission

Thanks
--
~Vinod

\
 
 \ /
  Last update: 2016-12-15 05:42    [W:0.208 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site