From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: arnd@arndb.de, linus.walleij@stericsson.com,
srinidhi.kasagar@stericsson.com, Lee Jones <lee.jones@linaro.org>
Subject: [PATCH 08/63] dmaengine: ste_dma40: Move default memcpy configs into the driver
Date: Fri, 3 May 2013 15:31:54 +0100 [thread overview]
Message-ID: <1367591569-32197-9-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1367591569-32197-1-git-send-email-lee.jones@linaro.org>
There are only two default memcpy configurations used for the DMA40
driver; one for physical memcpy and one for logical memcpy. Instead
of invariably passing the same configurations though platform data,
we're moving them into the driver instead.
Acked-by: Vinod Koul <vnod.koul@intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
arch/arm/mach-ux500/devices-db8500.c | 28 -----------------------
drivers/dma/ste_dma40.c | 32 +++++++++++++++++++++++++--
include/linux/platform_data/dma-ste-dma40.h | 4 ----
3 files changed, 30 insertions(+), 34 deletions(-)
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
index 01cfb68..8b20c91 100644
--- a/arch/arm/mach-ux500/devices-db8500.c
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -42,32 +42,6 @@ static struct resource dma40_resources[] = {
}
};
-/* Default configuration for physcial memcpy */
-struct stedma40_chan_cfg dma40_memcpy_conf_phy = {
- .mode = STEDMA40_MODE_PHYSICAL,
- .dir = STEDMA40_MEM_TO_MEM,
-
- .src_info.data_width = STEDMA40_BYTE_WIDTH,
- .src_info.psize = STEDMA40_PSIZE_PHY_1,
- .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
-
- .dst_info.data_width = STEDMA40_BYTE_WIDTH,
- .dst_info.psize = STEDMA40_PSIZE_PHY_1,
- .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
-};
-/* Default configuration for logical memcpy */
-struct stedma40_chan_cfg dma40_memcpy_conf_log = {
- .dir = STEDMA40_MEM_TO_MEM,
-
- .src_info.data_width = STEDMA40_BYTE_WIDTH,
- .src_info.psize = STEDMA40_PSIZE_LOG_1,
- .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
-
- .dst_info.data_width = STEDMA40_BYTE_WIDTH,
- .dst_info.psize = STEDMA40_PSIZE_LOG_1,
- .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
-};
-
/*
* Mapping between destination event lines and physical device address.
* The event line is tied to a device and therefore the address is constant.
@@ -150,8 +124,6 @@ static struct stedma40_platform_data dma40_plat_data = {
.dev_len = DB8500_DMA_NR_DEV,
.dev_rx = dma40_rx_map,
.dev_tx = dma40_tx_map,
- .memcpy_conf_phy = &dma40_memcpy_conf_phy,
- .memcpy_conf_log = &dma40_memcpy_conf_log,
.disabled_channels = {-1},
};
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 12de79e..3b83dee 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -58,6 +58,34 @@
/* Reserved event lines for memcpy only. */
static int dma40_memcpy_channels[] = { 56, 57, 58, 59, 60 };
+/* Default configuration for physcial memcpy */
+struct stedma40_chan_cfg dma40_memcpy_conf_phy = {
+ .mode = STEDMA40_MODE_PHYSICAL,
+ .dir = STEDMA40_MEM_TO_MEM,
+
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
+ .src_info.psize = STEDMA40_PSIZE_PHY_1,
+ .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
+
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
+ .dst_info.psize = STEDMA40_PSIZE_PHY_1,
+ .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
+};
+
+/* Default configuration for logical memcpy */
+struct stedma40_chan_cfg dma40_memcpy_conf_log = {
+ .mode = STEDMA40_MODE_LOGICAL,
+ .dir = STEDMA40_MEM_TO_MEM,
+
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
+ .src_info.psize = STEDMA40_PSIZE_LOG_1,
+ .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
+
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
+ .dst_info.psize = STEDMA40_PSIZE_LOG_1,
+ .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
+};
+
/**
* enum 40_command - The different commands and/or statuses.
*
@@ -2015,13 +2043,13 @@ static int d40_config_memcpy(struct d40_chan *d40c)
dma_cap_mask_t cap = d40c->chan.device->cap_mask;
if (dma_has_cap(DMA_MEMCPY, cap) && !dma_has_cap(DMA_SLAVE, cap)) {
- d40c->dma_cfg = *d40c->base->plat_data->memcpy_conf_log;
+ d40c->dma_cfg = dma40_memcpy_conf_log;
d40c->dma_cfg.src_dev_type = STEDMA40_DEV_SRC_MEMORY;
d40c->dma_cfg.dst_dev_type = dma40_memcpy_channels[d40c->chan.chan_id];
} else if (dma_has_cap(DMA_MEMCPY, cap) &&
dma_has_cap(DMA_SLAVE, cap)) {
- d40c->dma_cfg = *d40c->base->plat_data->memcpy_conf_phy;
+ d40c->dma_cfg = dma40_memcpy_conf_phy;
} else {
chan_err(d40c, "No memcpy\n");
return -EINVAL;
diff --git a/include/linux/platform_data/dma-ste-dma40.h b/include/linux/platform_data/dma-ste-dma40.h
index a808784..869c571 100644
--- a/include/linux/platform_data/dma-ste-dma40.h
+++ b/include/linux/platform_data/dma-ste-dma40.h
@@ -141,8 +141,6 @@ struct stedma40_chan_cfg {
* @dev_len: length of dev_tx and dev_rx
* @dev_tx: mapping between destination event line and io address
* @dev_rx: mapping between source event line and io address
- * @memcpy_conf_phy: default configuration of physical channel memcpy
- * @memcpy_conf_log: default configuration of logical channel memcpy
* @disabled_channels: A vector, ending with -1, that marks physical channels
* that are for different reasons not available for the driver.
* @soft_lli_chans: A vector, that marks physical channels will use LLI by SW
@@ -160,8 +158,6 @@ struct stedma40_platform_data {
u32 dev_len;
const dma_addr_t *dev_tx;
const dma_addr_t *dev_rx;
- struct stedma40_chan_cfg *memcpy_conf_phy;
- struct stedma40_chan_cfg *memcpy_conf_log;
int disabled_channels[STEDMA40_MAX_PHYS];
int *soft_lli_chans;
int num_of_soft_lli_chans;
--
1.7.10.4
next prev parent reply other threads:[~2013-05-03 14:39 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 14:31 [PATCH 00/63] dmaengine: Convert to correct API & Device Tree handling Lee Jones
2013-05-03 14:31 ` [PATCH 01/63] ARM: ux500: Supply address location names for the DMA40 DMA controller Lee Jones
2013-05-03 19:27 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 02/63] ARM: ux500: Setup the DMA40 driver's DT node using the new DMA API Lee Jones
2013-05-03 19:29 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 03/63] ARM: ux500: Supply UART's DMA configuration via Device Tree Lee Jones
2013-05-03 19:33 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 04/63] ARM: ux500: Supply MMC " Lee Jones
2013-05-03 19:33 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 05/63] ARM: ux500: Populate the ux500-musb Device Tree entry Lee Jones
2013-05-03 19:35 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 06/63] ARM: ux500: Pass DMA memcpy channels though Device Tree Lee Jones
2013-05-03 19:37 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 07/63] dmaengine: ste_dma40: Assign memcpy channels in the driver Lee Jones
2013-05-03 19:40 ` Linus Walleij
2013-05-03 19:51 ` Linus Walleij
2013-05-03 14:31 ` Lee Jones [this message]
2013-05-03 19:53 ` [PATCH 08/63] dmaengine: ste_dma40: Move default memcpy configs into " Linus Walleij
2013-05-03 14:31 ` [PATCH 09/63] dmaengine: ste_dma40: Rectify incorrect configuration validation checking Lee Jones
2013-05-03 19:58 ` Linus Walleij
2013-05-20 12:36 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 10/63] dmaengine: ste_dma40: Amalgamate DMA source and destination channel numbers Lee Jones
2013-05-03 20:00 ` Linus Walleij
2013-05-20 12:35 ` Linus Walleij
2013-05-23 10:46 ` Vinod Koul
2013-05-03 14:31 ` [PATCH 11/63] ARM: ux500: Strip out duplicate USB DMA configuration Lee Jones
2013-05-03 20:02 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 12/63] dmaengine: ste_dma40: Remove home-brew MAX() macro Lee Jones
2013-05-03 20:04 ` Linus Walleij
2013-05-20 12:32 ` Linus Walleij
2013-05-03 14:31 ` [PATCH 13/63] ARM: ux500: Remove unused 'data_width' attributes from SDI DMA configs Lee Jones
2013-05-03 20:07 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 14/63] ARM: ux500: Remove unused 'data_width' attributes from SSP " Lee Jones
2013-05-03 20:09 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 15/63] ARM: ux500: Remove unused 'data_width' attributes from UART " Lee Jones
2013-05-03 20:11 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 16/63] ARM: ux500: Remove superfluous 'psize' attribute from Audio platform data Lee Jones
2013-05-03 20:13 ` Linus Walleij
2013-05-03 20:59 ` Fabio Baltieri
2013-05-03 21:04 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 17/63] dmaengine: ste_dma40: Calculate number of logical channels from physical ones Lee Jones
2013-05-03 20:15 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 18/63] dmaengine: ste_dma40: Remove 'always true' checking Lee Jones
2013-05-03 20:17 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 19/63] dmaengine: ste_dma40: Separate Logical Global Interrupt Mask (GIM) unmasking Lee Jones
2013-05-03 20:23 ` Linus Walleij
2013-05-08 15:02 ` Lee Jones
2013-05-03 14:32 ` [PATCH 20/63] dmaengine: ste_dma40: Remove unnecessary call to d40_phy_cfg() Lee Jones
2013-05-03 20:27 ` Linus Walleij
2013-05-08 15:20 ` Lee Jones
2013-05-03 14:32 ` [PATCH 21/63] dmaengine: ste_dma40: Don't configure runtime configurable setup during allocate Lee Jones
2013-05-03 20:41 ` Linus Walleij
2013-05-08 15:24 ` Lee Jones
2013-05-03 14:32 ` [PATCH 22/63] dmaengine: ste_dma40: Move rev error-check up to revision acquisition Lee Jones
2013-05-03 20:48 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 23/63] dmaengine: ste_dma40: Also report the number of logical channels Lee Jones
2013-05-03 20:53 ` Linus Walleij
2013-05-20 12:29 ` Linus Walleij
2013-05-23 10:48 ` Vinod Koul
2013-05-03 14:32 ` [PATCH 24/63] dmaengine: ste_dma40: Allocate plat_data on declaration Lee Jones
2013-05-03 20:55 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 25/63] dmaengine: ste_dma40: Allow driver to be probe()able when DT is enabled Lee Jones
2013-05-03 20:58 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 26/63] dmaengine: ste_dma40: Supply full Device Tree parsing support Lee Jones
2013-05-03 20:59 ` Linus Walleij
2013-05-03 21:00 ` Linus Walleij
2013-05-23 10:54 ` Vinod Koul
2013-05-03 14:32 ` [PATCH 27/63] ARM: ux500: Pass remnant platform data though to DMA40 driver Lee Jones
2013-05-03 21:09 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 28/63] ARM: ux500: Stop passing UART's platform data for Device Tree boots Lee Jones
2013-05-03 21:11 ` Linus Walleij
2013-05-08 15:28 ` Lee Jones
2013-05-09 13:01 ` Lee Jones
2013-05-03 14:32 ` [PATCH 29/63] ARM: ux500: Stop passing MMC's " Lee Jones
2013-05-03 21:12 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 30/63] ARM: ux500: Move SDI (MMC) and UART devices under more descriptive heading Lee Jones
2013-05-03 21:12 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 31/63] dmaengine: ste_dma40: Only use addresses passed as configuration information Lee Jones
2013-05-03 21:16 ` Linus Walleij
2013-05-03 14:32 ` [PATCH 32/63] dmaengine: ste_dma40: Remove redundant address fetching function Lee Jones
2013-05-03 14:32 ` [PATCH 33/63] ARM: ux500: Remove DMA address look-up table Lee Jones
2013-05-03 14:32 ` [PATCH 34/63] dmaengine: ste_dma40: Correct copy/paste error Lee Jones
2013-05-03 14:32 ` [PATCH 35/63] ARM: ux500: Remove unnecessary attributes from DMA channel request pdata Lee Jones
2013-05-03 14:32 ` [PATCH 36/63] crypto: ux500/hash - Prepare clock before enabling it Lee Jones
2013-05-08 13:59 ` Ulf Hansson
2013-05-03 14:32 ` [PATCH 37/63] crypto: ux500/hash - Set DMA configuration though dma_slave_config() Lee Jones
2013-05-03 14:32 ` [PATCH 38/63] ARM: ux500: Stop passing Hash DMA channel config information though pdata Lee Jones
2013-05-03 14:32 ` [PATCH 39/63] crypto: ux500/cryp - Prepare clock before enabling it Lee Jones
2013-05-08 13:59 ` Ulf Hansson
2013-05-03 14:32 ` [PATCH 40/63] crypto: ux500/cryp - Set DMA configuration though dma_slave_config() Lee Jones
2013-05-03 14:32 ` [PATCH 41/63] ARM: ux500: Stop passing Cryp DMA channel config information though pdata Lee Jones
2013-05-03 14:32 ` [PATCH 42/63] crypto: ux500/[cryp|hash] - Show successful start-up in the bootlog Lee Jones
2013-05-03 14:32 ` [PATCH 43/63] ARM: ux500: Register Cyrp and Hash platform drivers on Snowball Lee Jones
2013-05-03 14:32 ` [PATCH 44/63] usb: musb: ux500: move channel number knowledge into the driver Lee Jones
2013-05-03 14:32 ` [PATCH 45/63] usb: musb: ux500: move the MUSB HDRC configuration " Lee Jones
2013-05-03 14:32 ` [PATCH 46/63] usb: musb: ux500: take the dma_mask from coherent_dma_mask Lee Jones
2013-05-03 14:32 ` [PATCH 47/63] usb: musb: ux500: harden checks for platform data Lee Jones
2013-05-03 14:32 ` [PATCH 48/63] usb: musb: ux500: attempt to find channels by name before using pdata Lee Jones
2013-05-03 14:32 ` [PATCH 49/63] usb: musb: ux500: add device tree probing support Lee Jones
2013-05-03 14:32 ` [PATCH 50/63] ARM: ux500: Add an auxdata entry for MUSB for clock-name look-up Lee Jones
2013-05-03 14:32 ` [PATCH 51/63] ARM: ux500: Remove ux500-musb platform registation when booting with DT Lee Jones
2013-05-03 14:32 ` [PATCH 52/63] ARM: ux500: Remove empty function u8500_of_init_devices() Lee Jones
2013-05-03 14:32 ` [PATCH 53/63] dmaengine: ste_dma40: Use the BIT macro to replace ugly '(1 << x)'s Lee Jones
2013-05-03 14:32 ` [PATCH 54/63] ARM: ux500: Replace ST-E's home-brew DMA direction definition with the generic one Lee Jones
2013-05-06 7:13 ` Srinidhi Kasagar
2013-05-07 7:39 ` Lee Jones
2013-05-07 9:42 ` Srinidhi Kasagar
2013-05-07 9:53 ` Lee Jones
2013-05-03 14:32 ` [PATCH 55/63] dmaengine: ste_dma40: Replace ST-E's home-brew DMA direction defs with generic ones Lee Jones
2013-05-03 14:32 ` [PATCH 56/63] ARM: ux500: Remove recently unused stedma40_xfer_dir enums Lee Jones
2013-05-06 7:17 ` Srinidhi Kasagar
2013-05-03 14:32 ` [PATCH 57/63] dmaengine: ste_dma40_ll: Use the BIT macro to replace ugly '(1 << x)'s Lee Jones
2013-05-03 14:32 ` [PATCH 58/63] dmaengine: ste_dma40: Convert data_width from register bit format to value Lee Jones
2013-05-03 14:32 ` [PATCH 59/63] dmaengine: ste_dma40_ll: Replace meaningless register set with comment Lee Jones
2013-05-03 14:32 ` [PATCH 60/63] dmaengine: ste_dma40: Allow memcpy channels to be configured from DT Lee Jones
2013-05-03 14:32 ` [PATCH 61/63] ARM: ux500: Stop passing DMA platform data though AUXDATA Lee Jones
2013-05-06 6:55 ` Srinidhi Kasagar
2013-05-03 14:32 ` [PATCH 62/63] dmaengine: ste_dma40: Fetch the number of physical channels from DT Lee Jones
2013-05-03 14:32 ` [PATCH 63/63] dmaengine: ste_dma40: Fetch disabled " Lee Jones
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=1367591569-32197-9-git-send-email-lee.jones@linaro.org \
--to=lee.jones@linaro.org \
--cc=arnd@arndb.de \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinidhi.kasagar@stericsson.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 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).