Commit 96004636 authored by Catalin Marinas's avatar Catalin Marinas

Merge branch 'for-next/sysreg-hwcaps' into for-next/core

* for-next/sysreg-hwcaps:
  : Make use of sysreg helpers for hwcaps
  arm64/cpufeature: Use helper macros to specify hwcaps
  arm64/cpufeature: Always use symbolic name for feature value in hwcaps
  arm64/sysreg: Initial unsigned annotations for ID registers
  arm64/sysreg: Initial annotation of signed ID registers
  arm64/sysreg: Allow enumerations to be declared as signed or unsigned
parents 156010ed bfffd469
This diff is collapsed.
...@@ -44,6 +44,11 @@ function define_field(reg, field, msb, lsb) { ...@@ -44,6 +44,11 @@ function define_field(reg, field, msb, lsb) {
define(reg "_" field "_WIDTH", msb - lsb + 1) define(reg "_" field "_WIDTH", msb - lsb + 1)
} }
# Print a field _SIGNED definition for a field
function define_field_sign(reg, field, sign) {
define(reg "_" field "_SIGNED", sign)
}
# Parse a "<msb>[:<lsb>]" string into the global variables @msb and @lsb # Parse a "<msb>[:<lsb>]" string into the global variables @msb and @lsb
function parse_bitdef(reg, field, bitdef, _bits) function parse_bitdef(reg, field, bitdef, _bits)
{ {
...@@ -233,6 +238,30 @@ END { ...@@ -233,6 +238,30 @@ END {
next next
} }
/^SignedEnum/ {
change_block("Enum<", "Sysreg", "Enum")
expect_fields(3)
field = $3
parse_bitdef(reg, field, $2)
define_field(reg, field, msb, lsb)
define_field_sign(reg, field, "true")
next
}
/^UnsignedEnum/ {
change_block("Enum<", "Sysreg", "Enum")
expect_fields(3)
field = $3
parse_bitdef(reg, field, $2)
define_field(reg, field, msb, lsb)
define_field_sign(reg, field, "false")
next
}
/^Enum/ { /^Enum/ {
change_block("Enum", "Sysreg", "Enum") change_block("Enum", "Sysreg", "Enum")
expect_fields(3) expect_fields(3)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment