Changeset 4f3f9659 in mainline
- Timestamp:
- 2011-06-11T22:38:19Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f2f99ae
- Parents:
- 9be360ee
- Location:
- uspace/srv/hid/kbd
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/kbd/Makefile
r9be360ee r4f3f9659 59 59 port/sgcn.c \ 60 60 port/ski.c \ 61 port/sun.c \62 61 port/z8530.c \ 63 62 ctl/apple.c \ -
uspace/srv/hid/kbd/generic/kbd.c
r9be360ee r4f3f9659 304 304 #endif 305 305 #if defined(UARCH_sparc64) && defined(MACHINE_generic) 306 kbd_add_dev(&sun_port, &sun_ctl); 306 kbd_add_dev(&z8530_port, &sun_ctl); 307 kbd_add_dev(&ns16550_port, &sun_ctl); 307 308 #endif 308 309 /* Silence warning on abs32le about kbd_add_dev() being unused */ -
uspace/srv/hid/kbd/include/kbd_port.h
r9be360ee r4f3f9659 59 59 extern kbd_port_ops_t sgcn_port; 60 60 extern kbd_port_ops_t ski_port; 61 extern kbd_port_ops_t sun_port;62 61 extern kbd_port_ops_t z8530_port; 63 62 -
uspace/srv/hid/kbd/port/ns16550.c
r9be360ee r4f3f9659 1 1 /* 2 2 * Copyright (c) 2006 Josef Cejka 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 41 42 #include <kbd.h> 42 43 #include <kbd_port.h> 43 #include <sun.h>44 44 #include <ddi.h> 45 45 #include <errno.h> 46 47 static int ns16550_port_init(kbd_dev_t *); 48 static void ns16550_port_yield(void); 49 static void ns16550_port_reclaim(void); 50 static void ns16550_port_write(uint8_t data); 51 52 kbd_port_ops_t ns16550_port = { 53 .init = ns16550_port_init, 54 .yield = ns16550_port_yield, 55 .reclaim = ns16550_port_reclaim, 56 .write = ns16550_port_write 57 }; 58 59 static kbd_dev_t *kbd_dev; 46 60 47 61 /* NS16550 registers */ … … 91 105 92 106 static uintptr_t ns16550_physical; 93 static uintptr_t ns16550_kernel; 107 static uintptr_t ns16550_kernel; 94 108 95 109 static kbd_dev_t *kbd_dev; 96 110 97 int ns16550_port_init(kbd_dev_t *kdev)111 static int ns16550_port_init(kbd_dev_t *kdev) 98 112 { 99 113 void *vaddr; 100 114 101 115 kbd_dev = kdev; 102 116 117 sysarg_t ns16550; 118 if (sysinfo_get_value("kbd.type.ns16550", &ns16550) != EOK) 119 return -1; 120 if (!ns16550) 121 return -1; 122 103 123 if (sysinfo_get_value("kbd.address.physical", &ns16550_physical) != EOK) 104 124 return -1; … … 120 140 } 121 141 142 static void ns16550_port_yield(void) 143 { 144 } 145 146 static void ns16550_port_reclaim(void) 147 { 148 } 149 150 static void ns16550_port_write(uint8_t data) 151 { 152 (void) data; 153 } 154 122 155 static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call) 123 156 { -
uspace/srv/hid/kbd/port/z8530.c
r9be360ee r4f3f9659 1 1 /* 2 2 * Copyright (c) 2006 Martin Decky 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 41 42 #include <kbd.h> 42 43 #include <kbd_port.h> 43 #include <sun.h>44 44 #include <sys/types.h> 45 45 #include <ddi.h> 46 46 #include <errno.h> 47 48 static int z8530_port_init(kbd_dev_t *); 49 static void z8530_port_yield(void); 50 static void z8530_port_reclaim(void); 51 static void z8530_port_write(uint8_t data); 52 53 kbd_port_ops_t z8530_port = { 54 .init = z8530_port_init, 55 .yield = z8530_port_yield, 56 .reclaim = z8530_port_reclaim, 57 .write = z8530_port_write 58 }; 47 59 48 60 static kbd_dev_t *kbd_dev; … … 87 99 static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call); 88 100 89 int z8530_port_init(kbd_dev_t *kdev)101 static int z8530_port_init(kbd_dev_t *kdev) 90 102 { 91 103 kbd_dev = kdev; 104 105 sysarg_t z8530; 106 if (sysinfo_get_value("kbd.type.z8530", &z8530) != EOK) 107 return -1; 108 if (!z8530) 109 return -1; 92 110 93 111 sysarg_t kaddr; … … 108 126 } 109 127 128 static void z8530_port_yield(void) 129 { 130 } 131 132 static void z8530_port_reclaim(void) 133 { 134 } 135 136 static void z8530_port_write(uint8_t data) 137 { 138 (void) data; 139 } 140 110 141 static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call) 111 142 {
Note:
See TracChangeset
for help on using the changeset viewer.