jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / src / target / quark_x10xx.c
index a3b8a266df944667fd635a7ec3c59967a55e6350..0daa642b858887ba04c9571096a5a18ccb6e5e0d 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /*
  * Copyright(c) 2013-2016 Intel Corporation.
  *
@@ -7,20 +9,6 @@
  * Julien Carreno (julien.carreno@intel.com)
  * Jeffrey Maxwell (jeffrey.r.maxwell@intel.com)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
  * Contact Information:
  * Intel Corporation
  */
 #include "lakemont.h"
 #include "x86_32_common.h"
 
-int quark_x10xx_target_create(struct target *t, Jim_Interp *interp)
+static int quark_x10xx_target_create(struct target *t, Jim_Interp *interp)
 {
-       struct x86_32_common *x86_32 = calloc(1, sizeof(struct x86_32_common));
-       if (x86_32 == NULL) {
-               LOG_ERROR("%s out of memory", __func__);
+       struct x86_32_common *x86_32 = calloc(1, sizeof(*x86_32));
+
+       if (!x86_32)
                return ERROR_FAIL;
-       }
+
        x86_32_common_init_arch_info(t, x86_32);
        lakemont_init_arch_info(t, x86_32);
        x86_32->core_type = LMT1;
-       return ERROR_OK;
-}
 
-int quark_x10xx_init_target(struct command_context *cmd_ctx, struct target *t)
-{
-       return lakemont_init_target(cmd_ctx, t);
+       return ERROR_OK;
 }
 
 struct target_type quark_x10xx_target = {
-       .name = "quark_x10xx",
+       .name                   = "quark_x10xx",
+
        /* Quark X1000 SoC */
-       .target_create = quark_x10xx_target_create,
-       .init_target = quark_x10xx_init_target,
+       .target_create          = quark_x10xx_target_create,
+
        /* lakemont probemode specific code */
-       .poll = lakemont_poll,
-       .arch_state = lakemont_arch_state,
-       .halt = lakemont_halt,
-       .resume = lakemont_resume,
-       .step = lakemont_step,
-       .assert_reset = lakemont_reset_assert,
-       .deassert_reset = lakemont_reset_deassert,
+       .arch_state             = lakemont_arch_state,
+       .assert_reset           = lakemont_reset_assert,
+       .deassert_reset         = lakemont_reset_deassert,
+       .halt                   = lakemont_halt,
+       .init_target            = lakemont_init_target,
+       .poll                   = lakemont_poll,
+       .resume                 = lakemont_resume,
+       .step                   = lakemont_step,
+
        /* common x86 code */
-       .commands = x86_32_command_handlers,
-       .get_gdb_reg_list = x86_32_get_gdb_reg_list,
-       .read_memory = x86_32_common_read_memory,
-       .write_memory = x86_32_common_write_memory,
-       .add_breakpoint = x86_32_common_add_breakpoint,
-       .remove_breakpoint = x86_32_common_remove_breakpoint,
-       .add_watchpoint = x86_32_common_add_watchpoint,
-       .remove_watchpoint = x86_32_common_remove_watchpoint,
-       .virt2phys = x86_32_common_virt2phys,
-       .read_phys_memory = x86_32_common_read_phys_mem,
-       .write_phys_memory = x86_32_common_write_phys_mem,
-       .mmu = x86_32_common_mmu,
+       .add_breakpoint         = x86_32_common_add_breakpoint,
+       .add_watchpoint         = x86_32_common_add_watchpoint,
+       .commands               = x86_32_command_handlers,
+       .get_gdb_reg_list       = x86_32_get_gdb_reg_list,
+       .mmu                    = x86_32_common_mmu,
+       .read_memory            = x86_32_common_read_memory,
+       .read_phys_memory       = x86_32_common_read_phys_mem,
+       .remove_breakpoint      = x86_32_common_remove_breakpoint,
+       .remove_watchpoint      = x86_32_common_remove_watchpoint,
+       .virt2phys              = x86_32_common_virt2phys,
+       .write_memory           = x86_32_common_write_memory,
+       .write_phys_memory      = x86_32_common_write_phys_mem,
 };

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)