Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/drivers/sgcn.h

    ra71c158 r253d3d0  
    3939#include <console/chardev.h>
    4040#include <proc/thread.h>
    41 #include <synch/spinlock.h>
    4241
    4342/* number of bytes in the TOC magic, including the NULL-terminator */
    44 #define TOC_MAGIC_BYTES  8
     43#define TOC_MAGIC_BYTES         8
    4544
    4645/* number of bytes in the TOC key, including the NULL-terminator */
    47 #define TOC_KEY_SIZE  8
     46#define TOC_KEY_SIZE            8
    4847
    4948/* maximum number of entries in the SRAM table of contents */
    50 #define MAX_TOC_ENTRIES  32
     49#define MAX_TOC_ENTRIES         32
    5150
    5251/* number of bytes in the SGCN buffer magic, including the NULL-terminator */
    53 #define SGCN_MAGIC_BYTES  4
     52#define SGCN_MAGIC_BYTES        4
    5453
    5554/**
    5655 * Entry in the SRAM table of contents. Describes one segment of the SRAM
    5756 * which serves a particular purpose (e.g. OBP serial console, Solaris serial
    58  * console, Solaris mailbox,...).
     57 * console, Solaris mailbox,...). 
    5958 */
    6059typedef struct {
     
    8584/**
    8685 * SGCN buffer header. It is placed at the very beginning of the SGCN
    87  * buffer.
     86 * buffer. 
    8887 */
    8988typedef struct {
     
    105104        /** offset within the SGCN buffer of the input buffer write pointer */
    106105        uint32_t in_wrptr;
    107        
     106
    108107        /** offset within the SGCN buffer of the output buffer start */
    109108        uint32_t out_begin;
     
    120119
    121120typedef struct {
    122         /** Starting address of SRAM */
    123         uintptr_t sram_begin;
    124        
    125         /** Starting address of the SGCN buffer */
    126         uintptr_t buffer_begin;
    127        
    128         /**
    129          * Ensure that writing to the buffer and consequent
    130          * update of the write pointer are one atomic operation.
    131          */
    132         SPINLOCK_DECLARE(output_lock);
    133        
    134         /**
    135          * Prevent the input buffer read/write pointers from
    136          * getting to inconsistent state.
    137          */
    138         SPINLOCK_DECLARE(input_lock);
    139        
    140121        thread_t *thread;
    141122        indev_t *srlnin;
    142123} sgcn_instance_t;
    143124
     125extern void sgcn_grab(void);
     126extern void sgcn_release(void);
    144127extern sgcn_instance_t *sgcnin_init(void);
    145128extern void sgcnin_wire(sgcn_instance_t *, indev_t *);
    146 extern outdev_t *sgcnout_init(void);
     129extern void sgcnout_init(void);
    147130
    148131#endif
Note: See TracChangeset for help on using the changeset viewer.