Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575822 > unrolled thread

[PATCH v4 0/3] i.MX7 PCI support

Started byAndrey Smirnov <andrew.smirnov@gmail.com>
First post2017-02-07 17:00 +0100
Last post2017-02-10 22:50 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/3] i.MX7 PCI support Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-07 17:00 +0100
    [PATCH v4 1/3] PCI: imx6: Fix a typo in error message Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-07 17:00 +0100
    [PATCH v4 2/3] PCI: imx6: Allow probe deferal by reset GPIO Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-07 17:00 +0100
    Re: [PATCH v4 0/3] i.MX7 PCI support Bjorn Helgaas <helgaas@kernel.org> - 2017-02-10 22:50 +0100

#1575822 — [PATCH v4 0/3] i.MX7 PCI support

FromAndrey Smirnov <andrew.smirnov@gmail.com>
Date2017-02-07 17:00 +0100
Subject[PATCH v4 0/3] i.MX7 PCI support
Message-ID<t8glr-4NN-3@gated-at.bofh.it>
Hello, everyone:

This is a fourth iteration of the code that adds PCI-subsystem bits
necessary for enabling PCI support on i.MX7.

Changes since v3 (can be found at [version3]):
	- Move all of the reset_control_assert's into imx6_pcie_assert_core_reset
	- Documented required reset and power domain DT bindings

Changes since v2 (can be found at [version2]):

	- Collected Reviewed-by for patch #2 from Lucas
	- Reset logic implementation moved out into a reset controller
          driver (see [reset1])
	- Removed unused leftover code

Changes since v1 (can be found at [version1]):

	- All GPC related code moved into a separate driver (see [gpc1])
	- Removed GPIO probe deferral logging
	- Fixed section mismatch warning
	- Minor reformatting of fsl,imx6q-pcie.txt(as per Rob
          Herring's request)

[version3] https://lkml.org/lkml/2017/2/6/565
[version2] https://lkml.org/lkml/2017/2/1/510
[version1] https://lkml.org/lkml/2017/1/19/488
[gpc1] https://lkml.org/lkml/2017/2/6/551
[reset1] https://lkml.org/lkml/2017/2/6/554

Andrey Smirnov (3):
  PCI: imx6: Fix a typo in error message
  PCI: imx6: Allow probe deferal by reset GPIO
  PCI: imx6: Add code to support i.MX7D

 .../devicetree/bindings/pci/fsl,imx6q-pcie.txt     |  13 +-
 drivers/pci/host/pci-imx6.c                        | 131 ++++++++++++++++-----
 include/linux/mfd/syscon/imx7-iomuxc-gpr.h         |   4 +
 3 files changed, 118 insertions(+), 30 deletions(-)

-- 
2.9.3

[toc] | [next] | [standalone]


#1575824 — [PATCH v4 1/3] PCI: imx6: Fix a typo in error message

FromAndrey Smirnov <andrew.smirnov@gmail.com>
Date2017-02-07 17:00 +0100
Subject[PATCH v4 1/3] PCI: imx6: Fix a typo in error message
Message-ID<t8gls-4NN-37@gated-at.bofh.it>
In reply to#1575822
Cc: yurovsky@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/pci/host/pci-imx6.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index c8cefb0..50a1291 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -678,8 +678,7 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
 		imx6_pcie->pcie_inbound_axi = devm_clk_get(dev,
 							   "pcie_inbound_axi");
 		if (IS_ERR(imx6_pcie->pcie_inbound_axi)) {
-			dev_err(dev,
-				"pcie_incbound_axi clock missing or invalid\n");
+			dev_err(dev, "pcie_inbound_axi clock missing or invalid\n");
 			return PTR_ERR(imx6_pcie->pcie_inbound_axi);
 		}
 	}
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1575825 — [PATCH v4 2/3] PCI: imx6: Allow probe deferal by reset GPIO

FromAndrey Smirnov <andrew.smirnov@gmail.com>
Date2017-02-07 17:00 +0100
Subject[PATCH v4 2/3] PCI: imx6: Allow probe deferal by reset GPIO
Message-ID<t8gls-4NN-39@gated-at.bofh.it>
In reply to#1575822
Some designs implement reset GPIO via a GPIO expander connected to a
peripheral bus. One such example would be i.MX7 Sabre board where said
GPIO is provided by SPI shift register connected to a bitbanged SPI
bus. In order to support such designs allow reset GPIO request to defer
probing of the driver.

Cc: yurovsky@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/pci/host/pci-imx6.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 50a1291..3ef8093 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -611,7 +611,7 @@ static int __init imx6_add_pcie_port(struct imx6_pcie *imx6_pcie,
 	return 0;
 }
 
-static int __init imx6_pcie_probe(struct platform_device *pdev)
+static int imx6_pcie_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct imx6_pcie *imx6_pcie;
@@ -653,6 +653,8 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
 			dev_err(dev, "unable to get reset gpio\n");
 			return ret;
 		}
+	} else if (imx6_pcie->reset_gpio == -EPROBE_DEFER) {
+		return imx6_pcie->reset_gpio;
 	}
 
 	/* Fetch clocks */
@@ -746,11 +748,12 @@ static struct platform_driver imx6_pcie_driver = {
 		.name	= "imx6q-pcie",
 		.of_match_table = imx6_pcie_of_match,
 	},
+	.probe    = imx6_pcie_probe,
 	.shutdown = imx6_pcie_shutdown,
 };
 
 static int __init imx6_pcie_init(void)
 {
-	return platform_driver_probe(&imx6_pcie_driver, imx6_pcie_probe);
+	return platform_driver_register(&imx6_pcie_driver);
 }
 device_initcall(imx6_pcie_init);
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1578818

FromBjorn Helgaas <helgaas@kernel.org>
Date2017-02-10 22:50 +0100
Message-ID<t9reN-us-5@gated-at.bofh.it>
In reply to#1575822
On Tue, Feb 07, 2017 at 07:50:24AM -0800, Andrey Smirnov wrote:
> Hello, everyone:
> 
> This is a fourth iteration of the code that adds PCI-subsystem bits
> necessary for enabling PCI support on i.MX7.
> 
> Changes since v3 (can be found at [version3]):
> 	- Move all of the reset_control_assert's into imx6_pcie_assert_core_reset
> 	- Documented required reset and power domain DT bindings
> 
> Changes since v2 (can be found at [version2]):
> 
> 	- Collected Reviewed-by for patch #2 from Lucas
> 	- Reset logic implementation moved out into a reset controller
>           driver (see [reset1])
> 	- Removed unused leftover code
> 
> Changes since v1 (can be found at [version1]):
> 
> 	- All GPC related code moved into a separate driver (see [gpc1])
> 	- Removed GPIO probe deferral logging
> 	- Fixed section mismatch warning
> 	- Minor reformatting of fsl,imx6q-pcie.txt(as per Rob
>           Herring's request)
> 
> [version3] https://lkml.org/lkml/2017/2/6/565
> [version2] https://lkml.org/lkml/2017/2/1/510
> [version1] https://lkml.org/lkml/2017/1/19/488
> [gpc1] https://lkml.org/lkml/2017/2/6/551
> [reset1] https://lkml.org/lkml/2017/2/6/554
> 
> Andrey Smirnov (3):
>   PCI: imx6: Fix a typo in error message
>   PCI: imx6: Allow probe deferal by reset GPIO
>   PCI: imx6: Add code to support i.MX7D
> 
>  .../devicetree/bindings/pci/fsl,imx6q-pcie.txt     |  13 +-
>  drivers/pci/host/pci-imx6.c                        | 131 ++++++++++++++++-----
>  include/linux/mfd/syscon/imx7-iomuxc-gpr.h         |   4 +
>  3 files changed, 118 insertions(+), 30 deletions(-)

I applied patches 1 & 3 (with reviewed-by and ack from Lucas and Lee)
to pci/host-imx6 for v4.11, thanks!

I didn't apply 2 because of the section mismatch found by the autobuilder:

  >> WARNING: drivers/built-in.o(.data+0x6948c): Section mismatch in reference from the variable imx6_pcie_driver to the function .init.text:imx6_pcie_probe()
     The variable imx6_pcie_driver references
     the function __init imx6_pcie_probe()
     If the reference is valid then annotate the
     variable with or __refdata (see linux/init.h) or name the variable:

Please repost it after you figure out how to deal with that.

Bjorn

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web