Rev 4419 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4419 | Rev 4420 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | #include <kbd.h> |
37 | #include <kbd.h> |
38 | #include <kbd_port.h> |
38 | #include <kbd_port.h> |
39 | #include <sun.h> |
39 | #include <sun.h> |
40 | #include <sysinfo.h> |
40 | #include <sysinfo.h> |
41 | 41 | ||
42 | typedef enum { |
- | |
43 | KBD_UNKNOWN, |
- | |
44 | KBD_Z8530, |
- | |
45 | KBD_NS16550, |
- | |
46 | KBD_SGCN |
- | |
47 | } kbd_type_t; |
- | |
48 | - | ||
49 | /** Sun keyboard virtual port driver. |
42 | /** Sun keyboard virtual port driver. |
50 | * |
43 | * |
51 | * This is a virtual port driver which can use |
44 | * This is a virtual port driver which can use |
52 | * both ns16550_port_init and z8530_port_init |
45 | * both ns16550_port_init and z8530_port_init |
53 | * according to the information passed from the |
46 | * according to the information passed from the |
54 | * kernel. This is just a temporal hack. |
47 | * kernel. This is just a temporal hack. |
55 | * |
48 | * |
56 | */ |
49 | */ |
57 | int kbd_port_init(void) |
50 | int kbd_port_init(void) |
58 | { |
51 | { |
59 | if (sysinfo_value("kbd.type") == KBD_Z8530) |
52 | if (sysinfo_value("kbd.type.z8530")) { |
60 | return z8530_port_init(); |
53 | if (z8530_port_init() == 0) |
- | 54 | return 0; |
|
- | 55 | } |
|
- | 56 | ||
61 | else if (sysinfo_value("kbd.type") == KBD_NS16550) |
57 | if (sysinfo_value("kbd.type.ns16550")) { |
62 | return ns16550_port_init(); |
58 | if (ns16550_port_init() == 0) |
- | 59 | return 0; |
|
- | 60 | } |
|
63 | 61 | ||
64 | return -1; |
62 | return -1; |
65 | } |
63 | } |
66 | 64 | ||
- | 65 | void kbd_port_yield(void) |
|
- | 66 | { |
|
- | 67 | } |
|
- | 68 | ||
- | 69 | void kbd_port_reclaim(void) |
|
- | 70 | { |
|
- | 71 | } |
|
- | 72 | ||
67 | /** @} |
73 | /** @} |
68 | */ |
74 | */ |