diff options
author | Pali Rohár <pali@kernel.org> | 2020-08-25 10:45:04 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2020-08-31 14:45:53 +0200 |
commit | 835d969c1f67f9a7be811c3811c6ec0b68ef79c7 (patch) | |
tree | 3be433f8c5c6b0abb020122331fd8b733e55e1f3 /drivers | |
parent | a65e65939eaee611c86c96bee4556f552f5b42a3 (diff) | |
download | u-boot-835d969c1f67f9a7be811c3811c6ec0b68ef79c7.tar.gz u-boot-835d969c1f67f9a7be811c3811c6ec0b68ef79c7.tar.xz u-boot-835d969c1f67f9a7be811c3811c6ec0b68ef79c7.zip |
arm64: a37xx: pci: Depends on DM_GPIO
For proper initialization of aardvark pci driver it is required to
de-assert reset GPIO. So depeneds on DM_GPIO option.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/Kconfig | 1 | ||||
-rw-r--r-- | drivers/pci/pci-aardvark.c | 10 |
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index c19d09bc41..dd1cc65229 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -30,6 +30,7 @@ config PCI_AARDVARK bool "Enable Aardvark PCIe driver" default n depends on DM_PCI + depends on DM_GPIO depends on ARMADA_3700 help Say Y here if you want to enable PCIe controller support on diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index 8996be5309..b2c417701f 100644 --- a/drivers/pci/pci-aardvark.c +++ b/drivers/pci/pci-aardvark.c @@ -148,9 +148,7 @@ struct pcie_advk { void *base; int first_busno; struct udevice *dev; -#if CONFIG_IS_ENABLED(DM_GPIO) struct gpio_desc reset_gpio; -#endif }; static inline void advk_writel(struct pcie_advk *pcie, uint val, uint reg) @@ -616,7 +614,6 @@ static int pcie_advk_probe(struct udevice *dev) { struct pcie_advk *pcie = dev_get_priv(dev); -#if CONFIG_IS_ENABLED(DM_GPIO) gpio_request_by_name(dev, "reset-gpios", 0, &pcie->reset_gpio, GPIOD_IS_OUT); /* @@ -637,10 +634,9 @@ static int pcie_advk_probe(struct udevice *dev) dm_gpio_set_value(&pcie->reset_gpio, 1); mdelay(200); dm_gpio_set_value(&pcie->reset_gpio, 0); + } else { + dev_warn(pcie->dev, "PCIE Reset on GPIO support is missing\n"); } -#else - dev_dbg(pcie->dev, "PCIE Reset on GPIO support is missing\n"); -#endif /* DM_GPIO */ pcie->first_busno = dev->seq; pcie->dev = pci_get_controller(dev); @@ -650,12 +646,10 @@ static int pcie_advk_probe(struct udevice *dev) static int pcie_advk_remove(struct udevice *dev) { -#if CONFIG_IS_ENABLED(DM_GPIO) struct pcie_advk *pcie = dev_get_priv(dev); if (dm_gpio_is_valid(&pcie->reset_gpio)) dm_gpio_set_value(&pcie->reset_gpio, 1); -#endif /* DM_GPIO */ return 0; } |