From 865efd828a267992db0f2a92a731c5ce23a34236 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Wed, 2 Dec 2009 17:18:05 -0800 Subject: [PATCH] move jtag drivers to src/jtag/drivers Moves JTAG interface drivers to src/jtag/drivers/, Adds src/jtag/drivers/Makefile.am. Builds libocdjtagdrivers.la. Flattens the rlink driver files into the drivers/ directory, adding the 'rlink_' prefix or '.rlink' suffix as appropriate. --- configure.in | 1 + src/jtag/Makefile.am | 68 ++--------------- src/jtag/drivers/Makefile.am | 74 +++++++++++++++++++ .../Makefile => drivers/Makefile.rlink} | 0 src/jtag/{ => drivers}/amt_jtagaccel.c | 0 src/jtag/{ => drivers}/arm-jtag-ew.c | 0 src/jtag/{ => drivers}/at91rm9200.c | 0 src/jtag/{ => drivers}/bitbang.c | 0 src/jtag/{ => drivers}/bitbang.h | 0 src/jtag/{ => drivers}/bitq.c | 0 src/jtag/{ => drivers}/bitq.h | 0 src/jtag/{ => drivers}/driver.c | 0 src/jtag/{ => drivers}/dummy.c | 0 src/jtag/{ => drivers}/ep93xx.c | 0 src/jtag/{ => drivers}/ft2232.c | 0 src/jtag/{ => drivers}/gw16012.c | 0 src/jtag/{ => drivers}/jlink.c | 0 src/jtag/{ => drivers}/parport.c | 0 src/jtag/{ => drivers}/presto.c | 0 src/jtag/{rlink => drivers}/rlink.c | 6 +- src/jtag/{rlink => drivers}/rlink.h | 0 .../{rlink/call.m4 => drivers/rlink_call.m4} | 0 .../dtc_cmd.h => drivers/rlink_dtc_cmd.h} | 0 .../ep1_cmd.h => drivers/rlink_ep1_cmd.h} | 0 .../{rlink/init.m4 => drivers/rlink_init.m4} | 0 .../{rlink => drivers}/rlink_speed_table.c | 2 +- src/jtag/{rlink/st7.h => drivers/rlink_st7.h} | 0 src/jtag/{ => drivers}/usb_common.c | 0 src/jtag/{ => drivers}/usb_common.h | 0 src/jtag/{ => drivers}/usbprog.c | 0 src/jtag/{ => drivers}/vsllink.c | 0 31 files changed, 86 insertions(+), 65 deletions(-) create mode 100644 src/jtag/drivers/Makefile.am rename src/jtag/{rlink/Makefile => drivers/Makefile.rlink} (100%) rename src/jtag/{ => drivers}/amt_jtagaccel.c (100%) rename src/jtag/{ => drivers}/arm-jtag-ew.c (100%) rename src/jtag/{ => drivers}/at91rm9200.c (100%) rename src/jtag/{ => drivers}/bitbang.c (100%) rename src/jtag/{ => drivers}/bitbang.h (100%) rename src/jtag/{ => drivers}/bitq.c (100%) rename src/jtag/{ => drivers}/bitq.h (100%) rename src/jtag/{ => drivers}/driver.c (100%) rename src/jtag/{ => drivers}/dummy.c (100%) rename src/jtag/{ => drivers}/ep93xx.c (100%) rename src/jtag/{ => drivers}/ft2232.c (100%) rename src/jtag/{ => drivers}/gw16012.c (100%) rename src/jtag/{ => drivers}/jlink.c (100%) rename src/jtag/{ => drivers}/parport.c (100%) rename src/jtag/{ => drivers}/presto.c (100%) rename src/jtag/{rlink => drivers}/rlink.c (99%) rename src/jtag/{rlink => drivers}/rlink.h (100%) rename src/jtag/{rlink/call.m4 => drivers/rlink_call.m4} (100%) rename src/jtag/{rlink/dtc_cmd.h => drivers/rlink_dtc_cmd.h} (100%) rename src/jtag/{rlink/ep1_cmd.h => drivers/rlink_ep1_cmd.h} (100%) rename src/jtag/{rlink/init.m4 => drivers/rlink_init.m4} (100%) rename src/jtag/{rlink => drivers}/rlink_speed_table.c (99%) rename src/jtag/{rlink/st7.h => drivers/rlink_st7.h} (100%) rename src/jtag/{ => drivers}/usb_common.c (100%) rename src/jtag/{ => drivers}/usb_common.h (100%) rename src/jtag/{ => drivers}/usbprog.c (100%) rename src/jtag/{ => drivers}/vsllink.c (100%) diff --git a/configure.in b/configure.in index 7b2b4af3..5020ed64 100644 --- a/configure.in +++ b/configure.in @@ -1117,6 +1117,7 @@ AC_OUTPUT(dnl src/Makefile dnl src/helper/Makefile dnl src/jtag/Makefile dnl + src/jtag/drivers/Makefile dnl src/xsvf/Makefile dnl src/svf/Makefile dnl src/target/Makefile dnl diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am index 5254a2b5..c735897e 100644 --- a/src/jtag/Makefile.am +++ b/src/jtag/Makefile.am @@ -5,7 +5,9 @@ AM_CPPFLAGS = \ METASOURCES = AUTO noinst_LTLIBRARIES = libjtag.la +SUBDIRS = DRIVERFILES = +libjtag_la_LIBADD = if MINIDRIVER @@ -20,63 +22,14 @@ endif else -# Standard Driver: common files -DRIVERFILES += driver.c commands.c +DRIVERFILES += commands.c -if USB -DRIVERFILES += usb_common.c -endif - -if BITBANG -DRIVERFILES += bitbang.c -endif -if PARPORT -DRIVERFILES += parport.c -endif -if DUMMY -DRIVERFILES += dummy.c -endif -if FT2232_DRIVER -DRIVERFILES += ft2232.c -endif -if AMTJTAGACCEL -DRIVERFILES += amt_jtagaccel.c -endif -if EP93XX -DRIVERFILES += ep93xx.c -endif -if AT91RM9200 -DRIVERFILES += at91rm9200.c -endif -if GW16012 -DRIVERFILES += gw16012.c -endif -if BITQ -DRIVERFILES += bitq.c -endif -if PRESTO_DRIVER -DRIVERFILES += presto.c -endif -if USBPROG -DRIVERFILES += usbprog.c -endif -if JLINK -DRIVERFILES += jlink.c -endif -if RLINK -DRIVERFILES += rlink/rlink.c rlink/rlink_speed_table.c -endif -if VSLLINK -DRIVERFILES += vsllink.c -endif -if ARMJTAGEW -DRIVERFILES += arm-jtag-ew.c -endif +SUBDIRS += drivers +libjtag_la_LIBADD += $(top_builddir)/src/jtag/drivers/libocdjtagdrivers.la endif # endif // MINIDRIVER - libjtag_la_SOURCES = \ core.c \ interface.c \ @@ -85,19 +38,12 @@ libjtag_la_SOURCES = \ $(DRIVERFILES) noinst_HEADERS = \ + commands.h \ interface.h \ interfaces.h \ - commands.h \ minidriver.h \ - bitbang.h \ jtag.h \ - bitq.h \ - rlink/dtc_cmd.h \ - rlink/ep1_cmd.h \ - rlink/rlink.h \ - rlink/st7.h \ - minidummy/jtag_minidriver.h \ - usb_common.h + minidummy/jtag_minidriver.h EXTRA_DIST = startup.tcl diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am new file mode 100644 index 00000000..0a007b4c --- /dev/null +++ b/src/jtag/drivers/Makefile.am @@ -0,0 +1,74 @@ +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/jtag + +noinst_LTLIBRARIES = libocdjtagdrivers.la + +libocdjtagdrivers_la_SOURCES = \ + $(DRIVERFILES) + +DRIVERFILES = + +# Standard Driver: common files +DRIVERFILES += driver.c + +if USB +DRIVERFILES += usb_common.c +endif + +if BITBANG +DRIVERFILES += bitbang.c +endif +if PARPORT +DRIVERFILES += parport.c +endif +if DUMMY +DRIVERFILES += dummy.c +endif +if FT2232_DRIVER +DRIVERFILES += ft2232.c +endif +if AMTJTAGACCEL +DRIVERFILES += amt_jtagaccel.c +endif +if EP93XX +DRIVERFILES += ep93xx.c +endif +if AT91RM9200 +DRIVERFILES += at91rm9200.c +endif +if GW16012 +DRIVERFILES += gw16012.c +endif +if BITQ +DRIVERFILES += bitq.c +endif +if PRESTO_DRIVER +DRIVERFILES += presto.c +endif +if USBPROG +DRIVERFILES += usbprog.c +endif +if JLINK +DRIVERFILES += jlink.c +endif +if RLINK +DRIVERFILES += rlink.c rlink_speed_table.c +endif +if VSLLINK +DRIVERFILES += vsllink.c +endif +if ARMJTAGEW +DRIVERFILES += arm-jtag-ew.c +endif + +noinst_HEADERS = \ + bitbang.h \ + bitq.h \ + rlink.h \ + rlink_dtc_cmd.h \ + rlink_ep1_cmd.h \ + rlink_st7.h \ + usb_common.h + +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in diff --git a/src/jtag/rlink/Makefile b/src/jtag/drivers/Makefile.rlink similarity index 100% rename from src/jtag/rlink/Makefile rename to src/jtag/drivers/Makefile.rlink diff --git a/src/jtag/amt_jtagaccel.c b/src/jtag/drivers/amt_jtagaccel.c similarity index 100% rename from src/jtag/amt_jtagaccel.c rename to src/jtag/drivers/amt_jtagaccel.c diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/drivers/arm-jtag-ew.c similarity index 100% rename from src/jtag/arm-jtag-ew.c rename to src/jtag/drivers/arm-jtag-ew.c diff --git a/src/jtag/at91rm9200.c b/src/jtag/drivers/at91rm9200.c similarity index 100% rename from src/jtag/at91rm9200.c rename to src/jtag/drivers/at91rm9200.c diff --git a/src/jtag/bitbang.c b/src/jtag/drivers/bitbang.c similarity index 100% rename from src/jtag/bitbang.c rename to src/jtag/drivers/bitbang.c diff --git a/src/jtag/bitbang.h b/src/jtag/drivers/bitbang.h similarity index 100% rename from src/jtag/bitbang.h rename to src/jtag/drivers/bitbang.h diff --git a/src/jtag/bitq.c b/src/jtag/drivers/bitq.c similarity index 100% rename from src/jtag/bitq.c rename to src/jtag/drivers/bitq.c diff --git a/src/jtag/bitq.h b/src/jtag/drivers/bitq.h similarity index 100% rename from src/jtag/bitq.h rename to src/jtag/drivers/bitq.h diff --git a/src/jtag/driver.c b/src/jtag/drivers/driver.c similarity index 100% rename from src/jtag/driver.c rename to src/jtag/drivers/driver.c diff --git a/src/jtag/dummy.c b/src/jtag/drivers/dummy.c similarity index 100% rename from src/jtag/dummy.c rename to src/jtag/drivers/dummy.c diff --git a/src/jtag/ep93xx.c b/src/jtag/drivers/ep93xx.c similarity index 100% rename from src/jtag/ep93xx.c rename to src/jtag/drivers/ep93xx.c diff --git a/src/jtag/ft2232.c b/src/jtag/drivers/ft2232.c similarity index 100% rename from src/jtag/ft2232.c rename to src/jtag/drivers/ft2232.c diff --git a/src/jtag/gw16012.c b/src/jtag/drivers/gw16012.c similarity index 100% rename from src/jtag/gw16012.c rename to src/jtag/drivers/gw16012.c diff --git a/src/jtag/jlink.c b/src/jtag/drivers/jlink.c similarity index 100% rename from src/jtag/jlink.c rename to src/jtag/drivers/jlink.c diff --git a/src/jtag/parport.c b/src/jtag/drivers/parport.c similarity index 100% rename from src/jtag/parport.c rename to src/jtag/drivers/parport.c diff --git a/src/jtag/presto.c b/src/jtag/drivers/presto.c similarity index 100% rename from src/jtag/presto.c rename to src/jtag/drivers/presto.c diff --git a/src/jtag/rlink/rlink.c b/src/jtag/drivers/rlink.c similarity index 99% rename from src/jtag/rlink/rlink.c rename to src/jtag/drivers/rlink.c index bb33ad8f..a039080e 100644 --- a/src/jtag/rlink/rlink.c +++ b/src/jtag/drivers/rlink.c @@ -31,9 +31,9 @@ #include "interface.h" #include "commands.h" #include "rlink.h" -#include "st7.h" -#include "ep1_cmd.h" -#include "dtc_cmd.h" +#include "rlink_st7.h" +#include "rlink_ep1_cmd.h" +#include "rlink_dtc_cmd.h" #include "usb_common.h" diff --git a/src/jtag/rlink/rlink.h b/src/jtag/drivers/rlink.h similarity index 100% rename from src/jtag/rlink/rlink.h rename to src/jtag/drivers/rlink.h diff --git a/src/jtag/rlink/call.m4 b/src/jtag/drivers/rlink_call.m4 similarity index 100% rename from src/jtag/rlink/call.m4 rename to src/jtag/drivers/rlink_call.m4 diff --git a/src/jtag/rlink/dtc_cmd.h b/src/jtag/drivers/rlink_dtc_cmd.h similarity index 100% rename from src/jtag/rlink/dtc_cmd.h rename to src/jtag/drivers/rlink_dtc_cmd.h diff --git a/src/jtag/rlink/ep1_cmd.h b/src/jtag/drivers/rlink_ep1_cmd.h similarity index 100% rename from src/jtag/rlink/ep1_cmd.h rename to src/jtag/drivers/rlink_ep1_cmd.h diff --git a/src/jtag/rlink/init.m4 b/src/jtag/drivers/rlink_init.m4 similarity index 100% rename from src/jtag/rlink/init.m4 rename to src/jtag/drivers/rlink_init.m4 diff --git a/src/jtag/rlink/rlink_speed_table.c b/src/jtag/drivers/rlink_speed_table.c similarity index 99% rename from src/jtag/rlink/rlink_speed_table.c rename to src/jtag/drivers/rlink_speed_table.c index 2ef62ee3..fa40fe8c 100644 --- a/src/jtag/rlink/rlink_speed_table.c +++ b/src/jtag/drivers/rlink_speed_table.c @@ -4,7 +4,7 @@ #endif #include "rlink.h" -#include "st7.h" +#include "rlink_st7.h" static const uint8_t dtc_64[] = { 0, 2, 68, 84, 67, 2, 13, 160, 176, 151, 147, 182, 141, 152, 177, 129, 148, diff --git a/src/jtag/rlink/st7.h b/src/jtag/drivers/rlink_st7.h similarity index 100% rename from src/jtag/rlink/st7.h rename to src/jtag/drivers/rlink_st7.h diff --git a/src/jtag/usb_common.c b/src/jtag/drivers/usb_common.c similarity index 100% rename from src/jtag/usb_common.c rename to src/jtag/drivers/usb_common.c diff --git a/src/jtag/usb_common.h b/src/jtag/drivers/usb_common.h similarity index 100% rename from src/jtag/usb_common.h rename to src/jtag/drivers/usb_common.h diff --git a/src/jtag/usbprog.c b/src/jtag/drivers/usbprog.c similarity index 100% rename from src/jtag/usbprog.c rename to src/jtag/drivers/usbprog.c diff --git a/src/jtag/vsllink.c b/src/jtag/drivers/vsllink.c similarity index 100% rename from src/jtag/vsllink.c rename to src/jtag/drivers/vsllink.c -- 2.39.5