[PATCH v2 1/2] ARM: shmobile: r8a7778: add HPB-DMAC support

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Jul 25 21:39:24 EDT 2013


Hi

> > +static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = {
> > +	{
> > +		.id	= HPBDMA_SLAVE_SDHI0_TX,
> > +		.addr	= 0xffe4c000 + 0x30,
> > +		.dcr	= DCR_SPDS_16BIT | DCR_DMDL | DCR_DPDS_16BIT,
> > +		.rstr	= ASYNCRSTR_ASRST21 | ASYNCRSTR_ASRST22 |
> > +			  ASYNCRSTR_ASRST23,
> > +		.mdr	= ASYNCMDR_ASMD21_SINGLE,
> > +		.mdm	= ASYNCMDR_ASMD21_MASK,
> > +		.port	= 0x0D0C,
> > +		.flags	= HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE,
> > +		.dma_ch	= 21,
> > +	}, {
> > +		.id	= HPBDMA_SLAVE_SDHI0_RX,
> > +		.addr	= 0xffe4c000 + 0x30,
> > +		.dcr	= DCR_SMDL | DCR_SPDS_16BIT | DCR_DPDS_16BIT,
> > +		.rstr	= ASYNCRSTR_ASRST21 | ASYNCRSTR_ASRST22 |
> > +			  ASYNCRSTR_ASRST23,
> > +		.mdr	= ASYNCMDR_ASMD22_SINGLE,
> > +		.mdm	= ASYNCMDR_ASMD22_MASK,
> > +		.port	= 0x0D0C,
> > +		.flags	= HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE,
> > +		.dma_ch	= 22,
> > +	},

I'm not sure detail of SDHI, but TX and RX are using same .port = 0x0D0C.
Is this correct ?
And what is 0x0C port ?
My datasheet doens't have it on Ch21 - Ch23

> > +static const struct hpb_dmae_channel hpb_dmae_channels[] = {
> > +	/* ch. 21 SD0 */
> > +	HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX),
> > +	/* ch. 22 SD0 */
> > +	HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX),
> > +};
> > +
> > +static struct hpb_dmae_pdata dma_platform_data __initdata = {
> > +	.slaves			= hpb_dmae_slaves,
> > +	.num_slaves		= ARRAY_SIZE(hpb_dmae_slaves),
> > +	.channels		= hpb_dmae_channels,
> > +	.num_channels		= ARRAY_SIZE(hpb_dmae_channels),
> > +	.ts_shift		= {
> > +		[XMIT_SZ_8BIT]	= 0,
> > +		[XMIT_SZ_16BIT]	= 1,
> > +		[XMIT_SZ_32BIT]	= 2,
> > +	},
> > +	.num_hw_channels	= 39,
> > +};

This is not a big deal, but according to .num_hw_channels,
we will have max 39 channels (or more over).

I want 1 line for 1 channels on hpb_dmae_channels.
like this

static const struct hpb_dmae_channel hpb_dmae_channels[] = {
	HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch21 */
	HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch22 */
}


Best regards
---
Kuninori Morimoto



More information about the linux-arm-kernel mailing list