From: Peter Griffin <peter.griffin@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, srinivas.kandagatla@gmail.com,
maxime.coquelin@st.com, patrice.chotard@st.com,
vinod.koul@intel.com
Cc: peter.griffin@linaro.org, lee.jones@linaro.org,
robh+dt@kernel.org, dmaengine@vger.kernel.org,
devicetree@vger.kernel.org, Ludovic Barre <ludovic.barre@st.com>
Subject: [PATCH v2 2/9] dmaengine: st_fdma: Add st fdma platform specific header
Date: Fri, 11 Sep 2015 15:14:24 +0100 [thread overview]
Message-ID: <1441980871-24475-3-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1441980871-24475-1-git-send-email-peter.griffin@linaro.org>
Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
include/linux/platform_data/dma-st_fdma.h | 72 +++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 include/linux/platform_data/dma-st_fdma.h
diff --git a/include/linux/platform_data/dma-st_fdma.h b/include/linux/platform_data/dma-st_fdma.h
new file mode 100644
index 0000000..ea2523b
--- /dev/null
+++ b/include/linux/platform_data/dma-st_fdma.h
@@ -0,0 +1,72 @@
+/*
+ * dma-st-fdma.h
+ *
+ * Copyright (C) 2014 STMicroelectronics
+ * Author: Ludovic Barre <Ludovic.barre@st.com>
+ * License terms: GNU General Public License (GPL), version 2
+ */
+#ifndef __PLAT_ST_FDMA_H
+#define __PLAT_ST_FDMA_H
+
+#include <linux/dmaengine.h>
+
+/*
+ * Channel type
+ */
+enum st_fdma_type {
+ ST_FDMA_TYPE_FREE_RUN,
+ ST_FDMA_TYPE_PACED,
+};
+
+struct st_fdma_cfg {
+ struct device_node *of_node;
+ enum st_fdma_type type;
+ dma_addr_t dev_addr;
+ enum dma_transfer_direction dir;
+ int req_line; /* request line */
+ u32 req_ctrl; /* Request control */
+};
+
+#define FW_NAME_SIZE 30
+
+/**
+ * struct st_fdma_platform_data - platform specific data for FDMA engine
+ *
+ * @nr_channels: Number of channels supported by hardware
+ * @fw_name: The firmware name
+ */
+struct st_fdma_platform_data {
+ u32 nr_channels;
+ u32 id;
+ char fw_name[FW_NAME_SIZE];
+};
+
+/*
+ * request control bits
+ */
+#define REQ_CTRL_NUM_OPS_MASK GENMASK(31, 24)
+#define REQ_CTRL_NUM_OPS(n) (REQ_CTRL_NUM_OPS_MASK & ((n) << 24))
+#define REQ_CTRL_INITIATOR_MASK BIT(22)
+#define REQ_CTRL_INIT0 (0x0 << 22)
+#define REQ_CTRL_INIT1 (0x1 << 22)
+#define REQ_CTRL_INC_ADDR_ON BIT(21)
+#define REQ_CTRL_DATA_SWAP_ON BIT(17)
+#define REQ_CTRL_WNR BIT(14)
+#define REQ_CTRL_OPCODE_MASK GENMASK(7, 4)
+#define REQ_CTRL_OPCODE_LD_ST1 (0x0 << 4)
+#define REQ_CTRL_OPCODE_LD_ST2 (0x1 << 4)
+#define REQ_CTRL_OPCODE_LD_ST4 (0x2 << 4)
+#define REQ_CTRL_OPCODE_LD_ST8 (0x3 << 4)
+#define REQ_CTRL_OPCODE_LD_ST16 (0x4 << 4)
+#define REQ_CTRL_OPCODE_LD_ST32 (0x5 << 4)
+#define REQ_CTRL_OPCODE_LD_ST64 (0x6 << 4)
+#define REQ_CTRL_HOLDOFF_MASK GENMASK(2, 0)
+#define REQ_CTRL_HOLDOFF(n) ((n) & REQ_CTRL_HOLDOFF_MASK)
+
+/* bits used by client to configure request control */
+#define REQ_CTRL_CFG_MASK (REQ_CTRL_HOLDOFF_MASK | REQ_CTRL_DATA_SWAP_ON \
+ | REQ_CTRL_INC_ADDR_ON | REQ_CTRL_INITIATOR_MASK)
+
+bool st_fdma_filter_fn(struct dma_chan *chan, void *param);
+
+#endif /* __PLAT_ST_FDMA_H */
--
1.9.1
next prev parent reply other threads:[~2015-09-11 14:14 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 14:14 [PATCH v2 0/9] Add support for FDMA DMA controller found on STi chipsets Peter Griffin
2015-09-11 14:14 ` [PATCH v2 1/9] dmaengine: st_fdma: Add STMicroelectronics FDMA DT binding documentation Peter Griffin
2015-09-11 20:36 ` Arnd Bergmann
2015-09-12 12:07 ` Peter Griffin
2015-09-14 8:19 ` Lee Jones
2015-09-29 10:04 ` Peter Griffin
2015-09-29 11:17 ` Arnd Bergmann
2015-09-29 12:11 ` Peter Griffin
2015-09-29 12:30 ` Arnd Bergmann
2015-09-29 13:42 ` Peter Griffin
2015-09-29 14:15 ` Arnd Bergmann
2015-10-13 11:18 ` Peter Griffin
2015-09-11 14:14 ` Peter Griffin [this message]
2015-09-11 20:32 ` [PATCH v2 2/9] dmaengine: st_fdma: Add st fdma platform specific header Arnd Bergmann
2015-09-29 9:24 ` Peter Griffin
2015-09-29 11:10 ` Arnd Bergmann
[not found] ` <1441980871-24475-1-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-11 14:14 ` [PATCH v2 3/9] dmaengine: st_fdma: Add STMicroelectronics FDMA driver header file Peter Griffin
[not found] ` <1441980871-24475-4-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-08 15:43 ` Koul, Vinod
2015-10-13 10:41 ` Peter Griffin
[not found] ` <1444118413.3579.46.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-13 10:43 ` Peter Griffin
2015-09-11 14:14 ` [PATCH v2 5/9] dmaengine: st_fdma: Add xp70 firmware loading mechanism Peter Griffin
2015-10-07 11:22 ` Vinod Koul
2015-10-13 10:53 ` Peter Griffin
2015-09-11 14:14 ` [PATCH v2 6/9] dmaengine: st_fdma: Add fdma suspend and resume callbacks Peter Griffin
2015-10-07 11:23 ` Vinod Koul
[not found] ` <20151007112346.GC4810-bQVUxfxUtC13uc1i7fC1zK2pdiUAq4bhAL8bYrjMMd8@public.gmane.org>
2015-10-13 11:19 ` Peter Griffin
2015-10-13 11:33 ` Koul, Vinod
2015-09-11 14:14 ` [PATCH v2 4/9] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support Peter Griffin
2015-09-11 20:30 ` Arnd Bergmann
2015-09-29 10:23 ` Peter Griffin
2015-10-07 11:15 ` Vinod Koul
2015-09-11 14:14 ` [PATCH v2 7/9] ARM: STi: DT: STiH407: Add FDMA driver dt nodes Peter Griffin
2015-09-11 16:27 ` Lee Jones
2015-09-11 16:48 ` Peter Griffin
2015-09-11 17:55 ` Lee Jones
2015-09-11 18:06 ` Peter Griffin
2015-09-11 19:33 ` Lee Jones
2015-09-12 12:23 ` Peter Griffin
2015-09-11 14:14 ` [PATCH v2 8/9] MAINTAINERS: Add FDMA driver files to STi section Peter Griffin
2015-09-11 16:22 ` Lee Jones
2015-09-11 14:14 ` [PATCH v2 9/9] ARM: multi_v7_defconfig: Enable STi FDMA driver Peter Griffin
2015-09-11 16:22 ` 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=1441980871-24475-3-git-send-email-peter.griffin@linaro.org \
--to=peter.griffin@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.barre@st.com \
--cc=maxime.coquelin@st.com \
--cc=patrice.chotard@st.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@gmail.com \
--cc=vinod.koul@intel.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).