summaryrefslogtreecommitdiffstats
path: root/include/linux/fpga
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2019-05-27 09:55:16 +0300
committerVinod Koul <vkoul@kernel.org>2019-05-27 12:36:08 +0530
commitd27ac2e02bf256d4e824e7c1e1e1afa2b96cefcc (patch)
tree8e8cf1ce54cba0841f7fe65c44fabd7ff8c3f20b /include/linux/fpga
parent7b11ef9653d2520540df708f92949f06ed8a42e2 (diff)
downloadtalos-op-linux-d27ac2e02bf256d4e824e7c1e1e1afa2b96cefcc.tar.gz
talos-op-linux-d27ac2e02bf256d4e824e7c1e1e1afa2b96cefcc.zip
include: fpga: adi-axi-common.h: add common regs & defs header
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> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/fpga')
-rw-r--r--include/linux/fpga/adi-axi-common.h19
1 files changed, 19 insertions, 0 deletions
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_ */
OpenPOWER on IntegriCloud