~jsvoboda/helenos/dnsr

« back to all changes in this revision

Viewing changes to uspace/drv/bus/usb/ehci/res.c

  • Committer: Jiri Svoboda
  • Date: 2012-11-11 21:31:03 UTC
  • mfrom: (1527.1.178 mainline)
  • Revision ID: jiri@wiwaxia-20121111213103-314bmkettwvlwj97
MergeĀ mainlineĀ changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
 * @param[out] irq_no IRQ assigned to the device.
76
76
 * @return Error code.
77
77
 */
78
 
int get_my_registers(const ddf_dev_t *dev,
 
78
int get_my_registers(ddf_dev_t *dev,
79
79
    uintptr_t *mem_reg_address, size_t *mem_reg_size, int *irq_no)
80
80
{
81
81
        assert(dev);
82
82
        
83
83
        async_sess_t *parent_sess = devman_parent_device_connect(
84
 
            EXCHANGE_SERIALIZE, dev->handle, IPC_FLAG_BLOCKING);
 
84
            EXCHANGE_SERIALIZE, ddf_dev_get_handle(dev), IPC_FLAG_BLOCKING);
85
85
        if (!parent_sess)
86
86
                return ENOMEM;
87
87
        
114
114
 * @param[in] device Device asking for interrupts
115
115
 * @return Error code.
116
116
 */
117
 
int enable_interrupts(const ddf_dev_t *device)
 
117
int enable_interrupts(ddf_dev_t *device)
118
118
{
119
119
        async_sess_t *parent_sess = devman_parent_device_connect(
120
 
            EXCHANGE_SERIALIZE, device->handle, IPC_FLAG_BLOCKING);
 
120
            EXCHANGE_SERIALIZE, ddf_dev_get_handle(device), IPC_FLAG_BLOCKING);
121
121
        if (!parent_sess)
122
122
                return ENOMEM;
123
123
        
133
133
 * @param eecp Value of EHCI Extended Capabilities pointer.
134
134
 * @return Error code.
135
135
 */
136
 
static int disable_extended_caps(const ddf_dev_t *device, unsigned eecp)
 
136
static int disable_extended_caps(ddf_dev_t *device, unsigned eecp)
137
137
{
138
138
        /* nothing to do */
139
139
        if (eecp == 0)
140
140
                return EOK;
141
141
 
142
142
        async_sess_t *parent_sess = devman_parent_device_connect(
143
 
            EXCHANGE_SERIALIZE, device->handle, IPC_FLAG_BLOCKING);
 
143
            EXCHANGE_SERIALIZE, ddf_dev_get_handle(device), IPC_FLAG_BLOCKING);
144
144
        if (!parent_sess)
145
145
                return ENOMEM;
146
146
 
233
233
#undef CHECK_RET_HANGUP_RETURN
234
234
}
235
235
 
236
 
int disable_legacy(const ddf_dev_t *device, uintptr_t reg_base, size_t reg_size)
 
236
int disable_legacy(ddf_dev_t *device, uintptr_t reg_base, size_t reg_size)
237
237
{
238
238
        assert(device);
239
239
        usb_log_debug("Disabling EHCI legacy support.\n");