Changeset c47e1a8 in mainline for uspace/srv/hw
- Timestamp:
- 2010-05-21T07:50:04Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d51ee2b
- Parents:
- cf8cc36 (diff), 15b592b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/srv/hw
- Files:
-
- 9 added
- 9 edited
-
bus/cuda_adb/Makefile (modified) (1 diff)
-
bus/cuda_adb/cuda_adb.c (modified) (2 diffs)
-
bus/pci/Makefile (modified) (1 diff)
-
char/i8042/Makefile (modified) (1 diff)
-
char/i8042/i8042.c (modified) (4 diffs)
-
cir/fhc/Makefile (modified) (1 diff)
-
cir/fhc/fhc.c (modified) (2 diffs)
-
cir/obio/Makefile (modified) (1 diff)
-
cir/obio/obio.c (modified) (2 diffs)
-
netif/dp8390/Makefile (added)
-
netif/dp8390/dp8390.c (added)
-
netif/dp8390/dp8390.h (added)
-
netif/dp8390/dp8390_drv.h (added)
-
netif/dp8390/dp8390_module.c (added)
-
netif/dp8390/dp8390_port.h (added)
-
netif/dp8390/local.h (added)
-
netif/dp8390/ne2000.c (added)
-
netif/dp8390/ne2000.h (added)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/bus/cuda_adb/Makefile
rcf8cc36 rc47e1a8 28 28 29 29 USPACE_PREFIX = ../../../.. 30 LIBS = $(LIBC_PREFIX)/libc.a 31 32 OUTPUT = cuda_adb 30 BINARY = cuda_adb 33 31 34 32 SOURCES = \ 35 33 cuda_adb.c 36 34 37 include ../../../Makefile.common 38 35 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
rcf8cc36 rc47e1a8 55 55 static void cuda_connection(ipc_callid_t iid, ipc_call_t *icall); 56 56 static int cuda_init(void); 57 static int cuda_claim(void);58 57 static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call); 59 58 … … 255 254 static int cuda_init(void) 256 255 { 256 if (sysinfo_get_value("cuda.address.physical", &(instance->cuda_physical)) != EOK) 257 return -1; 258 259 if (sysinfo_get_value("cuda.address.kernel", &(instance->cuda_kernel)) != EOK) 260 return -1; 261 257 262 void *vaddr; 258 259 instance->cuda_physical = sysinfo_value("cuda.address.physical");260 instance->cuda_kernel = sysinfo_value("cuda.address.kernel");261 262 263 if (pio_enable((void *) instance->cuda_physical, sizeof(cuda_t), &vaddr) != 0) 263 264 return -1; 265 264 266 dev = vaddr; 265 267 -
uspace/srv/hw/bus/pci/Makefile
rcf8cc36 rc47e1a8 29 29 30 30 USPACE_PREFIX = ../../../.. 31 LIBS = $(LIBPCI_PREFIX)/libpci.a $(LIBC_PREFIX)/libc.a31 LIBS = $(LIBPCI_PREFIX)/libpci.a 32 32 EXTRA_CFLAGS = -I$(LIBPCI_PREFIX) 33 34 OUTPUT = pci 33 BINARY = pci 35 34 36 35 SOURCES = \ 37 36 pci.c 38 37 39 include ../../../Makefile.common38 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hw/char/i8042/Makefile
rcf8cc36 rc47e1a8 29 29 30 30 USPACE_PREFIX = ../../../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 32 33 OUTPUT = i8042 31 BINARY = i8042 34 32 35 33 SOURCES = \ 36 34 i8042.c 37 35 38 include ../../../Makefile.common36 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hw/char/i8042/i8042.c
rcf8cc36 rc47e1a8 68 68 #define i8042_KBD_TRANSLATE 0x40 69 69 70 /* Mouse constants */71 #define MOUSE_OUT_INIT 0xf472 #define MOUSE_ACK 0xfa73 70 74 71 enum { … … 167 164 static int i8042_init(void) 168 165 { 166 if (sysinfo_get_value("i8042.address.physical", &i8042_physical) != EOK) 167 return -1; 168 169 if (sysinfo_get_value("i8042.address.kernel", &i8042_kernel) != EOK) 170 return -1; 171 169 172 void *vaddr; 170 171 i8042_physical = sysinfo_value("i8042.address.physical");172 i8042_kernel = sysinfo_value("i8042.address.kernel");173 173 if (pio_enable((void *) i8042_physical, sizeof(i8042_t), &vaddr) != 0) 174 174 return -1; 175 175 176 i8042 = vaddr; 176 177 178 sysarg_t inr_a; 179 sysarg_t inr_b; 180 181 if (sysinfo_get_value("i8042.inr_a", &inr_a) != EOK) 182 return -1; 183 184 if (sysinfo_get_value("i8042.inr_b", &inr_b) != EOK) 185 return -1; 186 177 187 async_set_interrupt_received(i8042_irq_handler); 178 179 /* Disable kbd, enable mouse */ 188 189 /* Disable kbd and aux */ 190 wait_ready(); 180 191 pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB); 181 192 wait_ready(); 182 pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB); 183 wait_ready(); 184 pio_write_8(&i8042->data, i8042_KBD_DISABLE); 185 wait_ready(); 193 pio_write_8(&i8042->data, i8042_KBD_DISABLE | i8042_AUX_DISABLE); 186 194 187 195 /* Flush all current IO */ … … 189 197 (void) pio_read_8(&i8042->data); 190 198 191 i8042_port_write(DEVID_AUX, MOUSE_OUT_INIT);192 193 199 i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status; 194 200 i8042_kbd.cmds[3].addr = (void *) &((i8042_t *) i8042_kernel)->data; 195 ipc_register_irq(sysinfo_value("i8042.inr_a"), device_assign_devno(), 0, &i8042_kbd); 196 ipc_register_irq(sysinfo_value("i8042.inr_b"), device_assign_devno(), 0, &i8042_kbd); 197 201 ipc_register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd); 202 ipc_register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd); 203 printf("%s: registered for interrupts %d and %d\n", NAME, inr_a, inr_b); 204 205 wait_ready(); 198 206 pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB); 199 207 wait_ready(); 200 208 pio_write_8(&i8042->data, i8042_KBD_IE | i8042_KBD_TRANSLATE | 201 209 i8042_AUX_IE); 202 wait_ready();203 210 204 211 return 0; … … 271 278 { 272 279 if (devid == DEVID_AUX) { 280 wait_ready(); 273 281 pio_write_8(&i8042->status, i8042_CMD_WRITE_AUX); 274 wait_ready();275 }282 } 283 wait_ready(); 276 284 pio_write_8(&i8042->data, data); 277 wait_ready();278 285 } 279 286 -
uspace/srv/hw/cir/fhc/Makefile
rcf8cc36 rc47e1a8 29 29 30 30 USPACE_PREFIX = ../../../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 32 33 OUTPUT = fhc 31 BINARY = fhc 34 32 35 33 SOURCES = \ 36 34 fhc.c 37 35 38 include ../../../Makefile.common36 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hw/cir/fhc/fhc.c
rcf8cc36 rc47e1a8 109 109 static bool fhc_init(void) 110 110 { 111 ipcarg_t phonead;111 sysarg_t paddr; 112 112 113 fhc_uart_size = sysinfo_value("fhc.uart.size"); 114 fhc_uart_phys = (void *) sysinfo_value("fhc.uart.physical"); 115 116 if (!fhc_uart_size) { 113 if ((sysinfo_get_value("fhc.uart.physical", &paddr) != EOK) 114 || (sysinfo_get_value("fhc.uart.size", &fhc_uart_size) != EOK)) { 117 115 printf(NAME ": no FHC UART registers found\n"); 118 116 return false; 119 117 } 120 118 119 fhc_uart_phys = (void *) paddr; 121 120 fhc_uart_virt = as_get_mappable_page(fhc_uart_size); 122 121 … … 132 131 printf(NAME ": FHC UART registers at %p, %d bytes\n", fhc_uart_phys, 133 132 fhc_uart_size); 134 133 135 134 async_set_client_connection(fhc_connection); 135 ipcarg_t phonead; 136 136 ipc_connect_to_me(PHONE_NS, SERVICE_FHC, 0, 0, &phonead); 137 137 -
uspace/srv/hw/cir/obio/Makefile
rcf8cc36 rc47e1a8 29 29 30 30 USPACE_PREFIX = ../../../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 32 33 OUTPUT = obio 31 BINARY = obio 34 32 35 33 SOURCES = \ 36 34 obio.c 37 35 38 include ../../../Makefile.common36 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hw/cir/obio/obio.c
rcf8cc36 rc47e1a8 112 112 static bool obio_init(void) 113 113 { 114 ipcarg_t phonead; 115 116 base_phys = (void *) sysinfo_value("obio.base.physical"); 114 sysarg_t paddr; 117 115 118 if ( !base_phys) {116 if (sysinfo_get_value("obio.base.physical", &paddr) != EOK) { 119 117 printf(NAME ": no OBIO registers found\n"); 120 118 return false; 121 119 } 122 120 121 base_phys = (void *) paddr; 123 122 base_virt = as_get_mappable_page(OBIO_SIZE); 124 123 … … 133 132 134 133 printf(NAME ": OBIO registers with base at %p\n", base_phys); 135 134 136 135 async_set_client_connection(obio_connection); 136 ipcarg_t phonead; 137 137 ipc_connect_to_me(PHONE_NS, SERVICE_OBIO, 0, 0, &phonead); 138 138
Note:
See TracChangeset
for help on using the changeset viewer.
