From mboxrd@z Thu Jan 1 00:00:00 1970 From: svenkatr@ti.com (Venkatraman S) Date: Wed, 5 May 2010 17:20:15 +0530 Subject: [PATCH v8 1/2] sDMA: descriptor autoloading feature In-Reply-To: References: Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org [Long sections have been trimmed to the context of the discussion] On Wed, May 5, 2010 at 3:02 PM, Shilimkar, Santosh wrote: >> -----Original Message----- >> +static int dma_sglist_set_phy_params(struct omap_dma_sglist_node *sghead, >> + ? ? ? ? ? ? dma_addr_t phyaddr, int nelem) >> +{ >> + ? ? struct omap_dma_sglist_node *sgcurr, *sgprev; >> + ? ? dma_addr_t elem_paddr = phyaddr; >> + >> + ? ? for (sgprev = sghead; >> + ? ? ? ? ? ? sgprev < sghead + nelem; >> + ? ? ? ? ? ? sgprev++) { >> + >> + ? ? ? ? ? ? sgcurr = sgprev + 1; >> + ? ? ? ? ? ? sgprev->next = sgcurr; >> + ? ? ? ? ? ? elem_paddr += (int)sizeof(*sgcurr); >> + ? ? ? ? ? ? sgprev->next_desc_add_ptr = elem_paddr; >> + >> + ? ? ? ? ? ? switch (sgcurr->desc_type) { >> + ? ? ? ? ? ? case OMAP_DMA_SGLIST_DESCRIPTOR_TYPE1: >> + ? ? ? ? ? ? ? ? ? ? omap_dma_list_set_ntype(sgprev, 1); >> + ? ? ? ? ? ? ? ? ? ? break; >> + >> + ? ? ? ? ? ? case OMAP_DMA_SGLIST_DESCRIPTOR_TYPE2a: >> + ? ? ? ? ? ? /* intentional no break */ >> + ? ? ? ? ? ? case OMAP_DMA_SGLIST_DESCRIPTOR_TYPE2b: >> + ? ? ? ? ? ? ? ? ? ? omap_dma_list_set_ntype(sgprev, 2); >> + ? ? ? ? ? ? ? ? ? ? break; >> + >> + ? ? ? ? ? ? case OMAP_DMA_SGLIST_DESCRIPTOR_TYPE3a: >> + ? ? ? ? ? ? ? ? ? ? /* intentional no break */ >> + ? ? ? ? ? ? case OMAP_DMA_SGLIST_DESCRIPTOR_TYPE3b: >> + ? ? ? ? ? ? ? ? ? ? omap_dma_list_set_ntype(sgprev, 3); >> + ? ? ? ? ? ? ? ? ? ? break; >> + >> + ? ? ? ? ? ? default: >> + ? ? ? ? ? ? ? ? ? ? return -EINVAL; >> + >> + ? ? ? ? ? ? } > Are we supporting all the descriptor types. I think only type2a is > supported. In that case please add FIXME, or WARN message here.