Changes in / [6eb794a:467bf40] in mainline


Ignore:
Files:
96 added
24 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r6eb794a r467bf40  
    547547
    548548% Launch (devman) test drivers
    549 ! [CONFIG_DEBUG=y] CONFIG_TEST_DRIVERS (y/n)
    550 
     549! [CONFIG_DEBUG=y] CONFIG_TEST_DRIVERS (n/y)
     550
  • Makefile

    r6eb794a r467bf40  
    9292        $(MAKE) -C uspace clean
    9393        $(MAKE) -C boot clean
     94
     95-include Makefile.local
  • boot/Makefile.common

    r6eb794a r467bf40  
    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 \
     
    143144        $(USPACE_PATH)/app/ping/ping \
    144145        $(USPACE_PATH)/app/stats/stats \
     146        $(USPACE_PATH)/app/sysinfo/sysinfo \
    145147        $(USPACE_PATH)/app/tasks/tasks \
    146148        $(USPACE_PATH)/app/top/top \
    147         $(USPACE_PATH)/app/sysinfo/sysinfo
     149        $(USPACE_PATH)/app/usbinfo/usbinfo \
     150        $(USPACE_PATH)/app/virtusbkbd/vuk
    148151
    149152ifneq ($(CONFIG_BAREBONE),y)
  • boot/arch/amd64/Makefile.inc

    r6eb794a r467bf40  
    4040        pciintel \
    4141        isa \
    42         ns8250
     42        ns8250 \
     43        uhci \
     44        usbhub \
     45        usbkbd \
     46        vhc
    4347       
    4448RD_DRV_CFG += \
  • uspace/Makefile

    r6eb794a r467bf40  
    4949        app/trace \
    5050        app/top \
     51        app/usbinfo \
     52        app/virtusbkbd \
    5153        app/netecho \
    5254        app/nettest1 \
     
    116118        DIRS += drv/isa
    117119        DIRS += drv/ns8250
     120        DIRS += drv/uhci
     121        DIRS += drv/usbhub
     122        DIRS += drv/usbkbd
     123        DIRS += drv/vhc
    118124endif
    119125
     
    123129        DIRS += drv/isa
    124130        DIRS += drv/ns8250
     131        DIRS += drv/uhci
     132        DIRS += drv/usbhub
     133        DIRS += drv/usbkbd
     134        DIRS += drv/vhc
    125135endif
    126136
     
    148158        lib/packet \
    149159        lib/net
     160
     161ifeq ($(UARCH),amd64)
     162        LIBS += lib/usb
     163        LIBS += lib/usbvirt
     164endif
     165
     166ifeq ($(UARCH),ia32)
     167        LIBS += lib/usb
     168        LIBS += lib/usbvirt
     169endif
    150170
    151171LIBC_BUILD = $(addsuffix .build,$(LIBC))
  • uspace/Makefile.common

    r6eb794a r467bf40  
    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

    r6eb794a r467bf40  
    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/app/tester/Makefile

    r6eb794a r467bf40  
    3131BINARY = tester
    3232
     33LIBS += $(LIBUSB_PREFIX)/libusb.a
     34EXTRA_CFLAGS += -I$(LIBUSB_PREFIX)/include
     35
    3336SOURCES = \
    3437        tester.c \
     38        adt/usbaddrkeep.c \
    3539        thread/thread1.c \
    3640        print/print1.c \
  • uspace/app/tester/tester.c

    r6eb794a r467bf40  
    6363#include "mm/malloc1.def"
    6464#include "hw/serial/serial1.def"
     65#include "adt/usbaddrkeep.def"
    6566#include "hw/misc/virtchar1.def"
    6667        {NULL, NULL, NULL, false}
  • uspace/app/tester/tester.h

    r6eb794a r467bf40  
    8080extern const char *test_malloc1(void);
    8181extern const char *test_serial1(void);
     82extern const char *test_usbaddrkeep(void);
    8283extern const char *test_virtchar1(void);
    8384
  • uspace/doc/doxygroups.h

    r6eb794a r467bf40  
    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

    r6eb794a r467bf40  
    8888
    8989        int res = child_device_register_wrapper(parent, VIRTUAL_DEVICE_NAME,
    90             VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE);
     90            VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE,
     91            NULL);
    9192
    9293        return res;
     
    136137
    137138        res = child_device_register_wrapper(parent, PLATFORM_DEVICE_NAME,
    138             match_id, PLATFORM_DEVICE_MATCH_SCORE);
     139            match_id, PLATFORM_DEVICE_MATCH_SCORE, NULL);
    139140
    140141        return res;
  • uspace/drv/rootvirt/devices.def

    r6eb794a r467bf40  
    2222},
    2323#endif
     24/* Virtual USB host controller. */
     25{
     26        .name = "usbhc",
     27        .match_id = "usb&hc=vhc"
     28},
  • uspace/drv/rootvirt/rootvirt.c

    r6eb794a r467bf40  
    8484
    8585        int rc = child_device_register_wrapper(parent, virt_dev->name,
    86             virt_dev->match_id, 10);
     86            virt_dev->match_id, 10, NULL);
    8787
    8888        if (rc == EOK) {
  • uspace/drv/test1/test1.c

    r6eb794a r467bf40  
    6262
    6363        int rc = child_device_register_wrapper(parent, name,
    64             match_id, match_score);
     64            match_id, match_score, NULL);
    6565
    6666        if (rc == EOK) {
  • uspace/drv/test2/test2.c

    r6eb794a r467bf40  
    6464
    6565        int rc = child_device_register_wrapper(parent, name,
    66             match_id, match_score);
     66            match_id, match_score, NULL);
    6767
    6868        if (rc == EOK) {
  • uspace/lib/c/generic/devman.c

    r6eb794a r467bf40  
    230230       
    231231        if (flags & IPC_FLAG_BLOCKING) {
    232                 phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
     232                phone = async_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
    233233                    DEVMAN_CONNECT_TO_DEVICE, handle);
    234234        } else {
    235                 phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
     235                phone = async_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
    236236                    DEVMAN_CONNECT_TO_DEVICE, handle);
    237237        }
  • uspace/lib/c/include/ipc/dev_iface.h

    r6eb794a r467bf40  
    3838        HW_RES_DEV_IFACE = 0,   
    3939        CHAR_DEV_IFACE,
     40
     41        /** Interface provided by USB host controller. */
     42        USBHC_DEV_IFACE,
     43
    4044        // TODO add more interfaces
    4145        DEV_IFACE_MAX
     
    5054        DEV_IFACE_ID(DEV_FIRST_CUSTOM_METHOD_IDX)
    5155
     56/*
     57 * The first argument is actually method (as the "real" method is used
     58 * for indexing into interfaces.
     59 */
     60
     61#define DEV_IPC_GET_ARG1(call) IPC_GET_ARG2((call))
     62#define DEV_IPC_GET_ARG2(call) IPC_GET_ARG3((call))
     63#define DEV_IPC_GET_ARG3(call) IPC_GET_ARG4((call))
     64#define DEV_IPC_GET_ARG4(call) IPC_GET_ARG5((call))
     65
    5266
    5367#endif
  • uspace/lib/drv/Makefile

    r6eb794a r467bf40  
    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_usbhc.c \
    3839        generic/remote_char.c
    3940
  • uspace/lib/drv/generic/dev_iface.c

    r6eb794a r467bf40  
    3939#include "remote_res.h"
    4040#include "remote_char.h"
     41#include "remote_usbhc.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_usbhc_iface
    4648        }
    4749};
  • uspace/lib/drv/generic/driver.c

    r6eb794a r467bf40  
    390390 */
    391391int child_device_register_wrapper(device_t *parent, const char *child_name,
    392     const char *child_match_id, int child_match_score)
     392    const char *child_match_id, int child_match_score,
     393    devman_handle_t *child_handle)
    393394{
    394395        device_t *child = NULL;
     
    418419                goto failure;
    419420
     421        if (child_handle != NULL) {
     422                *child_handle = child->handle;
     423        }
    420424        return EOK;
    421425
  • uspace/lib/drv/include/driver.h

    r6eb794a r467bf40  
    199199
    200200int child_device_register(device_t *, device_t *);
    201 int child_device_register_wrapper(device_t *, const char *, const char *, int);
     201int child_device_register_wrapper(device_t *, const char *, const char *, int,
     202    devman_handle_t *);
    202203
    203204
  • uspace/srv/devman/devman.c

    r6eb794a r467bf40  
    133133        printf(NAME": the '%s' driver was added to the list of available "
    134134            "drivers.\n", drv->name);
     135
     136        printf(NAME ": match ids:");
     137        link_t *cur;
     138        for (cur = drv->match_ids.ids.next; cur != &drv->match_ids.ids; cur = cur->next) {
     139                match_id_t *match_id = list_get_instance(cur, match_id_t, link);
     140                printf(" %d:%s", match_id->score, match_id->id);
     141        }
     142        printf("\n");
    135143}
    136144
  • uspace/srv/net/tl/udp/udp.c

    r6eb794a r467bf40  
    711711        int socket_id;
    712712        size_t addrlen;
    713         size_t size;
     713        size_t size = 0;
    714714        ipc_call_t answer;
    715715        int answer_count;
Note: See TracChangeset for help on using the changeset viewer.