Changeset 7deeb16 in rtems


Ignore:
Timestamp:
Jun 22, 1998, 11:49:38 AM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
8a2d4f2b
Parents:
ab2dbd7
Message:

Added initial part of iniitialization.

Location:
c/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libchip/serial/mc68681.c

    rab2dbd7 r7deeb16  
    8585{
    8686/* XXX */
     87  unsigned32              pMC68681_port;
    8788  unsigned32              pMC68681;
    8889  unsigned8               ucTrash;
     
    103104#endif
    104105
    105   pMC68681 = Console_Port_Tbl[minor].ulCtrlPort1;
    106   setReg   = Console_Port_Tbl[minor].setRegister;
    107   getReg   = Console_Port_Tbl[minor].getRegister;
    108 
    109 #if 0
     106  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort1;
     107  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort2;
     108  setReg        = Console_Port_Tbl[minor].setRegister;
     109  getReg        = Console_Port_Tbl[minor].getRegister;
     110
     111
     112  /*
     113   *  Reset Receiver
     114   */
     115
     116  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_RX );
     117  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_RX );
     118
     119  /*
     120   *  Reset Transmitter
     121   */
     122
     123  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_TX );
     124  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_TX );
     125
     126  (*setReg)( pMC68681, MC68681_MODE_REG_1A, 0x00 );
     127  (*setReg)( pMC68681, MC68681_MODE_REG_2A, 0x02 );
     128
     129 
     130#if 0
     131  /* FOM NS16550 */
    110132  /* Clear the divisor latch, clear all interrupt enables,
    111133   * and reset and
     
    209231   */
    210232  iTimeout = 1000;
    211   ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS_REG);
     233  ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS);
    212234  while ((ucLineStatus & MC68681_TX_READY) == 0) {
    213235
     
    219241       rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
    220242     }
    221      ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS_REG);
     243     ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS);
    222244     if(!--iTimeout) {
    223245       break;
     
    645667  getData  = Console_Port_Tbl[minor].getData;
    646668
    647   ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS_REG);
     669  ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS);
    648670  if(ucLineStatus & MC68681_RX_READY) {
    649671    cChar = (*getData)(pMC68681);
  • c/src/lib/libchip/serial/mc68681.h

    rab2dbd7 r7deeb16  
    2121/*
    2222 *  These are just used in the interface between this driver and
    23  *  the read/write register routines.
     23 *  the read/write register routines when accessing the first
     24 *  control port.
    2425 */
    2526
    26 #define MC68681_STATUS_REG      0xFF
     27#define MC68681_STATUS          1
     28#define MC68681_RX_BUFFER       2
     29
     30#define MC68681_CLOCK_SELECT    1
     31#define MC68681_COMMAND         2
     32#define MC68681_TX_BUFFER       3
    2733
    2834/*
  • c/src/libchip/serial/mc68681.c

    rab2dbd7 r7deeb16  
    8585{
    8686/* XXX */
     87  unsigned32              pMC68681_port;
    8788  unsigned32              pMC68681;
    8889  unsigned8               ucTrash;
     
    103104#endif
    104105
    105   pMC68681 = Console_Port_Tbl[minor].ulCtrlPort1;
    106   setReg   = Console_Port_Tbl[minor].setRegister;
    107   getReg   = Console_Port_Tbl[minor].getRegister;
    108 
    109 #if 0
     106  pMC68681_port = Console_Port_Tbl[minor].ulCtrlPort1;
     107  pMC68681      = Console_Port_Tbl[minor].ulCtrlPort2;
     108  setReg        = Console_Port_Tbl[minor].setRegister;
     109  getReg        = Console_Port_Tbl[minor].getRegister;
     110
     111
     112  /*
     113   *  Reset Receiver
     114   */
     115
     116  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_RX );
     117  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_RX );
     118
     119  /*
     120   *  Reset Transmitter
     121   */
     122
     123  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_TX );
     124  (*setReg)( pMC68681, MC68681_COMMAND, MC68681_MODE_REG_RESET_TX );
     125
     126  (*setReg)( pMC68681, MC68681_MODE_REG_1A, 0x00 );
     127  (*setReg)( pMC68681, MC68681_MODE_REG_2A, 0x02 );
     128
     129 
     130#if 0
     131  /* FOM NS16550 */
    110132  /* Clear the divisor latch, clear all interrupt enables,
    111133   * and reset and
     
    209231   */
    210232  iTimeout = 1000;
    211   ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS_REG);
     233  ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS);
    212234  while ((ucLineStatus & MC68681_TX_READY) == 0) {
    213235
     
    219241       rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
    220242     }
    221      ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS_REG);
     243     ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS);
    222244     if(!--iTimeout) {
    223245       break;
     
    645667  getData  = Console_Port_Tbl[minor].getData;
    646668
    647   ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS_REG);
     669  ucLineStatus = (*getReg)(pMC68681, MC68681_STATUS);
    648670  if(ucLineStatus & MC68681_RX_READY) {
    649671    cChar = (*getData)(pMC68681);
  • c/src/libchip/serial/mc68681.h

    rab2dbd7 r7deeb16  
    2121/*
    2222 *  These are just used in the interface between this driver and
    23  *  the read/write register routines.
     23 *  the read/write register routines when accessing the first
     24 *  control port.
    2425 */
    2526
    26 #define MC68681_STATUS_REG      0xFF
     27#define MC68681_STATUS          1
     28#define MC68681_RX_BUFFER       2
     29
     30#define MC68681_CLOCK_SELECT    1
     31#define MC68681_COMMAND         2
     32#define MC68681_TX_BUFFER       3
    2733
    2834/*
Note: See TracChangeset for help on using the changeset viewer.