build: cleanup src/target directory
[openocd.git] / src / target / avr32_jtag.c
index b6b5e37b0eb6fa4626c7d294d7554d76aa66bd10..c88f44e800f9286df15daf839cc28c2bec15836c 100644 (file)
@@ -16,6 +16,7 @@
  *   Free Software Foundation, Inc.,                                       *
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -34,8 +35,7 @@ static int avr32_jtag_set_instr(struct avr32_jtag *jtag_info, int new_instr)
        if (tap == NULL)
                return ERROR_FAIL;
 
-       if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != (uint32_t)new_instr)
-       {
+       if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != (uint32_t)new_instr) {
                do {
                        struct scan_field field;
                        uint8_t t[4];
@@ -47,8 +47,7 @@ static int avr32_jtag_set_instr(struct avr32_jtag *jtag_info, int new_instr)
                        field.in_value = ret;
 
                        jtag_add_ir_scan(tap, &field, TAP_IDLE);
-                       if (jtag_execute_queue() != ERROR_OK)
-                       {
+                       if (jtag_execute_queue() != ERROR_OK) {
                                LOG_ERROR("%s: setting address failed", __func__);
                                return ERROR_FAIL;
                        }
@@ -59,7 +58,7 @@ static int avr32_jtag_set_instr(struct avr32_jtag *jtag_info, int new_instr)
        return ERROR_OK;
 }
 
-int avr32_jtag_nexus_set_address(struct avr32_jtag *jtag_info, 
+int avr32_jtag_nexus_set_address(struct avr32_jtag *jtag_info,
                uint32_t addr, int mode)
 {
        struct scan_field fields[2];
@@ -85,19 +84,18 @@ int avr32_jtag_nexus_set_address(struct avr32_jtag *jtag_info,
                fields[1].out_value = addr_buf;
 
                jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE);
-               if (jtag_execute_queue() != ERROR_OK)
-               {
+               if (jtag_execute_queue() != ERROR_OK) {
                        LOG_ERROR("%s: setting address failed", __func__);
                        return ERROR_FAIL;
                }
                busy = buf_get_u32(busy_buf, 6, 1);
-       } while(busy);
+       } while (busy);
 
        return ERROR_OK;
 }
 
 
-int avr32_jtag_nexus_read_data(struct avr32_jtag *jtag_info, 
+int avr32_jtag_nexus_read_data(struct avr32_jtag *jtag_info,
        uint32_t *pdata)
 {
 
@@ -121,8 +119,7 @@ int avr32_jtag_nexus_read_data(struct avr32_jtag *jtag_info,
 
                jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE);
 
-               if (jtag_execute_queue() != ERROR_OK)
-               {
+               if (jtag_execute_queue() != ERROR_OK) {
                        LOG_ERROR("%s: reading data  failed", __func__);
                        return ERROR_FAIL;
                }
@@ -135,8 +132,7 @@ int avr32_jtag_nexus_read_data(struct avr32_jtag *jtag_info,
        return ERROR_OK;
 }
 
-
-int avr32_jtag_nexus_write_data(struct avr32_jtag *jtag_info, 
+int avr32_jtag_nexus_write_data(struct avr32_jtag *jtag_info,
                uint32_t data)
 {
 
@@ -163,8 +159,7 @@ int avr32_jtag_nexus_write_data(struct avr32_jtag *jtag_info,
 
                jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE);
 
-               if (jtag_execute_queue() != ERROR_OK)
-               {
+               if (jtag_execute_queue() != ERROR_OK) {
                        LOG_ERROR("%s: reading data  failed", __func__);
                        return ERROR_FAIL;
                }
@@ -176,9 +171,6 @@ int avr32_jtag_nexus_write_data(struct avr32_jtag *jtag_info,
        return ERROR_OK;
 }
 
-
-
-
 int avr32_jtag_nexus_read(struct avr32_jtag *jtag_info,
                uint32_t addr, uint32_t *value)
 {
@@ -228,18 +220,17 @@ int avr32_jtag_mwa_set_address(struct avr32_jtag *jtag_info, int slave,
                fields[1].out_value = slave_buf;
 
                jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE);
-               if (jtag_execute_queue() != ERROR_OK)
-               {
+               if (jtag_execute_queue() != ERROR_OK) {
                        LOG_ERROR("%s: setting address failed", __func__);
                        return ERROR_FAIL;
                }
                busy = buf_get_u32(busy_buf, 1, 1);
-       } while(busy);
+       } while (busy);
 
        return ERROR_OK;
 }
 
-int avr32_jtag_mwa_read_data(struct avr32_jtag *jtag_info, 
+int avr32_jtag_mwa_read_data(struct avr32_jtag *jtag_info,
        uint32_t *pdata)
 {
 
@@ -263,8 +254,7 @@ int avr32_jtag_mwa_read_data(struct avr32_jtag *jtag_info,
 
                jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE);
 
-               if (jtag_execute_queue() != ERROR_OK)
-               {
+               if (jtag_execute_queue() != ERROR_OK) {
                        LOG_ERROR("%s: reading data  failed", __func__);
                        return ERROR_FAIL;
                }
@@ -277,7 +267,7 @@ int avr32_jtag_mwa_read_data(struct avr32_jtag *jtag_info,
        return ERROR_OK;
 }
 
-int avr32_jtag_mwa_write_data(struct avr32_jtag *jtag_info, 
+int avr32_jtag_mwa_write_data(struct avr32_jtag *jtag_info,
        uint32_t data)
 {
 
@@ -304,8 +294,7 @@ int avr32_jtag_mwa_write_data(struct avr32_jtag *jtag_info,
 
                jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE);
 
-               if (jtag_execute_queue() != ERROR_OK)
-               {
+               if (jtag_execute_queue() != ERROR_OK) {
                        LOG_ERROR("%s: reading data  failed", __func__);
                        return ERROR_FAIL;
                }
@@ -316,8 +305,6 @@ int avr32_jtag_mwa_write_data(struct avr32_jtag *jtag_info,
        return ERROR_OK;
 }
 
-
-
 int avr32_jtag_mwa_read(struct avr32_jtag *jtag_info, int slave,
                uint32_t addr, uint32_t *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)