Changeset dc22844 in mainline
- Timestamp:
- 2009-02-20T16:44:32Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5c06c1c
- Parents:
- 7aef7ee
- Location:
- kernel/genarch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/include/kbd/ns16550.h
r7aef7ee rdc22844 66 66 devno_t devno; 67 67 ns16550_t *ns16550; 68 irq_t *irq;68 irq_t irq; 69 69 } ns16550_instance_t; 70 70 -
kernel/genarch/src/kbd/ns16550.c
r7aef7ee rdc22844 105 105 { 106 106 ns16550_instance_t *instance; 107 irq_t *irq;108 107 109 108 chardev_initialize("ns16550_kbd", &kbrd, &ops); … … 114 113 return false; 115 114 116 irq = malloc(sizeof(irq_t), FRAME_ATOMIC);117 if (!irq) {118 free(instance);119 return false;120 }121 122 115 instance->devno = devno; 123 116 instance->ns16550 = dev; 124 instance->irq = irq;125 117 126 irq_initialize( irq);127 i rq->devno = devno;128 i rq->inr = inr;129 i rq->claim = ns16550_claim;130 i rq->handler = ns16550_irq_handler;131 i rq->instance = instance;132 i rq->cir = cir;133 i rq->cir_arg = cir_arg;134 irq_register( irq);118 irq_initialize(&instance->irq); 119 instance->irq.devno = devno; 120 instance->irq.inr = inr; 121 instance->irq.claim = ns16550_claim; 122 instance->irq.handler = ns16550_irq_handler; 123 instance->irq.instance = instance; 124 instance->irq.cir = cir; 125 instance->irq.cir_arg = cir_arg; 126 irq_register(&instance->irq); 135 127 136 ns16550_irq = irq; /* TODO: remove me soon */128 ns16550_irq = &instance->irq; /* TODO: remove me soon */ 137 129 138 while ((pio_read_8(&dev->lsr) & LSR_DATA_READY)) 130 while ((pio_read_8(&dev->lsr) & LSR_DATA_READY)) 139 131 (void) pio_read_8(&dev->rbr); 140 132
Note:
See TracChangeset
for help on using the changeset viewer.