Skip to content

Commit

Permalink
pci
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhuzhus committed Sep 14, 2024
1 parent 49b6f2d commit 43eb0a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,14 +712,14 @@ rt_err_t rt_pci_device_alloc_resource(struct rt_pci_host_bridge *host_bridge,
return err;
}

rt_ubase_t rt_pci_get_addr(struct rt_pci_device *pdev, rt_ubase_t flags)
struct rt_pci_bus_resource *rt_pci_get_addr(struct rt_pci_device* pdev,rt_ubase_t flags)
{
for (int i = 0; i < RT_PCI_BAR_NR_MAX; i++)
{
if (pdev->resource[i].flags == flags)
return (rt_ubase_t)rt_ioremap((void *)pdev->resource[i].base, pdev->resource[i].size);
return &pdev->resource[i];
}
return 0;
return RT_NULL;
}

void rt_pci_enum_device(struct rt_pci_bus *bus,
Expand Down

0 comments on commit 43eb0a4

Please sign in to comment.