This is an automated email from Gerrit.

Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/918

-- gerrit

commit cd801f8cf3cb0e08aba2eedfdd1d226789a85a38
Author: Spencer Oliver <s...@spen-soft.co.uk>
Date:   Mon Oct 15 12:34:46 2012 +0100

    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 <s...@spen-soft.co.uk>

diff --git a/src/jtag/stlink/stlink_layout.c b/src/jtag/stlink/stlink_layout.c
index 4ef9b76..cd0ba7f 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,
diff --git a/src/jtag/stlink/stlink_layout.h b/src/jtag/stlink/stlink_layout.h
index 905105a..8d2a98a 100644
--- a/src/jtag/stlink/stlink_layout.h
+++ b/src/jtag/stlink/stlink_layout.h
@@ -75,8 +75,6 @@ struct stlink_layout {
        /** */
        char *name;
        /** */
-       int type;
-       /** */
        int (*open) (struct stlink_interface_s *stlink_if);
        /** */
        int (*close) (struct stlink_interface_s *stlink_if);
diff --git a/tcl/interface/stlink-v1.cfg b/tcl/interface/stlink-v1.cfg
index af67818..0003183 100644
--- a/tcl/interface/stlink-v1.cfg
+++ b/tcl/interface/stlink-v1.cfg
@@ -3,7 +3,7 @@
 #
 
 interface stlink
-stlink_layout sg
+stlink_layout stlink
 stlink_device_desc "ST-LINK/V1"
 stlink_vid_pid 0x0483 0x3744
 
diff --git a/tcl/interface/stlink-v2.cfg b/tcl/interface/stlink-v2.cfg
index 3eee7d9..25e696c 100644
--- a/tcl/interface/stlink-v2.cfg
+++ b/tcl/interface/stlink-v2.cfg
@@ -3,7 +3,7 @@
 #
 
 interface stlink
-stlink_layout usb
+stlink_layout stlink
 stlink_device_desc "ST-LINK/V2"
 stlink_vid_pid 0x0483 0x3748
 

-- 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to