This is an automated email from Gerrit.

Antonio Borneo ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/4823

-- gerrit

commit c557f1df257c42a876776bcd4bdce20cb7374bea
Author: Antonio Borneo <[email protected]>
Date:   Fri Dec 7 21:58:48 2018 +0100

    hla: remove unused API read_regs()
    
    The HLA framework has been derived from the initial implementation
    of ST-Link driver and the API are almost 1:1 mapping of ST-Link
    commands.
    The API read_regs() has never been used, either in old ST-Link and
    in the current HLA framework.
    The implementation for TI ICDI is empty with a comment reporting
    it is unsupported.
    The implementation for ST-Link is even broken for ST-Link API V2,
    but fixing it is out of the scope of this commit.
    
    Remove the API, the empty implementation for TI ICDI and mark as
    unused the implementation for ST-Link, for an (unlikely) use in
    future.
    
    Change-Id: Ib7fb416306762b34ecbfea1ff949e0a565834d02
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c
index aed30b6..e7375e9 100644
--- a/src/jtag/drivers/stlink_usb.c
+++ b/src/jtag/drivers/stlink_usb.c
@@ -1680,6 +1680,7 @@ static int stlink_usb_step(void *handle)
 }
 
 /** */
+__attribute__((unused))
 static int stlink_usb_read_regs(void *handle)
 {
        int res;
@@ -2704,8 +2705,6 @@ struct hl_layout_api_s stlink_usb_layout_api = {
        /** */
        .step = stlink_usb_step,
        /** */
-       .read_regs = stlink_usb_read_regs,
-       /** */
        .read_reg = stlink_usb_read_reg,
        /** */
        .write_reg = stlink_usb_write_reg,
diff --git a/src/jtag/drivers/ti_icdi_usb.c b/src/jtag/drivers/ti_icdi_usb.c
index f316c82..9d3bd27 100644
--- a/src/jtag/drivers/ti_icdi_usb.c
+++ b/src/jtag/drivers/ti_icdi_usb.c
@@ -470,12 +470,6 @@ static int icdi_usb_step(void *handle)
        return result;
 }
 
-static int icdi_usb_read_regs(void *handle)
-{
-       /* currently unsupported */
-       return ERROR_OK;
-}
-
 static int icdi_usb_read_reg(void *handle, int num, uint32_t *val)
 {
        int result;
@@ -776,7 +770,6 @@ struct hl_layout_api_s icdi_usb_layout_api = {
        .run = icdi_usb_run,
        .halt = icdi_usb_halt,
        .step = icdi_usb_step,
-       .read_regs = icdi_usb_read_regs,
        .read_reg = icdi_usb_read_reg,
        .write_reg = icdi_usb_write_reg,
        .read_mem = icdi_usb_read_mem,
diff --git a/src/jtag/hla/hla_layout.h b/src/jtag/hla/hla_layout.h
index 9f41b59..caa1e08 100644
--- a/src/jtag/hla/hla_layout.h
+++ b/src/jtag/hla/hla_layout.h
@@ -49,8 +49,6 @@ struct hl_layout_api_s {
        /** */
        int (*step) (void *handle);
        /** */
-       int (*read_regs) (void *handle);
-       /** */
        int (*read_reg) (void *handle, int num, uint32_t *val);
        /** */
        int (*write_reg) (void *handle, int num, uint32_t val);

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to