From patchwork Fri Sep 11 12:27:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 7160821 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F2D89F326 for ; Fri, 11 Sep 2015 12:30:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 30029205E9 for ; Fri, 11 Sep 2015 12:30:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36EF32057E for ; Fri, 11 Sep 2015 12:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753378AbbIKM24 (ORCPT ); Fri, 11 Sep 2015 08:28:56 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:56118 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753339AbbIKM2y (ORCPT ); Fri, 11 Sep 2015 08:28:54 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8BCSQ7b007275; Fri, 11 Sep 2015 07:28:26 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8BCSQWH001157; Fri, 11 Sep 2015 07:28:26 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Fri, 11 Sep 2015 07:30:29 -0500 Received: from dflp33.itg.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8BCROqC013634; Fri, 11 Sep 2015 07:28:23 -0500 From: Peter Ujfalusi To: , , CC: , , , , , Subject: [PATCH v2 19/23] dmaengine: edma: Consolidate the comments for functions Date: Fri, 11 Sep 2015 15:27:18 +0300 Message-ID: <1441974442-8233-20-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1441974442-8233-1-git-send-email-peter.ujfalusi@ti.com> References: <1441974442-8233-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_BLACK autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove or rewrite the comments for the internal functions. Signed-off-by: Peter Ujfalusi --- 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 5dd0cd478523..ffbf63a64313 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;