Changeset 260f678 in mainline
- Timestamp:
- 2013-02-04T10:42:50Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b5e17b1
- Parents:
- ae7ba7b6
- Location:
- kernel/arch/mips32/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mach/msim/msim.c
rae7ba7b6 r260f678 35 35 36 36 #include <arch/mach/msim/msim.h> 37 #include <console/console.h> 38 #include <sysinfo/sysinfo.h> 39 #include <arch/drivers/msim.h> 40 #include <genarch/drivers/dsrln/dsrlnin.h> 41 #include <genarch/drivers/dsrln/dsrlnout.h> 42 #include <genarch/srln/srln.h> 37 43 38 44 static void msim_init(void); … … 72 78 void msim_output_init(void) 73 79 { 80 #ifdef CONFIG_MSIM_PRN 81 outdev_t *dsrlndev = dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS); 82 if (dsrlndev) 83 stdout_wire(dsrlndev); 84 #endif 74 85 } 75 86 76 87 void msim_input_init(void) 77 88 { 89 #ifdef CONFIG_MSIM_KBD 90 /* 91 * Initialize the msim keyboard port. Then initialize the serial line 92 * module and connect it to the msim keyboard. Enable keyboard 93 * interrupts. 94 */ 95 dsrlnin_instance_t *dsrlnin_instance 96 = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ); 97 if (dsrlnin_instance) { 98 srln_instance_t *srln_instance = srln_init(); 99 if (srln_instance) { 100 indev_t *sink = stdin_wire(); 101 indev_t *srln = srln_wire(srln_instance, sink); 102 dsrlnin_wire(dsrlnin_instance, srln); 103 cp0_unmask_int(MSIM_KBD_IRQ); 104 } 105 } 106 107 /* 108 * This is the necessary evil until the userspace driver is entirely 109 * self-sufficient. 110 */ 111 sysinfo_set_item_val("kbd", NULL, true); 112 sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); 113 sysinfo_set_item_val("kbd.address.physical", NULL, 114 PA2KA(MSIM_KBD_ADDRESS)); 115 #endif 78 116 } 79 117 -
kernel/arch/mips32/src/mips32.c
rae7ba7b6 r260f678 41 41 #include <memstr.h> 42 42 #include <userspace.h> 43 #include <console/console.h>44 43 #include <syscall/syscall.h> 45 44 #include <sysinfo/sysinfo.h> 46 45 #include <arch/debug.h> 47 46 #include <arch/debugger.h> 48 #ifdef MACHINE_msim49 #include <arch/drivers/msim.h>50 #endif51 #include <genarch/fb/fb.h>52 #include <genarch/drivers/dsrln/dsrlnin.h>53 #include <genarch/drivers/dsrln/dsrlnout.h>54 #include <genarch/srln/srln.h>55 47 #include <arch/machine_func.h> 56 48 … … 99 91 sdram_size = bootinfo->sdram_size; 100 92 #endif 93 94 /* Initialize machine_ops pointer. */ 95 machine_ops_init(); 101 96 } 102 97 … … 135 130 { 136 131 interrupt_init(); 137 138 #ifdef CONFIG_MSIM_PRN 139 outdev_t *dsrlndev = dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS); 140 if (dsrlndev) 141 stdout_wire(dsrlndev); 142 #endif 132 133 machine_init(); 134 machine_output_init(); 143 135 } 144 136 … … 158 150 str_size(machine_get_platform_name())); 159 151 160 #ifdef CONFIG_MSIM_KBD 161 /* 162 * Initialize the msim keyboard port. Then initialize the serial line 163 * module and connect it to the msim keyboard. Enable keyboard 164 * interrupts. 165 */ 166 dsrlnin_instance_t *dsrlnin_instance 167 = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ); 168 if (dsrlnin_instance) { 169 srln_instance_t *srln_instance = srln_init(); 170 if (srln_instance) { 171 indev_t *sink = stdin_wire(); 172 indev_t *srln = srln_wire(srln_instance, sink); 173 dsrlnin_wire(dsrlnin_instance, srln); 174 cp0_unmask_int(MSIM_KBD_IRQ); 175 } 176 } 177 178 /* 179 * This is the necessary evil until the userspace driver is entirely 180 * self-sufficient. 181 */ 182 sysinfo_set_item_val("kbd", NULL, true); 183 sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); 184 sysinfo_set_item_val("kbd.address.physical", NULL, 185 PA2KA(MSIM_KBD_ADDRESS)); 186 #endif 152 machine_input_init(); 187 153 } 188 154
Note:
See TracChangeset
for help on using the changeset viewer.