source: rtems/c/src/libchip/serial/mc68681.c @ 07e91808

4.104.114.84.95
Last change on this file since 07e91808 was 749c54e, checked in by Joel Sherrill <joel.sherrill@…>, on 07/25/98 at 17:22:58

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