aice: add Andes AICE support
[fw/openocd] / src / jtag / aice / aice_port.c
1 /***************************************************************************
2  *   Copyright (C) 2013 by Andes Technology                                *
3  *   Hsiangkai Wang <hkwang@andestech.com>                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
19  ***************************************************************************/
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include <helper/log.h>
25 #include "aice_usb.h"
26 #include "aice_pipe.h"
27 #include "aice_port.h"
28
29 static const struct aice_port aice_ports[] = {
30         {
31                 .name = "aice_usb",
32                 .type = AICE_PORT_AICE_USB,
33                 .api = &aice_usb_api,
34         },
35         {
36                 .name = "aice_pipe",
37                 .type = AICE_PORT_AICE_PIPE,
38                 .api = &aice_pipe,
39         },
40         {.name = NULL, /* END OF TABLE */ },
41 };
42
43 /** */
44 const struct aice_port *aice_port_get_list(void)
45 {
46         return aice_ports;
47 }