Commit 8fbdbb66 authored by Darren Salt's avatar Darren Salt Committed by Christian König

PCI: Export pci_rebar_get_possible_sizes()

Export pci_rebar_get_possible_sizes() for use by modular drivers.
Signed-off-by: default avatarDarren Salt <devspam@moreofthesa.me.uk>
Signed-off-by: default avatarNirmoy Das <nirmoy.das@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20210107175017.15893-2-nirmoy.das@amd.com
parent ccae03f3
...@@ -3605,6 +3605,7 @@ u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar) ...@@ -3605,6 +3605,7 @@ u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
pci_read_config_dword(pdev, pos + PCI_REBAR_CAP, &cap); pci_read_config_dword(pdev, pos + PCI_REBAR_CAP, &cap);
return (cap & PCI_REBAR_CAP_SIZES) >> 4; return (cap & PCI_REBAR_CAP_SIZES) >> 4;
} }
EXPORT_SYMBOL(pci_rebar_get_possible_sizes);
/** /**
* pci_rebar_get_current_size - get the current size of a BAR * pci_rebar_get_current_size - get the current size of a BAR
......
...@@ -630,7 +630,6 @@ int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment, ...@@ -630,7 +630,6 @@ int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment,
struct resource *res); struct resource *res);
#endif #endif
u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar);
int pci_rebar_get_current_size(struct pci_dev *pdev, int bar); int pci_rebar_get_current_size(struct pci_dev *pdev, int bar);
int pci_rebar_set_size(struct pci_dev *pdev, int bar, int size); int pci_rebar_set_size(struct pci_dev *pdev, int bar, int size);
static inline u64 pci_rebar_size_to_bytes(int size) static inline u64 pci_rebar_size_to_bytes(int size)
......
...@@ -1232,6 +1232,7 @@ void pci_update_resource(struct pci_dev *dev, int resno); ...@@ -1232,6 +1232,7 @@ void pci_update_resource(struct pci_dev *dev, int resno);
int __must_check pci_assign_resource(struct pci_dev *dev, int i); int __must_check pci_assign_resource(struct pci_dev *dev, int i);
int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align); int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align);
void pci_release_resource(struct pci_dev *dev, int resno); void pci_release_resource(struct pci_dev *dev, int resno);
u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar);
int __must_check pci_resize_resource(struct pci_dev *dev, int i, int size); int __must_check pci_resize_resource(struct pci_dev *dev, int i, int size);
int pci_select_bars(struct pci_dev *dev, unsigned long flags); int pci_select_bars(struct pci_dev *dev, unsigned long flags);
bool pci_device_is_present(struct pci_dev *pdev); bool pci_device_is_present(struct pci_dev *pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment