Changeset 4c7c251 in mainline for uspace/drv/uhci-hcd/pci.c


Ignore:
Timestamp:
2011-03-01T23:08:25Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37b1651d
Parents:
ac8285d (diff), 0e2fdcf (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:

New PCI device interface, USB legacy disabled during device initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/pci.c

    rac8285d r4c7c251  
    4040
    4141#include <usb/debug.h>
     42#include <pci_dev_iface.h>
    4243
    4344#include "pci.h"
     
    128129        return enabled ? EOK : EIO;
    129130}
     131/*----------------------------------------------------------------------------*/
     132int pci_disable_legacy(ddf_dev_t *device)
     133{
     134        assert(device);
     135        int parent_phone = devman_parent_device_connect(device->handle,
     136                IPC_FLAG_BLOCKING);
     137        if (parent_phone < 0) {
     138                return parent_phone;
     139        }
     140
     141        /* See UHCI design guide for these values,
     142         * write all WC bits in USB legacy register */
     143        sysarg_t address = 0xc0;
     144        sysarg_t value = 0x8f00;
     145
     146  int rc = async_req_3_0(parent_phone, DEV_IFACE_ID(PCI_DEV_IFACE),
     147            IPC_M_CONFIG_SPACE_WRITE_16, address, value);
     148        async_hangup(parent_phone);
     149
     150  return rc;
     151}
     152/*----------------------------------------------------------------------------*/
    130153/**
    131154 * @}
Note: See TracChangeset for help on using the changeset viewer.