From: Peter Ujfalusi <peter.ujfalusi@ti.com> To: <b-liu@ti.com>, <tony@atomide.com>, <gregkh@linuxfoundation.org> Cc: <linux-usb@vger.kernel.org>, <linux-omap@vger.kernel.org>, <balbi@kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH 3/4] ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines Date: Wed, 3 May 2017 13:56:44 +0300 [thread overview] Message-ID: <20170503105645.26759-4-peter.ujfalusi@ti.com> (raw) In-Reply-To: <20170503105645.26759-1-peter.ujfalusi@ti.com> The external request lines are used by tusb6010 on OMAP24xx platforms. Update the map so the driver can use dmaengine API to request the DMA channel. At the same time add temporary map containing only the external DMA request numbers for DT booted case on omap24xx since the tusb6010 stack is not yet supports DT boot. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> --- arch/arm/mach-omap2/dma.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index e58c13a9bea5..0b77a0176018 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c @@ -249,6 +249,24 @@ static const struct dma_slave_map omap24xx_sdma_map[] = { { "omap_uart.2", "rx", SDMA_FILTER_PARAM(54) }, { "omap_hsmmc.0", "tx", SDMA_FILTER_PARAM(61) }, { "omap_hsmmc.0", "rx", SDMA_FILTER_PARAM(62) }, + + /* external DMA requests when tusb6010 is used */ + { "musb-tusb", "dmareq0", SDMA_FILTER_PARAM(2) }, + { "musb-tusb", "dmareq1", SDMA_FILTER_PARAM(3) }, + { "musb-tusb", "dmareq2", SDMA_FILTER_PARAM(14) }, /* OMAP2420 only */ + { "musb-tusb", "dmareq3", SDMA_FILTER_PARAM(15) }, /* OMAP2420 only */ + { "musb-tusb", "dmareq4", SDMA_FILTER_PARAM(16) }, /* OMAP2420 only */ + { "musb-tusb", "dmareq5", SDMA_FILTER_PARAM(64) }, /* OMAP2420 only */ +}; + +static const struct dma_slave_map omap24xx_sdma_dt_map[] = { + /* external DMA requests when tusb6010 is used */ + { "musb-hdrc.1.auto", "dmareq0", SDMA_FILTER_PARAM(2) }, + { "musb-hdrc.1.auto", "dmareq1", SDMA_FILTER_PARAM(3) }, + { "musb-hdrc.1.auto", "dmareq2", SDMA_FILTER_PARAM(14) }, /* OMAP2420 only */ + { "musb-hdrc.1.auto", "dmareq3", SDMA_FILTER_PARAM(15) }, /* OMAP2420 only */ + { "musb-hdrc.1.auto", "dmareq4", SDMA_FILTER_PARAM(16) }, /* OMAP2420 only */ + { "musb-hdrc.1.auto", "dmareq5", SDMA_FILTER_PARAM(64) }, /* OMAP2420 only */ }; static const struct dma_slave_map omap3xxx_sdma_map[] = { @@ -346,6 +364,12 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) __func__); return -ENODEV; } + } else { + if (soc_is_omap24xx()) { + /* DMA slave map for drivers not yet converted to DT */ + p.slave_map = omap24xx_sdma_dt_map; + p.slavecnt = ARRAY_SIZE(omap24xx_sdma_dt_map); + } } pdev = omap_device_build(name, 0, oh, &p, sizeof(p)); -- 2.12.2
WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com> To: b-liu@ti.com, tony@atomide.com, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, balbi@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines Date: Wed, 3 May 2017 13:56:44 +0300 [thread overview] Message-ID: <20170503105645.26759-4-peter.ujfalusi@ti.com> (raw) In-Reply-To: <20170503105645.26759-1-peter.ujfalusi@ti.com> The external request lines are used by tusb6010 on OMAP24xx platforms. Update the map so the driver can use dmaengine API to request the DMA channel. At the same time add temporary map containing only the external DMA request numbers for DT booted case on omap24xx since the tusb6010 stack is not yet supports DT boot. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> --- arch/arm/mach-omap2/dma.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index e58c13a9bea5..0b77a0176018 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c @@ -249,6 +249,24 @@ static const struct dma_slave_map omap24xx_sdma_map[] = { { "omap_uart.2", "rx", SDMA_FILTER_PARAM(54) }, { "omap_hsmmc.0", "tx", SDMA_FILTER_PARAM(61) }, { "omap_hsmmc.0", "rx", SDMA_FILTER_PARAM(62) }, + + /* external DMA requests when tusb6010 is used */ + { "musb-tusb", "dmareq0", SDMA_FILTER_PARAM(2) }, + { "musb-tusb", "dmareq1", SDMA_FILTER_PARAM(3) }, + { "musb-tusb", "dmareq2", SDMA_FILTER_PARAM(14) }, /* OMAP2420 only */ + { "musb-tusb", "dmareq3", SDMA_FILTER_PARAM(15) }, /* OMAP2420 only */ + { "musb-tusb", "dmareq4", SDMA_FILTER_PARAM(16) }, /* OMAP2420 only */ + { "musb-tusb", "dmareq5", SDMA_FILTER_PARAM(64) }, /* OMAP2420 only */ +}; + +static const struct dma_slave_map omap24xx_sdma_dt_map[] = { + /* external DMA requests when tusb6010 is used */ + { "musb-hdrc.1.auto", "dmareq0", SDMA_FILTER_PARAM(2) }, + { "musb-hdrc.1.auto", "dmareq1", SDMA_FILTER_PARAM(3) }, + { "musb-hdrc.1.auto", "dmareq2", SDMA_FILTER_PARAM(14) }, /* OMAP2420 only */ + { "musb-hdrc.1.auto", "dmareq3", SDMA_FILTER_PARAM(15) }, /* OMAP2420 only */ + { "musb-hdrc.1.auto", "dmareq4", SDMA_FILTER_PARAM(16) }, /* OMAP2420 only */ + { "musb-hdrc.1.auto", "dmareq5", SDMA_FILTER_PARAM(64) }, /* OMAP2420 only */ }; static const struct dma_slave_map omap3xxx_sdma_map[] = { @@ -346,6 +364,12 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) __func__); return -ENODEV; } + } else { + if (soc_is_omap24xx()) { + /* DMA slave map for drivers not yet converted to DT */ + p.slave_map = omap24xx_sdma_dt_map; + p.slavecnt = ARRAY_SIZE(omap24xx_sdma_dt_map); + } } pdev = omap_device_build(name, 0, oh, &p, sizeof(p)); -- 2.12.2
next prev parent reply other threads:[~2017-05-03 10:57 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-05-03 10:56 [PATCH 0/4] usb: musb: tusb6010_omap: Convert to DMAengine Peter Ujfalusi 2017-05-03 10:56 ` Peter Ujfalusi 2017-05-03 10:56 ` [PATCH 1/4] usb: musb: tusb6010_omap: Create new struct for DMA data/parameters Peter Ujfalusi 2017-05-03 10:56 ` Peter Ujfalusi 2017-05-03 10:56 ` [PATCH 2/4] usb: musb: tusb6010_omap: Allocate DMA channels upfront Peter Ujfalusi 2017-05-03 10:56 ` Peter Ujfalusi 2017-05-03 10:56 ` Peter Ujfalusi [this message] 2017-05-03 10:56 ` [PATCH 3/4] ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines Peter Ujfalusi 2017-05-03 10:56 ` [PATCH 4/4] usb: musb: tusb6010_omap: Convert to DMAengine API Peter Ujfalusi 2017-05-03 10:56 ` Peter Ujfalusi 2017-05-04 19:40 ` Tony Lindgren 2017-05-04 21:05 ` Tony Lindgren 2017-05-05 13:37 ` Peter Ujfalusi 2017-05-05 13:37 ` Peter Ujfalusi 2017-05-05 15:17 ` Peter Ujfalusi 2017-05-05 15:17 ` Peter Ujfalusi 2017-05-05 22:55 ` Tony Lindgren 2017-05-08 15:12 ` Peter Ujfalusi 2017-05-08 15:12 ` Peter Ujfalusi 2017-05-08 15:29 ` Tony Lindgren 2017-05-04 14:31 ` [PATCH 0/4] usb: musb: tusb6010_omap: Convert to DMAengine Tony Lindgren 2017-05-05 7:28 ` Peter Ujfalusi 2017-05-05 7:28 ` Peter Ujfalusi
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=20170503105645.26759-4-peter.ujfalusi@ti.com \ --to=peter.ujfalusi@ti.com \ --cc=b-liu@ti.com \ --cc=balbi@kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=tony@atomide.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.