source: rtems/c/src/lib/libchip/serial/mc68681.c @ 009c235

4.104.114.84.95
Last change on this file since 009c235 was 009c235, checked in by Joel Sherrill <joel.sherrill@…>, on 07/28/98 at 21:18:17

Corrected spacing.

  • Property mode set to 100644
File size: 18.4 KB
Line 
1/*
2 *  This file contains the termios TTY driver for the Motorola MC68681.
3 *
4 *  This part is available from a number of secondary sources.
5 *  In particular, we know about the following:
6 *
7 *     + Exar 88c681 and 68c681
8 *
9 *  COPYRIGHT (c) 1989-1998.
10 *  On-Line Applications Research Corporation (OAR).
11 *  Copyright assigned to U.S. Government, 1994.
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.OARcorp.com/rtems/license.html.
16 *
17 *  $Id$
18 */
19
20#include <rtems.h>
21#include <rtems/libio.h>
22#include <stdlib.h>
23
24#include <libchip/serial.h>
25#include <libchip/mc68681.h>
26#include "sersupp.h"
27#include "mc68681_p.h"
28
29/*
30 * Flow control is only supported when using interrupts
31 */
32
33console_fns mc68681_fns =
34{
35  libchip_serial_default_probe,   /* deviceProbe */
36  mc68681_open,                   /* deviceFirstOpen */
37  NULL,                           /* deviceLastClose */
38  NULL,                           /* deviceRead */
39  mc68681_write_support_int,      /* deviceWrite */
40  mc68681_initialize_interrupts,  /* deviceInitialize */
41  mc68681_write_polled,           /* deviceWritePolled */
42  mc68681_set_attributes,         /* deviceSetAttributes */
43  TRUE                            /* deviceOutputUsesInterrupts */
44};
45
46console_fns mc68681_fns_polled =
47{
48  libchip_serial_default_probe,        /* deviceProbe */
49  mc68681_open,                        /* deviceFirstOpen */
50  mc68681_close,                       /* deviceLastClose */
51  mc68681_inbyte_nonblocking_polled,   /* deviceRead */
52  mc68681_write_support_polled,        /* deviceWrite */
53  mc68681_init,                        /* deviceInitialize */
54  mc68681_write_polled,                /* deviceWritePolled */
55  mc68681_set_attributes,              /* deviceSetAttributes */
56  FALSE,                               /* deviceOutputUsesInterrupts */
57};
58
59extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
60
61/*
62 *  Console Device Driver Entry Points
63 */
64
65/*
66 *  mc68681_baud_rate
67 *
68 *  This routine returns the proper ACR bit and baud rate field values
69 *  based on the requested baud rate.  The baud rate set to be used
70 *  must be configured by the user.
71 */
72
73MC68681_STATIC int mc68681_baud_rate(
74  int           minor,
75  int           baud,
76  unsigned int *baud_mask_p,
77  unsigned int *acr_bit_p,
78  unsigned int *command
79);
80
81/*
82 *  mc68681_set_attributes
83 *
84 *  This function sets the DUART channel to reflect the requested termios
85 *  port settings.
86 */
87
88MC68681_STATIC int mc68681_set_attributes(
89  int minor,
90  const struct termios *t
91)
92{
93  unsigned32             pMC68681_port;
94  unsigned32             pMC68681;
95  unsigned int           mode1;
96  unsigned int           mode2;
97  unsigned int           baud_mask;
98  unsigned int           acr_bit;
99  unsigned int           cmd;
100  setRegister_f          setReg;
101  rtems_interrupt_level  Irql;
102
103  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort1;
104  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
105  setReg        = Console_Port_Tbl[minor].setRegister;
106
107  /*
108   *  Set the baud rate
109   */
110
111  if (mc68681_baud_rate( minor, t->c_cflag, &baud_mask, &acr_bit, &cmd ) == -1)
112    return -1;
113
114  baud_mask |=  baud_mask << 4;
115  acr_bit   <<= 7;
116
117  /*
118   *  Parity
119   */
120
121  mode1 = 0;
122  mode2 = 0;
123
124  if (t->c_cflag & PARENB) {
125    if (t->c_cflag & PARODD)
126      mode1 |= 0x04;
127    else
128      mode1 |= 0x04;
129  } else {
130   mode1 |= 0x10;
131  }
132
133  /*
134   *  Character Size
135   */
136
137  if (t->c_cflag & CSIZE) {
138    switch (t->c_cflag & CSIZE) {
139      case CS5:  break;
140      case CS6:  mode1 |= 0x01;  break;
141      case CS7:  mode1 |= 0x02;  break;
142      case CS8:  mode1 |= 0x03;  break;
143    }
144  } else {
145    mode1 |= 0x03;       /* default to 9600,8,N,1 */
146  }
147
148  /*
149   *  Stop Bits
150   */
151 
152  if (t->c_cflag & CSTOPB) {
153    mode2 |= 0x07;                      /* 2 stop bits */
154  } else {
155    if ((t->c_cflag & CSIZE) == CS5)    /* CS5 and 2 stop bits not supported */
156      return -1;
157    mode2 |= 0x0F;                      /* 1 stop bit */
158  }
159
160  rtems_interrupt_disable(Irql);
161    (*setReg)( pMC68681, MC68681_AUX_CTRL_REG, acr_bit );
162    (*setReg)( pMC68681_port, MC68681_CLOCK_SELECT, baud_mask );
163    if ( cmd ) {
164      (*setReg)( pMC68681_port, MC68681_COMMAND, cmd );         /* RX */
165      (*setReg)( pMC68681_port, MC68681_COMMAND, cmd | 0x20 );  /* TX */
166    }
167    (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_MR_PTR );
168    (*setReg)( pMC68681_port, MC68681_MODE, mode1 );
169    (*setReg)( pMC68681_port, MC68681_MODE, mode2 );
170  rtems_interrupt_enable(Irql);
171  return 0;
172}
173
174/*
175 *  mc68681_initialize_context
176 *
177 *  This function sets the default values of the per port context structure.
178 */
179
180MC68681_STATIC void mc68681_initialize_context(
181  int               minor,
182  mc68681_context  *pmc68681Context
183)
184{
185  int          port;
186  unsigned int pMC68681;
187  unsigned int pMC68681_port;
188 
189  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort1;
190  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
191
192  pmc68681Context->mate = -1;
193
194  for (port=0 ; port<Console_Port_Count ; port++ ) {
195    if ( Console_Port_Tbl[port].ulCtrlPort1 == pMC68681 &&
196         Console_Port_Tbl[port].ulCtrlPort2 != pMC68681_port ) {
197      pmc68681Context->mate = port;
198      pmc68681Context->imr  = 0;
199      break;
200    }
201  }
202
203}
204
205/*
206 *  mc68681_init
207 *
208 *  This function initializes the DUART to a quiecsent state.
209 */
210
211MC68681_STATIC void mc68681_init(int minor)
212{
213  unsigned32              pMC68681_port;
214  unsigned32              pMC68681;
215  mc68681_context        *pmc68681Context;
216  setRegister_f           setReg;
217  getRegister_f           getReg;
218
219  pmc68681Context = (mc68681_context *) malloc(sizeof(mc68681_context));
220
221  Console_Port_Data[minor].pDeviceContext = (void *)pmc68681Context;
222
223  mc68681_initialize_context( minor, pmc68681Context );
224
225  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort1;
226  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
227  setReg        = Console_Port_Tbl[minor].setRegister;
228  getReg        = Console_Port_Tbl[minor].getRegister;
229
230  /*
231   *  Reset everything and leave this port disabled.
232   */
233
234  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_RX );
235  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_TX );
236  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_ERROR );
237  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_BREAK );
238  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_STOP_BREAK );
239  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_TX );
240  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_RX );
241
242
243  (*setReg)( pMC68681_port, MC68681_MODE_REG_1A, 0x00 );
244  (*setReg)( pMC68681_port, MC68681_MODE_REG_2A, 0x02 );
245
246  /*
247   *  Disable interrupts on RX and TX for this port
248   */
249
250  mc68681_enable_interrupts( minor, MC68681_IMR_DISABLE_ALL );
251}
252
253/*
254 *  mc68681_open
255 *
256 *  This function opens a port for communication.
257 *
258 *  Default state is 9600 baud, 8 bits, No parity, and 1 stop bit.
259 */
260
261MC68681_STATIC int mc68681_open(
262  int      major,
263  int      minor,
264  void    *arg
265)
266{
267  unsigned32             pMC68681;
268  unsigned32             pMC68681_port;
269  unsigned int           baud;
270  unsigned int           acr;
271  unsigned int           vector;
272  unsigned int           command;
273  rtems_interrupt_level  Irql;
274  setRegister_f          setReg;
275
276  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort1;
277  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
278  setReg        = Console_Port_Tbl[minor].setRegister;
279  vector        = Console_Port_Tbl[minor].ulIntVector;
280
281  /* XXX default baud rate should be from configuration table */
282
283  (void) mc68681_baud_rate( minor, B9600, &baud, &acr, &command );
284
285  /*
286   *  Set the DUART channel to a default useable state
287   */
288
289  rtems_interrupt_disable(Irql);
290    (*setReg)( pMC68681, MC68681_AUX_CTRL_REG, acr );
291    (*setReg)( pMC68681_port, MC68681_CLOCK_SELECT, baud );
292    if ( command ) {
293      (*setReg)( pMC68681_port, MC68681_COMMAND, command );         /* RX */
294      (*setReg)( pMC68681_port, MC68681_COMMAND, command | 0x20 );  /* TX */
295    }
296    (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_MR_PTR );
297    (*setReg)( pMC68681_port, MC68681_MODE, 0x13 );
298    (*setReg)( pMC68681_port, MC68681_MODE, 0x07 );
299  rtems_interrupt_enable(Irql);
300
301  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_ENABLE_TX );
302  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_ENABLE_RX );
303
304  (*setReg)( pMC68681, MC68681_INTERRUPT_VECTOR_REG, vector );
305
306  return RTEMS_SUCCESSFUL;
307}
308
309/*
310 *  mc68681_close
311 *
312 *  This function shuts down the requested port.
313 */
314
315MC68681_STATIC int mc68681_close(
316  int      major,
317  int      minor,
318  void    *arg
319)
320{
321  unsigned32      pMC68681;
322  unsigned32      pMC68681_port;
323  setRegister_f   setReg;
324
325  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort1;
326  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
327  setReg        = Console_Port_Tbl[minor].setRegister;
328
329  /*
330   *  Disable interrupts from this channel and then disable it totally.
331   */
332
333  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_TX );
334  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_RX );
335
336  return(RTEMS_SUCCESSFUL);
337}
338
339/*
340 *  mc68681_write_polled
341 *
342 *  This routine polls out the requested character.
343 */
344
345MC68681_STATIC void mc68681_write_polled(
346  int   minor,
347  char  cChar
348)
349{
350  unsigned32              pMC68681_port;
351  unsigned char           ucLineStatus;
352  int                     iTimeout;
353  getRegister_f           getReg;
354  setRegister_f           setReg;
355
356  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
357  getReg        = Console_Port_Tbl[minor].getRegister;
358  setReg        = Console_Port_Tbl[minor].setRegister;
359
360  /*
361   * wait for transmitter holding register to be empty
362   */
363  iTimeout = 1000;
364  ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
365  while ((ucLineStatus & (MC68681_TX_READY|MC68681_TX_EMPTY)) == 0) {
366
367    if ((ucLineStatus & 0xF0))
368      (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_ERROR );
369
370    /*
371     * Yield while we wait
372     */
373
374     if(_System_state_Is_up(_System_state_Get())) {
375       rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
376     }
377     ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
378     if(!--iTimeout) {
379       break;
380     }
381  }
382
383  /*
384   * transmit character
385   */
386
387  (*setReg)(pMC68681_port, MC68681_TX_BUFFER, cChar);
388}
389
390/*
391 *  mc68681_isr
392 *
393 *  This is the single interrupt entry point which parcels interrupts
394 *  out to the various ports.
395 */
396
397MC68681_STATIC rtems_isr mc68681_isr(
398  rtems_vector_number vector
399)
400{
401  int     minor;
402
403  for(minor=0 ; minor<Console_Port_Count ; minor++) {
404    if(Console_Port_Tbl[minor].ulIntVector == vector &&
405       Console_Port_Tbl[minor].deviceType == SERIAL_MC68681 ) {
406      mc68681_process(minor);
407    }
408  }
409}
410
411/*
412 *  mc68681_initialize_interrupts
413 *
414 *  This routine initializes the console's receive and transmit
415 *  ring buffers and loads the appropriate vectors to handle the interrupts.
416 */
417
418MC68681_STATIC void mc68681_initialize_interrupts(int minor)
419{
420  mc68681_init(minor);
421
422  Console_Port_Data[minor].bActive = FALSE;
423
424  set_vector(mc68681_isr, Console_Port_Tbl[minor].ulIntVector, 1);
425
426  mc68681_enable_interrupts(minor,MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
427}
428
429/*
430 *  mc68681_write_support_int
431 *
432 *  Console Termios output entry point when using interrupt driven output.
433 */
434
435MC68681_STATIC int mc68681_write_support_int(
436  int         minor,
437  const char *buf,
438  int         len
439)
440{
441  unsigned32      Irql;
442  unsigned32      pMC68681_port;
443  setRegister_f   setReg;
444
445  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
446  setReg        = Console_Port_Tbl[minor].setRegister;
447
448  /*
449   *  We are using interrupt driven output and termios only sends us
450   *  one character at a time.
451   */
452
453  if ( !len )
454    return 0;
455
456  /*
457   *  Put the character out and enable interrupts if necessary.
458   */
459
460  rtems_interrupt_disable(Irql);
461    if ( Console_Port_Data[minor].bActive == FALSE ) {
462      Console_Port_Data[minor].bActive = TRUE;
463      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
464    }
465    (*setReg)(pMC68681_port, MC68681_TX_BUFFER, *buf);
466  rtems_interrupt_enable(Irql);
467
468  return 1;
469}
470
471/*
472 *  mc68681_write_support_polled
473 *
474 *  Console Termios output entry point when using polled output.
475 *
476 */
477
478MC68681_STATIC int mc68681_write_support_polled(
479  int         minor,
480  const char *buf,
481  int         len
482)
483{
484  int nwrite = 0;
485
486  /*
487   * poll each byte in the string out of the port.
488   */
489  while (nwrite < len) {
490    /*
491     * transmit character
492     */
493    mc68681_write_polled(minor, *buf++);
494    nwrite++;
495  }
496
497  /*
498   * return the number of bytes written.
499   */
500  return nwrite;
501}
502
503/*
504 *  mc68681_inbyte_nonblocking_polled
505 *
506 *  Console Termios polling input entry point.
507 */
508
509MC68681_STATIC int mc68681_inbyte_nonblocking_polled(
510  int minor
511)
512{
513  unsigned32           pMC68681_port;
514  unsigned char        ucLineStatus;
515  unsigned char        cChar;
516  getRegister_f        getReg;
517
518  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
519  getReg        = Console_Port_Tbl[minor].getRegister;
520
521  ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
522  if(ucLineStatus & MC68681_RX_READY) {
523    cChar = (*getReg)(pMC68681_port, MC68681_RX_BUFFER);
524    return (int)cChar;
525  } else {
526    return -1;
527  }
528}
529
530/*
531 *  mc68681_baud_rate
532 */
533
534MC68681_STATIC int mc68681_baud_rate(
535  int           minor,
536  int           baud,
537  unsigned int *baud_mask_p,
538  unsigned int *acr_bit_p,
539  unsigned int *command
540)
541{
542  unsigned int           baud_mask;
543  unsigned int           acr_bit;
544  int                    status;
545  int                    is_extended;
546  int                    baud_requested;
547  mc68681_baud_table_t  *baud_tbl;
548
549  baud_mask = 0;
550  acr_bit = 0;
551  status = 0;
552
553  if ( !(Console_Port_Tbl[minor].ulDataPort & MC68681_DATA_BAUD_RATE_SET_1) )
554    acr_bit = 1;
555
556  is_extended = 0;
557
558  switch (Console_Port_Tbl[minor].ulDataPort & MC68681_XBRG_MASK) {
559    case MC68681_XBRG_IGNORED:
560      *command = 0x00;
561      break;
562    case MC68681_XBRG_ENABLED:
563      *command = 0x80;
564      is_extended = 1;
565      break;
566    case MC68681_XBRG_DISABLED:
567      *command = 0x90;
568      break;
569  }
570
571  baud_requested = baud & CBAUD;
572  if (!baud_requested)
573    baud_requested = B9600;              /* default to 9600 baud */
574 
575  baud_requested = termios_baud_to_index( baud_requested );
576
577  baud_tbl = (mc68681_baud_table_t *) Console_Port_Tbl[minor].ulClock;
578  if (!baud_tbl)
579    rtems_fatal_error_occurred(RTEMS_INVALID_ADDRESS);
580
581  if ( is_extended )
582    baud_mask = (unsigned int)baud_tbl[ acr_bit + 2 ][ baud_requested ];
583  else
584    baud_mask = baud_tbl[ acr_bit ][ baud_requested ];
585
586  if ( baud_mask == MC68681_BAUD_NOT_VALID )
587    status = -1;
588
589  /*
590   *  upper nibble is receiver and lower nibble is transmitter
591   */
592
593  *baud_mask_p = (baud_mask << 4) | baud_mask;
594  *acr_bit_p   = acr_bit;
595  return status;
596}
597
598/*
599 *  mc68681_process
600 *
601 *  This routine is the per port console interrupt handler.
602 */
603
604MC68681_STATIC void mc68681_process(
605  int  minor
606)
607{
608  unsigned32              pMC68681;
609  unsigned32              pMC68681_port;
610  volatile unsigned8      ucLineStatus;
611  unsigned char           cChar;
612  getRegister_f           getReg;
613  setRegister_f           setReg;
614
615  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort1;
616  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
617  getReg        = Console_Port_Tbl[minor].getRegister;
618  setReg        = Console_Port_Tbl[minor].setRegister;
619
620  /*
621   * Deal with any received characters
622   */
623  while(TRUE) {
624    ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
625    if(!(ucLineStatus & MC68681_RX_READY)) {
626      break;
627    }
628    /*
629     *  If there is a RX error, then dump all the data.
630     */
631    if ( ucLineStatus & MC68681_RX_ERRORS ) {
632      do {
633        cChar = (*getReg)(pMC68681_port, MC68681_RX_BUFFER);
634        ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
635      } while ( ucLineStatus & MC68681_RX_READY );
636      continue;
637    }
638    cChar = (*getReg)(pMC68681_port, MC68681_RX_BUFFER);
639    rtems_termios_enqueue_raw_characters(
640      Console_Port_Data[minor].termios_data,
641      &cChar,
642      1
643    );
644  }
645
646  /*
647   *  Deal with the transmitter
648   */
649
650  ucLineStatus = (*getReg)(pMC68681, MC68681_INTERRUPT_STATUS_REG);
651  if (pMC68681 != pMC68681_port)
652    ucLineStatus >>= 4;
653
654  if(ucLineStatus & MC68681_IR_TX_READY) {
655    if (!rtems_termios_dequeue_characters(
656                Console_Port_Data[minor].termios_data, 1)) {
657      Console_Port_Data[minor].bActive = FALSE;
658      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
659    }
660  }
661
662}
663
664/*
665 *  mc68681_build_imr
666 *
667 *  This function returns the value for the interrupt mask register for this
668 *  DUART.  Since this is a shared register, we must look at the other port
669 *  on this chip to determine whether or not it is using interrupts.
670 */
671
672MC68681_STATIC unsigned int mc68681_build_imr(
673  int  minor,
674  int  enable_flag
675)
676{
677  int              mate;
678  int              is_a;
679  unsigned int     mask;
680  unsigned int     mate_mask;
681  unsigned int     pMC68681;
682  unsigned int     pMC68681_port;
683  mc68681_context *pmc68681Context;
684  mc68681_context *mateContext;
685 
686  pMC68681        = Console_Port_Tbl[minor].ulCtrlPort1;
687  pMC68681_port   = Console_Port_Tbl[minor].ulCtrlPort2;
688  pmc68681Context = (mc68681_context *) Console_Port_Data[minor].pDeviceContext;
689  mate            = pmc68681Context->mate;
690
691  mask = 0;
692  mate_mask = 0;
693
694  is_a = (pMC68681 == pMC68681_port);
695 
696  /*
697   *  If there is a mate for this port, get its IMR mask.
698   */
699
700  if ( mate != -1 ) {
701    mateContext = Console_Port_Data[mate].pDeviceContext;
702   
703    if (mateContext)
704      mate_mask = mateContext->imr;
705  }
706
707  /*
708   *  Calculate this port's IMR mask and save it in the context area.
709   */
710
711  if ( Console_Port_Tbl[minor].pDeviceFns->deviceOutputUsesInterrupts )
712    mask = enable_flag;
713
714  pmc68681Context->imr = mask;
715
716  /*
717   *  Now return the full IMR value
718   */
719
720  if (is_a)
721    return (mate_mask << 4) | mask;
722
723  return (mask << 4) | mate_mask;
724}
725
726/*
727 *  mc68681_enable_interrupts
728 *
729 *  This function initializes the hardware for this port to use interrupts.
730 */
731
732MC68681_STATIC void mc68681_enable_interrupts(
733  int minor,
734  int imr_mask
735)
736{
737  unsigned32            pMC68681;
738  setRegister_f         setReg;
739
740  pMC68681 = Console_Port_Tbl[minor].ulCtrlPort1;
741  setReg   = Console_Port_Tbl[minor].setRegister;
742
743  /*
744   *  Enable interrupts on RX and TX -- not break
745   */
746
747  (*setReg)(
748     pMC68681,
749     MC68681_INTERRUPT_MASK_REG,
750     mc68681_build_imr(minor, imr_mask)
751  );
752}
753
Note: See TracBrowser for help on using the repository browser.