Hi Guennadi,
On Wed, Apr 21, 2010 at 11:37 AM, Guennadi Liakhovetski
<[email protected]> wrote:
> SDHI controllers on SuperH, served by the tmio_mmc driver, can use slave DMA
> for data transfer. This patch adds support for the dmaengine API to tmio_mmc
> and the necessary interfacing to the sh_mobile_sdhi MFD driver.
>
> Signed-off-by: Guennadi Liakhovetski <[email protected]>
> ---
>
> It could be further broken down into MMC and MFD parts if required, I
> think.
>
> drivers/mfd/sh_mobile_sdhi.c | 25 +++-
> drivers/mmc/host/tmio_mmc.c | 346
> ++++++++++++++++++++++++++++++++----
> drivers/mmc/host/tmio_mmc.h | 11 ++
> include/linux/mfd/sh_mobile_sdhi.h | 3 +
> include/linux/mfd/tmio.h | 10 +
> 5 files changed, 359 insertions(+), 36 deletions(-)
[snip]
> diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
> index b2b577f..fafd8c9 100644
> --- a/drivers/mmc/host/tmio_mmc.c
> +++ b/drivers/mmc/host/tmio_mmc.c
> @@ -29,12 +29,21 @@
> #include <linux/irq.h>
> #include <linux/device.h>
> #include <linux/delay.h>
> +#include <linux/dmaengine.h>
> #include <linux/mmc/host.h>
> #include <linux/mfd/core.h>
> #include <linux/mfd/tmio.h>
>
> #include "tmio_mmc.h"
>
> +static void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable)
> +{
> +#if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE)
> + /* Switch DMA mode on or off - SuperH specific? */
> + sd_ctrl_write16(host, 0xd8, enable ? 2 : 0);
> +#endif
> +}
> +
Uhh.. #ifdefs. =)
Can't this register setting be implented in the SDHI driver?
In general I realize that you need to extend the logic in the tmio_mmc
driver quite a bit to implement DMA support, but I wonder if it is
possible to extend the tmio_mmc driver with callbacks and use them to
hook in the DMA code?
Thanks!
/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html