Changeset db71e2a in mainline for uspace/drv/bus


Ignore:
Timestamp:
2013-07-24T17:42:25Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
69b264a9
Parents:
52f1882 (diff), cffa14e6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes.

usb hc macro changes from mainline were reverted, too many conflicts

Location:
uspace/drv/bus
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/isa/isa.dev

    r52f1882 rdb71e2a  
    3131        match 100 isa/cmos-rtc
    3232        io_range 70 2
     33
     34ata-c1:
     35        match 100 isa/ata_bd
     36        io_range 0x1f0 8
     37        io_range 0x3f0 8
     38
     39ata-c2:
     40        match 100 isa/ata_bd
     41        io_range 0x170 8
     42        io_range 0x370 8
     43
     44ata-c3:
     45        match 100 isa/ata_bd
     46        io_range 0x1e8 8
     47        io_range 0x3e8 8
     48
     49ata-c4:
     50        match 100 isa/ata_bd
     51        io_range 0x168 8
     52        io_range 0x368 8
  • uspace/drv/bus/pci/pciintel/pci.c

    r52f1882 rdb71e2a  
    327327
    328328        /* Vendor ID & Device ID, length(incl \0) 22 */
    329         rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04x&dev=%04x",
    330             fun->vendor_id, fun->device_id);
     329        rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04"
     330            PRIx16 "&dev=%04" PRIx16, fun->vendor_id, fun->device_id);
    331331        if (rc < 0) {
    332332                ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
     
    758758        fun->vendor_id = pci_conf_read_16(fun, PCI_VENDOR_ID);
    759759        fun->device_id = pci_conf_read_16(fun, PCI_DEVICE_ID);
     760       
     761        /* Explicitly enable PCI bus mastering */
     762        fun->command = pci_conf_read_16(fun, PCI_COMMAND) |
     763            PCI_COMMAND_MASTER;
     764        pci_conf_write_16(fun, PCI_COMMAND, fun->command);
     765       
    760766        fun->class_code = pci_conf_read_8(fun, PCI_BASE_CLASS);
    761767        fun->subclass_code = pci_conf_read_8(fun, PCI_SUB_CLASS);
  • uspace/drv/bus/pci/pciintel/pci.h

    r52f1882 rdb71e2a  
    5959        int dev;
    6060        int fn;
    61         int vendor_id;
    62         int device_id;
     61        uint16_t vendor_id;
     62        uint16_t device_id;
     63        uint16_t command;
    6364        uint8_t class_code;
    6465        uint8_t subclass_code;
  • uspace/drv/bus/pci/pciintel/pci_regs.h

    r52f1882 rdb71e2a  
    9595#define PCI_BRIDGE_CTL                  0x3E
    9696
     97/* PCI command flags */
     98#define PCI_COMMAND_IO            0x001
     99#define PCI_COMMAND_MEMORY        0x002
     100#define PCI_COMMAND_MASTER        0x004
     101#define PCI_COMMAND_SPECIAL       0x008
     102#define PCI_COMMAND_INVALIDATE    0x010
     103#define PCI_COMMAND_VGA_PALETTE   0x020
     104#define PCI_COMMAND_PARITY        0x040
     105#define PCI_COMMAND_WAIT          0x080
     106#define PCI_COMMAND_SERR          0x100
     107#define PCI_COMMAND_FAST_BACK     0x200
     108#define PCI_COMMAND_INTX_DISABLE  0x400
     109
    97110#endif
    98111
  • uspace/drv/bus/usb/ohci/hc.c

    r52f1882 rdb71e2a  
    533533        assert(instance);
    534534
    535         bzero(&instance->rh, sizeof(instance->rh));
     535        memset(&instance->rh, 0, sizeof(instance->rh));
    536536        /* Init queues */
    537537        const int ret = hc_init_transfer_lists(instance);
  • uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c

    r52f1882 rdb71e2a  
    5353{
    5454        assert(instance);
    55         bzero(instance, sizeof(ed_t));
     55        memset(instance, 0, sizeof(ed_t));
    5656
    5757        if (ep == NULL) {
  • uspace/drv/bus/usb/ohci/hw_struct/hcca.h

    r52f1882 rdb71e2a  
    6868        hcca_t *hcca = memalign(256, sizeof(hcca_t));
    6969        if (hcca)
    70                 bzero(hcca, sizeof(hcca_t));
     70                memset(hcca, 0, sizeof(hcca_t));
    7171        return hcca;
    7272}
  • uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.c

    r52f1882 rdb71e2a  
    5858{
    5959        assert(instance);
    60         bzero(instance, sizeof(td_t));
     60        memset(instance, 0, sizeof(td_t));
    6161        /* Set PID and Error code */
    6262        OHCI_MEM32_WR(instance->status,
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    r52f1882 rdb71e2a  
    112112        CHECK_NULL_DISPOSE_RETURN(uhci_batch->device_buffer,
    113113            "Failed to allocate UHCI buffer.\n");
    114         bzero(uhci_batch->device_buffer, total_size);
     114        memset(uhci_batch->device_buffer, 0, total_size);
    115115
    116116        uhci_batch->tds = uhci_batch->device_buffer;
  • uspace/drv/bus/usb/usbhub/port.c

    r52f1882 rdb71e2a  
    141141        usb_log_debug("Interrupt at port %zu\n", port->port_number);
    142142
    143         usb_port_status_t status;
     143        usb_port_status_t status = 0;
    144144        const int opResult = get_port_status(port, &status);
    145145        if (opResult != EOK) {
  • uspace/drv/bus/usb/usbmast/scsi_ms.c

    r52f1882 rdb71e2a  
    167167         */
    168168
    169         bzero(inq_res, sizeof(*inq_res));
     169        memset(inq_res, 0, sizeof(*inq_res));
    170170
    171171        inq_res->device_type = BIT_RANGE_EXTRACT(uint8_t,
  • uspace/drv/bus/usb/vhc/hub/virthubops.c

    r52f1882 rdb71e2a  
    299299    size_t *act_size)
    300300{
    301         int rc;
     301        int rc = ENOTSUP;
    302302        size_t port = request->index - 1;
    303303        usb_hub_class_feature_t feature = request->value;
Note: See TracChangeset for help on using the changeset viewer.