projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fwcutter: Update copyright information
[b43-tools.git]
/
assembler
/
initvals.c
diff --git
a/assembler/initvals.c
b/assembler/initvals.c
index b40356380e1d7e1ade274ed630937d0f4f112a03..8d8d0e90d9bf1df6f03e541614400d49ec601621 100644
(file)
--- a/
assembler/initvals.c
+++ b/
assembler/initvals.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2007 Michael Buesch <m
b@bu3sch.de
>
+ * Copyright (C) 2007 Michael Buesch <m
@bues.ch
>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@
-189,6
+189,15
@@
static void assemble_write_shm(struct ivals_context *ctx,
}
}
}
}
+/* 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)
{
static void assemble_ival_section(struct ivals_context *ctx,
const struct initvals_sect *sect)
{
@@
-231,6
+240,10
@@
static void assemble_ival_section(struct ivals_context *ctx,
op->args[0],
SIZE_32BIT);
break;
op->args[0],
SIZE_32BIT);
break;
+ case IVAL_W_TRAM:
+ assemble_write_tram(ctx, op->args[1],
+ op->args[0]);
+ break;
}
}
}
}
}
}
@@
-283,9
+296,9
@@
static void emit_ival_section(struct ivals_context *ctx)
hdr.ver = FW_HDR_VER;
hdr.size = cpu_to_be32(ctx->ivals_count);
hdr.ver = FW_HDR_VER;
hdr.size = cpu_to_be32(ctx->ivals_count);
- fn_len = strlen(ctx->sect->name) + strlen(initvals_fn_extension ? : "") + 1;
+ fn_len = strlen(ctx->sect->name) + strlen(
cmdargs.
initvals_fn_extension ? : "") + 1;
fn = xmalloc(fn_len);
fn = xmalloc(fn_len);
- snprintf(fn, fn_len, "%s%s", ctx->sect->name, initvals_fn_extension ? : "");
+ snprintf(fn, fn_len, "%s%s", ctx->sect->name,
cmdargs.
initvals_fn_extension ? : "");
fd = fopen(fn, "w+");
if (!fd) {
fprintf(stderr, "Could not open initval output file \"%s\"\n", fn);
fd = fopen(fn, "w+");
if (!fd) {
fprintf(stderr, "Could not open initval output file \"%s\"\n", fn);
@@
-315,7
+328,7
@@
static void emit_ival_section(struct ivals_context *ctx)
filesize += size;
}
filesize += size;
}
- if (
arg_
print_sizes) {
+ if (
cmdargs.
print_sizes) {
printf("%s: %d values (%u bytes)\n",
fn, ctx->ivals_count, filesize);
}
printf("%s: %d values (%u bytes)\n",
fn, ctx->ivals_count, filesize);
}