Changeset 4c7257b in mainline
- Timestamp:
- 2009-02-28T18:55:38Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc18d63
- Parents:
- c43b1db2
- Location:
- kernel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/amd64.c
rc43b1db2 r4c7257b 64 64 #include <ddi/irq.h> 65 65 #include <ddi/device.h> 66 #include <sysinfo/sysinfo.h> 66 67 67 68 … … 174 175 void arch_post_smp_init(void) 175 176 { 177 devno_t devno = device_assign_devno(); 176 178 /* keyboard controller */ 177 (void) i8042_init((i8042_t *) I8042_BASE, device_assign_devno(), 178 IRQ_KBD); 179 (void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD); 180 181 /* 182 * This is the necessary evil until the userspace driver is entirely 183 * self-sufficient. 184 */ 185 sysinfo_set_item_val("kbd", NULL, true); 186 sysinfo_set_item_val("kbd.devno", NULL, devno); 187 sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); 179 188 } 180 189 -
kernel/arch/ia32/src/ia32.c
rc43b1db2 r4c7257b 63 63 #include <console/console.h> 64 64 #include <ddi/device.h> 65 #include <sysinfo/sysinfo.h> 65 66 66 67 #ifdef CONFIG_SMP … … 125 126 void arch_post_smp_init(void) 126 127 { 127 devno_t kbd= device_assign_devno();128 devno_t devno = device_assign_devno(); 128 129 /* keyboard controller */ 129 (void) i8042_init((i8042_t *) I8042_BASE, kbd, IRQ_KBD); 130 (void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD); 131 132 /* 133 * This is the necessary evil until the userspace driver is entirely 134 * self-sufficient. 135 */ 136 sysinfo_set_item_val("kbd", NULL, true); 137 sysinfo_set_item_val("kbd.devno", NULL, devno); 138 sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); 130 139 } 131 140 -
kernel/arch/ia64/src/ia64.c
rc43b1db2 r4c7257b 161 161 162 162 #ifdef I460GX 163 devno_t kbd = device_assign_devno(); 163 devno_t devno = device_assign_devno(); 164 inr_t inr; 164 165 165 166 #ifdef CONFIG_NS16550 166 (void) ns16550_init((ns16550_t *)NS16550_BASE, kbd, NS16550_IRQ, NULL, 167 NULL); 167 inr = NS16550_IRQ; 168 (void) ns16550_init((ns16550_t *)NS16550_BASE, devno, inr, NULL, NULL); 169 sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); 170 sysinfo_set_item_val("kbd.port", NULL, (uintptr_t)NS16550_BASE); 168 171 #else 169 (void) i8042_init((i8042_t *)I8042_BASE, kbd, IRQ_KBD); 170 #endif 172 inr = IRQ_KBD; 173 (void) i8042_init((i8042_t *)I8042_BASE, devno, inr); 174 sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); 175 #endif 176 sysinfo_set_item_val("kbd", NULL, true); 177 sysinfo_set_item_val("kbd.devno", NULL, devno); 178 sysinfo_set_item_val("kbd.inr", NULL, inr); 171 179 #endif 172 180 -
kernel/arch/sparc64/src/drivers/kbd.c
rc43b1db2 r4c7257b 67 67 cir_t cir; 68 68 void *cir_arg; 69 70 #ifdef CONFIG_NS16550 71 ns16550_t *ns16550; 72 #endif 73 #ifdef CONFIG_Z8530 74 z8530_t *z8530; 75 #endif 69 76 70 77 name = ofw_tree_node_name(node); … … 101 108 uintptr_t pa; 102 109 size_t size; 110 devno_t devno; 103 111 inr_t inr; 104 112 … … 149 157 #ifdef CONFIG_Z8530 150 158 case KBD_Z8530: 151 (void) z8530_init((z8530_t *) hw_map(aligned_addr, 152 offset + size) + offset, device_assign_devno(), inr, cir, 153 cir_arg); 159 devno = device_assign_devno(); 160 z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) + 161 offset; 162 (void) z8530_init(z8530, devno, inr, cir, cir_arg); 163 164 /* 165 * This is the necessary evil until the userspace drivers are 166 * entirely self-sufficient. 167 */ 168 sysinfo_set_item_val("kbd", NULL, true); 169 sysinfo_set_item_val("kbd.type", NULL, KBD_Z8530); 170 sysinfo_set_item_val("kbd.devno", NULL, devno); 171 sysinfo_set_item_val("kbd.inr", NULL, inr); 172 sysinfo_set_item_val("kbd.address.virtual", NULL, 173 (uintptr_t) z8530); 174 sysinfo_set_item_val("kbd.address.physical", NULL, pa); 154 175 break; 155 176 #endif 156 177 #ifdef CONFIG_NS16550 157 178 case KBD_NS16550: 158 (void) ns16550_init((ns16550_t *) (hw_map(aligned_addr, 159 offset + size) + offset), device_assign_devno(), inr, cir, 160 cir_arg); 179 devno = device_assign_devno(); 180 ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) + 181 offset; 182 (void) ns16550_init(ns16550, devno, inr, cir, cir_arg); 183 184 /* 185 * This is the necessary evil until the userspace driver is 186 * entirely self-sufficient. 187 */ 188 sysinfo_set_item_val("kbd", NULL, true); 189 sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); 190 sysinfo_set_item_val("kbd.devno", NULL, devno); 191 sysinfo_set_item_val("kbd.inr", NULL, inr); 192 sysinfo_set_item_val("kbd.address.virtual", NULL, 193 (uintptr_t) ns16550); 194 sysinfo_set_item_val("kbd.address.physical", NULL, pa); 161 195 break; 162 196 #endif -
kernel/genarch/src/kbd/i8042.c
rc43b1db2 r4c7257b 1 1 /* 2 * Copyright (c) 200 1-2004Jakub Jermar2 * Copyright (c) 2009 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 49 49 #include <console/console.h> 50 50 #include <interrupt.h> 51 #include <sysinfo/sysinfo.h>52 51 53 52 /* Keyboard commands. */ … … 149 148 (void) pio_read_8(&dev->data); 150 149 151 /*152 * This is the necessary evil until the userspace driver is entirely153 * self-sufficient.154 */155 sysinfo_set_item_val("kbd", NULL, true);156 sysinfo_set_item_val("kbd.devno", NULL, devno);157 sysinfo_set_item_val("kbd.inr", NULL, inr);158 #ifdef KBD_LEGACY159 sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY);160 #endif161 162 150 return true; 163 151 } -
kernel/genarch/src/kbd/ns16550.c
rc43b1db2 r4c7257b 1 1 /* 2 * Copyright (c) 200 1-2006Jakub Jermar2 * Copyright (c) 2009 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 48 48 #include <interrupt.h> 49 49 #include <arch/interrupt.h> 50 #include <sysinfo/sysinfo.h>51 50 #include <synch/spinlock.h> 52 51 #include <mm/slab.h> … … 105 104 (void) pio_read_8(&dev->rbr); 106 105 107 /*108 * This is the necessary evil until the userspace driver is entirely109 * self-sufficient.110 */111 sysinfo_set_item_val("kbd", NULL, true);112 sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550);113 sysinfo_set_item_val("kbd.devno", NULL, devno);114 sysinfo_set_item_val("kbd.inr", NULL, inr);115 sysinfo_set_item_val("kbd.address.virtual", NULL, (uintptr_t) dev);116 sysinfo_set_item_val("kbd.port", NULL, (uintptr_t) dev);117 118 106 /* Enable interrupts */ 119 107 pio_write_8(&dev->ier, IER_ERBFI); -
kernel/genarch/src/kbd/z8530.c
rc43b1db2 r4c7257b 1 1 /* 2 * Copyright (c) 200 1-2004Jakub Jermar2 * Copyright (c) 2009 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 42 42 #include <console/console.h> 43 43 #include <console/chardev.h> 44 #include <sysinfo/sysinfo.h>45 44 #include <ddi/irq.h> 46 45 #include <arch/asm.h> … … 123 122 z8530_write(&dev->ctl_a, WR9, WR9_MIE); 124 123 125 /*126 * This is the necessary evil until the userspace drivers are entirely127 * self-sufficient.128 */129 sysinfo_set_item_val("kbd", NULL, true);130 sysinfo_set_item_val("kbd.type", NULL, KBD_Z8530);131 sysinfo_set_item_val("kbd.devno", NULL, devno);132 sysinfo_set_item_val("kbd.inr", NULL, inr);133 sysinfo_set_item_val("kbd.address.virtual", NULL, (uintptr_t) dev);134 135 124 return true; 136 125 }
Note:
See TracChangeset
for help on using the changeset viewer.