From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: tony@atomide.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: Re: [PATCH 1/2] ARM: OMAP1: DMA: Provide dma_slave_map to omap-dma
Date: Mon, 22 Feb 2016 09:19:18 +0200 [thread overview]
Message-ID: <56CAB676.6080309@ti.com> (raw)
In-Reply-To: <20160219214426.GK1640@darkstar.musicnaut.iki.fi>
On 2016-02-19 23:44, Aaro Koskinen wrote:
> On Tue, Feb 02, 2016 at 04:27:06PM +0200, Peter Ujfalusi wrote:
>> OMAP1 can not boot in DT mode and to be able to clean up the driver
>> regarding to the dmaengine API use (switching to the new API) the
>> device/slave -> filter mapping needs to be provided to the omap-dma driver.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Thanks Aaro,
I believe the map covers all drivers using DMA, but in case I missed any we -
you ;) will notice it as they will fail to get the DMA channels. This only
going to be visible after I send the driver changes for 4.7. In such a case we
will need to add the given device to the list.
--
Péter
>
> A.
>
>> ---
>> arch/arm/mach-omap1/dma.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 45 insertions(+)
>>
>> diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
>> index 7b02ed218a42..f6ba589cd312 100644
>> --- a/arch/arm/mach-omap1/dma.c
>> +++ b/arch/arm/mach-omap1/dma.c
>> @@ -25,6 +25,7 @@
>> #include <linux/device.h>
>> #include <linux/io.h>
>> #include <linux/dma-mapping.h>
>> +#include <linux/dmaengine.h>
>> #include <linux/omap-dma.h>
>> #include <mach/tc.h>
>>
>> @@ -265,6 +266,42 @@ static const struct platform_device_info omap_dma_dev_info = {
>> .num_res = 1,
>> };
>>
>> +/* OMAP730, OMAP850 */
>> +static const struct dma_slave_map omap7xx_sdma_map[] = {
>> + { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
>> + { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
>> + { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(10) },
>> + { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(11) },
>> + { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
>> + { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
>> + { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
>> + { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
>> + { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
>> + { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
>> + { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
>> + { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
>> +};
>> +
>> +/* OMAP1510, OMAP1610*/
>> +static const struct dma_slave_map omap1xxx_sdma_map[] = {
>> + { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
>> + { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
>> + { "omap-mcbsp.3", "tx", SDMA_FILTER_PARAM(10) },
>> + { "omap-mcbsp.3", "rx", SDMA_FILTER_PARAM(11) },
>> + { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(16) },
>> + { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(17) },
>> + { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
>> + { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
>> + { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
>> + { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
>> + { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
>> + { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
>> + { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
>> + { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
>> + { "mmci-omap.1", "tx", SDMA_FILTER_PARAM(54) },
>> + { "mmci-omap.1", "rx", SDMA_FILTER_PARAM(55) },
>> +};
>> +
>> static struct omap_system_dma_plat_info dma_plat_info __initdata = {
>> .reg_map = reg_map,
>> .channel_stride = 0x40,
>> @@ -342,6 +379,14 @@ static int __init omap1_system_dma_init(void)
>> p.dma_attr = d;
>> p.errata = configure_dma_errata();
>>
>> + if (cpu_is_omap7xx()) {
>> + p.slave_map = omap7xx_sdma_map;
>> + p.slavecnt = ARRAY_SIZE(omap7xx_sdma_map);
>> + } else {
>> + p.slave_map = omap1xxx_sdma_map;
>> + p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map);
>> + }
>> +
>> ret = platform_device_add_data(pdev, &p, sizeof(p));
>> if (ret) {
>> dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
>> --
>> 2.7.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: OMAP1: DMA: Provide dma_slave_map to omap-dma
Date: Mon, 22 Feb 2016 09:19:18 +0200 [thread overview]
Message-ID: <56CAB676.6080309@ti.com> (raw)
In-Reply-To: <20160219214426.GK1640@darkstar.musicnaut.iki.fi>
On 2016-02-19 23:44, Aaro Koskinen wrote:
> On Tue, Feb 02, 2016 at 04:27:06PM +0200, Peter Ujfalusi wrote:
>> OMAP1 can not boot in DT mode and to be able to clean up the driver
>> regarding to the dmaengine API use (switching to the new API) the
>> device/slave -> filter mapping needs to be provided to the omap-dma driver.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Thanks Aaro,
I believe the map covers all drivers using DMA, but in case I missed any we -
you ;) will notice it as they will fail to get the DMA channels. This only
going to be visible after I send the driver changes for 4.7. In such a case we
will need to add the given device to the list.
--
P?ter
>
> A.
>
>> ---
>> arch/arm/mach-omap1/dma.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 45 insertions(+)
>>
>> diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
>> index 7b02ed218a42..f6ba589cd312 100644
>> --- a/arch/arm/mach-omap1/dma.c
>> +++ b/arch/arm/mach-omap1/dma.c
>> @@ -25,6 +25,7 @@
>> #include <linux/device.h>
>> #include <linux/io.h>
>> #include <linux/dma-mapping.h>
>> +#include <linux/dmaengine.h>
>> #include <linux/omap-dma.h>
>> #include <mach/tc.h>
>>
>> @@ -265,6 +266,42 @@ static const struct platform_device_info omap_dma_dev_info = {
>> .num_res = 1,
>> };
>>
>> +/* OMAP730, OMAP850 */
>> +static const struct dma_slave_map omap7xx_sdma_map[] = {
>> + { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
>> + { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
>> + { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(10) },
>> + { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(11) },
>> + { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
>> + { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
>> + { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
>> + { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
>> + { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
>> + { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
>> + { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
>> + { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
>> +};
>> +
>> +/* OMAP1510, OMAP1610*/
>> +static const struct dma_slave_map omap1xxx_sdma_map[] = {
>> + { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
>> + { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
>> + { "omap-mcbsp.3", "tx", SDMA_FILTER_PARAM(10) },
>> + { "omap-mcbsp.3", "rx", SDMA_FILTER_PARAM(11) },
>> + { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(16) },
>> + { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(17) },
>> + { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
>> + { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
>> + { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
>> + { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
>> + { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
>> + { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
>> + { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
>> + { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
>> + { "mmci-omap.1", "tx", SDMA_FILTER_PARAM(54) },
>> + { "mmci-omap.1", "rx", SDMA_FILTER_PARAM(55) },
>> +};
>> +
>> static struct omap_system_dma_plat_info dma_plat_info __initdata = {
>> .reg_map = reg_map,
>> .channel_stride = 0x40,
>> @@ -342,6 +379,14 @@ static int __init omap1_system_dma_init(void)
>> p.dma_attr = d;
>> p.errata = configure_dma_errata();
>>
>> + if (cpu_is_omap7xx()) {
>> + p.slave_map = omap7xx_sdma_map;
>> + p.slavecnt = ARRAY_SIZE(omap7xx_sdma_map);
>> + } else {
>> + p.slave_map = omap1xxx_sdma_map;
>> + p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map);
>> + }
>> +
>> ret = platform_device_add_data(pdev, &p, sizeof(p));
>> if (ret) {
>> dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
>> --
>> 2.7.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: <tony@atomide.com>, <linux-omap@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <arnd@arndb.de>
Subject: Re: [PATCH 1/2] ARM: OMAP1: DMA: Provide dma_slave_map to omap-dma
Date: Mon, 22 Feb 2016 09:19:18 +0200 [thread overview]
Message-ID: <56CAB676.6080309@ti.com> (raw)
In-Reply-To: <20160219214426.GK1640@darkstar.musicnaut.iki.fi>
On 2016-02-19 23:44, Aaro Koskinen wrote:
> On Tue, Feb 02, 2016 at 04:27:06PM +0200, Peter Ujfalusi wrote:
>> OMAP1 can not boot in DT mode and to be able to clean up the driver
>> regarding to the dmaengine API use (switching to the new API) the
>> device/slave -> filter mapping needs to be provided to the omap-dma driver.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Thanks Aaro,
I believe the map covers all drivers using DMA, but in case I missed any we -
you ;) will notice it as they will fail to get the DMA channels. This only
going to be visible after I send the driver changes for 4.7. In such a case we
will need to add the given device to the list.
--
Péter
>
> A.
>
>> ---
>> arch/arm/mach-omap1/dma.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 45 insertions(+)
>>
>> diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
>> index 7b02ed218a42..f6ba589cd312 100644
>> --- a/arch/arm/mach-omap1/dma.c
>> +++ b/arch/arm/mach-omap1/dma.c
>> @@ -25,6 +25,7 @@
>> #include <linux/device.h>
>> #include <linux/io.h>
>> #include <linux/dma-mapping.h>
>> +#include <linux/dmaengine.h>
>> #include <linux/omap-dma.h>
>> #include <mach/tc.h>
>>
>> @@ -265,6 +266,42 @@ static const struct platform_device_info omap_dma_dev_info = {
>> .num_res = 1,
>> };
>>
>> +/* OMAP730, OMAP850 */
>> +static const struct dma_slave_map omap7xx_sdma_map[] = {
>> + { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
>> + { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
>> + { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(10) },
>> + { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(11) },
>> + { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
>> + { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
>> + { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
>> + { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
>> + { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
>> + { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
>> + { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
>> + { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
>> +};
>> +
>> +/* OMAP1510, OMAP1610*/
>> +static const struct dma_slave_map omap1xxx_sdma_map[] = {
>> + { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
>> + { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
>> + { "omap-mcbsp.3", "tx", SDMA_FILTER_PARAM(10) },
>> + { "omap-mcbsp.3", "rx", SDMA_FILTER_PARAM(11) },
>> + { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(16) },
>> + { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(17) },
>> + { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
>> + { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
>> + { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
>> + { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
>> + { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
>> + { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
>> + { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
>> + { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
>> + { "mmci-omap.1", "tx", SDMA_FILTER_PARAM(54) },
>> + { "mmci-omap.1", "rx", SDMA_FILTER_PARAM(55) },
>> +};
>> +
>> static struct omap_system_dma_plat_info dma_plat_info __initdata = {
>> .reg_map = reg_map,
>> .channel_stride = 0x40,
>> @@ -342,6 +379,14 @@ static int __init omap1_system_dma_init(void)
>> p.dma_attr = d;
>> p.errata = configure_dma_errata();
>>
>> + if (cpu_is_omap7xx()) {
>> + p.slave_map = omap7xx_sdma_map;
>> + p.slavecnt = ARRAY_SIZE(omap7xx_sdma_map);
>> + } else {
>> + p.slave_map = omap1xxx_sdma_map;
>> + p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map);
>> + }
>> +
>> ret = platform_device_add_data(pdev, &p, sizeof(p));
>> if (ret) {
>> dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
>> --
>> 2.7.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-22 7:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 14:27 [PATCH 0/2] ARM: OMAP1/OMAP2+: Add dma_slave_map to board files Peter Ujfalusi
2016-02-02 14:27 ` Peter Ujfalusi
2016-02-02 14:27 ` Peter Ujfalusi
2016-02-02 14:27 ` [PATCH 1/2] ARM: OMAP1: DMA: Provide dma_slave_map to omap-dma Peter Ujfalusi
2016-02-02 14:27 ` Peter Ujfalusi
2016-02-02 14:27 ` Peter Ujfalusi
2016-02-19 18:07 ` Tony Lindgren
2016-02-19 18:07 ` Tony Lindgren
2016-02-19 21:44 ` Aaro Koskinen
2016-02-19 21:44 ` Aaro Koskinen
2016-02-22 7:19 ` Peter Ujfalusi [this message]
2016-02-22 7:19 ` Peter Ujfalusi
2016-02-22 7:19 ` Peter Ujfalusi
2016-02-22 18:02 ` Tony Lindgren
2016-02-22 18:02 ` Tony Lindgren
2016-02-02 14:27 ` [PATCH 2/2] ARM: OMAP2+: DMA: Provide dma_slave_map to omap-dma for legacy boot Peter Ujfalusi
2016-02-02 14:27 ` Peter Ujfalusi
2016-02-02 14:27 ` 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=56CAB676.6080309@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=aaro.koskinen@iki.fi \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@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: link
Be 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.