}
}
+/* Template RAM write */
+static void assemble_write_tram(struct ivals_context *ctx,
+ unsigned int offset,
+ unsigned int value)
+{
+ assemble_write_mmio(ctx, 0x130, SIZE_32BIT, offset);
+ assemble_write_mmio(ctx, 0x134, SIZE_32BIT, value);
+}
+
static void assemble_ival_section(struct ivals_context *ctx,
const struct initvals_sect *sect)
{
op->args[0],
SIZE_32BIT);
break;
+ case IVAL_W_TRAM:
+ assemble_write_tram(ctx, op->args[1],
+ op->args[0]);
+ break;
}
}
}
hdr.ver = FW_HDR_VER;
hdr.size = cpu_to_be32(ctx->ivals_count);
- fn_len = strlen(outfile_name) + 512;
+ fn_len = strlen(ctx->sect->name) + strlen(initvals_fn_extension ? : "") + 1;
fn = xmalloc(fn_len);
- snprintf(fn, fn_len, "%s.%s.initvals", outfile_name, ctx->sect->name);
+ snprintf(fn, fn_len, "%s%s", ctx->sect->name, initvals_fn_extension ? : "");
fd = fopen(fn, "w+");
if (!fd) {
fprintf(stderr, "Could not open initval output file \"%s\"\n", fn);