arm920t: add mrcmcr interface fn's.
authorØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 3 Nov 2009 11:54:26 +0000 (12:54 +0100)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 5 Nov 2009 22:57:49 +0000 (23:57 +0100)
The arm920t has a concept of read modify write cycles
that may have to be represented in the mrcmcr interface
eventually.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/target/arm920t.c

index 835e4ee16435b506e81f56e8fa9c3d8264b5683a..255600244a5754ec6c726fda51792cec3d5012eb 100644 (file)
@@ -46,6 +46,10 @@ int arm920t_init_target(struct command_context_s *cmd_ctx, struct target_s *targ
 
 #define ARM920T_CP15_PHYS_ADDR(x, y, z) ((x << 5) | (y << 1) << (z))
 
 
 #define ARM920T_CP15_PHYS_ADDR(x, y, z) ((x << 5) | (y << 1) << (z))
 
+static int arm920t_mrc(target_t *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value);
+static int arm920t_mcr(target_t *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t value);
+
+
 target_type_t arm920t_target =
 {
        .name = "arm920t",
 target_type_t arm920t_target =
 {
        .name = "arm920t",
@@ -84,6 +88,8 @@ target_type_t arm920t_target =
        .target_create = arm920t_target_create,
        .init_target = arm920t_init_target,
        .examine = arm9tdmi_examine,
        .target_create = arm920t_target_create,
        .init_target = arm920t_init_target,
        .examine = arm9tdmi_examine,
+       .mrc = arm920t_mrc,
+       .mcr = arm920t_mcr,
 };
 
 int arm920t_read_cp15_physical(target_t *target, int reg_addr, uint32_t *value)
 };
 
 int arm920t_read_cp15_physical(target_t *target, int reg_addr, uint32_t *value)
@@ -1407,3 +1413,26 @@ int arm920t_handle_cache_info_command(struct command_context_s *cmd_ctx, char *c
 
        return armv4_5_handle_cache_info_command(cmd_ctx, &arm920t->armv4_5_mmu.armv4_5_cache);
 }
 
        return armv4_5_handle_cache_info_command(cmd_ctx, &arm920t->armv4_5_mmu.armv4_5_cache);
 }
+
+
+static int arm920t_mrc(target_t *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value)
+{
+       if (cpnum!=15)
+       {
+               LOG_ERROR("Only cp15 is supported");
+               return ERROR_FAIL;
+       }
+
+       return arm920t_read_cp15_interpreted(target, mrc_opcode(cpnum, op1, op2, CRn, CRm), 0, value);
+}
+
+static int arm920t_mcr(target_t *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t value)
+{
+       if (cpnum!=15)
+       {
+               LOG_ERROR("Only cp15 is supported");
+               return ERROR_FAIL;
+       }
+
+       return arm920t_write_cp15_interpreted(target, mrc_opcode(cpnum, op1, op2, CRn, CRm), 0, value);
+}

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)