Changeset 63530c62 in mainline for kernel/arch/sparc64/src/drivers/kbd.c
- Timestamp:
- 2006-10-14T19:31:03Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e3890b3f
- Parents:
- 7dcf22a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/kbd.c
r7dcf22a r63530c62 50 50 #include <print.h> 51 51 52 volatile uint8_t *kbd_virt_address = NULL;53 54 52 kbd_type_t kbd_type = KBD_UNKNOWN; 55 56 static irq_t kbd_irq;57 53 58 54 /** Initialize keyboard. … … 103 99 uintptr_t pa; 104 100 size_t size; 105 int inr; 106 107 irq_initialize(&kbd_irq); 101 inr_t inr; 102 devno_t devno = device_assign_devno(); 108 103 109 104 switch (kbd_type) { … … 117 112 printf("Failed to determine keyboard interrupt.\n"); 118 113 return; 119 } else {120 kbd_irq.inr = inr;121 kbd_irq.devno = device_assign_devno();122 kbd_irq.trigger = IRQ_TRIGGER_LEVEL;123 kbd_irq.claim = z8530_claim;124 kbd_irq.handler = z8530_irq_handler;125 irq_register(&kbd_irq);126 114 } 127 115 break; … … 136 124 printf("Failed to determine keyboard interrupt.\n"); 137 125 return; 138 } else { 139 kbd_irq.inr = inr; 140 kbd_irq.devno = device_assign_devno(); 141 kbd_irq.trigger = IRQ_TRIGGER_LEVEL; 142 kbd_irq.claim = ns16550_claim; 143 kbd_irq.handler = ns16550_irq_handler; 144 irq_register(&kbd_irq); 145 } 126 }; 146 127 break; 147 128 … … 158 139 aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE); 159 140 offset = pa - aligned_addr; 160 kbd_virt_address = (uint8_t *)hw_map(aligned_addr, offset + size) + offset;141 uintptr_t vaddr = hw_map(aligned_addr, offset + size) + offset; 161 142 162 143 switch (kbd_type) { 163 144 #ifdef CONFIG_Z8530 164 145 case KBD_Z8530: 165 z8530_init( );146 z8530_init(devno, inr, vaddr); 166 147 break; 167 148 #endif 168 149 #ifdef CONFIG_NS16550 169 150 case KBD_NS16550: 170 ns16550_init( );151 ns16550_init(devno, inr, vaddr); 171 152 break; 172 153 #endif
Note:
See TracChangeset
for help on using the changeset viewer.