Changeset d74a92d in rtems


Ignore:
Timestamp:
Apr 16, 2001, 8:02:27 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
2cdde6d
Parents:
c9e7297
Message:

2001-04-16 Joel Sherrill <joel@…>

  • mongoosev/duart/mg5uart.c, mongoosev/duart/mg5uart.h Modifications made with Gregory Menke <gregory.menke@…> as he debugged this BSP using a logic analyzer. In particular, there was a mistake where the index not offset of registers was in the header file and the baud rate calculation was incorrect.
Location:
c/src/lib/libcpu/mips
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/mips/ChangeLog

    rc9e7297 rd74a92d  
     12001-04-16      Joel Sherrill <joel@OARcorp.com>
     2
     3        * mongoosev/duart/mg5uart.c, mongoosev/duart/mg5uart.h
     4        Modifications made with Gregory Menke <gregory.menke@gsfc.nasa.gov>
     5        as he debugged this BSP using a logic analyzer.  In particular,
     6        there was a mistake where the index not offset of registers was
     7        in the header file and the baud rate calculation was incorrect.
     8
    192001-03-13      Joel Sherrill <joel@OARcorp.com>
    210
  • c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c

    rc9e7297 rd74a92d  
    263263  /* XXX default baud rate could be from configuration table */
    264264
    265   (void) mg5uart_baud_rate( minor, B9600, &baudcmd );
     265  (void) mg5uart_baud_rate( minor, B19200, &baudcmd );
    266266
    267267  /*
     
    687687    baud_requested = B9600;              /* default to 9600 baud */
    688688 
    689   baud_requested = termios_baud_to_number( B9600 );
     689  baud_requested = termios_baud_to_number( baud_requested );
    690690
    691691  clock = (rtems_unsigned32) Console_Port_Tbl[minor].ulClock;
     
    695695  /*
    696696   *  Formula is Code = round(ClockFrequency / Baud - 1).
    697    *
    698    *  Since this is integer math, we will divide by twice the baud and
    699    *  check the remaining odd bit.
    700    */
    701 
    702   tmp_code = (clock / (baud_requested * 2));
    703   if ( tmp_code & 0x01 )
    704     tmp_code = (tmp_code >> 1) + 1;
    705   else
    706     tmp_code = (tmp_code >> 1);
     697   */
     698
     699  tmp_code = (clock / baud_requested) - 1;
    707700
    708701  /*
  • c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.h

    rc9e7297 rd74a92d  
    3535
    3636/* shared registers from peripheral base (i.e. from ulCtrlPort1) */
    37 #define MG5UART_COMMAND_REGISTER          0
    38 #define MG5UART_STATUS_REGISTER           1
    39 #define MG5UART_INTERRUPT_CAUSE_REGISTER  2
    40 #define MG5UART_INTERRUPT_MASK_REGISTER   3
     37#define MG5UART_COMMAND_REGISTER          0x00
     38#define MG5UART_STATUS_REGISTER           0x04
     39#define MG5UART_INTERRUPT_CAUSE_REGISTER  0x08
     40#define MG5UART_INTERRUPT_MASK_REGISTER   0x0c
    4141
    4242/* port specific registers from uart base (i.e. from ulCtrlPort2) */
    43 #define MG5UART_RX_BUFFER 0
    44 #define MG5UART_TX_BUFFER 1
    45 #define MG5UART_BAUD_RATE 2
     43#define MG5UART_RX_BUFFER 0x00
     44#define MG5UART_TX_BUFFER 0x04
     45#define MG5UART_BAUD_RATE 0x08
    4646
    4747/*
Note: See TracChangeset for help on using the changeset viewer.