提交 11c15733 编写于 作者: P Peter Ujfalusi 提交者: Vinod Koul

dmaengine: edma: Consolidate the comments for functions

Remove or rewrite the comments for the internal functions.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 fc014095
...@@ -508,19 +508,7 @@ static void edma_setup_interrupt(struct edma_cc *ecc, unsigned lch, ...@@ -508,19 +508,7 @@ static void edma_setup_interrupt(struct edma_cc *ecc, unsigned lch,
} }
/* /*
* paRAM management functions * paRAM slot management functions
*/
/**
* edma_write_slot - write parameter RAM data for slot
* @ecc: pointer to edma_cc struct
* @slot: number of parameter RAM slot being modified
* @param: data to be written into parameter RAM slot
*
* Use this to assign all parameters of a transfer at once. This
* allows more efficient setup of transfers than issuing multiple
* calls to set up those parameters in small pieces, and provides
* complete control over all transfer options.
*/ */
static void edma_write_slot(struct edma_cc *ecc, unsigned slot, static void edma_write_slot(struct edma_cc *ecc, unsigned slot,
const struct edmacc_param *param) const struct edmacc_param *param)
...@@ -531,15 +519,6 @@ static void edma_write_slot(struct edma_cc *ecc, unsigned slot, ...@@ -531,15 +519,6 @@ static void edma_write_slot(struct edma_cc *ecc, unsigned slot,
memcpy_toio(ecc->base + PARM_OFFSET(slot), param, PARM_SIZE); memcpy_toio(ecc->base + PARM_OFFSET(slot), param, PARM_SIZE);
} }
/**
* edma_read_slot - read parameter RAM data from slot
* @ecc: pointer to edma_cc struct
* @slot: number of parameter RAM slot being copied
* @param: where to store copy of parameter RAM data
*
* Use this to read data from a parameter RAM slot, perhaps to
* save them as a template for later reuse.
*/
static void edma_read_slot(struct edma_cc *ecc, unsigned slot, static void edma_read_slot(struct edma_cc *ecc, unsigned slot,
struct edmacc_param *param) struct edmacc_param *param)
{ {
...@@ -590,15 +569,6 @@ static int edma_alloc_slot(struct edma_cc *ecc, int slot) ...@@ -590,15 +569,6 @@ static int edma_alloc_slot(struct edma_cc *ecc, int slot)
return EDMA_CTLR_CHAN(ecc->id, slot); return EDMA_CTLR_CHAN(ecc->id, slot);
} }
/**
* edma_free_slot - deallocate DMA parameter RAM
* @ecc: pointer to edma_cc struct
* @slot: parameter RAM slot returned from edma_alloc_slot()
*
* This deallocates the parameter RAM slot allocated by edma_alloc_slot().
* Callers are responsible for ensuring the slot is inactive, and will
* not be activated.
*/
static void edma_free_slot(struct edma_cc *ecc, unsigned slot) static void edma_free_slot(struct edma_cc *ecc, unsigned slot)
{ {
slot = EDMA_CHAN_SLOT(slot); slot = EDMA_CHAN_SLOT(slot);
...@@ -707,10 +677,9 @@ static int edma_start(struct edma_cc *ecc, unsigned channel) ...@@ -707,10 +677,9 @@ static int edma_start(struct edma_cc *ecc, unsigned channel)
* @ecc: pointer to edma_cc struct * @ecc: pointer to edma_cc struct
* @channel: channel being deactivated * @channel: channel being deactivated
* *
* When @lch is a channel, any active transfer is paused and * Any active transfer is paused and all pending hardware events are cleared.
* all pending hardware events are cleared. The current transfer * The current transfer may not be resumed, and the channel's Parameter RAM
* may not be resumed, and the channel's Parameter RAM should be * should be reinitialized before being reused.
* reinitialized before being reused.
*/ */
static void edma_stop(struct edma_cc *ecc, unsigned channel) static void edma_stop(struct edma_cc *ecc, unsigned channel)
{ {
...@@ -742,13 +711,9 @@ static void edma_stop(struct edma_cc *ecc, unsigned channel) ...@@ -742,13 +711,9 @@ static void edma_stop(struct edma_cc *ecc, unsigned channel)
} }
} }
/** /*
* edma_pause - pause dma on a channel * Temporarily disable EDMA hardware events on the specified channel,
* @ecc: pointer to edma_cc struct * preventing them from triggering new transfers
* @channel: on which edma_start() has been called
*
* This temporarily disables EDMA hardware events on the specified channel,
* preventing them from triggering new transfers on its behalf
*/ */
static void edma_pause(struct edma_cc *ecc, unsigned channel) static void edma_pause(struct edma_cc *ecc, unsigned channel)
{ {
...@@ -766,13 +731,7 @@ static void edma_pause(struct edma_cc *ecc, unsigned channel) ...@@ -766,13 +731,7 @@ static void edma_pause(struct edma_cc *ecc, unsigned channel)
} }
} }
/** /* Re-enable EDMA hardware events on the specified channel. */
* edma_resume - resumes dma on a paused channel
* @ecc: pointer to edma_cc struct
* @channel: on which edma_pause() has been called
*
* This re-enables EDMA hardware events on the specified channel.
*/
static void edma_resume(struct edma_cc *ecc, unsigned channel) static void edma_resume(struct edma_cc *ecc, unsigned channel)
{ {
if (ecc->id != EDMA_CTLR(channel)) { if (ecc->id != EDMA_CTLR(channel)) {
...@@ -808,19 +767,6 @@ static int edma_trigger_channel(struct edma_cc *ecc, unsigned channel) ...@@ -808,19 +767,6 @@ static int edma_trigger_channel(struct edma_cc *ecc, unsigned channel)
return 0; return 0;
} }
/******************************************************************************
*
* It cleans ParamEntry qand bring back EDMA to initial state if media has
* been removed before EDMA has finished.It is usedful for removable media.
* Arguments:
* ch_no - channel no
*
* Return: zero on success, or corresponding error no on failure
*
* FIXME this should not be needed ... edma_stop() should suffice.
*
*****************************************************************************/
static void edma_clean_channel(struct edma_cc *ecc, unsigned channel) static void edma_clean_channel(struct edma_cc *ecc, unsigned channel)
{ {
if (ecc->id != EDMA_CTLR(channel)) { if (ecc->id != EDMA_CTLR(channel)) {
...@@ -975,14 +921,7 @@ static void edma_free_channel(struct edma_cc *ecc, unsigned channel) ...@@ -975,14 +921,7 @@ static void edma_free_channel(struct edma_cc *ecc, unsigned channel)
clear_bit(channel, ecc->edma_inuse); clear_bit(channel, ecc->edma_inuse);
} }
/* /* Move channel to a specific event queue */
* edma_assign_channel_eventq - move given channel to desired eventq
* Arguments:
* channel - channel number
* eventq_no - queue to move the channel
*
* Can be used to move a channel to a selected event queue.
*/
static void edma_assign_channel_eventq(struct edma_cc *ecc, unsigned channel, static void edma_assign_channel_eventq(struct edma_cc *ecc, unsigned channel,
enum dma_event_q eventq_no) enum dma_event_q eventq_no)
{ {
...@@ -1005,6 +944,7 @@ static void edma_assign_channel_eventq(struct edma_cc *ecc, unsigned channel, ...@@ -1005,6 +944,7 @@ static void edma_assign_channel_eventq(struct edma_cc *ecc, unsigned channel,
edma_map_dmach_to_queue(ecc, channel, eventq_no); edma_map_dmach_to_queue(ecc, channel, eventq_no);
} }
/* eDMA interrupt handler */
static irqreturn_t dma_irq_handler(int irq, void *data) static irqreturn_t dma_irq_handler(int irq, void *data)
{ {
struct edma_cc *ecc = data; struct edma_cc *ecc = data;
...@@ -1056,11 +996,7 @@ static irqreturn_t dma_irq_handler(int irq, void *data) ...@@ -1056,11 +996,7 @@ static irqreturn_t dma_irq_handler(int irq, void *data)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
/****************************************************************************** /* eDMA error interrupt handler */
*
* DMA error interrupt handler
*
*****************************************************************************/
static irqreturn_t dma_ccerr_handler(int irq, void *data) static irqreturn_t dma_ccerr_handler(int irq, void *data)
{ {
struct edma_cc *ecc = data; struct edma_cc *ecc = data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册