Changes in / [4687fcd4:a09128c] in mainline
- Location:
- uspace
- Files:
-
- 1 added
- 22 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
r4687fcd4 ra09128c 144 144 return CMD_SUCCESS; 145 145 case 'H': 146 printf( "%s",cat_oops);146 printf(cat_oops); 147 147 return CMD_FAILURE; 148 148 case 't': 149 printf( "%s",cat_oops);149 printf(cat_oops); 150 150 return CMD_FAILURE; 151 151 case 'b': 152 printf( "%s",cat_oops);152 printf(cat_oops); 153 153 break; 154 154 case 'm': 155 printf( "%s",cat_oops);155 printf(cat_oops); 156 156 return CMD_FAILURE; 157 157 } -
uspace/app/bdsh/cmds/modules/rm/rm.c
r4687fcd4 ra09128c 227 227 } 228 228 memset(buff, 0, sizeof(buff)); 229 snprintf(buff, len, "%s",argv[i]);229 snprintf(buff, len, argv[i]); 230 230 231 231 scope = rm_scope(buff); -
uspace/drv/rootvirt/devices.def
r4687fcd4 ra09128c 23 23 #endif 24 24 /* Virtual USB host controller. */ 25 /*26 25 { 27 26 .name = "usbhc", 28 27 .match_id = "usb&hc=vhc" 29 28 }, 30 */ -
uspace/drv/uhci/Makefile
r4687fcd4 ra09128c 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 -I.31 EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include 32 32 BINARY = uhci 33 33 34 34 SOURCES = \ 35 callback.c \36 iface.c \37 35 main.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 36 pci.c \ 37 transfers.c 45 38 46 39 include $(USPACE_PREFIX)/Makefile.common -
uspace/drv/uhci/main.c
r4687fcd4 ra09128c 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky , Jan Vesely2 * Copyright (c) 2010 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 #include <driver.h> 28 #include <usb/hcdhubd.h> 29 #include <usb_iface.h> 30 #include <usb/debug.h> 29 31 #include <errno.h> 30 32 #include <str_error.h> 31 #include <usb_iface.h> 32 33 #include "debug.h" 34 #include "iface.h" 35 #include "name.h" 33 #include <driver.h> 36 34 #include "uhci.h" 37 35 … … 56 54 static int uhci_add_device(device_t *device) 57 55 { 58 u hci_print_info( "uhci_add_device() called\n");56 usb_dprintf(NAME, 1, "uhci_add_device() called\n"); 59 57 device->ops = &uhci_ops; 60 58 … … 67 65 68 66 if (rc != EOK) { 69 uhci_print_fatal("failed to get I/O registers addresses: %s.\n", 67 fprintf(stderr, 68 NAME ": failed to get I/O registers addresses: %s.\n", 70 69 str_error(rc)); 71 70 return rc; 72 71 } 73 72 74 u hci_print_info("I/O regs at 0x%X (size %zu), IRQ %d.\n",73 usb_dprintf(NAME, 2, "I/O regs at 0x%X (size %zu), IRQ %d.\n", 75 74 io_reg_base, io_reg_size, irq); 76 75 77 return uhci_init(device, (void*)io_reg_base, io_reg_size); 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; 78 83 } 79 84 … … 93 98 */ 94 99 sleep(5); 95 usb_dprintf_enable(NAME, DEBUG_LEVEL_INFO);100 usb_dprintf_enable(NAME, 5); 96 101 97 102 return driver_main(&uhci_driver); -
uspace/drv/uhci/uhci.h
r4687fcd4 ra09128c 1 1 /* 2 * Copyright (c) 2010 Jan Vesely2 * Copyright (c) 2010 Vojtech Horky 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>41 38 #include <usbhc_iface.h> 42 39 43 #include "root_hub/root_hub.h" 44 #include "transfer_list.h" 40 #define NAME "uhci" 45 41 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 ); 42 usbhc_iface_t uhci_iface; 103 43 104 44 int pci_get_my_registers(device_t *, uintptr_t *, size_t *, int *); -
uspace/lib/usb/include/usb/devreq.h
r4687fcd4 ra09128c 70 70 /** Main parameter to the request. */ 71 71 union { 72 uint16_t value;73 72 /* FIXME: add #ifdefs according to host endianess */ 74 73 struct { … … 76 75 uint8_t value_high; 77 76 }; 77 uint16_t value; 78 78 }; 79 79 /** Auxiliary parameter to the request. -
uspace/lib/usb/src/addrkeep.c
r4687fcd4 ra09128c 33 33 * @brief Address keeping. 34 34 */ 35 #include <usb/ addrkeep.h>35 #include <usb/hcd.h> 36 36 #include <errno.h> 37 37 #include <assert.h>
Note:
See TracChangeset
for help on using the changeset viewer.