Changes in kernel/arch/sparc64/include/drivers/sgcn.h [a71c158:253d3d0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/drivers/sgcn.h
ra71c158 r253d3d0 39 39 #include <console/chardev.h> 40 40 #include <proc/thread.h> 41 #include <synch/spinlock.h>42 41 43 42 /* number of bytes in the TOC magic, including the NULL-terminator */ 44 #define TOC_MAGIC_BYTES 43 #define TOC_MAGIC_BYTES 8 45 44 46 45 /* number of bytes in the TOC key, including the NULL-terminator */ 47 #define TOC_KEY_SIZE 46 #define TOC_KEY_SIZE 8 48 47 49 48 /* maximum number of entries in the SRAM table of contents */ 50 #define MAX_TOC_ENTRIES 49 #define MAX_TOC_ENTRIES 32 51 50 52 51 /* number of bytes in the SGCN buffer magic, including the NULL-terminator */ 53 #define SGCN_MAGIC_BYTES 52 #define SGCN_MAGIC_BYTES 4 54 53 55 54 /** 56 55 * Entry in the SRAM table of contents. Describes one segment of the SRAM 57 56 * which serves a particular purpose (e.g. OBP serial console, Solaris serial 58 * console, Solaris mailbox,...). 57 * console, Solaris mailbox,...). 59 58 */ 60 59 typedef struct { … … 85 84 /** 86 85 * SGCN buffer header. It is placed at the very beginning of the SGCN 87 * buffer. 86 * buffer. 88 87 */ 89 88 typedef struct { … … 105 104 /** offset within the SGCN buffer of the input buffer write pointer */ 106 105 uint32_t in_wrptr; 107 106 108 107 /** offset within the SGCN buffer of the output buffer start */ 109 108 uint32_t out_begin; … … 120 119 121 120 typedef 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 consequent130 * 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 from136 * getting to inconsistent state.137 */138 SPINLOCK_DECLARE(input_lock);139 140 121 thread_t *thread; 141 122 indev_t *srlnin; 142 123 } sgcn_instance_t; 143 124 125 extern void sgcn_grab(void); 126 extern void sgcn_release(void); 144 127 extern sgcn_instance_t *sgcnin_init(void); 145 128 extern void sgcnin_wire(sgcn_instance_t *, indev_t *); 146 extern outdev_t *sgcnout_init(void);129 extern void sgcnout_init(void); 147 130 148 131 #endif
Note:
See TracChangeset
for help on using the changeset viewer.