Changeset 70a1c59 in mainline for kernel/arch/sparc64/src/drivers/niagara.c
- Timestamp:
- 2009-11-15T19:12:47Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5f678b1c
- Parents:
- 69b68d1f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/niagara.c
r69b68d1f r70a1c59 66 66 static niagara_instance_t *instance = NULL; 67 67 68 /* functions referenced from definitions of I/O operations structures */69 68 static void niagara_putchar(outdev_t *, const wchar_t, bool); 70 //static void niagara_noop(chardev_t *);71 //static char niagara_read(chardev_t *);72 69 73 70 /** character device operations */ … … 104 101 chardev_t niagara_io; 105 102 106 /**107 * Niagara IRQ structure. So far used only for notifying the userspace of the108 * key being pressed, not for kernel being informed about keyboard interrupts.109 */110 static irq_t niagara_irq;111 112 103 /** defined in drivers/kbd.c */ 113 104 extern kbd_type_t kbd_type; … … 119 110 static char read_char; 120 111 121 /**122 * The driver works in polled mode, so no interrupt should be handled by it.123 */124 static irq_ownership_t niagara_claim(void)125 {126 return IRQ_DECLINE;127 }128 129 /**130 * The driver works in polled mode, so no interrupt should be handled by it.131 */132 static void niagara_irq_handler(irq_t *irq, void *arg, ...)133 {134 panic("Not yet implemented, SGCN works in polled mode.\n");135 }136 112 137 113 #endif … … 146 122 /** Writes a single character to the standard output. */ 147 123 static void niagara_putchar(outdev_t *dev, const wchar_t ch, bool silent) 148 //static void niagara_putchar(struct chardev * cd, const char c)149 124 { 150 125 do_putchar(ch); … … 230 205 if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == EOK) { 231 206 indev_push_character(instance->srlnin, c); 232 #if 0233 ipl_t ipl = interrupts_disable();234 spinlock_lock(&niagara_irq.lock);235 236 if (niagara_irq.notif_cfg.notify &&237 niagara_irq.notif_cfg.answerbox) {238 /*239 * remember the character, uspace will pick it240 * up using pseudocode241 */242 read_char = (char) c;243 ipc_irq_send_notif(&niagara_irq);244 spinlock_unlock(&niagara_irq.lock);245 interrupts_restore(ipl);246 return;247 } else {248 spinlock_unlock(&niagara_irq.lock);249 interrupts_restore(ipl);250 251 chardev_push_character(&niagara_io, c);252 if (c == '\r')253 chardev_push_character(&niagara_io, '\n');254 }255 #endif256 207 } 257 208 … … 334 285 ddi_parea_register(&outbuf_parea); 335 286 336 chardev_initialize("niagara_io", &niagara_io, &niagara_ops);337 stdin = &niagara_io;338 stdout = &niagara_io;339 287 #endif 340 288 … … 351 299 niagara_init(); 352 300 353 // TODO - move to console init354 301 if (instance) { 355 302 srln_instance_t *srln_instance = srln_init();
Note:
See TracChangeset
for help on using the changeset viewer.