Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.c

    r6dbc500 r65f77f4  
    5757#include <ops/hw_res.h>
    5858#include <device/hw_res.h>
    59 #include <ops/pio_window.h>
    60 #include <device/pio_window.h>
    6159#include <ddi.h>
    6260#include <pci_dev_iface.h>
     
    143141}
    144142
    145 static pio_window_t *pciintel_get_pio_window(ddf_fun_t *fnode)
    146 {
    147         pci_fun_t *fun = pci_fun(fnode);
    148        
    149         if (fun == NULL)
    150                 return NULL;
    151         return &fun->pio_window;
    152 }
    153 
    154 
    155143static int pci_config_space_write_32(ddf_fun_t *fun, uint32_t address,
    156144    uint32_t data)
     
    210198        .get_resource_list = &pciintel_get_resources,
    211199        .enable_interrupt = &pciintel_enable_interrupt,
    212 };
    213 
    214 static pio_window_ops_t pciintel_pio_window_ops = {
    215         .get_pio_window = &pciintel_get_pio_window
    216200};
    217201
     
    227211static ddf_dev_ops_t pci_fun_ops = {
    228212        .interfaces[HW_RES_DEV_IFACE] = &pciintel_hw_res_ops,
    229         .interfaces[PIO_WINDOW_DEV_IFACE] = &pciintel_pio_window_ops,
    230213        .interfaces[PCI_DEV_IFACE] = &pci_dev_ops
    231214};
     
    634617                        pci_read_bars(fun);
    635618                        pci_read_interrupt(fun);
    636 
    637                         /* Propagate the PIO window to the function. */
    638                         fun->pio_window = bus->pio_win;
    639619                       
    640620                        ddf_fun_set_ops(fun->fnode, &pci_fun_ops);
     
    667647static int pci_dev_add(ddf_dev_t *dnode)
    668648{
    669         hw_resource_list_t hw_resources;
    670649        pci_bus_t *bus = NULL;
    671650        ddf_fun_t *ctl = NULL;
     
    693672                goto fail;
    694673        }
    695 
    696         rc = pio_window_get(sess, &bus->pio_win);
    697         if (rc != EOK) {
    698                 ddf_msg(LVL_ERROR, "pci_dev_add failed to get PIO window "
    699                     "for the device.");
    700                 goto fail;
    701         }
     674       
     675        hw_resource_list_t hw_resources;
    702676       
    703677        rc = hw_res_get_resource_list(sess, &hw_resources);
     
    789763{
    790764        ddf_log_init(NAME);
     765        pci_fun_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_hw_res_ops;
     766        pci_fun_ops.interfaces[PCI_DEV_IFACE] = &pci_dev_ops;
    791767}
    792768
Note: See TracChangeset for help on using the changeset viewer.