Changeset 64c7e14 in mainline for kernel/arch/sparc64/src/drivers/kbd.c
- Timestamp:
- 2008-12-17T16:24:02Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8231246
- Parents:
- 04de765
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/kbd.c
r04de765 r64c7e14 87 87 uint32_t interrupts; 88 88 prop = ofw_tree_getprop(node, "interrupts"); 89 if ( !prop || !prop->value)89 if ((!prop) || (!prop->value)) 90 90 panic("Can't find \"interrupts\" property.\n"); 91 91 interrupts = *((uint32_t *) prop->value); 92 92 93 93 /* 94 94 * Read 'reg' property. 95 95 */ 96 96 prop = ofw_tree_getprop(node, "reg"); 97 if ( !prop || !prop->value)97 if ((!prop) || (!prop->value)) 98 98 panic("Can't find \"reg\" property.\n"); 99 99 … … 101 101 size_t size; 102 102 inr_t inr; 103 devno_t devno = device_assign_devno();104 103 105 104 switch (kbd_type) { … … 133 132 }; 134 133 break; 135 134 136 135 default: 137 panic("Unexpected type.\n");136 panic("Unexpected keyboard type.\n"); 138 137 } 139 138 … … 146 145 aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE); 147 146 offset = pa - aligned_addr; 148 uintptr_t vaddr = hw_map(aligned_addr, offset + size) + offset; 149 147 150 148 switch (kbd_type) { 151 149 #ifdef CONFIG_Z8530 152 150 case KBD_Z8530: 153 z8530_init(devno, vaddr, inr, cir, cir_arg); 151 z8530_init(device_assign_devno(), 152 hw_map(aligned_addr, offset + size) + offset, inr, cir, cir_arg); 154 153 break; 155 154 #endif 156 155 #ifdef CONFIG_NS16550 157 156 case KBD_NS16550: 158 ns16550_init(devno, (ioport_t)vaddr, inr, cir, cir_arg); 157 ns16550_init(device_assign_devno(), 158 (ioport_t) (hw_map(aligned_addr, offset + size) + offset), inr, cir, cir_arg); 159 159 break; 160 160 #endif
Note:
See TracChangeset
for help on using the changeset viewer.