2 * Header for the new SH dmaengine driver
4 * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #ifndef ASM_DMAENGINE_H
11 #define ASM_DMAENGINE_H
13 #include <asm/dma-register.h>
15 #define SH_DMAC_MAX_CHANNELS 6
17 enum sh_dmae_slave_chan_id {
34 SHDMA_SLAVE_NUMBER, /* Must stay last */
37 struct sh_dmae_slave_config {
38 enum sh_dmae_slave_chan_id slave_id;
44 struct sh_dmae_channel {
47 unsigned int dmars_bit;
50 struct sh_dmae_pdata {
51 struct sh_dmae_slave_config *slave;
53 struct sh_dmae_channel *channel;
55 unsigned int ts_low_shift;
56 unsigned int ts_low_mask;
57 unsigned int ts_high_shift;
58 unsigned int ts_high_mask;
59 unsigned int *ts_shift;
66 /* Used by slave DMA clients to request DMA to/from a specific peripheral */
67 struct sh_dmae_slave {
68 enum sh_dmae_slave_chan_id slave_id; /* Set by the platform */
69 struct device *dma_dev; /* Set by the platform */
70 struct sh_dmae_slave_config *config; /* Set by the driver */