Changes in / [a09128c:4687fcd4] in mainline
- Location:
- uspace
- Files:
-
- 22 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
ra09128c r4687fcd4 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
ra09128c r4687fcd4 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
ra09128c r4687fcd4 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
ra09128c r4687fcd4 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 callback.c \ 36 iface.c \ 35 37 main.c \ 36 pci.c \ 37 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 \ 43 uhci_struct/transfer_descriptor.c \ 44 pci.c 38 45 39 46 include $(USPACE_PREFIX)/Makefile.common -
uspace/drv/uhci/main.c
ra09128c r4687fcd4 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky 2 * Copyright (c) 2010 Vojtech Horky, 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 #include <usb/hcdhubd.h> 29 #include <usb_iface.h> 30 #include <usb/debug.h> 28 #include <driver.h> 31 29 #include <errno.h> 32 30 #include <str_error.h> 33 #include <driver.h> 31 #include <usb_iface.h> 32 33 #include "debug.h" 34 #include "iface.h" 35 #include "name.h" 34 36 #include "uhci.h" 35 37 … … 54 56 static int uhci_add_device(device_t *device) 55 57 { 56 u sb_dprintf(NAME, 1, "uhci_add_device() called\n");58 uhci_print_info( "uhci_add_device() called\n" ); 57 59 device->ops = &uhci_ops; 58 60 … … 65 67 66 68 if (rc != EOK) { 67 fprintf(stderr, 68 NAME ": failed to get I/O registers addresses: %s.\n", 69 uhci_print_fatal("failed to get I/O registers addresses: %s.\n", 69 70 str_error(rc)); 70 71 return rc; 71 72 } 72 73 73 u sb_dprintf(NAME, 2,"I/O regs at 0x%X (size %zu), IRQ %d.\n",74 uhci_print_info("I/O regs at 0x%X (size %zu), IRQ %d.\n", 74 75 io_reg_base, io_reg_size, irq); 75 76 76 /* 77 * We need to announce the presence of our root hub. 78 */ 79 usb_dprintf(NAME, 2, "adding root hub\n"); 80 usb_hcd_add_root_hub(device); 81 82 return EOK; 77 return uhci_init(device, (void*)io_reg_base, io_reg_size); 83 78 } 84 79 … … 98 93 */ 99 94 sleep(5); 100 usb_dprintf_enable(NAME, 5);95 usb_dprintf_enable(NAME, DEBUG_LEVEL_INFO); 101 96 102 97 return driver_main(&uhci_driver); -
uspace/drv/uhci/uhci.h
ra09128c r4687fcd4 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky2 * Copyright (c) 2010 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 36 36 #define DRV_UHCI_UHCI_H 37 37 38 #include <fibril.h> 39 40 #include <usb/addrkeep.h> 38 41 #include <usbhc_iface.h> 39 42 40 #define NAME "uhci" 43 #include "root_hub/root_hub.h" 44 #include "transfer_list.h" 41 45 42 usbhc_iface_t uhci_iface; 46 typedef struct uhci_regs { 47 uint16_t usbcmd; 48 #define UHCI_CMD_MAX_PACKET (1 << 7) 49 #define UHCI_CMD_CONFIGURE (1 << 6) 50 #define UHCI_CMD_DEBUG (1 << 5) 51 #define UHCI_CMD_FORCE_GLOBAL_RESUME (1 << 4) 52 #define UHCI_CMD_FORCE_GLOBAL_SUSPEND (1 << 3) 53 #define UHCI_CMD_GLOBAL_RESET (1 << 2) 54 #define UHCI_CMD_HCRESET (1 << 1) 55 #define UHCI_CMD_RUN_STOP (1 << 0) 56 57 uint16_t usbsts; 58 #define UHCI_STATUS_HALTED (1 << 5) 59 #define UHCI_STATUS_PROCESS_ERROR (1 << 4) 60 #define UHCI_STATUS_SYSTEM_ERROR (1 << 3) 61 #define UHCI_STATUS_RESUME (1 << 2) 62 #define UHCI_STATUS_ERROR_INTERRUPT (1 << 1) 63 #define UHCI_STATUS_INTERRUPT (1 << 0) 64 65 uint16_t usbintr; 66 uint16_t frnum; 67 uint32_t flbaseadd; 68 uint8_t sofmod; 69 } regs_t; 70 71 #define TRANSFER_QUEUES 4 72 #define UHCI_FRAME_LIST_COUNT 1024 73 #define UHCI_CLEANER_TIMEOUT 1000000 74 #define UHCI_DEBUGER_TIMEOUT 500000 75 76 typedef struct uhci { 77 usb_address_keeping_t address_manager; 78 uhci_root_hub_t root_hub; 79 volatile regs_t *registers; 80 81 link_pointer_t *frame_list; 82 83 transfer_list_t transfers[TRANSFER_QUEUES]; 84 fid_t cleaner; 85 fid_t debug_checker; 86 } uhci_t; 87 88 /* init uhci specifics in device.driver_data */ 89 int uhci_init( device_t *device, void *regs, size_t reg_size ); 90 91 int uhci_destroy( device_t *device ); 92 93 int uhci_transfer( 94 device_t *dev, 95 usb_target_t target, 96 usb_transfer_type_t transfer_type, 97 bool toggle, 98 usb_packet_id pid, 99 void *buffer, size_t size, 100 usbhc_iface_transfer_out_callback_t callback_out, 101 usbhc_iface_transfer_in_callback_t callback_in, 102 void *arg ); 43 103 44 104 int pci_get_my_registers(device_t *, uintptr_t *, size_t *, int *); -
uspace/lib/usb/include/usb/devreq.h
ra09128c r4687fcd4 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/src/addrkeep.c
ra09128c r4687fcd4 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.