mips: fixup fastdata
authorStefan Mahr <stefan.mahr@sphairon.com>
Tue, 31 May 2011 07:33:01 +0000 (09:33 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 1 Jun 2011 05:23:42 +0000 (07:23 +0200)
fixup fastdata

src/target/mips_ejtag.c
src/target/mips_ejtag.h

index f95104941ddd801a7f69629bbf74bed3595162d5..449b6b828ede2b3e524a521f52da1b425608f726 100644 (file)
@@ -342,7 +342,6 @@ int mips_ejtag_init(struct mips_ejtag *ejtag_info)
 int mips_ejtag_fastdata_scan(struct mips_ejtag *ejtag_info, int write_t, uint32_t *data)
 {
        struct jtag_tap *tap;
 int mips_ejtag_fastdata_scan(struct mips_ejtag *ejtag_info, int write_t, uint32_t *data)
 {
        struct jtag_tap *tap;
-       uint8_t r[4];
 
        tap = ejtag_info->tap;
        assert(tap != NULL);
 
        tap = ejtag_info->tap;
        assert(tap != NULL);
@@ -367,15 +366,14 @@ int mips_ejtag_fastdata_scan(struct mips_ejtag *ejtag_info, int write_t, uint32_
        }
        else
        {
        }
        else
        {
-               fields[1].in_value = r;
+               fields[1].in_value = (void *) data;
        }
 
        jtag_add_dr_scan(tap, 2, fields, TAP_IDLE);
 
        }
 
        jtag_add_dr_scan(tap, 2, fields, TAP_IDLE);
 
-       if (!write_t)
-       {
-               *data = buf_get_u32(fields[1].in_value, 0, 32);
-       }
+       if ( (!write_t) && (data) )
+               jtag_add_callback(mips_le_to_h_u32,
+                       (jtag_callback_data_t) data);
 
        keep_alive();
 
 
        keep_alive();
 
index a6ed95a509b5bdc9c287ecbe4ed98ade5ccec42d..399246c447ab4959e04a97ca5ba32934dd19880a 100644 (file)
@@ -146,4 +146,10 @@ int mips_ejtag_init(struct mips_ejtag *ejtag_info);
 int mips_ejtag_config_step(struct mips_ejtag *ejtag_info, int enable_step);
 int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg);
 
 int mips_ejtag_config_step(struct mips_ejtag *ejtag_info, int enable_step);
 int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg);
 
+static __inline__ void mips_le_to_h_u32(jtag_callback_data_t arg)
+{
+       uint8_t *in = (uint8_t *)arg;
+       *((uint32_t *)arg) = le_to_h_u32(in);
+}
+
 #endif /* MIPS_EJTAG */
 #endif /* MIPS_EJTAG */

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)