DMA Engine development
 help / color / mirror / Atom feed
* [PATCH 1/3][V3] include: fpga: adi-axi-common.h: add common regs & defs header
@ 2019-05-27  6:55 Alexandru Ardelean
  2019-05-27  6:55 ` [PATCH 2/3][V3] dmaengine: axi-dmac: Discover length alignment requirement Alexandru Ardelean
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexandru Ardelean @ 2019-05-27  6:55 UTC (permalink / raw)
  To: dmaengine; +Cc: Alexandru Ardelean

The AXI HDL cores provided for Analog Devices reference designs all share
some common base registers (e.g. version register at address 0x00).

To reduce duplication for this, a common header is added to define these
registers as well as bitfields & macros to work with these registers.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---

Changelog v2 -> v3:
* fixed style for SPDX-License-Identifier in C header
* fixed minor checkpatch complaint about 80 col limit

 include/linux/fpga/adi-axi-common.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 include/linux/fpga/adi-axi-common.h

diff --git a/include/linux/fpga/adi-axi-common.h b/include/linux/fpga/adi-axi-common.h
new file mode 100644
index 000000000000..7fc95d5c95bb
--- /dev/null
+++ b/include/linux/fpga/adi-axi-common.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Analog Devices AXI common registers & definitions
+ *
+ * Copyright 2019 Analog Devices Inc.
+ *
+ * https://wiki.analog.com/resources/fpga/docs/axi_ip
+ * https://wiki.analog.com/resources/fpga/docs/hdl/regmap
+ */
+
+#ifndef ADI_AXI_COMMON_H_
+#define ADI_AXI_COMMON_H_
+
+#define	ADI_AXI_REG_VERSION			0x0000
+
+#define ADI_AXI_PCORE_VER(major, minor, patch)	\
+	(((major) << 16) | ((minor) << 8) | (patch))
+
+#endif /* ADI_AXI_COMMON_H_ */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-27  7:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-27  6:55 [PATCH 1/3][V3] include: fpga: adi-axi-common.h: add common regs & defs header Alexandru Ardelean
2019-05-27  6:55 ` [PATCH 2/3][V3] dmaengine: axi-dmac: Discover length alignment requirement Alexandru Ardelean
2019-05-27  6:55 ` [PATCH 3/3][V3] dmaengine: axi-dmac: assign `copy_align` property Alexandru Ardelean
2019-05-27  7:06 ` [PATCH 1/3][V3] include: fpga: adi-axi-common.h: add common regs & defs header Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox