Changeset d9fae235 in mainline for uspace/srv/hw
- Timestamp:
- 2010-04-17T01:28:38Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9d6bfa5
- Parents:
- 9256ad29
- Location:
- uspace/srv/hw
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
r9256ad29 rd9fae235 254 254 static int cuda_init(void) 255 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 256 262 void *vaddr; 257 258 instance->cuda_physical = sysinfo_value("cuda.address.physical");259 instance->cuda_kernel = sysinfo_value("cuda.address.kernel");260 261 263 if (pio_enable((void *) instance->cuda_physical, sizeof(cuda_t), &vaddr) != 0) 262 264 return -1; 265 263 266 dev = vaddr; 264 267 -
uspace/srv/hw/char/i8042/i8042.c
r9256ad29 rd9fae235 164 164 static int i8042_init(void) 165 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 166 172 void *vaddr; 167 168 i8042_physical = sysinfo_value("i8042.address.physical");169 i8042_kernel = sysinfo_value("i8042.address.kernel");170 173 if (pio_enable((void *) i8042_physical, sizeof(i8042_t), &vaddr) != 0) 171 174 return -1; 175 172 176 i8042 = vaddr; 173 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 174 187 async_set_interrupt_received(i8042_irq_handler); 175 188 176 189 /* Disable kbd and aux */ 177 190 wait_ready(); … … 186 199 i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status; 187 200 i8042_kbd.cmds[3].addr = (void *) &((i8042_t *) i8042_kernel)->data; 188 ipc_register_irq(sysinfo_value("i8042.inr_a"), device_assign_devno(), 0, &i8042_kbd); 189 ipc_register_irq(sysinfo_value("i8042.inr_b"), device_assign_devno(), 0, &i8042_kbd); 190 printf("i8042: registered for interrupts %d and %d\n", 191 sysinfo_value("i8042.inr_a"), sysinfo_value("i8042.inr_b")); 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); 192 204 193 205 wait_ready(); -
uspace/srv/hw/cir/fhc/fhc.c
r9256ad29 rd9fae235 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/obio.c
r9256ad29 rd9fae235 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.