From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Sun, 8 Dec 2019 09:08:54 +0800 Subject: [PATCH v6 005/102] dm: pci: Move pci_get_devfn() into a common file In-Reply-To: <20191206213936.v6.5.I2f121abd7009eef1a08f631a97d894d75dc71875@changeid> References: <20191207044315.51770-1-sjg@chromium.org> <20191206213936.v6.5.I2f121abd7009eef1a08f631a97d894d75dc71875@changeid> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Dec 7, 2019 at 12:46 PM Simon Glass 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 > Reviewed-by: Bin Meng > --- > > 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!