Changeset 125d4c61 in rtems


Ignore:
Timestamp:
Nov 30, 2007, 4:52:23 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.8
Children:
b25b7da8
Parents:
0cec037
Message:

2007-11-30 Daniel Hellstrom <daniel@…>

  • shared/can/occan.c: LEON2/3 OCCAN CAN driver. Fixes typecast to volatile integer where needed. Fixes bug where closing the driver and opening it again could make the driver not starting transmission due to the software fifo was not cleared.
Location:
c/src/lib/libbsp/sparc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/ChangeLog

    r0cec037 r125d4c61  
     12007-11-30      Daniel Hellstrom <daniel@gaisler.com>
     2
     3        * shared/can/occan.c: LEON2/3 OCCAN CAN driver. Fixes typecast to
     4        volatile integer where needed. Fixes bug where closing the driver and
     5        opening it again could make the driver not starting transmission due
     6        to the software fifo was not cleared.
     7
    182007-11-30      Daniel Hellstrom <daniel@gaisler.com>
    29
  • c/src/lib/libbsp/sparc/shared/can/occan.c

    r0cec037 r125d4c61  
    254254static void occan_fifo_get(occan_fifo *fifo);
    255255static CANMsg *occan_fifo_claim_get(occan_fifo *fifo);
     256static void occan_fifo_clr(occan_fifo *fifo);
    256257
    257258/**** Hardware related Interface ****/
     
    289290
    290291#ifdef OCCAN_DONT_BYPASS_CACHE
    291  #define READ_REG(address) (*(unsigned char *)(address))
     292 #define READ_REG(address) (*(volatile unsigned char *)(address))
    292293#else
    293294 /* Bypass cache */
     
    303304#endif
    304305
    305 #define WRITE_REG(address,data) (*(unsigned char *)(address) = (data))
     306#define WRITE_REG(address,data) (*(volatile unsigned char *)(address) = (data))
    306307
    307308/* Mode register bit definitions */
     
    440441                return -1;
    441442
     443  /* In case we were started before and stopped we
     444   * should empty the TX fifo or try to resend those
     445   * messages. We make it simple...
     446   */
     447  occan_fifo_clr(priv->txfifo);
     448 
    442449        /* Clear status bits */
    443450        priv->status = 0;
     
    19051912        fifo->full = 0;
    19061913}
     1914
     1915static void occan_fifo_clr(occan_fifo *fifo){
     1916  fifo->full  = 0;
     1917  fifo->ovcnt = 0;
     1918  fifo->head  = fifo->tail = fifo->base;
     1919}
     1920
    19071921/*******************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.