remove in_handler usage
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 7 May 2009 13:40:11 +0000 (13:40 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 7 May 2009 13:40:11 +0000 (13:40 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1643 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/arm9tdmi.c

index e8e1991c6ad2e5ad854342c25f3504401731578a..6e1364445bc20ad694275606f40225bcab97c634 100644 (file)
@@ -128,32 +128,32 @@ int arm9tdmi_examine_debug_reason(target_t *target)
                fields[0].tap = arm7_9->jtag_info.tap;
                fields[0].num_bits = 32;
                fields[0].out_value = NULL;
-               
+
                fields[0].in_value = databus;
-               
-               
+
+
                fields[0].in_handler = NULL;
-               
+
 
                fields[1].tap = arm7_9->jtag_info.tap;
                fields[1].num_bits = 3;
                fields[1].out_value = NULL;
-               
+
                fields[1].in_value = &debug_reason;
-               
-               
+
+
                fields[1].in_handler = NULL;
-               
+
 
                fields[2].tap = arm7_9->jtag_info.tap;
                fields[2].num_bits = 32;
                fields[2].out_value = NULL;
-               
+
                fields[2].in_value = instructionbus;
-               
-               
+
+
                fields[2].in_handler = NULL;
-               
+
 
                if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
                {
@@ -216,42 +216,34 @@ int arm9tdmi_clock_out(arm_jtag_t *jtag_info, u32 instr, u32 out, u32 *in, int s
        fields[0].tap = jtag_info->tap;
        fields[0].num_bits = 32;
        fields[0].out_value = out_buf;
-       
        fields[0].in_value = NULL;
-       if (in)
-       {
-               fields[0].in_handler = arm_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
-               fields[0].in_handler_priv = in;
-       }
-       else
-       {
-               fields[0].in_handler = NULL;
-               
-       }
-       
-       
+       fields[0].in_handler = NULL;
 
        fields[1].tap = jtag_info->tap;
        fields[1].num_bits = 3;
        fields[1].out_value = &sysspeed_buf;
-       
        fields[1].in_value = NULL;
-       
-       
        fields[1].in_handler = NULL;
-       
+
 
        fields[2].tap = jtag_info->tap;
        fields[2].num_bits = 32;
        fields[2].out_value = instr_buf;
-       
        fields[2].in_value = NULL;
-       
-       
        fields[2].in_handler = NULL;
-       
 
-       jtag_add_dr_scan(3, fields, TAP_INVALID);
+       if (in)
+       {
+               u8 tmp[4];
+               fields[0].in_value=tmp;
+               jtag_add_dr_scan_now(3, fields, TAP_INVALID);
+
+               *in=flip_u32(le_to_h_u32(tmp), 32);
+       }
+       else
+       {
+               jtag_add_dr_scan(3, fields, TAP_INVALID);
+       }
 
        jtag_add_runtest(0, TAP_INVALID);
 
@@ -291,32 +283,32 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in)
        fields[0].tap = jtag_info->tap;
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
-       
+
        fields[0].in_value = NULL;
        fields[0].in_handler = arm_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
        fields[0].in_handler_priv = in;
-       
-       
+
+
 
        fields[1].tap = jtag_info->tap;
        fields[1].num_bits = 3;
        fields[1].out_value = NULL;
-       
+
        fields[1].in_value = NULL;
        fields[1].in_handler = NULL;
-       
-       
-       
+
+
+
 
        fields[2].tap = jtag_info->tap;
        fields[2].num_bits = 32;
        fields[2].out_value = NULL;
-       
+
        fields[2].in_value = NULL;
-       
-       
+
+
        fields[2].in_handler = NULL;
-       
+
 
        jtag_add_dr_scan(3, fields, TAP_INVALID);
 
@@ -363,7 +355,7 @@ int arm9tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size,
        fields[0].tap = jtag_info->tap;
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
-       
+
        fields[0].in_value = NULL;
        switch (size)
        {
@@ -378,28 +370,28 @@ int arm9tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size,
                        break;
        }
        fields[0].in_handler_priv = in;
-       
-       
+
+
 
        fields[1].tap = jtag_info->tap;
        fields[1].num_bits = 3;
        fields[1].out_value = NULL;
-       
+
        fields[1].in_value = NULL;
        fields[1].in_handler = NULL;
-       
-       
-       
+
+
+
 
        fields[2].tap = jtag_info->tap;
        fields[2].num_bits = 32;
        fields[2].out_value = NULL;
-       
+
        fields[2].in_value = NULL;
-       
-       
+
+
        fields[2].in_handler = NULL;
-       
+
 
        jtag_add_dr_scan(3, fields, TAP_INVALID);
 
@@ -1032,11 +1024,11 @@ int arm9tdmi_register_commands(struct command_context_s *cmd_ctx)
 {
        int retval;
        command_t *arm9tdmi_cmd;
-       
+
        retval = arm7_9_register_commands(cmd_ctx);
        arm9tdmi_cmd = register_command(cmd_ctx, NULL, "arm9tdmi", NULL, COMMAND_ANY, "arm9tdmi specific commands");
        register_command(cmd_ctx, arm9tdmi_cmd, "vector_catch", handle_arm9tdmi_catch_vectors_command, COMMAND_EXEC, "catch arm920t vectors ['all'|'none'|'<vec1 vec2 ...>']");
-       
+
        return retval;
 }
 

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)