summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-octeontx2/soc.h
diff options
context:
space:
mode:
authorSuneel Garapati <sgarapati@marvell.com>2019-10-19 18:35:54 -0700
committerStefan Roese <sr@denx.de>2020-08-25 08:01:16 +0200
commit04cd0a0fa03968405918fa6f6b695821767fb068 (patch)
tree77ed55384787061e3b3d83808a2c8df953a9c219 /arch/arm/include/asm/arch-octeontx2/soc.h
parent387d321add65e7a93422be434c48067fc7d69d86 (diff)
arm: octeontx2: Add headers for OcteonTX2
Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Diffstat (limited to 'arch/arm/include/asm/arch-octeontx2/soc.h')
-rw-r--r--arch/arm/include/asm/arch-octeontx2/soc.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-octeontx2/soc.h b/arch/arm/include/asm/arch-octeontx2/soc.h
new file mode 100644
index 0000000000..9cf6628da4
--- /dev/null
+++ b/arch/arm/include/asm/arch-octeontx2/soc.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2019 Marvell International Ltd.
+ *
+ * https://spdx.org/licenses
+ */
+
+#ifndef __SOC_H__
+#define __SOC_H__
+
+/* Product PARTNUM */
+#define CN81XX 0xA2
+#define CN83XX 0xA3
+#define CN96XX 0xB2
+#define CN95XX 0xB3
+
+/* Register defines */
+
+#define otx_is_soc(soc) (read_partnum() == (soc))
+#define otx_is_board(model) (!strcmp(read_board_name(), model))
+#define otx_is_platform(platform) (read_platform() == (platform))
+
+enum platform_t {
+ PLATFORM_HW = 0,
+ PLATFORM_EMULATOR = 1,
+ PLATFORM_ASIM = 3,
+};
+
+int read_platform(void);
+u8 read_partnum(void);
+const char *read_board_name(void);
+
+#endif /* __SOC_H */