Re: [PATCH] dma: tegra: add support for Tegra148/124

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

 



On Mon, Nov 25, 2013 at 03:15:32PM -0700, Stephen Warren wrote:
[...]
> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
[...]
> +/* Tegra148 specific registers */
> +#define TEGRA_APBDMA_CHAN_WCOUNT		0x20
> +#define TEGRA_APBDMA_WCOUNT_WCOUNT_SHIFT	2
> +#define TEGRA_APBDMA_WCOUNT_WCOUNT_MASK		0xfffffffc

According to the TRM this field spans bits 29:2, so the mask should be
0x3ffffffc.

> +#define TEGRA_APBDMA_CHAN_WORD_TRANSFER		0x24
> +#define TEGRA_APBDMA_WORD_TRANSFER_WXFER_SHIFT	2
> +#define TEGRA_APBDMA_WORD_TRANSFER_WXFER_MASK	0xfffc

Comparing to the TRM these should be named:

	TEGRA_APBDMA_CHAN_WORD_TRANSFER_COUNT_SHIFT
	TEGRA_APBDMA_CHAN_WORD_TRANSFER_COUNT_MASK

Also the COUNT field spans bits 29:2, so the mask should be 0x3ffffffc.

> @@ -719,6 +735,7 @@ static void tegra_dma_terminate_all(struct dma_chan *dc)
>  	struct tegra_dma_desc *dma_desc;
>  	unsigned long flags;
>  	unsigned long status;
> +	unsigned long wcount = 0;

You assign a value to this later on, so I don't think this needs to be
initialized.

Thierry

Attachment: pgpAlQ4RvP5AY.pgp
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux