source: rtems/c/src/libchip/serial/mc68681.c @ 70502bc4

4.104.114.84.95
Last change on this file since 70502bc4 was 70502bc4, checked in by Joel Sherrill <joel.sherrill@…>, on 08/13/98 at 15:52:40

Don't disable the RX/TX on close in polled mode.

Fixed a comment.

  • 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#if 0
334  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_TX );
335  (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_RX );
336#endif
337
338  return(RTEMS_SUCCESSFUL);
339}
340
341/*
342 *  mc68681_write_polled
343 *
344 *  This routine polls out the requested character.
345 */
346
347MC68681_STATIC void mc68681_write_polled(
348  int   minor,
349  char  cChar
350)
351{
352  unsigned32              pMC68681_port;
353  unsigned char           ucLineStatus;
354  int                     iTimeout;
355  getRegister_f           getReg;
356  setRegister_f           setReg;
357
358  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
359  getReg        = Console_Port_Tbl[minor].getRegister;
360  setReg        = Console_Port_Tbl[minor].setRegister;
361
362  /*
363   * wait for transmitter holding register to be empty
364   */
365  iTimeout = 1000;
366  ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
367  while ((ucLineStatus & (MC68681_TX_READY|MC68681_TX_EMPTY)) == 0) {
368
369    if ((ucLineStatus & 0xF0))
370      (*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_RESET_ERROR );
371
372    /*
373     * Yield while we wait
374     */
375
376#if 0
377     if(_System_state_Is_up(_System_state_Get())) {
378       rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
379     }
380#endif
381     ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
382     if(!--iTimeout) {
383       break;
384     }
385  }
386
387  /*
388   * transmit character
389   */
390
391  (*setReg)(pMC68681_port, MC68681_TX_BUFFER, cChar);
392}
393
394/*
395 *  mc68681_isr
396 *
397 *  This is the single interrupt entry point which parcels interrupts
398 *  out to the various ports.
399 */
400
401MC68681_STATIC rtems_isr mc68681_isr(
402  rtems_vector_number vector
403)
404{
405  int     minor;
406
407  for(minor=0 ; minor<Console_Port_Count ; minor++) {
408    if(Console_Port_Tbl[minor].ulIntVector == vector &&
409       Console_Port_Tbl[minor].deviceType == SERIAL_MC68681 ) {
410      mc68681_process(minor);
411    }
412  }
413}
414
415/*
416 *  mc68681_initialize_interrupts
417 *
418 *  This routine initializes the console's receive and transmit
419 *  ring buffers and loads the appropriate vectors to handle the interrupts.
420 */
421
422MC68681_STATIC void mc68681_initialize_interrupts(int minor)
423{
424  mc68681_init(minor);
425
426  Console_Port_Data[minor].bActive = FALSE;
427
428  set_vector(mc68681_isr, Console_Port_Tbl[minor].ulIntVector, 1);
429
430  mc68681_enable_interrupts(minor,MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
431}
432
433/*
434 *  mc68681_write_support_int
435 *
436 *  Console Termios output entry point when using interrupt driven output.
437 */
438
439MC68681_STATIC int mc68681_write_support_int(
440  int         minor,
441  const char *buf,
442  int         len
443)
444{
445  unsigned32      Irql;
446  unsigned32      pMC68681_port;
447  setRegister_f   setReg;
448
449  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
450  setReg        = Console_Port_Tbl[minor].setRegister;
451
452  /*
453   *  We are using interrupt driven output and termios only sends us
454   *  one character at a time.
455   */
456
457  if ( !len )
458    return 0;
459
460  /*
461   *  Put the character out and enable interrupts if necessary.
462   */
463
464  rtems_interrupt_disable(Irql);
465    if ( Console_Port_Data[minor].bActive == FALSE ) {
466      Console_Port_Data[minor].bActive = TRUE;
467      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
468    }
469    (*setReg)(pMC68681_port, MC68681_TX_BUFFER, *buf);
470  rtems_interrupt_enable(Irql);
471
472  return 1;
473}
474
475/*
476 *  mc68681_write_support_polled
477 *
478 *  Console Termios output entry point when using polled output.
479 *
480 */
481
482MC68681_STATIC int mc68681_write_support_polled(
483  int         minor,
484  const char *buf,
485  int         len
486)
487{
488  int nwrite = 0;
489
490  /*
491   * poll each byte in the string out of the port.
492   */
493  while (nwrite < len) {
494    /*
495     * transmit character
496     */
497    mc68681_write_polled(minor, *buf++);
498    nwrite++;
499  }
500
501  /*
502   * return the number of bytes written.
503   */
504  return nwrite;
505}
506
507/*
508 *  mc68681_inbyte_nonblocking_polled
509 *
510 *  Console Termios polling input entry point.
511 */
512
513MC68681_STATIC int mc68681_inbyte_nonblocking_polled(
514  int minor
515)
516{
517  unsigned32           pMC68681_port;
518  unsigned char        ucLineStatus;
519  unsigned char        cChar;
520  getRegister_f        getReg;
521
522  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
523  getReg        = Console_Port_Tbl[minor].getRegister;
524
525  ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
526  if(ucLineStatus & MC68681_RX_READY) {
527    cChar = (*getReg)(pMC68681_port, MC68681_RX_BUFFER);
528    return (int)cChar;
529  } else {
530    return -1;
531  }
532}
533
534/*
535 *  mc68681_baud_rate
536 */
537
538MC68681_STATIC int mc68681_baud_rate(
539  int           minor,
540  int           baud,
541  unsigned int *baud_mask_p,
542  unsigned int *acr_bit_p,
543  unsigned int *command
544)
545{
546  unsigned int           baud_mask;
547  unsigned int           acr_bit;
548  int                    status;
549  int                    is_extended;
550  int                    baud_requested;
551  mc68681_baud_table_t  *baud_tbl;
552
553  baud_mask = 0;
554  acr_bit = 0;
555  status = 0;
556
557  if ( !(Console_Port_Tbl[minor].ulDataPort & MC68681_DATA_BAUD_RATE_SET_1) )
558    acr_bit = 1;
559
560  is_extended = 0;
561
562  switch (Console_Port_Tbl[minor].ulDataPort & MC68681_XBRG_MASK) {
563    case MC68681_XBRG_IGNORED:
564      *command = 0x00;
565      break;
566    case MC68681_XBRG_ENABLED:
567      *command = 0x80;
568      is_extended = 1;
569      break;
570    case MC68681_XBRG_DISABLED:
571      *command = 0x90;
572      break;
573  }
574
575  baud_requested = baud & CBAUD;
576  if (!baud_requested)
577    baud_requested = B9600;              /* default to 9600 baud */
578 
579  baud_requested = termios_baud_to_index( baud_requested );
580
581  baud_tbl = (mc68681_baud_table_t *) Console_Port_Tbl[minor].ulClock;
582  if (!baud_tbl)
583    rtems_fatal_error_occurred(RTEMS_INVALID_ADDRESS);
584
585  if ( is_extended )
586    baud_mask = (unsigned int)baud_tbl[ acr_bit + 2 ][ baud_requested ];
587  else
588    baud_mask = baud_tbl[ acr_bit ][ baud_requested ];
589
590  if ( baud_mask == MC68681_BAUD_NOT_VALID )
591    status = -1;
592
593  /*
594   *  upper nibble is receiver and lower nibble is transmitter
595   */
596
597  *baud_mask_p = (baud_mask << 4) | baud_mask;
598  *acr_bit_p   = acr_bit;
599  return status;
600}
601
602/*
603 *  mc68681_process
604 *
605 *  This routine is the per port console interrupt handler.
606 */
607
608MC68681_STATIC void mc68681_process(
609  int  minor
610)
611{
612  unsigned32              pMC68681;
613  unsigned32              pMC68681_port;
614  volatile unsigned8      ucLineStatus;
615  unsigned char           cChar;
616  getRegister_f           getReg;
617  setRegister_f           setReg;
618
619  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort1;
620  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort2;
621  getReg        = Console_Port_Tbl[minor].getRegister;
622  setReg        = Console_Port_Tbl[minor].setRegister;
623
624  /*
625   * Deal with any received characters
626   */
627  while(TRUE) {
628    ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
629    if(!(ucLineStatus & MC68681_RX_READY)) {
630      break;
631    }
632    /*
633     *  If there is a RX error, then dump all the data.
634     */
635    if ( ucLineStatus & MC68681_RX_ERRORS ) {
636      do {
637        cChar = (*getReg)(pMC68681_port, MC68681_RX_BUFFER);
638        ucLineStatus = (*getReg)(pMC68681_port, MC68681_STATUS);
639      } while ( ucLineStatus & MC68681_RX_READY );
640      continue;
641    }
642    cChar = (*getReg)(pMC68681_port, MC68681_RX_BUFFER);
643    rtems_termios_enqueue_raw_characters(
644      Console_Port_Data[minor].termios_data,
645      &cChar,
646      1
647    );
648  }
649
650  /*
651   *  Deal with the transmitter
652   */
653
654  ucLineStatus = (*getReg)(pMC68681, MC68681_INTERRUPT_STATUS_REG);
655  if (pMC68681 != pMC68681_port)
656    ucLineStatus >>= 4;
657
658  if(ucLineStatus & MC68681_IR_TX_READY) {
659    if (!rtems_termios_dequeue_characters(
660                Console_Port_Data[minor].termios_data, 1)) {
661      Console_Port_Data[minor].bActive = FALSE;
662      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
663    }
664  }
665
666}
667
668/*
669 *  mc68681_build_imr
670 *
671 *  This function returns the value for the interrupt mask register for this
672 *  DUART.  Since this is a shared register, we must look at the other port
673 *  on this chip to determine whether or not it is using interrupts.
674 */
675
676MC68681_STATIC unsigned int mc68681_build_imr(
677  int  minor,
678  int  enable_flag
679)
680{
681  int              mate;
682  int              is_a;
683  unsigned int     mask;
684  unsigned int     mate_mask;
685  unsigned int     pMC68681;
686  unsigned int     pMC68681_port;
687  mc68681_context *pmc68681Context;
688  mc68681_context *mateContext;
689 
690  pMC68681        = Console_Port_Tbl[minor].ulCtrlPort1;
691  pMC68681_port   = Console_Port_Tbl[minor].ulCtrlPort2;
692  pmc68681Context = (mc68681_context *) Console_Port_Data[minor].pDeviceContext;
693  mate            = pmc68681Context->mate;
694
695  mask = 0;
696  mate_mask = 0;
697
698  is_a = (pMC68681 == pMC68681_port);
699 
700  /*
701   *  If there is a mate for this port, get its IMR mask.
702   */
703
704  if ( mate != -1 ) {
705    mateContext = Console_Port_Data[mate].pDeviceContext;
706   
707    if (mateContext)
708      mate_mask = mateContext->imr;
709  }
710
711  /*
712   *  Calculate this port's IMR mask and save it in the context area.
713   */
714
715  if ( Console_Port_Tbl[minor].pDeviceFns->deviceOutputUsesInterrupts )
716    mask = enable_flag;
717
718  pmc68681Context->imr = mask;
719
720  /*
721   *  Now return the full IMR value
722   */
723
724  if (is_a)
725    return (mate_mask << 4) | mask;
726
727  return (mask << 4) | mate_mask;
728}
729
730/*
731 *  mc68681_enable_interrupts
732 *
733 *  This function enables specific interrupt sources on the DUART.
734 */
735
736MC68681_STATIC void mc68681_enable_interrupts(
737  int minor,
738  int imr_mask
739)
740{
741  unsigned32            pMC68681;
742  setRegister_f         setReg;
743
744  pMC68681 = Console_Port_Tbl[minor].ulCtrlPort1;
745  setReg   = Console_Port_Tbl[minor].setRegister;
746
747  /*
748   *  Enable interrupts on RX and TX -- not break
749   */
750
751  (*setReg)(
752     pMC68681,
753     MC68681_INTERRUPT_MASK_REG,
754     mc68681_build_imr(minor, imr_mask)
755  );
756}
Note: See TracBrowser for help on using the repository browser.