From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
To: dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, vinod.koul@intel.com,
dan.j.williams@intel.com, andriy.shevchenko@linux.intel.com,
vireshk@kernel.org, linux-snps-arc@lists.infradead.org,
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Subject: [PATCH v3 3/3] dmaengine: DW DMAC: move "nollp" to "dwc->flags"
Date: Fri, 28 Oct 2016 19:00:02 +0300 [thread overview]
Message-ID: <1477670402-23943-4-git-send-email-Eugeniy.Paltsev@synopsys.com> (raw)
In-Reply-To: <1477670402-23943-1-git-send-email-Eugeniy.Paltsev@synopsys.com>
Add "DW_DMA_IS_LLP_SUPPORTED" flag. Use this flag to get rid
of "dwc->nollp" as separate variable.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
drivers/dma/dw/core.c | 11 ++++++-----
drivers/dma/dw/regs.h | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 6281009..98beb16 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -227,7 +227,7 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
return;
}
- if (dwc->nollp) {
+ if (!test_bit(DW_DMA_IS_LLP_SUPPORTED, &dwc->flags)) {
was_soft_llp = test_and_set_bit(DW_DMA_IS_SOFT_LLP,
&dwc->flags);
if (was_soft_llp) {
@@ -1265,7 +1265,7 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
unsigned long flags;
spin_lock_irqsave(&dwc->lock, flags);
- if (dwc->nollp) {
+ if (!test_bit(DW_DMA_IS_LLP_SUPPORTED, &dwc->flags)) {
spin_unlock_irqrestore(&dwc->lock, flags);
dev_dbg(chan2dev(&dwc->chan),
"channel doesn't support LLP transfers\n");
@@ -1570,11 +1570,12 @@ int dw_dma_probe(struct dw_dma_chip *chip)
*/
dwc->block_size =
(4 << ((pdata->block_size >> 4 * i) & 0xf)) - 1;
- dwc->nollp =
- (dwc_params >> DWC_PARAMS_MBLK_EN & 0x1) == 0;
+ if ((dwc_params >> DWC_PARAMS_MBLK_EN & 0x1) != 0)
+ set_bit(DW_DMA_IS_LLP_SUPPORTED, &dwc->flags);
} else {
dwc->block_size = pdata->block_size;
- dwc->nollp = pdata->is_nollp;
+ if (!pdata->is_nollp)
+ set_bit(DW_DMA_IS_LLP_SUPPORTED, &dwc->flags);
}
}
diff --git a/drivers/dma/dw/regs.h b/drivers/dma/dw/regs.h
index f65dd10..f50c0fc 100644
--- a/drivers/dma/dw/regs.h
+++ b/drivers/dma/dw/regs.h
@@ -218,6 +218,7 @@ enum dw_dmac_flags {
DW_DMA_IS_SOFT_LLP = 1,
DW_DMA_IS_PAUSED = 2,
DW_DMA_IS_INITIALIZED = 3,
+ DW_DMA_IS_LLP_SUPPORTED = 4,
};
struct dw_dma_chan {
@@ -242,7 +243,6 @@ struct dw_dma_chan {
/* hardware configuration */
unsigned int block_size;
- bool nollp;
/* custom slave configuration */
struct dw_dma_slave dws;
--
2.5.5
next prev parent reply other threads:[~2016-10-28 16:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 15:59 [PATCH v3 0/3] dmaengine: DW DMAC: split pdata to hardware properties Eugeniy Paltsev
2016-10-28 16:00 ` [PATCH v3 1/3] dmaengine: DW DMAC: split pdata to hardware properties and platform quirks Eugeniy Paltsev
2016-10-28 16:00 ` [PATCH v3 2/3] dmaengine: DW DMAC: convert to unified device property API Eugeniy Paltsev
2016-10-28 16:00 ` Eugeniy Paltsev [this message]
2016-10-28 16:15 ` [PATCH v3 0/3] dmaengine: DW DMAC: split pdata to hardware properties Andy Shevchenko
2016-11-02 11:55 ` Eugeniy Paltsev
2016-11-07 13:55 ` Andy Shevchenko
2016-11-08 12:22 ` Eugeniy Paltsev
2016-11-08 13:36 ` Andy Shevchenko
2016-11-10 16:28 ` Eugeniy Paltsev
2016-11-11 11:05 ` Andy Shevchenko
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=1477670402-23943-4-git-send-email-Eugeniy.Paltsev@synopsys.com \
--to=eugeniy.paltsev@synopsys.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=vinod.koul@intel.com \
--cc=vireshk@kernel.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;
as well as URLs for NNTP newsgroup(s).