From f0e8f7b790f6d945c35b4bb868cafee5fcea3a22 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Fri, 3 Mar 2023 12:26:46 +0100 Subject: [PATCH] tcl/board/calao-usb-a9260: fix and refactor broken support The old configuration files did not work because of a missing 'at91sam9260minimal.cfg' file. Also, the config files were placed wrongly. Update them, put them to the proper location, merge the two supported boards into one, remove now superfluous include, remove defunct web page, etc.. Tested with a Calao USB-A9G20 and a hacked 'device_desc' to match. Native support for it will come next. Signed-off-by: Wolfram Sang Change-Id: Iec578c8777c5a6134e132dbac17c2988c7634742 Reviewed-on: https://review.openocd.org/c/openocd/+/7522 Tested-by: jenkins Reviewed-by: Tomas Vanek --- tcl/board/calao-usb-a9260.cfg | 14 +++++++++++++ tcl/interface/calao-usb-a9260.cfg | 12 ----------- tcl/interface/ftdi/calao-usb-a9260-c01.cfg | 24 ---------------------- tcl/interface/ftdi/calao-usb-a9260-c02.cfg | 24 ---------------------- 4 files changed, 14 insertions(+), 60 deletions(-) create mode 100644 tcl/board/calao-usb-a9260.cfg delete mode 100644 tcl/interface/calao-usb-a9260.cfg delete mode 100644 tcl/interface/ftdi/calao-usb-a9260-c01.cfg delete mode 100644 tcl/interface/ftdi/calao-usb-a9260-c02.cfg diff --git a/tcl/board/calao-usb-a9260.cfg b/tcl/board/calao-usb-a9260.cfg new file mode 100644 index 000000000..52fede0fa --- /dev/null +++ b/tcl/board/calao-usb-a9260.cfg @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# CALAO Systems USB-A9260 (C01 and C02) + +adapter driver ftdi +ftdi device_desc "USB-A9260" +ftdi vid_pid 0x0403 0x6001 0x0403 0x6010 +ftdi layout_init 0x0c08 0x0f1b +ftdi layout_signal nTRST -data 0x0100 -noe 0x0400 +ftdi layout_signal nSRST -data 0x0200 -noe 0x0800 + +transport select jtag + +source [find target/at91sam9260.cfg] diff --git a/tcl/interface/calao-usb-a9260.cfg b/tcl/interface/calao-usb-a9260.cfg deleted file mode 100644 index ff652ef8f..000000000 --- a/tcl/interface/calao-usb-a9260.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -# -# CALAO Systems USB-A9260 common -C01 -C02 setup -# -# http://www.calao-systems.com/ -# -# See calao-usb-a9260-c01.cfg and calao-usb-a9260-c02.cfg. -# - -adapter srst delay 200 -jtag_ntrst_delay 200 diff --git a/tcl/interface/ftdi/calao-usb-a9260-c01.cfg b/tcl/interface/ftdi/calao-usb-a9260-c01.cfg deleted file mode 100644 index c84e77874..000000000 --- a/tcl/interface/ftdi/calao-usb-a9260-c01.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -# -# CALAO Systems USB-A9260-C01 -# -# http://www.calao-systems.com/ -# - -echo "WARNING!" -echo "This file was not tested with real interface, but is assumed to work as this" -echo "interface uses the same layout as configs that were verified. Please report your" -echo "experience with this file to openocd-devel mailing list, so it could be marked" -echo "as working or fixed." - -adapter driver ftdi -ftdi device_desc "USB-A9260" -ftdi vid_pid 0x0403 0x6010 - -ftdi layout_init 0x0c08 0x0f1b -ftdi layout_signal nTRST -data 0x0100 -noe 0x0400 -ftdi layout_signal nSRST -data 0x0200 -noe 0x0800 - -script interface/calao-usb-a9260.cfg -script target/at91sam9260minimal.cfg diff --git a/tcl/interface/ftdi/calao-usb-a9260-c02.cfg b/tcl/interface/ftdi/calao-usb-a9260-c02.cfg deleted file mode 100644 index 9d79b2600..000000000 --- a/tcl/interface/ftdi/calao-usb-a9260-c02.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -# -# CALAO Systems USB-A9260-C02 -# -# http://www.calao-systems.com/ -# - -echo "WARNING!" -echo "This file was not tested with real interface, but is assumed to work as this" -echo "interface uses the same layout as configs that were verified. Please report your" -echo "experience with this file to openocd-devel mailing list, so it could be marked" -echo "as working or fixed." - -adapter driver ftdi -ftdi device_desc "USB-A9260" -ftdi vid_pid 0x0403 0x6001 - -ftdi layout_init 0x0c08 0x0f1b -ftdi layout_signal nTRST -data 0x0100 -noe 0x0400 -ftdi layout_signal nSRST -data 0x0200 -noe 0x0800 - -script interface/calao-usb-a9260.cfg -script target/at91sam9260minimal.cfg