nlm: Ensure callback code also checks that the files match
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / sudmac.h
CommitLineData
18a1053f
SY
1/*
2 * Header for the SUDMAC driver
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 *
6 * This is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
9 */
10#ifndef SUDMAC_H
11#define SUDMAC_H
12
13#include <linux/dmaengine.h>
14#include <linux/shdma-base.h>
15#include <linux/types.h>
16
17/* Used by slave DMA clients to request DMA to/from a specific peripheral */
18struct sudmac_slave {
19 struct shdma_slave shdma_slave; /* Set by the platform */
20};
21
22/*
23 * Supplied by platforms to specify, how a DMA channel has to be configured for
24 * a certain peripheral
25 */
26struct sudmac_slave_config {
27 int slave_id;
28};
29
30struct sudmac_channel {
31 unsigned long offset;
32 unsigned long config;
33 unsigned long wait; /* The configuable range is 0 to 3 */
34 unsigned long dint_end_bit;
35};
36
37struct sudmac_pdata {
38 const struct sudmac_slave_config *slave;
39 int slave_num;
40 const struct sudmac_channel *channel;
41 int channel_num;
42};
43
44/* Definitions for the sudmac_channel.config */
45#define SUDMAC_TX_BUFFER_MODE BIT(0)
46#define SUDMAC_RX_END_MODE BIT(1)
47
48/* Definitions for the sudmac_channel.dint_end_bit */
49#define SUDMAC_DMA_BIT_CH0 BIT(0)
50#define SUDMAC_DMA_BIT_CH1 BIT(1)
51
52#endif