From 66f5ae0ce3416c8326fc94b638e6cc0f32338b32 Mon Sep 17 00:00:00 2001 From: John Winans Date: Wed, 11 Aug 1993 17:29:43 +0000 Subject: [PATCH] added reboothook stuff to force DMA off on warm boots --- src/drv/drvGpib.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/drv/drvGpib.c b/src/drv/drvGpib.c index 8d8c55a91..334331850 100644 --- a/src/drv/drvGpib.c +++ b/src/drv/drvGpib.c @@ -246,6 +246,28 @@ reportGpib(void) return(OK); } +STATIC void rebootFunc(void) +{ + int i; + int probeValue; + struct ibregs *pibregs; + + if (ibDebug) + printf("NI-GPIB driver resetting\n"); + + probeValue = D_LMR | D_SFL; + pibregs = (struct ibregs *)((unsigned int)short_base + NIGPIB_SHORT_OFF); + + for (i=0;icfg2), WRITE, 1, &probeValue); + + pibregs++; + } + taskDelay(10); + return; +} /****************************************************************************** * * Called by the iocInit processing. @@ -295,6 +317,8 @@ initGpib(void) /* When probing, send out a reset signal to reset the DMAC and the TLC */ probeValue = D_LMR | D_SFL; + rebootHookAdd(rebootFunc); + pibregs = (struct ibregs *)((unsigned int)short_base + NIGPIB_SHORT_OFF); /* Gotta do all the probing first because the 1014D's LMRs are shared :-( */ for (i=0; i