* linux-next: manual merge of the slave-dma tree with the arm tree
@ 2012-07-02 3:16 Stephen Rothwell
2012-07-13 3:09 ` Vinod Koul
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2012-07-02 3:16 UTC (permalink / raw)
To: Vinod Koul
Cc: linux-next, linux-kernel, Zhangfei Gao, Leo Yan, Qiao Zhou, Russell King
[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]
Hi Vinod,
Today's linux-next merge of the slave-dma tree got conflicts in
drivers/dma/Kconfig and drivers/dma/Makefile between commit 06dba53e6fcf
("dmaengine: add OMAP DMA engine driver") from the arm tree and commit
c6da0ba8dfc8 ("dmaengine: mmp_tdma: add mmp tdma support") from the
slave-dma tree.
Just context changes. I fixed it up (see below) and can carry the fixes
as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/dma/Kconfig
index 6f93365,d45cf1b..0000000
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@@ -262,12 -274,16 +276,22 @@@ config DMA_SA11X
SA-1110 SoCs. This DMA engine can only be used with on-chip
devices.
+config DMA_OMAP
+ tristate "OMAP DMA support"
+ depends on ARCH_OMAP
+ select DMA_ENGINE
+ select DMA_VIRTUAL_CHANNELS
+
+ config MMP_TDMA
+ bool "MMP Two-Channel DMA support"
+ depends on ARCH_MMP
+ select DMA_ENGINE
+ help
+ Support the MMP Two-Channel DMA engine.
+ This engine used for MMP Audio DMA and pxa910 SQU.
+
+ Say Y here if you enabled MMP ADMA, otherwise say N.
+
config DMA_ENGINE
bool
diff --cc drivers/dma/Makefile
index ddc291a,370a655..0000000
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@@ -29,4 -29,4 +30,5 @@@ obj-$(CONFIG_PCH_DMA) += pch_dma.
obj-$(CONFIG_AMBA_PL08X) += amba-pl08x.o
obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
obj-$(CONFIG_DMA_SA11X0) += sa11x0-dma.o
+obj-$(CONFIG_DMA_OMAP) += omap-dma.o
+ obj-$(CONFIG_MMP_TDMA) += mmp_tdma.o
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the slave-dma tree with the arm tree
2012-07-02 3:16 linux-next: manual merge of the slave-dma tree with the arm tree Stephen Rothwell
@ 2012-07-13 3:09 ` Vinod Koul
0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2012-07-13 3:09 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next, linux-kernel, Zhangfei Gao, Leo Yan, Qiao Zhou, Russell King
On Mon, 2012-07-02 at 13:16 +1000, Stephen Rothwell wrote:
> Hi Vinod,
>
> Today's linux-next merge of the slave-dma tree got conflicts in
> drivers/dma/Kconfig and drivers/dma/Makefile between commit 06dba53e6fcf
> ("dmaengine: add OMAP DMA engine driver") from the arm tree and commit
> c6da0ba8dfc8 ("dmaengine: mmp_tdma: add mmp tdma support") from the
> slave-dma tree.
Thanks, Looks like Russell has merged the OMAP changes into his tree?
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the slave-dma tree with the arm tree
2014-12-09 13:38 ` Krzysztof Kozlowski
@ 2014-12-09 14:08 ` Stephen Rothwell
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2014-12-09 14:08 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Vinod Koul, Russell King, linux-next, linux-kernel, Maxime Ripard
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
Hi Krzysztof,
On Tue, 09 Dec 2014 14:38:48 +0100 Krzysztof Kozlowski <k.kozlowski@samsung.com> wrote:
>
> Looks almost good:
> ++ pm_runtime_mark_last_busy(pl330->ddma.dev);
> ++ pm_runtime_put_autosuspend(pl330->ddma.dev);1
> ^here
Thanks for pointing that out, I have fixed it up for tomorrow.
> However I am looking current next (fetched few minutes ago and the one
> visible through gitweb) and I can see only mi changes (related to PM
> runtime). It looks like slave-dma changes got lost on the way.
Yeah, the slave-dma tree had another build problem so I used the
version of it from the previous day and so this conflict did not
actually occur today after all.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the slave-dma tree with the arm tree
2014-12-09 3:09 Stephen Rothwell
@ 2014-12-09 13:38 ` Krzysztof Kozlowski
2014-12-09 14:08 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2014-12-09 13:38 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Vinod Koul, Russell King, linux-next, linux-kernel, Maxime Ripard
On wto, 2014-12-09 at 14:09 +1100, Stephen Rothwell wrote:
> Hi Vinod,
>
> Today's linux-next merge of the slave-dma tree got a conflict in
> drivers/dma/pl330.c between commits ae43b3289186 ("ARM: 8202/1:
> dmaengine: pl330: Add runtime Power Management support v12") and
> b816ccc5c01f ("ARM: 8206/1: dmaengine: pl330: Add PM sleep support")
> from the arm tree and commits 86e15941d3f5 ("dmaengine: pl330: Split
> device_control") and c9a09dacf851 ("dmaengine: pl330: Declare slave
> capabilities for the generic code") from the slave-dma tree.
>
> I fixed it up (hopefully - see below) and can carry the fix as
> necessary (no action is required).
Looks almost good:
++ pm_runtime_mark_last_busy(pl330->ddma.dev);
++ pm_runtime_put_autosuspend(pl330->ddma.dev);1
^here
However I am looking current next (fetched few minutes ago and the one
visible through gitweb) and I can see only mi changes (related to PM
runtime). It looks like slave-dma changes got lost on the way.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* linux-next: manual merge of the slave-dma tree with the arm tree
@ 2014-12-09 3:09 Stephen Rothwell
2014-12-09 13:38 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2014-12-09 3:09 UTC (permalink / raw)
To: Vinod Koul, Russell King
Cc: linux-next, linux-kernel, Krzysztof Kozlowski, Maxime Ripard
[-- Attachment #1: Type: text/plain, Size: 5924 bytes --]
Hi Vinod,
Today's linux-next merge of the slave-dma tree got a conflict in
drivers/dma/pl330.c between commits ae43b3289186 ("ARM: 8202/1:
dmaengine: pl330: Add runtime Power Management support v12") and
b816ccc5c01f ("ARM: 8206/1: dmaengine: pl330: Add PM sleep support")
from the arm tree and commits 86e15941d3f5 ("dmaengine: pl330: Split
device_control") and c9a09dacf851 ("dmaengine: pl330: Declare slave
capabilities for the generic code") from the slave-dma tree.
I fixed it up (hopefully - see below) and can carry the fix as
necessary (no action is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/dma/pl330.c
index ca1566045ca4,b84222270c11..000000000000
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@@ -2092,71 -2092,38 +2116,44 @@@ static int pl330_terminate_all(struct d
struct dma_pl330_desc *desc;
unsigned long flags;
struct pl330_dmac *pl330 = pch->dmac;
- struct dma_slave_config *slave_config;
LIST_HEAD(list);
- switch (cmd) {
- case DMA_TERMINATE_ALL:
- pm_runtime_get_sync(pl330->ddma.dev);
- spin_lock_irqsave(&pch->lock, flags);
++ pm_runtime_get_sync(pl330->ddma.dev);
+ spin_lock_irqsave(&pch->lock, flags);
- spin_lock(&pl330->lock);
- _stop(pch->thread);
- spin_unlock(&pl330->lock);
+ spin_lock(&pl330->lock);
+ _stop(pch->thread);
+ spin_unlock(&pl330->lock);
- pch->thread->req[0].desc = NULL;
- pch->thread->req[1].desc = NULL;
- pch->thread->req_running = -1;
+ pch->thread->req[0].desc = NULL;
+ pch->thread->req[1].desc = NULL;
+ pch->thread->req_running = -1;
- /* Mark all desc done */
- list_for_each_entry(desc, &pch->submitted_list, node) {
- desc->status = FREE;
- dma_cookie_complete(&desc->txd);
- }
+ /* Mark all desc done */
+ list_for_each_entry(desc, &pch->submitted_list, node) {
+ desc->status = FREE;
+ dma_cookie_complete(&desc->txd);
+ }
- list_for_each_entry(desc, &pch->work_list , node) {
- desc->status = FREE;
- dma_cookie_complete(&desc->txd);
- }
+ list_for_each_entry(desc, &pch->work_list , node) {
+ desc->status = FREE;
+ dma_cookie_complete(&desc->txd);
+ }
- list_for_each_entry(desc, &pch->completed_list , node) {
- desc->status = FREE;
- dma_cookie_complete(&desc->txd);
- }
+ list_for_each_entry(desc, &pch->completed_list , node) {
+ desc->status = FREE;
+ dma_cookie_complete(&desc->txd);
+ }
- if (!list_empty(&pch->work_list))
- pm_runtime_put(pl330->ddma.dev);
++ if (!list_empty(&pch->work_list))
++ pm_runtime_put(pl330->ddma.dev);
+
- list_splice_tail_init(&pch->submitted_list, &pl330->desc_pool);
- list_splice_tail_init(&pch->work_list, &pl330->desc_pool);
- list_splice_tail_init(&pch->completed_list, &pl330->desc_pool);
- spin_unlock_irqrestore(&pch->lock, flags);
- pm_runtime_mark_last_busy(pl330->ddma.dev);
- pm_runtime_put_autosuspend(pl330->ddma.dev);
- break;
- case DMA_SLAVE_CONFIG:
- slave_config = (struct dma_slave_config *)arg;
-
- if (slave_config->direction == DMA_MEM_TO_DEV) {
- if (slave_config->dst_addr)
- pch->fifo_addr = slave_config->dst_addr;
- if (slave_config->dst_addr_width)
- pch->burst_sz = __ffs(slave_config->dst_addr_width);
- if (slave_config->dst_maxburst)
- pch->burst_len = slave_config->dst_maxburst;
- } else if (slave_config->direction == DMA_DEV_TO_MEM) {
- if (slave_config->src_addr)
- pch->fifo_addr = slave_config->src_addr;
- if (slave_config->src_addr_width)
- pch->burst_sz = __ffs(slave_config->src_addr_width);
- if (slave_config->src_maxburst)
- pch->burst_len = slave_config->src_maxburst;
- }
- break;
- default:
- dev_err(pch->dmac->ddma.dev, "Not supported command.\n");
- return -ENXIO;
- }
+ list_splice_tail_init(&pch->submitted_list, &pl330->desc_pool);
+ list_splice_tail_init(&pch->work_list, &pl330->desc_pool);
+ list_splice_tail_init(&pch->completed_list, &pl330->desc_pool);
+ spin_unlock_irqrestore(&pch->lock, flags);
++ pm_runtime_mark_last_busy(pl330->ddma.dev);
++ pm_runtime_put_autosuspend(pl330->ddma.dev);1
return 0;
}
@@@ -2623,59 -2578,6 +2620,46 @@@ static irqreturn_t pl330_irq_handler(in
BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | \
BIT(DMA_SLAVE_BUSWIDTH_8_BYTES)
- static int pl330_dma_device_slave_caps(struct dma_chan *dchan,
- struct dma_slave_caps *caps)
- {
- caps->src_addr_widths = PL330_DMA_BUSWIDTHS;
- caps->dstn_addr_widths = PL330_DMA_BUSWIDTHS;
- caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
- caps->cmd_pause = false;
- caps->cmd_terminate = true;
- caps->residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
-
- return 0;
- }
-
+/*
+ * Runtime PM callbacks are provided by amba/bus.c driver.
+ *
+ * It is assumed here that IRQ safe runtime PM is chosen in probe and amba
+ * bus driver will only disable/enable the clock in runtime PM callbacks.
+ */
+static int __maybe_unused pl330_suspend(struct device *dev)
+{
+ struct amba_device *pcdev = to_amba_device(dev);
+
+ pm_runtime_disable(dev);
+
+ if (!pm_runtime_status_suspended(dev)) {
+ /* amba did not disable the clock */
+ amba_pclk_disable(pcdev);
+ }
+ amba_pclk_unprepare(pcdev);
+
+ return 0;
+}
+
+static int __maybe_unused pl330_resume(struct device *dev)
+{
+ struct amba_device *pcdev = to_amba_device(dev);
+ int ret;
+
+ ret = amba_pclk_prepare(pcdev);
+ if (ret)
+ return ret;
+
+ if (!pm_runtime_status_suspended(dev))
+ ret = amba_pclk_enable(pcdev);
+
+ pm_runtime_enable(dev);
+
+ return ret;
+}
+
+static SIMPLE_DEV_PM_OPS(pl330_pm, pl330_suspend, pl330_resume);
+
static int
pl330_probe(struct amba_device *adev, const struct amba_id *id)
{
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-09 14:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-02 3:16 linux-next: manual merge of the slave-dma tree with the arm tree Stephen Rothwell
2012-07-13 3:09 ` Vinod Koul
2014-12-09 3:09 Stephen Rothwell
2014-12-09 13:38 ` Krzysztof Kozlowski
2014-12-09 14:08 ` Stephen Rothwell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.