Message ID | 1614244979-48216-20-git-send-email-bmeng.cn@gmail.com |
---|---|
State | Accepted |
Commit | 5a40f5c09dfdc1ddc9413584d5a99f2879e10de8 |
Delegated to: | Priyanka Jain |
Headers | show |
Series | ppc: qemu: Convert qemu-ppce500 to driver model and enable additional driver support | expand |
>-----Original Message----- >From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Bin Meng >Sent: Thursday, February 25, 2021 2:53 PM >To: Simon Glass <sjg@chromium.org>; Alexander Graf <agraf@csgraf.de>; >Priyanka Jain <priyanka.jain@nxp.com> >Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Tom Rini ><trini@konsulko.com>; Heiko Schocher <hs@denx.de> >Subject: [PATCH v3 19/38] pci: mpc85xx: Wrap LAW programming with >CONFIG_FSL_LAW > >For the QEMU ppce500 machine, LAW registers are not implemented hence >CONFIG_FSL_LAW is not turned on and all LAW APIs are not available. We >should wrap all LAW registers programming in the mpc85xx PCI driver with >CONFIG_FSL_LAW. > >Signed-off-by: Bin Meng <bmeng.cn@gmail.com> >Reviewed-by: Heiko Schocher <hs@denx.de> >Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com> >--- > >(no changes since v1) > > drivers/pci/pci_mpc85xx.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c index >ab6ff45..7387a1e 100644 >--- a/drivers/pci/pci_mpc85xx.c >+++ b/drivers/pci/pci_mpc85xx.c >@@ -46,6 +46,7 @@ static int mpc85xx_pci_dm_write_config(struct udevice >*dev, pci_dev_t bdf, > return 0; > } > >+#ifdef CONFIG_FSL_LAW > static int > mpc85xx_pci_dm_setup_laws(struct pci_region *io, struct pci_region *mem, > struct pci_region *pre) >@@ -68,6 +69,7 @@ mpc85xx_pci_dm_setup_laws(struct pci_region *io, >struct pci_region *mem, > > return 0; > } >+#endif > > static int mpc85xx_pci_dm_probe(struct udevice *dev) { @@ -85,7 +87,9 >@@ static int mpc85xx_pci_dm_probe(struct udevice *dev) > return -EINVAL; > } > >+#ifdef CONFIG_FSL_LAW > mpc85xx_pci_dm_setup_laws(io, mem, pre); >+#endif > > pcix = priv->cfg_addr; > /* BAR 1: memory */ >-- >2.7.4 Kindly fix below if possible WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible #26: FILE: drivers/pci/pci_mpc85xx.c:49: +#ifdef CONFIG_FSL_LAW WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible #42: FILE: drivers/pci/pci_mpc85xx.c:90: +#ifdef CONFIG_FSL_LAW total: 0 errors, 2 warnings, 0 checks, 23 lines checked Regards Priyanka
diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c index ab6ff45..7387a1e 100644 --- a/drivers/pci/pci_mpc85xx.c +++ b/drivers/pci/pci_mpc85xx.c @@ -46,6 +46,7 @@ static int mpc85xx_pci_dm_write_config(struct udevice *dev, pci_dev_t bdf, return 0; } +#ifdef CONFIG_FSL_LAW static int mpc85xx_pci_dm_setup_laws(struct pci_region *io, struct pci_region *mem, struct pci_region *pre) @@ -68,6 +69,7 @@ mpc85xx_pci_dm_setup_laws(struct pci_region *io, struct pci_region *mem, return 0; } +#endif static int mpc85xx_pci_dm_probe(struct udevice *dev) { @@ -85,7 +87,9 @@ static int mpc85xx_pci_dm_probe(struct udevice *dev) return -EINVAL; } +#ifdef CONFIG_FSL_LAW mpc85xx_pci_dm_setup_laws(io, mem, pre); +#endif pcix = priv->cfg_addr; /* BAR 1: memory */