b43-asm: Add tram keyword for writing to template ram
[b43-tools.git] / assembler / initvals.c
index b40356380e1d7e1ade274ed630937d0f4f112a03..5db74d149d7cb58246c8a13212ab67d60b9216cc 100644 (file)
@@ -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)
 {
@@ -231,6 +240,10 @@ static void assemble_ival_section(struct ivals_context *ctx,
                                           op->args[0],
                                           SIZE_32BIT);
                        break;
+               case IVAL_W_TRAM:
+                       assemble_write_tram(ctx, op->args[1],
+                                           op->args[0]);
+                       break;
                }
        }
 }