arm_coresight: define ARM_CS_CIDR_CLASS()
Right now it has a single use but it will soon be used more. Change-Id: I9a819c65df467fc859e4b5251035a17ed33daa35 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6813 Tested-by: jenkins Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
This commit is contained in:
parent
d1e14abdba
commit
d796f5929c
|
@ -1434,7 +1434,7 @@ static int dap_rom_display(struct command_invocation *cmd,
|
|||
|
||||
command_print(cmd, "\t\tPeripheral ID 0x%010" PRIx64, pid);
|
||||
|
||||
const unsigned int class = (cid & ARM_CS_CIDR_CLASS_MASK) >> ARM_CS_CIDR_CLASS_SHIFT;
|
||||
const unsigned int class = ARM_CS_CIDR_CLASS(cid);
|
||||
const unsigned int part_num = ARM_CS_PIDR_PART(pid);
|
||||
unsigned int designer_id = ARM_CS_PIDR_DESIGNER(pid);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#define ARM_CS_CIDR3 (0xFFC)
|
||||
|
||||
#define ARM_CS_CIDR_CLASS_MASK (0x0000F000)
|
||||
#define ARM_CS_CIDR_CLASS_SHIFT (12)
|
||||
#define ARM_CS_CIDR_CLASS(cidr) (((cidr) >> 12) & 0x000F)
|
||||
#define ARM_CS_CLASS_0X1_ROM_TABLE (0x1)
|
||||
#define ARM_CS_CLASS_0X9_CS_COMPONENT (0x9)
|
||||
|
||||
|
|
Loading…
Reference in New Issue