Subversion Repositories HelenOS

Rev

Rev 4103 | Rev 4148 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4103 Rev 4119
Line 55... Line 55...
55
#include <print.h>
55
#include <print.h>
56
#include <sysinfo/sysinfo.h>
56
#include <sysinfo/sysinfo.h>
57
 
57
 
58
kbd_type_t kbd_type = KBD_UNKNOWN;
58
kbd_type_t kbd_type = KBD_UNKNOWN;
59
 
59
 
60
#if defined (CONFIG_Z8530) || defined (CONFIG_NS16550)
60
#ifdef CONFIG_SUN_KBD
61
 
61
 
62
/** Initialize keyboard.
62
/** Initialize keyboard.
63
 *
63
 *
64
 * Traverse OpenFirmware device tree in order to find necessary
64
 * Traverse OpenFirmware device tree in order to find necessary
65
 * info about the keyboard device.
65
 * info about the keyboard device.
Line 166... Line 166...
166
    case KBD_Z8530:
166
    case KBD_Z8530:
167
        devno = device_assign_devno();
167
        devno = device_assign_devno();
168
        z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) +
168
        z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) +
169
            offset;
169
            offset;
170
       
170
       
171
        indev_t *kbrdin = z8530_init(z8530, devno, inr, cir, cir_arg);
171
        indev_t *kbrdin_z8530 = z8530_init(z8530, devno, inr, cir, cir_arg);
172
        if (kbrdin)
172
        if (kbrdin_z8530)
173
            kbrd_init(kbrdin);
173
            kbrd_init(kbrdin_z8530);
174
       
174
       
175
        /*
175
        /*
176
         * This is the necessary evil until the userspace drivers are
176
         * This is the necessary evil until the userspace drivers are
177
         * entirely self-sufficient.
177
         * entirely self-sufficient.
178
         */
178
         */
Line 189... Line 189...
189
    case KBD_NS16550:
189
    case KBD_NS16550:
190
        devno = device_assign_devno();
190
        devno = device_assign_devno();
191
        ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) +
191
        ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) +
192
            offset;
192
            offset;
193
       
193
       
194
        indev_t *kbrdin = ns16550_init(ns16550, devno, inr, cir, cir_arg);
194
        indev_t *kbrdin_ns16550 = ns16550_init(ns16550, devno, inr, cir, cir_arg);
195
        if (kbrdin)
195
        if (kbrdin_ns16550)
196
            kbrd_init(kbrdin);
196
            kbrd_init(kbrdin_ns16550);
197
       
197
       
198
        /*
198
        /*
199
         * This is the necessary evil until the userspace driver is
199
         * This is the necessary evil until the userspace driver is
200
         * entirely self-sufficient.
200
         * entirely self-sufficient.
201
         */
201
         */
Line 212... Line 212...
212
        printf("Kernel is not compiled with the necessary keyboard "
212
        printf("Kernel is not compiled with the necessary keyboard "
213
            "driver this machine requires.\n");
213
            "driver this machine requires.\n");
214
    }
214
    }
215
}
215
}
216
 
216
 
217
    #endif
217
#endif
-
 
218
 
218
/** @}
219
/** @}
219
 */
220
 */