Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 89e54124 in mainline


Ignore:
Timestamp:
2012-03-15T12:03:13Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
698cb1cc
Parents:
145d16f
Message:

ohci: Rename and cleanup pci_* functions and files.

They are not pci specific. Cleanup includes.

Location:
uspace/drv/bus/usb/ohci
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/Makefile

    r145d16f r89e54124  
    5050        ohci_batch.c \
    5151        ohci_endpoint.c \
    52         pci.c \
     52        res.c \
    5353        root_hub.c \
    5454        hw_struct/endpoint_descriptor.c \
  • uspace/drv/bus/usb/ohci/ohci.c

    r145d16f r89e54124  
    4242
    4343#include "ohci.h"
    44 #include "pci.h"
     44#include "res.h"
    4545#include "hc.h"
    4646
     
    180180        int irq = 0;
    181181
    182         ret = pci_get_my_registers(device, &reg_base, &reg_size, &irq);
     182        ret = get_my_registers(device, &reg_base, &reg_size, &irq);
    183183        CHECK_RET_DEST_FREE_RETURN(ret,
    184184            "Failed to get register memory addresses for %" PRIun ": %s.\n",
     
    211211        /* Try to enable interrupts */
    212212        bool interrupts = false;
    213         ret = pci_enable_interrupts(device);
     213        ret = enable_interrupts(device);
    214214        if (ret != EOK) {
    215215                usb_log_warning("Failed to enable interrupts: %s."
  • uspace/drv/bus/usb/ohci/res.c

    r145d16f r89e54124  
    3838#include <errno.h>
    3939#include <assert.h>
    40 #include <as.h>
    4140#include <devman.h>
    42 #include <ddi.h>
    43 #include <libarch/ddi.h>
    4441#include <device/hw_res_parsed.h>
    4542
    4643#include <usb/debug.h>
    47 #include <pci_dev_iface.h>
    4844
    49 #include "pci.h"
     45#include "res.h"
    5046
    5147/** Get address of registers and IRQ for given device.
     
    5753 * @return Error code.
    5854 */
    59 int pci_get_my_registers(ddf_dev_t *dev,
     55int get_my_registers(const ddf_dev_t *dev,
    6056    uintptr_t *mem_reg_address, size_t *mem_reg_size, int *irq_no)
    6157{
     
    9894 * @return Error code.
    9995 */
    100 int pci_enable_interrupts(ddf_dev_t *device)
     96int enable_interrupts(const ddf_dev_t *device)
    10197{
    10298        async_sess_t *parent_sess =
     
    106102                return ENOMEM;
    107103       
    108         bool enabled = hw_res_enable_interrupt(parent_sess);
     104        const bool enabled = hw_res_enable_interrupt(parent_sess);
    109105        async_hangup(parent_sess);
    110106       
  • uspace/drv/bus/usb/ohci/res.h

    r145d16f r89e54124  
    3232 * PCI related functions needed by OHCI driver.
    3333 */
    34 #ifndef DRV_OHCI_PCI_H
    35 #define DRV_OHCI_PCI_H
     34#ifndef DRV_OHCI_RES_H
     35#define DRV_OHCI_RES_H
    3636
    3737#include <ddf/driver.h>
    3838
    39 int pci_get_my_registers(ddf_dev_t *, uintptr_t *, size_t *, int *);
    40 int pci_enable_interrupts(ddf_dev_t *);
    41 int pci_disable_legacy(ddf_dev_t *);
     39int get_my_registers(const ddf_dev_t *, uintptr_t *, size_t *, int *);
     40int enable_interrupts(const ddf_dev_t *);
    4241
    4342#endif
Note: See TracChangeset for help on using the changeset viewer.