Changeset 977fcea in mainline for uspace/drv
- Timestamp:
- 2011-01-14T10:11:11Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f9dd44d
- Parents:
- 0bd2879 (diff), 6610565b (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/drv
- Files:
-
- 7 edited
-
isa/isa.c (modified) (3 diffs)
-
ns8250/ns8250.c (modified) (5 diffs)
-
pciintel/pci.c (modified) (7 diffs)
-
rootpc/rootpc.c (modified) (3 diffs)
-
test1/char.c (modified) (3 diffs)
-
usbkbd/main.c (modified) (2 diffs)
-
vhc/hcd.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/isa/isa.c
r0bd2879 r977fcea 51 51 52 52 #include <driver.h> 53 #include < resource.h>53 #include <ops/hw_res.h> 54 54 55 55 #include <devman.h> … … 84 84 } 85 85 86 static resource_iface_t isa_child_res_iface= {86 static hw_res_ops_t isa_child_hw_res_ops = { 87 87 &isa_get_child_resources, 88 88 &isa_enable_child_interrupt … … 502 502 static void isa_init() 503 503 { 504 isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_ res_iface;504 isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_hw_res_ops; 505 505 } 506 506 -
uspace/drv/ns8250/ns8250.c
r0bd2879 r977fcea 53 53 54 54 #include <driver.h> 55 #include <char.h> 56 #include <resource.h> 55 #include <ops/char_dev.h> 57 56 58 57 #include <devman.h> … … 227 226 228 227 /** The character interface's callbacks. */ 229 static char_ iface_t ns8250_char_iface= {228 static char_dev_ops_t ns8250_char_dev_ops = { 230 229 .read = &ns8250_read, 231 230 .write = &ns8250_write … … 347 346 348 347 /* Get hw resources. */ 349 ret = get_hw_resources(dev->parent_phone, &hw_resources);348 ret = hw_res_get_resource_list(dev->parent_phone, &hw_resources); 350 349 if (ret != EOK) { 351 350 printf(NAME ": failed to get hw resources for the device " … … 394 393 } 395 394 396 clean_hw_resource_list(&hw_resources);395 hw_res_clean_resource_list(&hw_resources); 397 396 return ret; 398 397 399 398 failed: 400 399 ns8250_dev_cleanup(dev); 401 clean_hw_resource_list(&hw_resources);400 hw_res_clean_resource_list(&hw_resources); 402 401 return ret; 403 402 } … … 924 923 ns8250_dev_ops.close = &ns8250_close; 925 924 926 ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_ iface;925 ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_dev_ops; 927 926 ns8250_dev_ops.default_handler = &ns8250_default_handler; 928 927 } -
uspace/drv/pciintel/pci.c
r0bd2879 r977fcea 49 49 #include <ipc/devman.h> 50 50 #include <ipc/dev_iface.h> 51 #include < resource.h>51 #include <ops/hw_res.h> 52 52 #include <device/hw_res.h> 53 53 #include <ddi.h> … … 77 77 } 78 78 79 static resource_iface_t pciintel_child_res_iface= {79 static hw_res_ops_t pciintel_child_hw_res_ops = { 80 80 &pciintel_get_child_resources, 81 81 &pciintel_enable_child_interrupt … … 473 473 hw_resource_list_t hw_resources; 474 474 475 rc = get_hw_resources(dev->parent_phone, &hw_resources);475 rc = hw_res_get_resource_list(dev->parent_phone, &hw_resources); 476 476 if (rc != EOK) { 477 477 printf(NAME ": pci_add_device failed to get hw resources for " … … 497 497 delete_pci_bus_data(bus_data); 498 498 ipc_hangup(dev->parent_phone); 499 clean_hw_resource_list(&hw_resources);499 hw_res_clean_resource_list(&hw_resources); 500 500 return EADDRNOTAVAIL; 501 501 } … … 508 508 pci_bus_scan(dev, 0); 509 509 510 clean_hw_resource_list(&hw_resources);510 hw_res_clean_resource_list(&hw_resources); 511 511 512 512 return EOK; … … 515 515 static void pciintel_init(void) 516 516 { 517 pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_ res_iface;517 pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_hw_res_ops; 518 518 } 519 519 … … 537 537 { 538 538 if (dev_data != NULL) { 539 clean_hw_resource_list(&dev_data->hw_resources);539 hw_res_clean_resource_list(&dev_data->hw_resources); 540 540 free(dev_data); 541 541 } -
uspace/drv/rootpc/rootpc.c
r0bd2879 r977fcea 50 50 #include <ipc/devman.h> 51 51 #include <ipc/dev_iface.h> 52 #include < resource.h>52 #include <ops/hw_res.h> 53 53 #include <device/hw_res.h> 54 54 … … 107 107 } 108 108 109 static resource_iface_t child_res_iface= {109 static hw_res_ops_t child_hw_res_ops = { 110 110 &rootpc_get_child_resources, 111 111 &rootpc_enable_child_interrupt … … 190 190 static void root_pc_init(void) 191 191 { 192 rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_ res_iface;192 rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_hw_res_ops; 193 193 } 194 194 -
uspace/drv/test1/char.c
r0bd2879 r977fcea 33 33 #include <errno.h> 34 34 #include <mem.h> 35 #include < char.h>35 #include <ops/char_dev.h> 36 36 37 37 #include "test1.h" … … 46 46 } 47 47 48 static char_ iface_t char_interface= {48 static char_dev_ops_t char_dev_ops = { 49 49 .read = &impl_char_read, 50 50 .write = &imp_char_write … … 52 52 53 53 device_ops_t char_device_ops = { 54 .interfaces[CHAR_DEV_IFACE] = &char_ interface54 .interfaces[CHAR_DEV_IFACE] = &char_dev_ops 55 55 }; 56 56 -
uspace/drv/usbkbd/main.c
r0bd2879 r977fcea 78 78 } 79 79 80 #if 0 80 81 static void send_key(int key, int type, wchar_t c) { 81 82 async_msg_4(console_callback_phone, KBD_EVENT, type, key, 82 83 KM_NUM_LOCK, c); 83 84 } 84 85 static void send_alnum(int key, wchar_t c) { 86 printf(NAME ": sending key '%lc' to console\n", (wint_t) c); 87 send_key(key, KEY_PRESS, c); 88 send_key(key, KEY_RELEASE, c); 89 } 85 #endif 90 86 91 87 /* … … 231 227 sizeof(usb_hid_report_in_callbacks_t)); 232 228 callbacks->keyboard = usbkbd_process_keycodes; 233 234 if (console_callback_phone != -1) {235 static size_t counter = 0;236 counter++;237 if (counter > 3) {238 counter = 0;239 send_alnum(KC_A, L'a');240 }241 }242 229 243 230 usb_hid_parse_report(kbd_dev->parser, buffer, actual_size, callbacks, -
uspace/drv/vhc/hcd.c
r0bd2879 r977fcea 86 86 dev->ops = &vhc_ops; 87 87 88 devman_add_device_to_class(dev->handle, "usbhc"); 89 88 90 /* 89 91 * Initialize our hub and announce its presence.
Note:
See TracChangeset
for help on using the changeset viewer.
