From 20e4e77cdf366dedac21ff5670c54291feadfc05 Mon Sep 17 00:00:00 2001 From: drath Date: Fri, 10 Aug 2007 19:44:06 +0000 Subject: - renamed M5960 USB JTAG to "flyswatter" - make ep93xx and at91rm9200 bitbang JTAG interfaces dependant on ARM host (thanks to Vincent Palatin) - various whitespace fixes - removed various warnings - add support for Debian GNU/kFreeBSD (thanks to Uwe Hermann) - fix OpenOCD compilation for various platforms (thanks to Uwe Hermann and Vincent Palatin) - switched order of JTAG chain examination and validation (examine first, then multiple validation tries even if examination failed) - added target_request subsystem to handle requests from the target (debug messages and tracepoints implemented, future enhancements might include semihosting, all ARM7/9 only for now) - added support for GDB vFlashXXX packets (thanks to Pavel Chromy) - added support for receiving data via ARM7/9 DCC - reworked flash writing. the 'flash write' command is now deprecated and replaced by 'flash write_binary' (old syntax and behaviour) and 'flash write_image' (write image files (bin, hex, elf, s19) to a target). - added support for AMD/ST/SST 29F400B non-cfi flashes git-svn-id: svn://svn.berlios.de/openocd/trunk@190 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/parport.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/jtag/parport.c') diff --git a/src/jtag/parport.c b/src/jtag/parport.c index bc95c3d0..b9087d9f 100644 --- a/src/jtag/parport.c +++ b/src/jtag/parport.c @@ -28,7 +28,7 @@ /* system includes */ // -ino: 060521-1036 -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #include @@ -49,7 +49,7 @@ #include #if PARPORT_USE_PPDEV == 1 -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #include #define PPRSTATUS PPIGSTATUS @@ -200,7 +200,7 @@ void parport_write(int tck, int tms, int tdi) #if PARPORT_USE_PPDEV == 1 ioctl(device_handle, PPWDATA, &output); #else -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) outb(dataport, output); #else outb(output, dataport); @@ -229,7 +229,7 @@ void parport_reset(int trst, int srst) #if PARPORT_USE_PPDEV == 1 ioctl(device_handle, PPWDATA, &output); #else -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) outb(dataport, output); #else outb(output, dataport); @@ -322,17 +322,17 @@ int parport_init(void) return ERROR_JTAG_INIT_FAILED; } -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) DEBUG("opening /dev/ppi%d...", parport_port); snprintf(buffer, 256, "/dev/ppi%d", parport_port); device_handle = open(buffer, O_WRONLY); -#else /* not __Free_BSD */ +#else /* not __FreeBSD__, __FreeBSD_kernel__ */ DEBUG("opening /dev/parport%d...", parport_port); snprintf(buffer, 256, "/dev/parport%d", parport_port); device_handle = open(buffer, O_WRONLY); -#endif /* __FreeBSD__ */ +#endif /* __FreeBSD__, __FreeBSD_kernel__ */ if (device_handle < 0) { @@ -342,7 +342,7 @@ int parport_init(void) DEBUG("...open"); -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) i=ioctl(device_handle, PPCLAIM); if (i<0) { @@ -365,7 +365,7 @@ int parport_init(void) ERROR("cannot set compatible 1284 mode to device"); return ERROR_JTAG_INIT_FAILED; } -#endif /* not __Free_BSD__ */ +#endif /* not __FreeBSD__, __FreeBSD_kernel__ */ #else /* not PARPORT_USE_PPDEV */ if (parport_port == 0) @@ -390,7 +390,7 @@ int parport_init(void) DEBUG("...privileges granted"); /* make sure parallel port is in right mode (clear tristate and interrupt */ - #ifdef __FreeBSD__ + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) outb(parport_port + 2, 0x0); #else outb(0x0, parport_port + 2); -- cgit v1.2.3