From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 18/21] dmaengine: edma: Consolidate the comments for functions
Date: Thu, 10 Sep 2015 11:37:47 +0300 [thread overview]
Message-ID: <1441874270-2399-19-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1441874270-2399-1-git-send-email-peter.ujfalusi@ti.com>
Remove or rewrite the comments for the internal functions.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/dma/edma.c | 86 +++++++-----------------------------------------------
1 file changed, 11 insertions(+), 75 deletions(-)
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 2c6be4c62a73..f869d130819b 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -486,19 +486,7 @@ static void edma_setup_interrupt(struct edma_cc *ecc, unsigned lch,
}
/*
- * paRAM 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.
+ * paRAM slot management functions
*/
static void edma_write_slot(struct edma_cc *ecc, unsigned slot,
const struct edmacc_param *param)
@@ -509,15 +497,6 @@ static void edma_write_slot(struct edma_cc *ecc, unsigned slot,
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,
struct edmacc_param *param)
{
@@ -568,15 +547,6 @@ static int edma_alloc_slot(struct edma_cc *ecc, int 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)
{
@@ -686,10 +656,9 @@ static int edma_start(struct edma_cc *ecc, unsigned channel)
* @ecc: pointer to edma_cc struct
* @channel: channel being deactivated
*
- * When @lch is a channel, any active transfer is paused and
- * all pending hardware events are cleared. The current transfer
- * may not be resumed, and the channel's Parameter RAM should be
- * reinitialized before being reused.
+ * Any active transfer is paused and all pending hardware events are cleared.
+ * The current transfer may not be resumed, and the channel's Parameter RAM
+ * should be reinitialized before being reused.
*/
static void edma_stop(struct edma_cc *ecc, unsigned channel)
{
@@ -721,13 +690,9 @@ static void edma_stop(struct edma_cc *ecc, unsigned channel)
}
}
-/**
- * edma_pause - pause dma on a channel
- * @ecc: pointer to edma_cc struct
- * @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
+/*
+ * Temporarily disable EDMA hardware events on the specified channel,
+ * preventing them from triggering new transfers
*/
static void edma_pause(struct edma_cc *ecc, unsigned channel)
{
@@ -745,13 +710,7 @@ static void edma_pause(struct edma_cc *ecc, unsigned 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.
- */
+/* Re-enable EDMA hardware events on the specified channel. */
static void edma_resume(struct edma_cc *ecc, unsigned channel)
{
if (ecc->id != EDMA_CTLR(channel)) {
@@ -787,19 +746,6 @@ static int edma_trigger_channel(struct edma_cc *ecc, unsigned channel)
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)
{
if (ecc->id != EDMA_CTLR(channel)) {
@@ -956,14 +902,7 @@ static void edma_free_channel(struct edma_cc *ecc, unsigned channel)
clear_bit(channel, ecc->edma_inuse);
}
-/*
- * 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.
- */
+/* Move channel to a specific event queue */
static void edma_assign_channel_eventq(struct edma_cc *ecc, unsigned channel,
enum dma_event_q eventq_no)
{
@@ -986,6 +925,7 @@ static void edma_assign_channel_eventq(struct edma_cc *ecc, unsigned channel,
edma_map_dmach_to_queue(ecc, channel, eventq_no);
}
+/* eDMA interrupt handler */
static irqreturn_t dma_irq_handler(int irq, void *data)
{
struct edma_cc *ecc = data;
@@ -1037,11 +977,7 @@ static irqreturn_t dma_irq_handler(int irq, void *data)
return IRQ_HANDLED;
}
-/******************************************************************************
- *
- * DMA error interrupt handler
- *
- *****************************************************************************/
+/* eDMA error interrupt handler */
static irqreturn_t dma_ccerr_handler(int irq, void *data)
{
struct edma_cc *ecc = data;
--
2.5.1
next prev parent reply other threads:[~2015-09-10 8:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 8:37 [PATCH 00/21] dmaengine/ARM: Merge the edma drivers into one Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 01/21] ARM: common: edma: Fix channel parameter for irq callbacks Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 02/21] ARM: common: edma: Remove unused functions Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 03/21] dmaengine: edma: Simplify and optimize the edma_execute path Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 04/21] ARM: davinci/common: Convert edma driver to handle one eDMA instance per driver Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 05/21] ARM/dmaengine: edma: Move of_dma_controller_register to the dmaengine driver Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 06/21] ARM: common: edma: Internal API to use pointer to 'struct edma' Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 07/21] ARM/dmaengine: edma: Public API to use private struct pointer Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 08/21] ARM/dmaengine: edma: Remove limitation on the number of eDMA controllers Peter Ujfalusi
2015-09-10 8:40 ` Arnd Bergmann
2015-09-10 9:09 ` Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 09/21] ARM: davinci: Add set dma_mask to eDMA devices Peter Ujfalusi
2015-09-10 8:45 ` Arnd Bergmann
2015-09-10 9:13 ` Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 10/21] ARM/dmaengine: edma: Merge the two drivers under drivers/dmaengine Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 11/21] dmaengine: edma: Allocate memory dynamically for bitmaps and structures Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 12/21] dmaengine: edma: Parameter alignment and long line fixes Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 13/21] dmaengine: edma: Use devm_kcalloc when possible Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 14/21] dmaengine: edma: Cleanup regarding the use of dev around the code Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 15/21] dmaengine: edma: Use dev_dbg instead pr_debug Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 16/21] dmaengine: edma: Use the edma_write_slot instead open coded memcpy_toio Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 17/21] dmaengine: edma: Print warning when linking slots from different eDMA Peter Ujfalusi
2015-09-10 8:37 ` Peter Ujfalusi [this message]
2015-09-10 8:37 ` [PATCH 19/21] dmaengine: edma: Simplify the interrupt handling Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 20/21] dmaengine: edma: Move the pending error check into helper function Peter Ujfalusi
2015-09-10 8:37 ` [PATCH 21/21] dmaengine: edma: Simplify and optimize ccerr interrupt handler Peter Ujfalusi
2015-09-10 8:47 ` [PATCH 00/21] dmaengine/ARM: Merge the edma drivers into one Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441874270-2399-19-git-send-email-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox