Changes in / [7e1f9b7:32eceb4f] in mainline


Ignore:
Files:
64 added
11 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r7e1f9b7 r32eceb4f  
    7979        $(MAKE) -C uspace clean
    8080        $(MAKE) -C boot clean
     81
     82-include Makefile.local
  • boot/Makefile.common

    r7e1f9b7 r32eceb4f  
    9999        $(USPACE_PATH)/srv/taskmon/taskmon \
    100100        $(USPACE_PATH)/srv/hw/netif/dp8390/dp8390 \
     101        $(USPACE_PATH)/srv/hw/bus/usb/hcd/virtual/vhcd \
    101102        $(USPACE_PATH)/srv/net/netif/lo/lo \
    102103        $(USPACE_PATH)/srv/net/il/arp/arp \
     
    109110       
    110111RD_DRVS = \
    111         root
     112        root \
     113        vhc
    112114
    113115RD_DRV_CFG =
     
    140142        $(USPACE_PATH)/app/ping/ping \
    141143        $(USPACE_PATH)/app/stats/stats \
     144        $(USPACE_PATH)/app/virtusbkbd/vuk \
    142145        $(USPACE_PATH)/app/tasks/tasks \
    143146        $(USPACE_PATH)/app/top/top
  • boot/arch/amd64/Makefile.inc

    r7e1f9b7 r32eceb4f  
    4040        pciintel \
    4141        isa \
    42         ns8250
     42        ns8250 \
     43        uhci \
     44        usbkbd
    4345       
    4446RD_DRV_CFG += \
  • uspace/Makefile

    r7e1f9b7 r32eceb4f  
    5050        app/trace \
    5151        app/top \
     52        app/virtusbkbd \
    5253        app/netecho \
    5354        app/nettest1 \
     
    8687        srv/net/tl/tcp \
    8788        srv/net/net \
    88         drv/root
     89        drv/root \
     90        drv/vhc
    8991
    9092## Networking
     
    116118        DIRS += drv/isa
    117119        DIRS += drv/ns8250
     120        DIRS += drv/uhci
     121        DIRS += drv/usbkbd
    118122endif
    119123
     
    141145        lib/packet \
    142146        lib/net
     147
     148ifeq ($(UARCH),amd64)
     149        LIBS += lib/usb
     150        LIBS += lib/usbvirt
     151endif
     152
     153ifeq ($(UARCH),ia32)
     154        LIBS += lib/usb
     155        LIBS += lib/usbvirt
     156endif
    143157
    144158LIBC_BUILD = $(addsuffix .build,$(LIBC))
  • uspace/Makefile.common

    r7e1f9b7 r32eceb4f  
    8686LIBCLUI_PREFIX = $(LIB_PREFIX)/clui
    8787
     88
     89LIBUSB_PREFIX = $(LIB_PREFIX)/usb
     90LIBUSBVIRT_PREFIX = $(LIB_PREFIX)/usbvirt
    8891LIBDRV_PREFIX = $(LIB_PREFIX)/drv
    8992LIBPACKET_PREFIX = $(LIB_PREFIX)/packet
  • uspace/app/init/init.c

    r7e1f9b7 r32eceb4f  
    312312        getterm("term/vc5", "/app/bdsh", false);
    313313        getterm("term/vc6", "/app/klog", false);
     314        getterm("term/vc7", "/srv/devman", false);
    314315       
    315316        return 0;
  • uspace/doc/doxygroups.h

    r7e1f9b7 r32eceb4f  
    155155         * @endcond
    156156         */
    157        
     157
    158158/**
    159159 * @defgroup emul Emulation Libraries
     
    170170         * @ingroup emul
    171171         */
     172
     173/**
     174 * @defgroup usb USB
     175 * @ingroup uspace
     176 * @brief USB support for HelenOS.
     177 */
     178        /**
     179         * @defgroup libusb USB library
     180         * @ingroup usb
     181         * @brief Library for creating USB devices drivers.
     182         */
  • uspace/drv/root/root.c

    r7e1f9b7 r32eceb4f  
    7272static int add_platform_child(device_t *parent)
    7373{
     74        return EOK;
    7475        printf(NAME ": adding new child for platform device.\n");
    7576       
     
    119120}
    120121
     122/** Create virtual USB host controller device.
     123 * Note that the virtual HC is actually device and driver in one
     124 * task.
     125 *
     126 * @param parent Parent device.
     127 * @return Error code.
     128 */
     129static int add_virtual_usb_host_controller(device_t *parent)
     130{
     131        printf(NAME ": adding virtual host contoller.\n");
     132
     133        int rc;
     134        device_t *vhc = NULL;
     135        match_id_t *match_id = NULL;
     136
     137        vhc = create_device();
     138        if (vhc == NULL) {
     139                rc = ENOMEM;
     140                goto failure;
     141        }
     142
     143        vhc->name = "vhc";
     144        printf(NAME ": the new device's name is %s.\n", vhc->name);
     145
     146        /* Initialize match id list. */
     147        match_id = create_match_id();
     148        if (match_id == NULL) {
     149                rc = ENOMEM;
     150                goto failure;
     151        }
     152
     153        match_id->id = "usb&hc=vhc";
     154        match_id->score = 100;
     155        add_match_id(&vhc->match_ids, match_id);
     156
     157        /* Register child device. */
     158        rc = child_device_register(vhc, parent);
     159        if (rc != EOK)
     160                goto failure;
     161
     162        return EOK;
     163
     164failure:
     165        if (match_id != NULL)
     166                match_id->id = NULL;
     167
     168        if (vhc != NULL) {
     169                vhc->name = NULL;
     170                delete_device(vhc);
     171        }
     172
     173        return rc;
     174}
     175
    121176/** Get the root device.
    122177 *
     
    133188                printf(NAME ": failed to add child device for platform.\n");
    134189       
     190        /* Register virtual USB host controller. */
     191        int rc = add_virtual_usb_host_controller(dev);
     192        if (EOK != rc) {
     193                printf(NAME ": failed to add child device - virtual USB HC.\n");
     194        }
     195
    135196        return res;
    136197}
  • uspace/lib/c/include/ipc/dev_iface.h

    r7e1f9b7 r32eceb4f  
    3838        HW_RES_DEV_IFACE = 0,   
    3939        CHAR_DEV_IFACE,
     40        USB_DEV_IFACE,
    4041        // TODO add more interfaces
    4142        DEV_IFACE_MAX
  • uspace/lib/drv/Makefile

    r7e1f9b7 r32eceb4f  
    2929
    3030USPACE_PREFIX = ../..
    31 EXTRA_CFLAGS = -Iinclude
     31EXTRA_CFLAGS = -Iinclude -I$(LIBUSB_PREFIX)/include
    3232LIBRARY = libdrv
    3333
     
    3636        generic/dev_iface.c \
    3737        generic/remote_res.c \
     38        generic/remote_usb.c \
    3839        generic/remote_char.c
    3940
  • uspace/lib/drv/generic/dev_iface.c

    r7e1f9b7 r32eceb4f  
    3939#include "remote_res.h"
    4040#include "remote_char.h"
     41#include "remote_usb.h"
    4142
    4243static iface_dipatch_table_t remote_ifaces = {
    4344        .ifaces = {
    4445                &remote_res_iface,
    45                 &remote_char_iface
     46                &remote_char_iface,
     47                &remote_usb_iface
    4648        }
    4749};
Note: See TracChangeset for help on using the changeset viewer.