Changes in / [6610565b:977fcea] in mainline
- Location:
- uspace
- Files:
-
- 22 added
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
r6610565b r977fcea 144 144 return CMD_SUCCESS; 145 145 case 'H': 146 printf( cat_oops);146 printf("%s", cat_oops); 147 147 return CMD_FAILURE; 148 148 case 't': 149 printf( cat_oops);149 printf("%s", cat_oops); 150 150 return CMD_FAILURE; 151 151 case 'b': 152 printf( cat_oops);152 printf("%s", cat_oops); 153 153 break; 154 154 case 'm': 155 printf( cat_oops);155 printf("%s", cat_oops); 156 156 return CMD_FAILURE; 157 157 } -
uspace/app/bdsh/cmds/modules/rm/rm.c
r6610565b r977fcea 227 227 } 228 228 memset(buff, 0, sizeof(buff)); 229 snprintf(buff, len, argv[i]);229 snprintf(buff, len, "%s", argv[i]); 230 230 231 231 scope = rm_scope(buff); -
uspace/drv/rootvirt/devices.def
r6610565b r977fcea 23 23 #endif 24 24 /* Virtual USB host controller. */ 25 /* 25 26 { 26 27 .name = "usbhc", 27 28 .match_id = "usb&hc=vhc" 28 29 }, 30 */ -
uspace/drv/uhci/Makefile
r6610565b r977fcea 29 29 USPACE_PREFIX = ../.. 30 30 LIBS = $(LIBDRV_PREFIX)/libdrv.a $(LIBUSB_PREFIX)/libusb.a 31 EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include 31 EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include -I. 32 32 BINARY = uhci 33 33 34 34 SOURCES = \ 35 iface.c \ 35 36 main.c \ 36 transfers.c 37 root_hub/port.c \ 38 root_hub/port_status.c \ 39 root_hub/root_hub.c \ 40 uhci.c \ 41 utils/fibril_semaphore.c \ 42 utils/hc_synchronizer.c \ 43 utils/usb_device.c 37 44 38 45 include $(USPACE_PREFIX)/Makefile.common -
uspace/drv/uhci/main.c
r6610565b r977fcea 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky 2 * Copyright (c) 2010 Vojtech Horky, Jan Vesely 3 3 * All rights reserved. 4 4 * … … 28 28 #include <usb/hcdhubd.h> 29 29 #include <usb_iface.h> 30 #include <usb/debug.h>31 30 #include <errno.h> 32 #include <driver.h> 31 32 #include "debug.h" 33 #include "iface.h" 34 #include "name.h" 33 35 #include "uhci.h" 34 36 … … 53 55 static int uhci_add_device(device_t *device) 54 56 { 55 usb_dprintf(NAME, 1, "uhci_add_device() called\n"); 57 // usb_dprintf(NAME, DEBUG, "uhci_add_device() called\n"); 58 uhci_print_info( "uhci_add_device() called\n" ); 56 59 device->ops = &uhci_ops; 57 60 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); 61 uhci_init( device, (void*)0xc020 ); 63 62 64 63 return EOK; … … 79 78 * Do some global initializations. 80 79 */ 81 sleep( 5);82 usb_dprintf_enable(NAME, 5);80 sleep( 5 ); 81 usb_dprintf_enable(NAME, DEBUG_LEVEL_MAX); 83 82 84 83 return driver_main(&uhci_driver); -
uspace/drv/uhci/uhci.h
r6610565b r977fcea 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky2 * Copyright (c) 2010 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 28 /** @addtogroup usb 30 29 * @{ … … 36 35 #define DRV_UHCI_UHCI_H 37 36 37 #include <fibril.h> 38 39 #include <usb/addrkeep.h> 40 #include <usb/hcdhubd.h> 38 41 #include <usbhc_iface.h> 39 42 40 # define NAME "uhci"43 #include "root_hub/root_hub.h" 41 44 42 usbhc_iface_t uhci_iface; 45 typedef struct uhci_regs { 46 uint16_t usbcmd; 47 uint16_t usbsts; 48 uint16_t usbintr; 49 uint16_t frnum; 50 uint32_t flbaseadd; 51 uint8_t sofmod; 52 } regs_t; 53 54 typedef struct uhci { 55 usb_address_keeping_t address_manager; 56 uhci_root_hub_t root_hub; 57 volatile regs_t* registers; 58 } uhci_t ; 59 60 /* init uhci specifics in device.driver_data */ 61 int uhci_init( device_t *device, void *regs ); 62 63 int uhci_destroy( device_t *device ); 64 65 int uhci_in( 66 device_t *dev, 67 usb_target_t target, 68 usb_transfer_type_t transfer_type, 69 void *buffer, size_t size, 70 usbhc_iface_transfer_in_callback_t callback, void *arg 71 ); 72 73 int uhci_out( 74 device_t *dev, 75 usb_target_t target, 76 usb_transfer_type_t transfer_type, 77 void *buffer, size_t size, 78 usbhc_iface_transfer_out_callback_t callback, void *arg 79 ); 80 81 int uhci_setup( 82 device_t *dev, 83 usb_target_t target, 84 usb_transfer_type_t transfer_type, 85 void *buffer, size_t size, 86 usbhc_iface_transfer_out_callback_t callback, void *arg 87 ); 43 88 44 89 #endif -
uspace/lib/usb/include/usb/devreq.h
r6610565b r977fcea 70 70 /** Main parameter to the request. */ 71 71 union { 72 uint16_t value; 72 73 /* FIXME: add #ifdefs according to host endianess */ 73 74 struct { … … 75 76 uint8_t value_high; 76 77 }; 77 uint16_t value;78 78 }; 79 79 /** Auxiliary parameter to the request. -
uspace/lib/usb/include/usb/hcd.h
-
Property mode
changed from
100644
to120000
r6610565b r977fcea 1 /* 2 * Copyright (c) 2010 Vojtech Horky 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libusb usb 30 * @{ 31 */ 32 /** @file 33 * @brief HC driver. 34 */ 35 #ifndef LIBUSB_HCD_H_ 36 #define LIBUSB_HCD_H_ 37 38 #include <usb/usb.h> 39 #include <fibril_synch.h> 40 #include <devman.h> 41 42 /** Info about used address. */ 43 typedef struct { 44 /** Linked list member. */ 45 link_t link; 46 /** Address. */ 47 usb_address_t address; 48 /** Corresponding devman handle. */ 49 devman_handle_t devman_handle; 50 } usb_address_keeping_used_t; 51 52 /** Structure for keeping track of free and used USB addresses. */ 53 typedef struct { 54 /** Head of list of used addresses. */ 55 link_t used_addresses; 56 /** Upper bound for USB addresses. */ 57 usb_address_t max_address; 58 /** Mutex protecting used address. */ 59 fibril_mutex_t used_addresses_guard; 60 /** Condition variable for used addresses. */ 61 fibril_condvar_t used_addresses_condvar; 62 63 /** Condition variable mutex for default address. */ 64 fibril_mutex_t default_condvar_guard; 65 /** Condition variable for default address. */ 66 fibril_condvar_t default_condvar; 67 /** Whether is default address available. */ 68 bool default_available; 69 } usb_address_keeping_t; 70 71 void usb_address_keeping_init(usb_address_keeping_t *, usb_address_t); 72 73 void usb_address_keeping_reserve_default(usb_address_keeping_t *); 74 void usb_address_keeping_release_default(usb_address_keeping_t *); 75 76 usb_address_t usb_address_keeping_request(usb_address_keeping_t *); 77 int usb_address_keeping_release(usb_address_keeping_t *, usb_address_t); 78 void usb_address_keeping_devman_bind(usb_address_keeping_t *, usb_address_t, 79 devman_handle_t); 80 usb_address_t usb_address_keeping_find(usb_address_keeping_t *, 81 devman_handle_t); 82 83 84 #endif 1 addrkeep.h -
Property mode
changed from
-
uspace/lib/usb/src/addrkeep.c
r6610565b r977fcea 33 33 * @brief Address keeping. 34 34 */ 35 #include <usb/ hcd.h>35 #include <usb/addrkeep.h> 36 36 #include <errno.h> 37 37 #include <assert.h>
Note:
See TracChangeset
for help on using the changeset viewer.