From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: Vinod Koul <vinod.koul@intel.com>,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Arnd Bergmann <arnd@arndb.de>,
Peter Ujfalusi <peter.ujfalusi@ti.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Vinod Koul <vkoul@kernel.org>,
devicetree@vger.kernel.org
Subject: [PATCH 07/14] ARM: OMAP2+: Configure dma_plat_info directly and drop dma_dev_attr
Date: Mon, 16 Dec 2019 16:19:18 -0800 [thread overview]
Message-ID: <20191217001925.44558-8-tony@atomide.com> (raw)
In-Reply-To: <20191217001925.44558-1-tony@atomide.com>
Let's prepare things for passing dma_plat_info to the dmaengine driver in
device tree auxdata. To do that, we want to configure dma_plat_info
directly. And we can also drop the related dma_dev_attr data.
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/dma.c | 31 +++++++++++++---------
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 8 ------
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 8 ------
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 8 ------
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 8 ------
arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 8 ------
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 8 ------
7 files changed, 18 insertions(+), 61 deletions(-)
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -211,9 +211,16 @@ static const struct dma_slave_map omap24xx_sdma_dt_map[] = {
{ "musb-hdrc.1.auto", "dmareq5", SDMA_FILTER_PARAM(64) }, /* OMAP2420 only */
};
+static struct omap_dma_dev_attr dma_attr = {
+ .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
+ IS_CSSA_32 | IS_CDSA_32,
+ .lch_count = 32,
+};
+
static struct omap_system_dma_plat_info dma_plat_info __initdata = {
.reg_map = reg_map,
.channel_stride = 0x60,
+ .dma_attr = &dma_attr,
.show_dma_caps = omap2_show_dma_caps,
.clear_dma = omap2_clear_dma,
.dma_write = dma_write,
@@ -230,22 +237,25 @@ static struct platform_device_info omap_dma_dev_info __initdata = {
static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
{
struct platform_device *pdev;
- struct omap_system_dma_plat_info p;
- struct omap_dma_dev_attr *d;
struct resource *mem;
char *name = "omap_dma_system";
- p = dma_plat_info;
- p.dma_attr = (struct omap_dma_dev_attr *)oh->dev_attr;
- p.errata = configure_dma_errata();
+ dma_plat_info.errata = configure_dma_errata();
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);
+ dma_plat_info.slave_map = omap24xx_sdma_dt_map;
+ dma_plat_info.slavecnt = ARRAY_SIZE(omap24xx_sdma_dt_map);
}
- pdev = omap_device_build(name, 0, oh, &p, sizeof(p));
+ if (!soc_is_omap242x())
+ dma_attr.dev_caps |= IS_RW_PRIORITY;
+
+ if (soc_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
+ dma_attr.dev_caps |= HS_CHANNELS_RESERVED;
+
+ pdev = omap_device_build(name, 0, oh, &dma_plat_info,
+ sizeof(dma_plat_info));
if (IS_ERR(pdev)) {
pr_err("%s: Can't build omap_device for %s:%s.\n",
__func__, name, oh->name);
@@ -267,11 +277,6 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
return -ENOMEM;
}
- d = oh->dev_attr;
-
- if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
- d->dev_caps |= HS_CHANNELS_RESERVED;
-
/* Check the capabilities register for descriptor loading feature */
if (soc_is_omap24xx() || soc_is_omap34xx() || soc_is_am35xx())
dma_common_ch_end = CCFN;
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -126,18 +126,10 @@ static struct omap_hwmod omap2420_i2c2_hwmod = {
.flags = HWMOD_16BIT_REG,
};
-/* dma attributes */
-static struct omap_dma_dev_attr dma_dev_attr = {
- .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
- IS_CSSA_32 | IS_CDSA_32,
- .lch_count = 32,
-};
-
static struct omap_hwmod omap2420_dma_system_hwmod = {
.name = "dma",
.class = &omap2xxx_dma_hwmod_class,
.main_clk = "core_l3_ck",
- .dev_attr = &dma_dev_attr,
.flags = HWMOD_NO_IDLEST,
};
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -121,18 +121,10 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
.class = &omap2xxx_gpio_hwmod_class,
};
-/* dma attributes */
-static struct omap_dma_dev_attr dma_dev_attr = {
- .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
- IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
- .lch_count = 32,
-};
-
static struct omap_hwmod omap2430_dma_system_hwmod = {
.name = "dma",
.class = &omap2xxx_dma_hwmod_class,
.main_clk = "core_l3_ck",
- .dev_attr = &dma_dev_attr,
.flags = HWMOD_NO_IDLEST,
};
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -833,13 +833,6 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = {
.class = &omap3xxx_gpio_hwmod_class,
};
-/* dma attributes */
-static struct omap_dma_dev_attr dma_dev_attr = {
- .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
- IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
- .lch_count = 32,
-};
-
static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
.rev_offs = 0x0000,
.sysc_offs = 0x002c,
@@ -870,7 +863,6 @@ static struct omap_hwmod omap3xxx_dma_system_hwmod = {
.idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
},
},
- .dev_attr = &dma_dev_attr,
.flags = HWMOD_NO_IDLEST,
};
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -422,13 +422,6 @@ static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
.sysc = &omap44xx_dma_sysc,
};
-/* dma dev_attr */
-static struct omap_dma_dev_attr dma_dev_attr = {
- .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
- IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
- .lch_count = 32,
-};
-
/* dma_system */
static struct omap_hwmod omap44xx_dma_system_hwmod = {
.name = "dma_system",
@@ -441,7 +434,6 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = {
.context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
},
},
- .dev_attr = &dma_dev_attr,
};
/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -256,13 +256,6 @@ static struct omap_hwmod_class omap54xx_dma_hwmod_class = {
.sysc = &omap54xx_dma_sysc,
};
-/* dma dev_attr */
-static struct omap_dma_dev_attr dma_dev_attr = {
- .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
- IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
- .lch_count = 32,
-};
-
/* dma_system */
static struct omap_hwmod omap54xx_dma_system_hwmod = {
.name = "dma_system",
@@ -275,7 +268,6 @@ static struct omap_hwmod omap54xx_dma_system_hwmod = {
.context_offs = OMAP54XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
},
},
- .dev_attr = &dma_dev_attr,
};
/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -411,13 +411,6 @@ static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
.sysc = &dra7xx_dma_sysc,
};
-/* dma dev_attr */
-static struct omap_dma_dev_attr dma_dev_attr = {
- .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
- IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
- .lch_count = 32,
-};
-
/* dma_system */
static struct omap_hwmod dra7xx_dma_system_hwmod = {
.name = "dma_system",
@@ -430,7 +423,6 @@ static struct omap_hwmod dra7xx_dma_system_hwmod = {
.context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
},
},
- .dev_attr = &dma_dev_attr,
};
/*
--
2.24.1
next prev parent reply other threads:[~2019-12-17 0:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 0:19 [PATCH 00/14] Remove legacy sdma code for dt booting omaps Tony Lindgren
2019-12-17 0:19 ` [PATCH 01/14] ARM: dts: Add generic compatible for omap sdma instances Tony Lindgren
2019-12-17 0:19 ` [PATCH 02/14] ARM: dts: Configure interconnect target module for omap2 sdma Tony Lindgren
2019-12-17 0:19 ` [PATCH 03/14] ARM: dts: Configure interconnect target module for omap3 sdma Tony Lindgren
2019-12-17 0:19 ` [PATCH 04/14] ARM: OMAP2+: Drop unused sdma functions Tony Lindgren
2019-12-17 0:19 ` [PATCH 05/14] ARM: OMAP2+: Drop sdma interrupt handling for mach-omap2 Tony Lindgren
2019-12-17 0:19 ` [PATCH 06/14] ARM: OMAP2+: Configure sdma capabilities directly Tony Lindgren
2019-12-17 0:19 ` Tony Lindgren [this message]
2019-12-17 0:19 ` [PATCH 08/14] dmaengine: ti: omap-dma: Add device tree match data and use it for cpu_pm Tony Lindgren
2019-12-23 7:43 ` Vinod Koul
2019-12-17 0:19 ` [PATCH 09/14] dmaengine: ti: omap-dma: Configure global priority register directly Tony Lindgren
2019-12-23 7:44 ` Vinod Koul
2019-12-17 0:19 ` [PATCH 10/14] dmaengine: ti: omap-dma: Pass sdma auxdata to driver and use it Tony Lindgren
2019-12-23 7:46 ` Vinod Koul
2019-12-17 0:19 ` [PATCH 11/14] dmaengine: ti: omap-dma: Allocate channels directly Tony Lindgren
2019-12-23 7:47 ` Vinod Koul
2019-12-17 0:19 ` [PATCH 12/14] dmaengine: ti: omap-dma: Use cpu notifier to block idle for omap2 Tony Lindgren
2019-12-17 0:27 ` Tony Lindgren
2019-12-23 7:47 ` Vinod Koul
2019-12-17 0:19 ` [PATCH 13/14] ARM: OMAP2+: Drop legacy init for sdma Tony Lindgren
2019-12-17 0:19 ` [PATCH 14/14] ARM: OMAP2+: Drop legacy platform data " Tony Lindgren
2019-12-17 9:53 ` [PATCH 00/14] Remove legacy sdma code for dt booting omaps Peter Ujfalusi
2019-12-17 14:50 ` Tony Lindgren
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=20191217001925.44558-8-tony@atomide.com \
--to=tony@atomide.com \
--cc=aaro.koskinen@iki.fi \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vinod.koul@intel.com \
--cc=vkoul@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).