Skip to content

Commit 39ed0b0

Browse files
zapb-0borneoa
authored andcommitted
adapter/parport: Deprecate direct I/O support
We deprecate direct I/O support in favor of ppdev for the following reasons: - Linux supports ppdev since ~2.4 (released ~24 years ago) and it is enabled by default on major distros (Ubuntu, Fedora). So it is effectively ubiquitous - FreeBSD provides no direct I/O support, so ppdev (ppi) is the only viable option - Direct I/O requires root/elevated privileges which is inadvisable - Removing direct I/O reduces build and driver complexity and yields a smaller, easier-to-maintain codebase - Supporting only ppdev allows us to simplify the codebase by using device files (e.g., /dev/parport0) instead of numeric identifiers Windows is the only rationale to keep direct I/O, but the user base appears minimal to nonexistent and no active contributors can test the Windows driver. Change-Id: Ia6d5ed6e8c5faa2a9b4919ca97c5cf9033372a64 Signed-off-by: Marc Schink <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/9151 Reviewed-by: Antonio Borneo <[email protected]> Tested-by: jenkins
1 parent 6d51e6b commit 39ed0b0

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

configure.ac

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ AC_ARG_ENABLE([parport_ppdev],
356356

357357
AC_ARG_ENABLE([parport_giveio],
358358
AS_HELP_STRING([--enable-parport-giveio],
359-
[Enable use of giveio for parport (for CygWin only)]),
359+
[Enable use of giveio for parport (deprecated, for CygWin only)]),
360360
[parport_use_giveio=$enableval], [parport_use_giveio=])
361361

362362
AC_ARG_ENABLE([gw16012],
@@ -825,6 +825,12 @@ AS_IF([test "x$build_gw16012" = "xyes"], [
825825
AC_MSG_WARN([Gateworks GW16012 JTAG adapter is deprecated and support will be removed in the next release!])
826826
])
827827
828+
AS_IF([test "x$parport_use_giveio" = "xyes" || test [ "x$enable_parport" != "xno" -a "x$parport_use_ppdev" = "xno"]], [
829+
echo
830+
echo
831+
AC_MSG_WARN([Parallel port access with direct I/O is deprecated and support will be removed in the next release!])
832+
])
833+
828834
echo
829835
echo
830836
echo OpenOCD configuration summary

doc/openocd.texi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3225,6 +3225,7 @@ The default port number is 0.
32253225

32263226
When using direct I/O, the number is the I/O port number.
32273227
The default port number is 0x378 (LTP1).
3228+
@b{Note:} Direct I/O support is deprecated and will be removed in the future.
32283229
@end deffn
32293230

32303231
@deffn {Config Command} {parport write_on_exit} (@option{on}|@option{off})

src/jtag/drivers/parport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ static int parport_init(void)
341341
#endif /* not __FreeBSD__, __FreeBSD_kernel__ */
342342

343343
#else /* not PARPORT_USE_PPDEV */
344+
LOG_WARNING("DEPRECATED: Parallel port access with direct I/O is deprecated and support will be removed in the next release");
345+
344346
if (!parport_port) {
345347
parport_port = 0x378;
346348
LOG_WARNING("No parallel port specified, using default 0x378 (LPT1)");

0 commit comments

Comments
 (0)