aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-11-24 05:05:22 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-11-25 02:26:46 -0500
commita782d688e9c6f9ca9a7a9a28e8e2876969ddef53 (patch)
treec8b13a19a1397bbbda255a59ce8a26518991d2e5 /include
parente47bf32aa8de06ec72e18b4fbbd880caeedb0088 (diff)
mmc: sh_mmcif: add DMA support
The MMCIF controller on sh-mobile platforms can use the DMA controller for data transfers. Interface to the SH dmaengine driver to enable DMA. We also have to lower the maximum number of segments to match with the number od DMA descriptors on SuperH, this doesn't significantly affect driver's PIO performance. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/sh_mmcif.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h
index a6bfa5296495..f216a8879b58 100644
--- a/include/linux/mmc/sh_mmcif.h
+++ b/include/linux/mmc/sh_mmcif.h
@@ -14,8 +14,9 @@
14#ifndef __SH_MMCIF_H__ 14#ifndef __SH_MMCIF_H__
15#define __SH_MMCIF_H__ 15#define __SH_MMCIF_H__
16 16
17#include <linux/platform_device.h>
18#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/platform_device.h>
19#include <linux/sh_dma.h>
19 20
20/* 21/*
21 * MMCIF : CE_CLK_CTRL [19:16] 22 * MMCIF : CE_CLK_CTRL [19:16]
@@ -31,13 +32,19 @@
31 * 1111 : Peripheral clock (sup_pclk set '1') 32 * 1111 : Peripheral clock (sup_pclk set '1')
32 */ 33 */
33 34
35struct sh_mmcif_dma {
36 struct sh_dmae_slave chan_priv_tx;
37 struct sh_dmae_slave chan_priv_rx;
38};
39
34struct sh_mmcif_plat_data { 40struct sh_mmcif_plat_data {
35 void (*set_pwr)(struct platform_device *pdev, int state); 41 void (*set_pwr)(struct platform_device *pdev, int state);
36 void (*down_pwr)(struct platform_device *pdev); 42 void (*down_pwr)(struct platform_device *pdev);
37 int (*get_cd)(struct platform_device *pdef); 43 int (*get_cd)(struct platform_device *pdef);
38 u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ 44 struct sh_mmcif_dma *dma;
39 unsigned long caps; 45 u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */
40 u32 ocr; 46 unsigned long caps;
47 u32 ocr;
41}; 48};
42 49
43#define MMCIF_CE_CMD_SET 0x00000000 50#define MMCIF_CE_CMD_SET 0x00000000