[PATCH v6 005/102] dm: pci: Move pci_get_devfn() into a common file
Bin Meng
bmeng.cn at gmail.com
Sun Dec 8 02:08:54 CET 2019
On Sat, Dec 7, 2019 at 12:46 PM Simon Glass <sjg at chromium.org> wrote:
>
> Early in boot it is necessary to decode the PCI device/function values for
> particular peripherals in the device tree or of-platdata. This is needed
> in TPL where CONFIG_PCI is not defined.
>
> To handle this, move pci_get_devfn() into a file that is built even when
> CONFIG_PCI is not defined.
>
> Also add a function for use by of-platdata, to convert a reg property to
> a pci_dev_t.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
> Changes in v6:
> - Rename pci_x86_ofplat_get_devfn() to pci_ofplat_get_devfn() in comment
>
> Changes in v5: None
> Changes in v4:
> - Add more documentation for pci_ofplat_get_devfn()
> - Mention that the return value is pci_dev_t
> - Rename pci_x86_ofplat_get_devfn() to pci_ofplat_get_devfn()
>
> Changes in v3:
> - Move the function to a common file instead of duplicating it
> - Update device type to pci_dev_t
>
> Changes in v2: None
>
> drivers/core/util.c | 20 +++++++++++++++++++
> drivers/pci/pci-uclass.c | 16 ---------------
> include/dm/pci.h | 43 ++++++++++++++++++++++++++++++++++++++++
> include/pci.h | 12 ++---------
> 4 files changed, 65 insertions(+), 26 deletions(-)
> create mode 100644 include/dm/pci.h
>
applied to u-boot-x86/next, thanks!
More information about the U-Boot
mailing list