diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-05-15 11:51:57 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-06-04 11:12:09 +0200 |
commit | 43f2e1a3be5d83004f09bcb53c46f273e7473a00 (patch) | |
tree | af13dad918da322ee4984925453dbe157731d790 /include/linux/platform_data/dma-ste-dma40.h | |
parent | 16db3411ebd4777b0b1b7207b10730b726fb751c (diff) | |
download | talos-obmc-linux-43f2e1a3be5d83004f09bcb53c46f273e7473a00.tar.gz talos-obmc-linux-43f2e1a3be5d83004f09bcb53c46f273e7473a00.zip |
dmaengine: ste_dma40: Convert data_width from register bit format to value
When a DMA client requests and configures a DMA channel, it requests
data_width in Bytes. The DMA40 driver then swiftly converts it over to
the necessary register bit value. Unfortunately, for any subsequent
calculations we have to shift '1' by the bit pattern (1 << data_width)
times to make any sense of it.
This patch flips the semantics on its head and only converts the value
to its respective register bit pattern when writing to registers. This
way we can use the true data_width (in Bytes) value.
Cc: Dan Williams <djbw@fb.com>
Cc: Per Forlin <per.forlin@stericsson.com>
Cc: Rabin Vincent <rabin@rab.in>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/platform_data/dma-ste-dma40.h')
-rw-r--r-- | include/linux/platform_data/dma-ste-dma40.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/platform_data/dma-ste-dma40.h b/include/linux/platform_data/dma-ste-dma40.h index 54ddca615cb4..ceba6dc566a9 100644 --- a/include/linux/platform_data/dma-ste-dma40.h +++ b/include/linux/platform_data/dma-ste-dma40.h @@ -70,13 +70,6 @@ enum stedma40_flow_ctrl { STEDMA40_FLOW_CTRL, }; -enum stedma40_periph_data_width { - STEDMA40_BYTE_WIDTH = STEDMA40_ESIZE_8_BIT, - STEDMA40_HALFWORD_WIDTH = STEDMA40_ESIZE_16_BIT, - STEDMA40_WORD_WIDTH = STEDMA40_ESIZE_32_BIT, - STEDMA40_DOUBLEWORD_WIDTH = STEDMA40_ESIZE_64_BIT -}; - /** * struct stedma40_half_channel_info - dst/src channel configuration * @@ -87,7 +80,7 @@ enum stedma40_periph_data_width { */ struct stedma40_half_channel_info { bool big_endian; - enum stedma40_periph_data_width data_width; + enum dma_slave_buswidth data_width; int psize; enum stedma40_flow_ctrl flow_ctrl; }; |