Re: [PATCH mmc/next v2 3/4] mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 16, 2017 at 11:58:53AM +0200, Simon Horman wrote:
> Add a new variant of the SDHI driver to support R-Car Gen3 with DMA via
> on-chip bus mastering.  Since the DMAC is in a part of the SDHI module it
> is not suitable to be used via DMA Engine.
> 
> Clearing of DM_CM_INFO1 after DMA thanks to Dirk Behme
> 
> Cc: Dirk Behme <dirk.behme@xxxxxxxxxxxx>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> Signed-off-by: Ai Kyuse <ai.kyuse.uw@xxxxxxxxxxx>

Your Sob is missing!

> + * - Since this SDHI DMAC register set has actual 32-bit and "bus_shift" is 2,
> + *   this driver cannot use original sd_ctrl_{write,read}32 functions.

Easier to understand, I'd think, would be:

Since the SDHI DMAC register set has not 16 but 32-bit width, we need a
custom accessor.

> +	ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, dir);
> +	if (ret < 0) {
> +		dev_err(&host->pdev->dev, "%s: dma_map_sg failed\n", __func__);

__func__?

> +	/* start the DMAC */

Not very useful comment in my book, but no strong opinion.

> +	renesas_sdhi_internal_dmac_dm_write(host, DM_CM_DTRAN_CTRL,
> +					    DTRAN_CTRL_DM_START);
> +}
> +	dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->sg_len, dir);
> +
> +	spin_unlock_irq(&host->lock);
> +
> +	spin_lock_irq(&host->lock);

Just keep the lock?

Rest looks good so far...

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux