diff options
author | Spencer Oliver <spen@spen-soft.co.uk> | 2012-10-15 12:34:46 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2012-12-23 21:37:50 +0000 |
commit | a047d87196e829b927b4dc5281981d011fb4c586 (patch) | |
tree | 94cf146c8287d27e76b2f077ad059c7be3df6e2f /src/jtag/stlink/stlink_layout.c | |
parent | b7ea4a616279e2d8d315b2463dc5cf5bbeaf78fc (diff) |
stlink: use common layout
Even though the stlinkv1 and stlinkv2 use different usb classes they share
the same layout scheme.
Merge the two into a common layout, thus enabling us to support other
adapter layouts.
Change-Id: I7d02c44a7f94ebc7f2cb5428b02ee40294fb430d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/918
Tested-by: jenkins
Diffstat (limited to 'src/jtag/stlink/stlink_layout.c')
-rw-r--r-- | src/jtag/stlink/stlink_layout.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/jtag/stlink/stlink_layout.c b/src/jtag/stlink/stlink_layout.c index 4ef9b765..cd0ba7f5 100644 --- a/src/jtag/stlink/stlink_layout.c +++ b/src/jtag/stlink/stlink_layout.c @@ -32,10 +32,6 @@ #include <jtag/stlink/stlink_transport.h> #include <jtag/stlink/stlink_interface.h> -#define STLINK_LAYOUT_UNKNOWN 0 -#define STLINK_LAYOUT_SG 1 -#define STLINK_LAYOUT_USB 2 - static int stlink_layout_open(struct stlink_interface_s *stlink_if) { int res; @@ -61,15 +57,7 @@ static int stlink_layout_close(struct stlink_interface_s *stlink_if) static const struct stlink_layout stlink_layouts[] = { { - .name = "usb", - .type = STLINK_LAYOUT_USB, - .open = stlink_layout_open, - .close = stlink_layout_close, - .api = &stlink_usb_layout_api, - }, - { - .name = "sg", - .type = STLINK_LAYOUT_SG, + .name = "stlink", .open = stlink_layout_open, .close = stlink_layout_close, .api = &stlink_usb_layout_api, |