Changes in / [6265a2b:7fc092a] in mainline


Ignore:
Location:
uspace
Files:
20 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cat/cat.c

    r6265a2b r7fc092a  
    144144                        return CMD_SUCCESS;
    145145                case 'H':
    146                         printf(cat_oops);
     146                        printf("%s", cat_oops);
    147147                        return CMD_FAILURE;
    148148                case 't':
    149                         printf(cat_oops);
     149                        printf("%s", cat_oops);
    150150                        return CMD_FAILURE;
    151151                case 'b':
    152                         printf(cat_oops);
     152                        printf("%s", cat_oops);
    153153                        break;
    154154                case 'm':
    155                         printf(cat_oops);
     155                        printf("%s", cat_oops);
    156156                        return CMD_FAILURE;
    157157                }
  • uspace/app/bdsh/cmds/modules/rm/rm.c

    r6265a2b r7fc092a  
    227227                }
    228228                memset(buff, 0, sizeof(buff));
    229                 snprintf(buff, len, argv[i]);
     229                snprintf(buff, len, "%s", argv[i]);
    230230
    231231                scope = rm_scope(buff);
  • uspace/drv/rootvirt/devices.def

    r6265a2b r7fc092a  
    2323#endif
    2424/* Virtual USB host controller. */
     25/*
    2526{
    2627        .name = "usbhc",
    2728        .match_id = "usb&hc=vhc"
    2829},
     30*/
  • uspace/drv/uhci/Makefile

    r6265a2b r7fc092a  
    2929USPACE_PREFIX = ../..
    3030LIBS = $(LIBDRV_PREFIX)/libdrv.a $(LIBUSB_PREFIX)/libusb.a
    31 EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include
     31EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include -I.
    3232BINARY = uhci
    3333
    3434SOURCES = \
     35        callback.c \
     36        iface.c \
    3537        main.c \
    36         transfers.c
     38        root_hub/port.c \
     39        root_hub/port_status.c \
     40        root_hub/root_hub.c \
     41        transfer_list.c \
     42        uhci.c
    3743
    3844include $(USPACE_PREFIX)/Makefile.common
  • uspace/drv/uhci/main.c

    r6265a2b r7fc092a  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2010 Vojtech Horky, Jan Vesely
    33 * All rights reserved.
    44 *
     
    2828#include <usb/hcdhubd.h>
    2929#include <usb_iface.h>
    30 #include <usb/debug.h>
    3130#include <errno.h>
    32 #include <driver.h>
     31
     32#include "debug.h"
     33#include "iface.h"
     34#include "name.h"
    3335#include "uhci.h"
    3436
     
    5355static int uhci_add_device(device_t *device)
    5456{
    55         usb_dprintf(NAME, 1, "uhci_add_device() called\n");
     57        uhci_print_info( "uhci_add_device() called\n" );
    5658        device->ops = &uhci_ops;
    5759
    58         /*
    59          * We need to announce the presence of our root hub.
    60          */
    61         usb_dprintf(NAME, 2, "adding root hub\n");
    62         usb_hcd_add_root_hub(device);
     60        // TODO: get this value out of pci driver
     61        uhci_init(device, (void*)0xc020);
    6362
    6463        return EOK;
     
    8079         */
    8180        sleep(5);
    82         usb_dprintf_enable(NAME, 5);
     81        usb_dprintf_enable(NAME, DEBUG_LEVEL_MAX);
    8382
    8483        return driver_main(&uhci_driver);
  • uspace/drv/uhci/uhci.h

    r6265a2b r7fc092a  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2010 Jan Vesely
    33 * All rights reserved.
    44 *
     
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 
    2928/** @addtogroup usb
    3029 * @{
     
    3635#define DRV_UHCI_UHCI_H
    3736
     37#include <fibril.h>
     38
     39#include <usb/addrkeep.h>
     40#include <usb/hcdhubd.h>
    3841#include <usbhc_iface.h>
    3942
    40 #define NAME "uhci"
     43#include "root_hub/root_hub.h"
     44#include "transfer_list.h"
    4145
    42 usbhc_iface_t uhci_iface;
     46typedef struct uhci_regs {
     47        uint16_t usbcmd;
     48        uint16_t usbsts;
     49        uint16_t usbintr;
     50        uint16_t frnum;
     51        uint32_t flbaseadd;
     52        uint8_t sofmod;
     53} regs_t;
     54
     55#define TRANSFER_QUEUES 4
     56#define UHCI_FRAME_LIST_COUNT 1024
     57
     58typedef struct uhci {
     59        usb_address_keeping_t address_manager;
     60        uhci_root_hub_t root_hub;
     61        volatile regs_t *registers;
     62
     63        link_pointer_t *frame_list;
     64
     65        transfer_list_t transfers[TRANSFER_QUEUES];
     66        fid_t cleaner;
     67} uhci_t;
     68
     69/* init uhci specifics in device.driver_data */
     70int uhci_init( device_t *device, void *regs );
     71
     72int uhci_destroy( device_t *device );
     73
     74int uhci_in(
     75  device_t *dev,
     76        usb_target_t target,
     77        usb_transfer_type_t transfer_type,
     78        void *buffer, size_t size,
     79        usbhc_iface_transfer_in_callback_t callback, void *arg
     80        );
     81
     82int uhci_out(
     83  device_t *dev,
     84        usb_target_t target,
     85  usb_transfer_type_t transfer_type,
     86  void *buffer, size_t size,
     87        usbhc_iface_transfer_out_callback_t callback, void *arg
     88  );
     89
     90int uhci_setup(
     91  device_t *dev,
     92  usb_target_t target,
     93  usb_transfer_type_t transfer_type,
     94  void *buffer, size_t size,
     95  usbhc_iface_transfer_out_callback_t callback, void *arg
     96  );
    4397
    4498#endif
  • uspace/lib/usb/include/usb/devreq.h

    r6265a2b r7fc092a  
    7070        /** Main parameter to the request. */
    7171        union {
     72                uint16_t value;
    7273                /* FIXME: add #ifdefs according to host endianess */
    7374                struct {
     
    7576                        uint8_t value_high;
    7677                };
    77                 uint16_t value;
    7878        };
    7979        /** Auxiliary parameter to the request.
  • uspace/lib/usb/src/addrkeep.c

    r6265a2b r7fc092a  
    3333 * @brief Address keeping.
    3434 */
    35 #include <usb/hcd.h>
     35#include <usb/addrkeep.h>
    3636#include <errno.h>
    3737#include <assert.h>
Note: See TracChangeset for help on using the changeset viewer.