summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ipa_reg.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/ipa_reg.c b/ipa_reg.c
index 90bb426..259b1c0 100644
--- a/ipa_reg.c
+++ b/ipa_reg.c
@@ -896,6 +896,52 @@ static void ipa_reg_test_local_pkt_proc_cntxt(enum ipa_version version)
ipa_reg_test_fmask(reg, LOCAL_PKT_CNTXT_BASE_ADDR, mask);
}
+static void ipa_reg_test_aggr_force_close(enum ipa_version version)
+{
+ const struct ipa_regs *regs = ipa_regs[version];
+ const char *vers = version_string(version);
+ const struct ipa_reg *reg;
+
+ /* AGGR_FORCE_CLOSE is defined for all versions */
+ if (IPA_REG_AGGR_FORCE_CLOSE >= regs->reg_count) {
+ printf("version %s AGGR_FORCE_CLOSE > reg_count %u\n",
+ vers, regs->reg_count);
+ exit(1);
+ }
+
+ reg = regs->reg[IPA_REG_AGGR_FORCE_CLOSE];
+ if (!reg) {
+ printf("version %s AGGR_FORCE_CLOSE not defined\n",
+ vers);
+ exit(1);
+ }
+
+ if (!reg->name) {
+ printf("version %s AGGR_FORCE_CLOSE has no defined name\n",
+ vers);
+ exit(1);
+ }
+
+ if (strcmp(reg->name, "AGGR_FORCE_CLOSE")) {
+ printf("version %s AGGR_FORCE_CLOSE has wrong name %s\n",
+ vers, reg->name);
+ exit(1);
+ }
+
+ if (reg->offset != IPA_REG_AGGR_FORCE_CLOSE_OFFSET) {
+ printf("version %s %s offset 0x%04x, old 0x%04x\n",
+ vers, reg->name, reg->offset,
+ IPA_REG_AGGR_FORCE_CLOSE_OFFSET);
+ exit(1);
+ }
+
+ if (reg->field_count) {
+ printf("version %s AGGR_FORCE_CLOSE has %u fields should have none\n",
+ vers, reg->field_count);
+ exit(1);
+ }
+}
+
static void ipa_reg_test(enum ipa_version version)
{
printf("Testing %s\n", version_string(version));
@@ -911,6 +957,7 @@ static void ipa_reg_test(enum ipa_version version)
ipa_reg_test_state_aggr_active(version);
ipa_reg_test_bcr(version);
ipa_reg_test_local_pkt_proc_cntxt(version);
+ ipa_reg_test_aggr_force_close(version);
}
int ipa_reg_init(struct ipa *ipa)