swd: Introducing LibSWD git submodule.

It points to libswd-0.5 release branch with fixed autoconf AM_PROG_AR
issue. Introducing submodules/ directory to keep all submodules in
place, with README file that describes submodules role.

Change-Id: Ie9e654b7de5190ae284b3ddab5b5ebf71f622b24
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added bootstrap procedure of submodules/libswd.

When there is no configure script for libswd (i.e. when working on a
master branch) then autogen.sh is executed to generate it.

Change-Id: Ibcb9e7313935aa61ad17972145b5ccec73a0f1fa
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Introducing interface/ folder

Introducing interface/ folder dedicated to the interface
infrastructure and drivers. Introducing interface_signal
infrastructure to perform operations on interface port pins - this
will create good abstraction layer for pin state operations at runtime
and it is necessary to implement buffer configuration routines for SWD
transport.

Change-Id: I03181343f97347e3595aeb9acf17efbd3e0d8671
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added swd_only transport definition.

It will be used by swd interface driver.

Change-Id: I669b7b5ef62f15414e3f392c7004eb46bb827119
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Minor comments/description modification.

No functional/code changes.

Change-Id: I194346ddb245eff90d4c9dbdf8540ffeffe1e20d
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Extending jtag_interface driver structure

Extending jtag_interface driver structure with following fields:
*transport, *transfer, *bitbang, *signal, *target. These function and
data pointers will be used by swd driver implementation and allows any
other generic transport implementation.

Change-Id: If5b124c64960be7ab94983ca1948d7dda99ae611
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Extended ft2232_layout structure

Extended ft2232_layout structure with bitbang_deny field that will
define port pins that are not allowed to manipulate by user (i.e. to
avoid hardware damage). Minor comment updates.

Change-Id: I7e28986d56ad433070afacd21b3fbff6d365c091
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added ft2232_transfer() and ft2232_bitbang() implementation.

New interface routines (interface signal handling) are now part of the
build process (required by ft2232 transfer and bitbang functions).
Extended ft2232 based jtag driver with existing ft2232_bitbang
function.

Change-Id: I2d1e68782f702d385a8a48964417b5046a88e7c4
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added ft2232_interface_swd driver declaration

Added ft2232_interface_swd driver declaration with default transport
set to swd_only. It is based on existing ft2232 and jtag_interface. It
contains ft2232_transfer and ft2232_bitbang functions by default, thus
it will work only with ft2232 devices for now. This will be the first
interface type to work with LibSWD.

Change-Id: Ie06ac0430ed588423f32a904b102983ce224a062
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Small reorganization of interface includes.

interface/interface.h now includes jtag/interface.h until we separate
current openocd interface drivers from jtag specific code.

Change-Id: I5e6ff4ca465eec61710791e7be2a3ba99e989cc6
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Implemented TCL interface to interface_signal infrastructure.

Change-Id: Ia769d4c6366742147d73505ffa655bf0dae9d3b3
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added example interface_signal for KT-LINK

Added example interface_signal LED,SRST,SRSTin definitions to KT-LINK
interface for testing.

Change-Id: Idc8432f0835b4c3c00875f29d6ba00b90df405b3
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Introducing and implementing interface_bitbang

Introducing and implementing interface_bitbang infrastructure to
operate (read/write) on predefined interface_signal port pins (port
pin masks to be precise).

Change-Id: I9d1beb9b5f32d28ab2c833c21c0d69690381ddd0
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added comment that src/target/adi_v5_swd.c should be removed

Added comment that src/target/adi_v5_swd.c should be removed and its
functionality should be only provided by arm_adi_v5.c (target part)
and the transport swd (transport part).

Change-Id: If5136700420163a9d3dea1ad8dfe3094790668dd
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Small file rename.

When proper source code directory structure is implemented filenames
need no prefix, I guess :-)

Change-Id: Ib77e2a362a35c886d7ce8efb745bb1c813e61b72
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added interface configuration file for SWD-mode KT-LINK dongle.

Change-Id: I1a19d810e38d7c85ef5eed9d11fd2a8fc19801d0
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Bigger updates in Transport infrastructure

Functions renames to contain more consistent prefix oocd_transport_,
source code updates that was depending on these functions.

IMPORTANT: existing suspicious SWD implementation transport was
renamed to OLDSWD so if you want to use old swd drivers please rename
your transport to oldswd, it will be removed when transport work is
finished. Updated STLINK transport as well.

Change-Id: I41a07f51c1c43e466ed78f5bada76e4d2ca3bbb8
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added CTX void pointer

swd: Added CTX void pointer to to hold context for arm dap specific
operations.

Change-Id: I5e5414b2ab083719f13f5b5b2862fde3ba43a434
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Added ft2232_swd to available interfaces to use.

Change-Id: I4a88074d5a51f102b879618afea5b3cd214078f1
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>
swd: Introducing ktlink_swd layout for ft2232 driver.

Updated configuration files to use ktlink_jtag.

IMPORTANT: old layout was renamed to ktlink_jtag, please update your
configurations if necessary!

Change-Id: I46a658398820074ca47e6b73a51ce87d0c79559b
Signed-off-by: Tomek CEDRO <cederom@tlen.pl>