Hi Stefan,

On Sat, 19 Jan 2019 at 00:46, Stefan Roese <[email protected]> wrote:
>
> This macro will be used the by the Marvell Armada XP/38x PCIe driver,
> which is moved to DM right now.
>
> Signed-off-by: Stefan Roese <[email protected]>
> Cc: Bin Meng <[email protected]>
> Cc: Simon Glass <[email protected]>
> ---
>  include/pci.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/pci.h b/include/pci.h
> index 785d7d28b7..f4a9e025b3 100644
> --- a/include/pci.h
> +++ b/include/pci.h
> @@ -501,6 +501,7 @@ typedef int pci_dev_t;
>  #define PCI_BUS(d)             (((d) >> 16) & 0xff)
>  #define PCI_DEV(d)             (((d) >> 11) & 0x1f)
>  #define PCI_FUNC(d)            (((d) >> 8) & 0x7)
> +#define PCI_SLOT(d)            (((d) >> 3) & 0x1f)

This seems unrelated to the other macros, since is shifts left only 3
positions. Can you perhaps move it to the end and add a comment as to
what the input is and what it returns? It seems different to the
others.

>  #define PCI_DEVFN(d, f)                ((d) << 11 | (f) << 8)
>  #define PCI_MASK_BUS(bdf)      ((bdf) & 0xffff)
>  #define PCI_ADD_BUS(bus, devfn)        (((bus) << 16) | (devfn))
> --
> 2.20.1
>

Regards,
Simon
_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to