}
}
+/* 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;
}
}
}
IVAL_W_RADIO,
IVAL_W_SHM16,
IVAL_W_SHM32,
+ IVAL_W_TRAM,
} type;
unsigned int args[3];
%token OP_ADD OP_ADDSC OP_ADDC OP_ADDSCC OP_SUB OP_SUBSC OP_SUBC OP_SUBSCC OP_SRA OP_OR OP_AND OP_XOR OP_SR OP_SRX OP_SL OP_RL OP_RR OP_NAND OP_ORX OP_MOV OP_JMP OP_JAND OP_JNAND OP_JS OP_JNS OP_JE OP_JNE OP_JLS OP_JGES OP_JGS OP_JLES OP_JL OP_JGE OP_JG OP_JLE OP_JZX OP_JNZX OP_JEXT OP_JNEXT OP_CALL OP_RET OP_TKIPH OP_TKIPHS OP_TKIPL OP_TKIPLS OP_NAP RAW_CODE
-%token IVAL_MMIO16 IVAL_MMIO32 IVAL_PHY IVAL_RADIO IVAL_SHM16 IVAL_SHM32
+%token IVAL_MMIO16 IVAL_MMIO32 IVAL_PHY IVAL_RADIO IVAL_SHM16 IVAL_SHM32 IVAL_TRAM
%start line
iop->args[2] = (unsigned int)(unsigned long)$6;
$$ = iop;
}
+ | IVAL_TRAM imm_value COMMA imm_value {
+ struct initval_op *iop = xmalloc(sizeof(struct initval_op));
+ iop->type = IVAL_W_TRAM;
+ iop->args[0] = (unsigned int)(unsigned long)$2;
+ iop->args[1] = (unsigned int)(unsigned long)$4;
+ $$ = iop;
+ }
;
statement : asmdir {
radio { update_lineinfo(); return IVAL_RADIO; }
shm16 { update_lineinfo(); return IVAL_SHM16; }
shm32 { update_lineinfo(); return IVAL_SHM32; }
+tram { update_lineinfo(); return IVAL_TRAM; }
@[0-9a-fA-F]{3,3} { update_lineinfo(); return RAW_CODE; }
radio 0x1234, 0xABC /* Write 0x1234 to RADIO register 0xABC */
shm16 0x1234, 0x0001, 0x0002 /* Write 0x1234 to SHM routing 0x0001, register 0x0002 */
shm32 0x12345678, 0x0001, 0x0002 /* Write 0x12345678 to SHM routing 0x0001, register 0x0002 */
+ tram 0x12345678, 0x1234 /* Write 0x12345678 to Template Ram offset 0x1234 */
// vim: syntax=b43 ts=8