Changeset 1256a0a in mainline for uspace/drv/uhci-hcd/main.c


Ignore:
Timestamp:
2011-02-01T00:08:46Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
993a1e1
Parents:
37ac7bb
Message:

uhci-rhd - UHCI Root hub drier as a separated process

this wil deffinitely need a lot of polishing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/main.c

    r37ac7bb r1256a0a  
    3434#include "iface.h"
    3535#include "name.h"
     36#include "pci.h"
     37#include "root_hub.h"
    3638#include "uhci.h"
    3739
     
    7577            io_reg_base, io_reg_size, irq);
    7678
    77         return uhci_init(device, (void*)io_reg_base, io_reg_size);
     79        int ret = uhci_init(device, (void*)io_reg_base, io_reg_size);
     80
     81        if (ret != EOK) {
     82                uhci_print_error("Failed to init uhci-hcd.\n");
     83                return ret;
     84        }
     85        device_t *rh;
     86        ret = setup_root_hub(&rh, device);
     87
     88        if (ret != EOK) {
     89                uhci_print_error("Failed to setup uhci root hub.\n");
     90                /* TODO: destroy uhci here */
     91                return ret;
     92        }
     93
     94        ret = child_device_register(rh, device);
     95        if (ret != EOK) {
     96                uhci_print_error("Failed to register root hub.\n");
     97                /* TODO: destroy uhci here */
     98                return ret;
     99        }
     100
     101        return EOK;
    78102}
    79103
Note: See TracChangeset for help on using the changeset viewer.