summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Burnicki <martin.burnicki@meinberg.de>2011-12-21 12:00:00 +0100
committerMartin Burnicki <martin.burnicki@meinberg.de>2011-12-21 12:00:00 +0100
commit68a194ac1bedb990f4fdc3da748ee5bc7c2e3a58 (patch)
treed30c4953ce0f38c2f499a5f09f4a31eb3d0b2dc2
parent72685dddea57d0546d59ce869b3d2adabd25c370 (diff)
downloadmbgtools-fbsd-68a194ac1bedb990f4fdc3da748ee5bc7c2e3a58.tar.gz
mbgtools-fbsd-68a194ac1bedb990f4fdc3da748ee5bc7c2e3a58.zip
Update some files; cleanupmbgtools-fbsd-dev-2011-12-21
-rwxr-xr-xMakefile2
-rwxr-xr-xmbgclock/mbgclock_main.c2
-rwxr-xr-xmbgfasttstamp/Makefile2
-rwxr-xr-xmbgfasttstamp/mbgfasttstamp.c5
-rwxr-xr-xmbghrtime/mbghrtime.c5
-rwxr-xr-xmbglib/common/gpsdefs.h6
-rwxr-xr-xmbglib/common/lan_util.c2
-rwxr-xr-xmbglib/common/macioctl.h2
-rwxr-xr-xmbglib/common/mbgddmsg.h2
-rwxr-xr-xmbglib/common/mbgdevio.c2
-rwxr-xr-xmbglib/common/mbgdevio.h2
-rwxr-xr-xmbglib/common/mbgioctl.h2
-rwxr-xr-xmbglib/common/mbgmutex.h2
-rwxr-xr-xmbglib/common/mbgpccyc.h16
-rwxr-xr-xmbglib/common/mbgtime.h2
-rwxr-xr-xmbglib/common/pcpsdev.h2
-rwxr-xr-xmbglib/common/pcpsdrvr.c31
-rwxr-xr-xmbglib/common/pcpsdrvr.h50
-rwxr-xr-xmbglib/common/pcpsirq.h72
-rwxr-xr-xmbglib/common/toolutil.c2
-rwxr-xr-xmbgstatus/mbgstatus.c2
-rwxr-xr-xmbgsvcd/mbgsvcd.c2
22 files changed, 125 insertions, 90 deletions
diff --git a/Makefile b/Makefile
index b081418..1d0c59c 100755
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#########################################################################
#
-# $Id: Makefile 1.1.1.8 2011/11/24 11:25:00 martin TRASH $
+# $Id: Makefile 1.1.1.8 2011/11/24 11:25:00 martin TEST $
#
# Description:
# Makefile for mbgtools which recurses into the subdirectories.
diff --git a/mbgclock/mbgclock_main.c b/mbgclock/mbgclock_main.c
index 7eced2c..61d0bf4 100755
--- a/mbgclock/mbgclock_main.c
+++ b/mbgclock/mbgclock_main.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgclock_main.c 1.1.1.13 2011/11/01 09:08:33 martin TRASH $
+ * $Id: mbgclock_main.c 1.1.1.13 2011/11/01 09:08:33 martin TEST $
*
* Description:
* Main file for for mbgclock driver to support Meinberg bus level
diff --git a/mbgfasttstamp/Makefile b/mbgfasttstamp/Makefile
index e46181a..0ff4574 100755
--- a/mbgfasttstamp/Makefile
+++ b/mbgfasttstamp/Makefile
@@ -1,7 +1,7 @@
#########################################################################
#
-# $Id: Makefile 1.2.1.3 2011/11/23 17:58:59 martin TRASH $
+# $Id: Makefile 1.2.1.3 2011/11/23 17:58:59 martin TEST $
#
# Description:
# Makefile for mbgfasttstamp.
diff --git a/mbgfasttstamp/mbgfasttstamp.c b/mbgfasttstamp/mbgfasttstamp.c
index 360d5dc..46273bc 100755
--- a/mbgfasttstamp/mbgfasttstamp.c
+++ b/mbgfasttstamp/mbgfasttstamp.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgfasttstamp.c 1.6.1.4 2011/09/26 16:00:51 martin TEST martin $
+ * $Id: mbgfasttstamp.c 1.6.1.5 2011/12/19 16:09:17 martin TEST $
*
* Description:
* Main file for mbgfasttstamp program which demonstrates how to access
@@ -9,6 +9,7 @@
*
* -----------------------------------------------------------------------
* $Log: mbgfasttstamp.c $
+ * Revision 1.6.1.5 2011/12/19 16:09:17 martin
* Revision 1.6.1.4 2011/09/26 16:00:51 martin
* Modified program version handling.
* Account for modified library functions which can now
@@ -269,7 +270,7 @@ int main( int argc, char *argv[] )
return 1;
#endif
- #if !defined( MBG_PC_CYCLES_SUPPORTED )
+ #if !MBG_PC_CYCLES_SUPPORTED
printf( "** Warning: No cycles support to compute real latencies on this platform!\n" );
if ( !read_raw )
diff --git a/mbghrtime/mbghrtime.c b/mbghrtime/mbghrtime.c
index 9ff82d0..698e4d2 100755
--- a/mbghrtime/mbghrtime.c
+++ b/mbghrtime/mbghrtime.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbghrtime.c 1.11.1.8 2011/09/29 16:28:34 martin TEST martin $
+ * $Id: mbghrtime.c 1.11.1.9 2011/12/19 16:13:46 martin TEST $
*
* Description:
* Main file for mbghrtime program which demonstrates how to access
@@ -10,6 +10,7 @@
*
* -----------------------------------------------------------------------
* $Log: mbghrtime.c $
+ * Revision 1.11.1.9 2011/12/19 16:13:46 martin
* Revision 1.11.1.8 2011/09/29 16:28:34 martin
* New options -s, -u, -v.
* Print time using new function mbg_print_hr_time().
@@ -299,7 +300,7 @@ int main( int argc, char *argv[] )
}
- #if !defined( MBG_PC_CYCLES_SUPPORTED )
+ #if !MBG_PC_CYCLES_SUPPORTED
printf( "** Warning: No cycles support to compute real latencies on this platform!\n" );
if ( !read_raw )
diff --git a/mbglib/common/gpsdefs.h b/mbglib/common/gpsdefs.h
index 5c1d023..6d49cf8 100755
--- a/mbglib/common/gpsdefs.h
+++ b/mbglib/common/gpsdefs.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: gpsdefs.h 1.98 2011/11/25 14:58:34 martin REL_M $
+ * $Id: gpsdefs.h 1.99 2011/12/09 09:22:03 martin REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -13,6 +13,8 @@
*
* -----------------------------------------------------------------------
* $Log: gpsdefs.h $
+ * Revision 1.99 2011/12/09 09:22:03 martin
+ * Fixed a typo.
* Revision 1.98 2011/11/25 14:58:34 martin
* Renamed some evt_log definitions.
* Revision 1.97 2011/11/25 10:11:17 martin
@@ -2761,7 +2763,7 @@ typedef struct
#define _mbg_swab_cal_rec_irig_rx_comp( _p ) \
{ \
_mbg_swab_cal_rec_hdr( &(_p)->hdr ); \
- _mbg_swab_irig_rx_comp( &(_p)->comp_datam ); \
+ _mbg_swab_irig_rx_comp( &(_p)->comp_data ); \
}
/** @} group_irig_comp */
diff --git a/mbglib/common/lan_util.c b/mbglib/common/lan_util.c
index 8d31493..4e4d82f 100755
--- a/mbglib/common/lan_util.c
+++ b/mbglib/common/lan_util.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: lan_util.c 1.1.1.13 2011/09/20 16:14:03 martin TEST $
+ * $Id: lan_util.c 1.1.1.13 2011/09/20 16:14:03 martin TEST martin $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/macioctl.h b/mbglib/common/macioctl.h
index 40b89ac..cba3f79 100755
--- a/mbglib/common/macioctl.h
+++ b/mbglib/common/macioctl.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: macioctl.h 1.33.1.31 2011/11/25 15:03:17 martin TRASH $
+ * $Id: macioctl.h 1.33.1.31 2011/11/25 15:03:17 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/mbgddmsg.h b/mbglib/common/mbgddmsg.h
index 7540a57..41afbd0 100755
--- a/mbglib/common/mbgddmsg.h
+++ b/mbglib/common/mbgddmsg.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgddmsg.h 1.9.1.2 2011/11/01 09:08:48 martin TRASH $
+ * $Id: mbgddmsg.h 1.9.1.2 2011/11/01 09:08:48 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/mbgdevio.c b/mbglib/common/mbgdevio.c
index 53a6ca3..d556fd1 100755
--- a/mbglib/common/mbgdevio.c
+++ b/mbglib/common/mbgdevio.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgdevio.c 1.35.1.29 2011/11/25 15:03:19 martin TRASH $
+ * $Id: mbgdevio.c 1.35.1.29 2011/11/25 15:03:19 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/mbgdevio.h b/mbglib/common/mbgdevio.h
index 4a6aadb..24a312c 100755
--- a/mbglib/common/mbgdevio.h
+++ b/mbglib/common/mbgdevio.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgdevio.h 1.39.1.25 2011/11/25 15:03:22 martin TRASH $
+ * $Id: mbgdevio.h 1.39.1.25 2011/11/25 15:03:22 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/mbgioctl.h b/mbglib/common/mbgioctl.h
index 75afd00..16e1f7f 100755
--- a/mbglib/common/mbgioctl.h
+++ b/mbglib/common/mbgioctl.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgioctl.h 1.24.1.12 2011/11/25 15:03:23 martin TRASH $
+ * $Id: mbgioctl.h 1.24.1.12 2011/11/25 15:03:23 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/mbgmutex.h b/mbglib/common/mbgmutex.h
index d64f74f..41212d1 100755
--- a/mbglib/common/mbgmutex.h
+++ b/mbglib/common/mbgmutex.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgmutex.h 1.1.1.7 2011/10/21 14:08:30 martin TRASH $
+ * $Id: mbgmutex.h 1.1.1.7 2011/10/21 14:08:30 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/mbgpccyc.h b/mbglib/common/mbgpccyc.h
index a6563e9..3b40c88 100755
--- a/mbglib/common/mbgpccyc.h
+++ b/mbglib/common/mbgpccyc.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgpccyc.h 1.1.1.5 2011/09/21 14:25:39 martin TEST $
+ * $Id: mbgpccyc.h 1.1.1.6 2011/12/19 16:14:13 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -10,6 +10,7 @@
*
* -----------------------------------------------------------------------
* $Log: mbgpccyc.h $
+ * Revision 1.1.1.6 2011/12/19 16:14:13 martin
* Revision 1.1.1.5 2011/09/21 14:25:39 martin
* Use get_cycles() in Linux kernel mode if no special cycles support
* is provided for the given hardware platform.
@@ -51,7 +52,6 @@
#if defined( MBG_TGT_LINUX )
#if defined( MBG_ARCH_IA64 ) && defined( MBG_TGT_KERNEL )
#include <asm/ia64regs.h>
- #include <asm/intel_intrin.h>
#endif
#endif
@@ -156,6 +156,8 @@
static __mbg_inline
void mbg_get_pc_cycles( MBG_PC_CYCLES *p )
{
+#if !defined( OMIT_PC_CYCLES_SUPPORT )
+
#if defined( MBG_TGT_WIN32 )
#if defined( MBG_TGT_KERNEL ) // kernel space
@@ -204,9 +206,15 @@ void mbg_get_pc_cycles( MBG_PC_CYCLES *p )
#define MBG_PC_CYCLES_SUPPORTED 1
- #else
+ #endif
+
+#endif
+
+
+ #if !defined( MBG_PC_CYCLES_SUPPORTED )
*p = 0;
+ #define MBG_PC_CYCLES_SUPPORTED 0
#endif
@@ -262,7 +270,7 @@ void mbg_get_pc_cycles_frequency( MBG_PC_CYCLES_FREQUENCY *p )
static __mbg_inline
MBG_PC_CYCLES mbg_delta_pc_cycles( const MBG_PC_CYCLES *p1, const MBG_PC_CYCLES *p2 )
{
-#if 0 && !defined( MBG_PC_CYCLES_SUPPORTED ) //##+++++++++++++++++
+#if 0 && !MBG_PC_CYCLES_SUPPORTED
// Cycle counts not supported on this target platform.
// Under SPARC this may even result in bus errors
// due to alignment of the underlying data structures.
diff --git a/mbglib/common/mbgtime.h b/mbglib/common/mbgtime.h
index 5ee780c..7dde395 100755
--- a/mbglib/common/mbgtime.h
+++ b/mbglib/common/mbgtime.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgtime.h 1.17.1.7 2011/10/21 14:07:52 martin TRASH $
+ * $Id: mbgtime.h 1.17.1.7 2011/10/21 14:07:52 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/pcpsdev.h b/mbglib/common/pcpsdev.h
index 41d9dc8..43e5423 100755
--- a/mbglib/common/pcpsdev.h
+++ b/mbglib/common/pcpsdev.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: pcpsdev.h 1.49.1.68 2011/11/28 10:04:39 martin TRASH $
+ * $Id: pcpsdev.h 1.49.1.68 2011/11/28 10:04:39 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/pcpsdrvr.c b/mbglib/common/pcpsdrvr.c
index a67084d..cda390d 100755
--- a/mbglib/common/pcpsdrvr.c
+++ b/mbglib/common/pcpsdrvr.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: pcpsdrvr.c 1.46.2.59 2011/11/25 15:13:01 martin REL_M $
+ * $Id: pcpsdrvr.c 1.46.2.60 2011/12/20 11:32:16 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -63,6 +63,8 @@
*
* -----------------------------------------------------------------------
* $Log: pcpsdrvr.c $
+ * Revision 1.46.2.60 2011/12/20 11:32:16 martin
+ * Removed obsolete code.
* Revision 1.46.2.59 2011/11/25 15:13:01 martin
* Support on-board event log.
* Revision 1.46.2.58 2011/11/23 17:47:33 martin
@@ -431,8 +433,6 @@
#define DEBUG_SERNUM ( defined( DEBUG ) && ( DEBUG >= DEBUG_LVL_SERNUM ) )
#endif
-#define _PCPS_USE_MM_IO ( 0 && MBG_TGT_SUPP_MEM_ACC && !MBG_USE_MM_IO_FOR_PCI )
-
extern const char pcps_driver_name[];
@@ -786,32 +786,7 @@ int pcps_wait_busy( PCPS_DDEV *pddev ) __attribute__((always_inline));
__mbg_inline /*HDR*/
int pcps_wait_busy( PCPS_DDEV *pddev )
{
-#if _PCPS_USE_MM_IO
-
-#if 0
-#define _pcps_ddev_read_status_port( _d ) \
- ( _pcps_ddev_is_pci_mbgpex( _d ) ? \
- ( (_d)->mm_addr->mbgpex.asic.status_port ) : \
- _mbg_inp8( (_d), 0, (_d)->status_port ) )
-#elif 0
- uint32_t st = _pcps_ddev_is_pci_mbgpex( pddev ) ?
- pddev->mm_addr->mbgpex.asic.status_port :
- _pcps_ddev_read_status_port( pddev );
-
- if ( st & PCPS_ST_BUSY )
-#else
- uint32_t st;
- if ( _pcps_ddev_is_pci_mbgpex( pddev ) )
- st = pddev->mm_addr->mbgpex.asic.status_port.ul;
- else
- st = _pcps_ddev_read_status_port( pddev );
-
- if ( st & PCPS_ST_BUSY )
-#endif
-
-#else
if ( _pcps_ddev_status_busy( pddev ) )
-#endif
{
#if defined( MBG_TGT_BSD )
struct timeval tv_start;
diff --git a/mbglib/common/pcpsdrvr.h b/mbglib/common/pcpsdrvr.h
index 744f82e..c2b5ee4 100755
--- a/mbglib/common/pcpsdrvr.h
+++ b/mbglib/common/pcpsdrvr.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: pcpsdrvr.h 1.41.1.39 2011/11/25 15:03:24 martin TRASH $
+ * $Id: pcpsdrvr.h 1.41.1.41 2011/12/20 13:58:43 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -10,6 +10,9 @@
*
* -----------------------------------------------------------------------
* $Log: pcpsdrvr.h $
+ * Revision 1.41.1.41 2011/12/20 13:58:43 martin
+ * Revision 1.41.1.40 2011/12/20 11:31:42Z martin
+ * Conditionally support memory mapped access for MBGPEX cards.
* Revision 1.41.1.39 2011/11/25 15:03:24 martin
* Support on-board event logs.
* Revision 1.41.1.38 2011/11/22 16:27:47 martin
@@ -495,6 +498,34 @@
extern "C" {
#endif
+#define _PCPS_USE_MM_IO ( 1 && MBG_TGT_SUPP_MEM_ACC && !MBG_USE_MM_IO_FOR_PCI )
+
+#if _PCPS_USE_MM_IO
+
+ #define _mbg_inp32_ex( _d, _i, _p, _r ) \
+ ( _pcps_ddev_is_pci_mbgpex( _d ) ? \
+ (_d)->mm_addr->mbgpex.asic.control_status.ul : \
+ _mbg_inp32( (_d), (_i), (_p) ) \
+ )
+
+ #define _mbg_outp32_ex( _d, _i, _p, _r, _v ) \
+ do \
+ { \
+ if ( _pcps_ddev_is_pci_mbgpex( _d ) ) \
+ (_d)->mm_addr->mbgpex.asic.control_status.ul = (_v); \
+ else \
+ _mbg_outp32( _d, _i, _p, _v ); \
+ } while ( 0 )
+
+#else
+
+ #define _mbg_inp32_ex( _d, _i, _p, _r ) _mbg_inp32( _d, _i, _p )
+ #define _mbg_outp32_ex( _d, _i, _p, _r, _v ) _mbg_outp32( _d, _i, _p, _v )
+
+#endif
+
+
+
// Define some OS-specific primitives to alloc / free memory and handle
// mutexes and spinlocks in kernel space.
@@ -1314,8 +1345,21 @@ _ext const char *fw_id_ref[]
// The macro below reads a device's status port which includes
// the BUSY flag and the modulation signal of DCF77 receivers.
// The macro takes a (PCPS_DDEV *) as argument.
-#define _pcps_ddev_read_status_port( _d ) \
- _mbg_inp8( (_d), 0, (_d)->status_port )
+#if _PCPS_USE_MM_IO
+
+ #define _pcps_ddev_read_status_port( _d ) \
+ ( _pcps_ddev_is_pci_mbgpex( _d ) ? \
+ (uint8_t) (_d)->mm_addr->mbgpex.asic.status_port.ul : \
+ _mbg_inp8( (_d), 0, (_d)->status_port ) \
+ )
+
+#else
+
+ #define _pcps_ddev_read_status_port( _d ) \
+ _mbg_inp8( (_d), 0, (_d)->status_port )
+
+#endif
+
#define _pcps_ddev_status_busy( _d ) \
( _pcps_ddev_read_status_port( pddev ) & PCPS_ST_BUSY )
diff --git a/mbglib/common/pcpsirq.h b/mbglib/common/pcpsirq.h
index d2c2853..7b4f137 100755
--- a/mbglib/common/pcpsirq.h
+++ b/mbglib/common/pcpsirq.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: pcpsirq.h 1.7.1.2 2011/06/29 11:03:28 martin TEST $
+ * $Id: pcpsirq.h 1.7.1.3 2011/12/20 13:46:07 martin TEST $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -11,6 +11,8 @@
*
* -----------------------------------------------------------------------
* $Log: pcpsirq.h $
+ * Revision 1.7.1.3 2011/12/20 13:46:07 martin
+ * Conditionally support memory mapped access for MBGPEX cards.
* Revision 1.7.1.2 2011/06/29 11:03:28 martin
* Updated a comment.
* Revision 1.7.1.1 2011/02/09 17:22:36 martin
@@ -44,13 +46,6 @@
#include <pci_asic.h>
-#define _set_port_bit( _d, _adr, _msk ) \
- _mbg_outp8( (_d), 0, _adr, _mbg_inp8( (_d), 0, _adr ) | (_msk) )
-
-#define _clear_port_bit( _d, _adr, _msk ) \
- _mbg_outp8( (_d), 0, _adr, _mbg_inp8( (_d), 0, _adr ) & ~(_msk) )
-
-
// Each of the macros below expects a parameter _d which is
// a pointer to the PCPS_DDEV structure which represents the
// hardware device.
@@ -58,6 +53,12 @@
// The macros below generate code only if MCA support is enabled.
#if _PCPS_USE_MCA
+ #define _set_mca_port_bit( _d, _adr, _msk ) \
+ _mbg_outp8( (_d), 0, _adr, _mbg_inp8( (_d), 0, _adr ) | (_msk) )
+
+ #define _clear_mca_port_bit( _d, _adr, _msk ) \
+ _mbg_outp8( (_d), 0, _adr, _mbg_inp8( (_d), 0, _adr ) & ~(_msk) )
+
#define MCIC_IRQ 0x04
#define _mcic_enb_reg( _r ) ( (_r) + 0x0A )
#define _mcic_ack_reg( _r ) ( (_r) + 0x0B )
@@ -71,7 +72,7 @@
if ( _pcps_ddev_is_mca( _d ) ) \
{ \
PCPS_IO_ADDR_MAPPED port = _mcic_ack_reg( _pcps_ddev_io_base_mapped( _d, 0 ) ); \
- _set_port_bit( (_d), port, MCIC_IRQ ); \
+ _set_mca_port_bit( (_d), port, MCIC_IRQ ); \
}
// In IRQ init function, enable IRQ on the
@@ -81,7 +82,7 @@
{ \
uint16_t port = _mcic_enb_reg( _pcps_ddev_io_base_mapped( _d, 0 ) ); \
set_pos_reg( 4, _pcps_ddev_slot_num( _d ), active_irq.map_code ); \
- _set_port_bit( (_d), port, MCIC_IRQ ); \
+ _set_mca_port_bit( (_d), port, MCIC_IRQ ); \
}
// In IRQ de-init function, disable IRQ on the
@@ -90,15 +91,15 @@
if ( _pcps_ddev_is_mca( _d ) ) \
{ \
uint16_t port = _mcic_enb_reg( _pcps_ddev_io_base_mapped( _d, 0 ) ); \
- _clear_port_bit( (_d), port, MCIC_IRQ ); \
+ _clear_mca_port_bit( (_d), port, MCIC_IRQ ); \
}
#else
// Do nothing if MCA not supported.
- #define _pcps_ddev_enb_irq_mca( _d );
- #define _pcps_ddev_disb_irq_mca( _d );
- #define _pcps_ddev_ack_irq_mca( _d );
+ #define _pcps_ddev_enb_irq_mca( _d ) _nop_macro_fnc()
+ #define _pcps_ddev_disb_irq_mca( _d ) _nop_macro_fnc()
+ #define _pcps_ddev_ack_irq_mca( _d ) _nop_macro_fnc()
#endif
@@ -120,34 +121,37 @@
_mbg_inp32( (_d), 0, _pcps_ddev_io_base_mapped( _d, 0 ) \
+ AMCC_OP_REG_IMB4 ); \
\
- _mbg_outp32( (_d), 0, (_d)->irq_ack_port, (_d)->irq_ack_mask ); \
+ _mbg_outp32_ex( (_d), 0, (_d)->irq_ack_port, control_status, \
+ (_d)->irq_ack_mask ); \
}
// In IRQ init function, enable IRQ on the
// interface chip.
- #define _pcps_ddev_enb_irq_pci( _d ) \
- if ( (_d)->irq_enb_mask ) \
- { \
- uint32_t intcsr = _mbg_inp32_to_cpu( (_d), 0, (_d)->irq_enb_disb_port ); \
- _mbg_outp32( (_d), 0, (_d)->irq_enb_disb_port, \
- intcsr | (_d)->irq_enb_mask ); \
+ #define _pcps_ddev_enb_irq_pci( _d ) \
+ if ( (_d)->irq_enb_mask ) \
+ { \
+ uint32_t intcsr = _mbg32_to_cpu( _mbg_inp32_ex( (_d), 0, \
+ (_d)->irq_enb_disb_port, control_status ) ); \
+ _mbg_outp32_ex( (_d), 0, (_d)->irq_enb_disb_port, control_status, \
+ intcsr | (_d)->irq_enb_mask ); \
}
// In IRQ de-init function, disable IRQ on the
// interface chip.
- #define _pcps_ddev_disb_irq_pci( _d ) \
- if ( (_d)->irq_disb_mask ) \
- { \
- uint32_t intcsr = _mbg_inp32_to_cpu( (_d), 0, (_d)->irq_enb_disb_port ); \
- _mbg_outp32( (_d), 0, (_d)->irq_enb_disb_port, \
- intcsr & ~(_d)->irq_disb_mask ); \
+ #define _pcps_ddev_disb_irq_pci( _d ) \
+ if ( (_d)->irq_disb_mask ) \
+ { \
+ uint32_t intcsr = _mbg32_to_cpu( _mbg_inp32_ex( (_d), 0, \
+ (_d)->irq_enb_disb_port, control_status ) ); \
+ _mbg_outp32_ex( (_d), 0, (_d)->irq_enb_disb_port, control_status, \
+ intcsr & ~(_d)->irq_disb_mask ); \
}
#else
// Do nothing if PCI not supported.
- #define _pcps_ddev_enb_irq_pci( _d );
- #define _pcps_ddev_disb_irq_pci( _d );
- #define _pcps_ddev_ack_irq_pci( _d );
+ #define _pcps_ddev_enb_irq_pci( _d ) _nop_macro_fnc()
+ #define _pcps_ddev_disb_irq_pci( _d ) _nop_macro_fnc()
+ #define _pcps_ddev_ack_irq_pci( _d ) _nop_macro_fnc()
#endif
@@ -158,10 +162,10 @@
// For non-PCI devices check the IRQ flag of the clock's
// status port.
#if ( _PCPS_USE_PCI )
- #define _pcps_ddev_has_gen_irq( _d ) \
- ( ( (_d)->irq_flag_mask ) ? \
- ( _mbg_inp32( (_d), 0, (_d)->irq_flag_port ) & (_d)->irq_flag_mask ) : \
- ( _pcps_ddev_read_status_port( _d ) & PCPS_ST_IRQF ) \
+ #define _pcps_ddev_has_gen_irq( _d ) \
+ ( ( (_d)->irq_flag_mask ) ? \
+ ( _mbg_inp32_ex( (_d), 0, (_d)->irq_flag_port, control_status ) & (_d)->irq_flag_mask ) : \
+ ( _pcps_ddev_read_status_port( _d ) & PCPS_ST_IRQF ) \
)
#else
diff --git a/mbglib/common/toolutil.c b/mbglib/common/toolutil.c
index e6e3f75..55d7ae7 100755
--- a/mbglib/common/toolutil.c
+++ b/mbglib/common/toolutil.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: toolutil.c 1.3.2.12 2011/11/03 08:54:08 martin TRASH $
+ * $Id: toolutil.c 1.3.2.12 2011/11/03 08:54:08 martin TEST $
*
* Description:
* Common functions which can be used with Meinberg command line
diff --git a/mbgstatus/mbgstatus.c b/mbgstatus/mbgstatus.c
index f04a263..c1f264e 100755
--- a/mbgstatus/mbgstatus.c
+++ b/mbgstatus/mbgstatus.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgstatus.c 1.13.1.19 2011/10/28 13:46:14 martin TRASH $
+ * $Id: mbgstatus.c 1.13.1.19 2011/10/28 13:46:14 martin TEST $
*
* Description:
* Main file for mbgstatus program which demonstrates how to
diff --git a/mbgsvcd/mbgsvcd.c b/mbgsvcd/mbgsvcd.c
index 5685a29..8b1ea22 100755
--- a/mbgsvcd/mbgsvcd.c
+++ b/mbgsvcd/mbgsvcd.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgsvcd.c 1.3.1.14 2011/11/17 10:07:08 martin TRASH daniel $
+ * $Id: mbgsvcd.c 1.3.1.14 2011/11/17 10:07:08 martin TEST daniel $
*
* Description:
* Main file for mbgsvcd which compares the system time to a PCI card's