Changeset 3b5d1535 in mainline for uspace/drv/usbhub


Ignore:
Timestamp:
2011-02-23T10:28:21Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eb48f61
Parents:
e936e8e (diff), eb1a2f4 (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.
Message:

Merge mainline changes

Location:
uspace/drv/usbhub
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/main.c

    re936e8e r3b5d1535  
    3131 */
    3232
    33 #include <driver.h>
     33#include <ddf/driver.h>
    3434#include <errno.h>
    3535#include <async.h>
     
    6262int main(int argc, char *argv[])
    6363{
    64         usb_log_enable(USB_LOG_LEVEL_INFO, NAME);
     64        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
    6565       
    6666        fibril_mutex_initialize(&usb_hub_list_lock);
     
    7777        fibril_add_ready(fid);
    7878
    79         return driver_main(&hub_driver);
     79        return ddf_driver_main(&hub_driver);
    8080}
    8181
  • uspace/drv/usbhub/usbhub.c

    re936e8e r3b5d1535  
    3333 */
    3434
    35 #include <driver.h>
     35#include <ddf/driver.h>
    3636#include <bool.h>
    3737#include <errno.h>
     
    5252#include "usb/classes/classes.h"
    5353
    54 static device_ops_t hub_device_ops = {
     54static ddf_dev_ops_t hub_device_ops = {
    5555        .interfaces[USB_DEV_IFACE] = &usb_iface_hub_impl
    5656};
     
    7979 */
    8080static int usb_hub_init_communication(usb_hub_info_t * hub){
     81        usb_log_debug("Initializing hub USB communication (hub->device->handle=%zu).\n", hub->device->handle);
    8182        int opResult;
    8283        opResult = usb_device_connection_initialize_from_device(
     
    8889                return opResult;
    8990        }
     91        usb_log_debug("Initializing USB wire abstraction.\n");
    9092        opResult = usb_hc_connection_initialize_from_device(&hub->connection,
    9193                        hub->device);
     
    9597                return opResult;
    9698        }
     99        usb_log_debug("Initializing default control pipe.\n");
    97100        opResult = usb_endpoint_pipe_initialize_default_control(&hub->endpoints.control,
    98101            &hub->device_connection);
     
    222225 * @return pointer to created structure or NULL in case of error
    223226 */
    224 usb_hub_info_t * usb_create_hub_info(device_t * device) {
     227usb_hub_info_t * usb_create_hub_info(ddf_dev_t * device) {
    225228        usb_hub_info_t* result = usb_new(usb_hub_info_t);
    226229        result->device = device;
     
    291294 * @return
    292295 */
    293 int usb_add_hub_device(device_t *dev) {
     296int usb_add_hub_device(ddf_dev_t *dev) {
    294297        dprintf(USB_LOG_LEVEL_INFO, "add_hub_device(handle=%d)", (int) dev->handle);
    295298
    296         dev->ops = &hub_device_ops;
     299        //dev->ops = &hub_device_ops;
     300        (void) hub_device_ops;
    297301
    298302        usb_hub_info_t * hub_info = usb_create_hub_info(dev);
     
    450454        //??
    451455    opResult = usb_device_register_child_in_devman(new_device_address,
    452             hub->connection.hc_handle, hub->device, &child_handle);
     456            hub->connection.hc_handle, hub->device, &child_handle,
     457            NULL, NULL, NULL);
    453458
    454459        if (opResult != EOK) {
  • uspace/drv/usbhub/usbhub.h

    re936e8e r3b5d1535  
    3838#include <ipc/devman.h>
    3939#include <usb/usb.h>
    40 #include <driver.h>
     40#include <ddf/driver.h>
    4141
    4242#define NAME "usbhub"
     
    6363        //usb_hcd_attached_device_info_t * usb_device;
    6464        /** General device info*/
    65         device_t * device;
     65        ddf_dev_t * device;
    6666        /** connection to hcd */
    6767        //usb_device_connection_t connection;
     
    8484 * @return Error code.
    8585 */
    86 int usb_add_hub_device(device_t *dev);
     86int usb_add_hub_device(ddf_dev_t *dev);
    8787
    8888/**
  • uspace/drv/usbhub/usbhub_private.h

    re936e8e r3b5d1535  
    4242#include <adt/list.h>
    4343#include <bool.h>
    44 #include <driver.h>
     44#include <ddf/driver.h>
    4545#include <fibril_synch.h>
    4646
     
    7676 * @return
    7777 */
    78 usb_hub_info_t * usb_create_hub_info(device_t * device);
     78usb_hub_info_t * usb_create_hub_info(ddf_dev_t * device);
    7979
    8080/** List of hubs maanged by this driver */
  • uspace/drv/usbhub/utils.c

    re936e8e r3b5d1535  
    3333 * @brief various utilities
    3434 */
    35 #include <driver.h>
     35#include <ddf/driver.h>
    3636#include <bool.h>
    3737#include <errno.h>
Note: See TracChangeset for help on using the changeset viewer.