aboutsummaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier2022-06-20 18:36:39 +0200
committerMichal Simek2022-06-24 14:37:27 +0200
commit9bc5a24dea086d526f804ea527b845c1ab77b38c (patch)
tree51008519181cf91a9bd8d4da8933a62d6741712b /board/xilinx
parentbcf6f71bd701cc258e08e1f8c4e915ddb9803faa (diff)
xilinx: zynqmp: Add macro for device type mask
Add a macro for the device type mask of the id code. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Link: https://lore.kernel.org/r/20220620163650.18756-4-stefan.herbrechtsmeier-oss@weidmueller.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'board/xilinx')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 9dfa4643fb6..1a7383d0230 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -49,6 +49,7 @@
#define EFUSE_VCU_DIS_SHIFT 8
#define EFUSE_GPU_DIS_MASK 0x20
#define EFUSE_GPU_DIS_SHIFT 5
+#define IDCODE_DEV_TYPE_MASK GENMASK(27, 0)
#define IDCODE2_PL_INIT_MASK 0x200
#define IDCODE2_PL_INIT_SHIFT 9
@@ -218,7 +219,7 @@ static char *zynqmp_detect_svd_name(u32 idcode)
u32 i;
for (i = 0; i < ARRAY_SIZE(zynqmp_svd_devices); i++) {
- if (zynqmp_svd_devices[i].id == (idcode & 0x0FFFFFFF))
+ if (zynqmp_svd_devices[i].id == (idcode & IDCODE_DEV_TYPE_MASK))
return zynqmp_svd_devices[i].name;
}
@@ -254,7 +255,7 @@ static char *zynqmp_get_silicon_idcode_name(void)
idcode2);
for (i = 0; i < ARRAY_SIZE(zynqmp_devices); i++) {
- if (zynqmp_devices[i].id == (idcode & 0x0FFFFFFF))
+ if (zynqmp_devices[i].id == (idcode & IDCODE_DEV_TYPE_MASK))
break;
}