Rev 4109 | Rev 4267 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4109 | Rev 4148 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | #include <genarch/fb/visuals.h> |
54 | #include <genarch/fb/visuals.h> |
55 | #include <genarch/drivers/dsrln/dsrlnin.h> |
55 | #include <genarch/drivers/dsrln/dsrlnin.h> |
56 | #include <genarch/drivers/dsrln/dsrlnout.h> |
56 | #include <genarch/drivers/dsrln/dsrlnout.h> |
57 | #include <genarch/srln/srln.h> |
57 | #include <genarch/srln/srln.h> |
58 | #include <macros.h> |
58 | #include <macros.h> |
59 | #include <ddi/device.h> |
- | |
60 | #include <config.h> |
59 | #include <config.h> |
61 | #include <string.h> |
60 | #include <string.h> |
62 | #include <arch/drivers/msim.h> |
61 | #include <arch/drivers/msim.h> |
63 | 62 | ||
64 | #include <arch/asm/regname.h> |
63 | #include <arch/asm/regname.h> |
Line 164... | Line 163... | ||
164 | } |
163 | } |
165 | 164 | ||
166 | void arch_post_smp_init(void) |
165 | void arch_post_smp_init(void) |
167 | { |
166 | { |
168 | #ifdef CONFIG_MIPS_KBD |
167 | #ifdef CONFIG_MIPS_KBD |
169 | devno_t devno = device_assign_devno(); |
- | |
170 | - | ||
171 | /* |
168 | /* |
172 | * Initialize the msim/GXemul keyboard port. Then initialize the serial line |
169 | * Initialize the msim/GXemul keyboard port. Then initialize the serial line |
173 | * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. |
170 | * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. |
174 | */ |
171 | */ |
175 | indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, devno, MSIM_KBD_IRQ); |
172 | indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ); |
176 | if (kbrdin) { |
173 | if (kbrdin) { |
177 | srln_init(kbrdin); |
174 | srln_init(kbrdin); |
178 | cp0_unmask_int(MSIM_KBD_IRQ); |
175 | cp0_unmask_int(MSIM_KBD_IRQ); |
179 | } |
176 | } |
180 | 177 | ||
181 | /* |
178 | /* |
182 | * This is the necessary evil until the userspace driver is entirely |
179 | * This is the necessary evil until the userspace driver is entirely |
183 | * self-sufficient. |
180 | * self-sufficient. |
184 | */ |
181 | */ |
185 | sysinfo_set_item_val("kbd", NULL, true); |
182 | sysinfo_set_item_val("kbd", NULL, true); |
186 | sysinfo_set_item_val("kbd.devno", NULL, devno); |
- | |
187 | sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); |
183 | sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); |
188 | sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); |
184 | sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); |
189 | #endif |
185 | #endif |
190 | } |
186 | } |
191 | 187 |