diff mbox series

[U-Boot,1/4,v2] pci: fixed dm_pci_map_bar comment

Message ID 20190604124628.31882-1-alexm.osslist@gmail.com
State Superseded
Delegated to: Simon Glass
Headers show
Series [U-Boot,1/4,v2] pci: fixed dm_pci_map_bar comment | expand

Commit Message

Alexandru Marginean June 4, 2019, 12:46 p.m. UTC
The comment now indicates that the input argument bar is a register offset,
not a BAR index.
It also mentions which BARs are supported for type 0/1 and that the
function can return 0 on error.

Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
---

Changes in v2:
	- new patch

 include/pci.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Bin Meng June 5, 2019, 10:05 a.m. UTC | #1
On Tue, Jun 4, 2019 at 8:46 PM Alex Marginean <alexm.osslist@gmail.com> wrote:
>
> The comment now indicates that the input argument bar is a register offset,
> not a BAR index.
> It also mentions which BARs are supported for type 0/1 and that the
> function can return 0 on error.
>
> Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
> ---
>
> Changes in v2:
>         - new patch
>
>  include/pci.h | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass June 28, 2019, 1:55 p.m. UTC | #2
On Wed, 5 Jun 2019 at 04:05, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Tue, Jun 4, 2019 at 8:46 PM Alex Marginean <alexm.osslist@gmail.com> wrote:
> >
> > The comment now indicates that the input argument bar is a register offset,
> > not a BAR index.
> > It also mentions which BARs are supported for type 0/1 and that the
> > function can return 0 on error.
> >
> > Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
> > ---
> >
> > Changes in v2:
> >         - new patch
> >
> >  include/pci.h | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

diff --git a/include/pci.h b/include/pci.h
index 508f7bca81..40c7751acf 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -1309,12 +1309,14 @@  pci_addr_t dm_pci_phys_to_bus(struct udevice *dev, phys_addr_t addr,
  * dm_pci_map_bar() - get a virtual address associated with a BAR region
  *
  * Looks up a base address register and finds the physical memory address
- * that corresponds to it
+ * that corresponds to it.
+ * Can be used for 32b BARs 0-5 on type 0 functions and for 32b BARs 0-1 on
+ * type 1 functions.
  *
  * @dev:	Device to check
- * @bar:	Bar number to read (numbered from 0)
+ * @bar:	Bar register offset (PCI_BASE_ADDRESS_...)
  * @flags:	Flags for the region type (PCI_REGION_...)
- * @return: pointer to the virtual address to use
+ * @return: pointer to the virtual address to use or 0 on error
  */
 void *dm_pci_map_bar(struct udevice *dev, int bar, int flags);