ETB: cleanup needless symbol exports and forward decls.
authordbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 29 Sep 2009 18:06:26 +0000 (18:06 +0000)
committerdbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 29 Sep 2009 18:06:26 +0000 (18:06 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2772 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/etb.c
src/target/etb.h

index a327fb6bd48a1f841780ec61937fd642eb873dcd..40bb34a14f7917e2d0bcc0d45458eac005485ad7 100644 (file)
@@ -96,6 +96,33 @@ static int etb_scann(etb_t *etb, uint32_t new_scan_chain)
        return ERROR_OK;
 }
 
+static int etb_read_reg_w_check(reg_t *, uint8_t *, uint8_t *);
+static int etb_set_reg_w_exec(reg_t *, uint8_t *);
+
+static int etb_read_reg(reg_t *reg)
+{
+       return etb_read_reg_w_check(reg, NULL, NULL);
+}
+
+static int etb_get_reg(reg_t *reg)
+{
+       int retval;
+
+       if ((retval = etb_read_reg(reg)) != ERROR_OK)
+       {
+               LOG_ERROR("BUG: error scheduling etm register read");
+               return retval;
+       }
+
+       if ((retval = jtag_execute_queue()) != ERROR_OK)
+       {
+               LOG_ERROR("register read failed");
+               return retval;
+       }
+
+       return ERROR_OK;
+}
+
 reg_cache_t* etb_build_reg_cache(etb_t *etb)
 {
        reg_cache_t *reg_cache = malloc(sizeof(reg_cache_t));
@@ -138,29 +165,10 @@ reg_cache_t* etb_build_reg_cache(etb_t *etb)
        return reg_cache;
 }
 
-static int etb_get_reg(reg_t *reg)
-{
-       int retval;
-
-       if ((retval = etb_read_reg(reg)) != ERROR_OK)
-       {
-               LOG_ERROR("BUG: error scheduling etm register read");
-               return retval;
-       }
-
-       if ((retval = jtag_execute_queue()) != ERROR_OK)
-       {
-               LOG_ERROR("register read failed");
-               return retval;
-       }
-
-       return ERROR_OK;
-}
-
-
 static void etb_getbuf(jtag_callback_data_t arg)
 {
-  uint8_t *in = (uint8_t *)arg;
+       uint8_t *in = (uint8_t *)arg;
+
        *((uint32_t *)in) = buf_get_u32(in, 0, 32);
 }
 
@@ -218,7 +226,8 @@ static int etb_read_ram(etb_t *etb, uint32_t *data, int num_frames)
        return ERROR_OK;
 }
 
-int etb_read_reg_w_check(reg_t *reg, uint8_t* check_value, uint8_t* check_mask)
+static int etb_read_reg_w_check(reg_t *reg,
+               uint8_t* check_value, uint8_t* check_mask)
 {
        etb_reg_t *etb_reg = reg->arch_info;
        uint8_t reg_addr = etb_reg->addr & 0x7f;
@@ -271,12 +280,9 @@ int etb_read_reg_w_check(reg_t *reg, uint8_t* check_value, uint8_t* check_mask)
        return ERROR_OK;
 }
 
-int etb_read_reg(reg_t *reg)
-{
-       return etb_read_reg_w_check(reg, NULL, NULL);
-}
+static int etb_write_reg(reg_t *, uint32_t);
 
-int etb_set_reg(reg_t *reg, uint32_t value)
+static int etb_set_reg(reg_t *reg, uint32_t value)
 {
        int retval;
 
@@ -293,7 +299,7 @@ int etb_set_reg(reg_t *reg, uint32_t value)
        return ERROR_OK;
 }
 
-int etb_set_reg_w_exec(reg_t *reg, uint8_t *buf)
+static int etb_set_reg_w_exec(reg_t *reg, uint8_t *buf)
 {
        int retval;
 
@@ -307,7 +313,7 @@ int etb_set_reg_w_exec(reg_t *reg, uint8_t *buf)
        return ERROR_OK;
 }
 
-int etb_write_reg(reg_t *reg, uint32_t value)
+static int etb_write_reg(reg_t *reg, uint32_t value)
 {
        etb_reg_t *etb_reg = reg->arch_info;
        uint8_t reg_addr = etb_reg->addr & 0x7f;
@@ -345,11 +351,6 @@ int etb_write_reg(reg_t *reg, uint32_t value)
        return ERROR_OK;
 }
 
-int etb_store_reg(reg_t *reg)
-{
-       return etb_write_reg(reg, buf_get_u32(reg->value, 0, reg->size));
-}
-
 static int etb_register_commands(struct command_context_s *cmd_ctx)
 {
        command_t *etb_cmd;
index b262841ca22d978f8870129efc8bd481af33571d..0eeb02bde280fa3b07d2448aeb76b8180617796c 100644 (file)
@@ -57,11 +57,5 @@ typedef struct etb_reg_s
 extern etm_capture_driver_t etb_capture_driver;
 
 extern reg_cache_t* etb_build_reg_cache(etb_t *etb);
-extern int etb_read_reg(reg_t *reg);
-extern int etb_write_reg(reg_t *reg, uint32_t value);
-extern int etb_read_reg_w_check(reg_t *reg, uint8_t* check_value, uint8_t* check_mask);
-extern int etb_store_reg(reg_t *reg);
-extern int etb_set_reg(reg_t *reg, uint32_t value);
-extern int etb_set_reg_w_exec(reg_t *reg, uint8_t *buf);
 
 #endif /* ETB_H */

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)