linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, Marek Vasut <marex@denx.de>,
	Bjorn Helgaas <bhelgaas@google.com>, Frank Li <lznuaa@gmail.com>,
	Jingoo Han <jg1.han@samsung.com>,
	Mohit KUMAR <Mohit.KUMAR@st.com>,
	Pratyush Anand <pratyush.anand@st.com>,
	Richard Zhu <r65037@freescale.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Sean Cross <xobs@kosagi.com>, Shawn Guo <shawn.guo@linaro.org>,
	Siva Reddy Kallam <siva.kallam@samsung.com>,
	Srikanth T Shivanand <ts.srikanth@samsung.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Troy Kisky <troy.kisky@boundarydevices.com>,
	Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH 4/6] PCI: imx6: Probe the PCIe in fs_initcall()
Date: Tue, 15 Oct 2013 18:06:38 +0200	[thread overview]
Message-ID: <1381853200-5534-5-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1381853200-5534-1-git-send-email-marex@denx.de>

Probe the PCIe driver in fs_initcall() instead of module_init()
to assure that pci_assign_unassigned_resources(); will be called
early. This function is called in dw_pcie_host_init(), which is
in turn called from imx6_add_pcie_port(), which is called from
imx6_pcie_probe() . If this is not called early, we will hit
resource collisions since pcieport driver is then probed way too
late.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Frank Li <lznuaa@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Mohit KUMAR <Mohit.KUMAR@st.com>
Cc: Pratyush Anand <pratyush.anand@st.com>
Cc: Richard Zhu <r65037@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Sean Cross <xobs@kosagi.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Siva Reddy Kallam <siva.kallam@samsung.com>
Cc: Srikanth T Shivanand <ts.srikanth@samsung.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Yinghai Lu <yinghai@kernel.org>
---
 drivers/pci/host/pci-imx6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 94e4d0f..ca8c5de 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -586,7 +586,7 @@ static int __init imx6_pcie_init(void)
 {
 	return platform_driver_probe(&imx6_pcie_driver, imx6_pcie_probe);
 }
-module_init(imx6_pcie_init);
+fs_initcall(imx6_pcie_init);
 
 MODULE_AUTHOR("Sean Cross <xobs@kosagi.com>");
 MODULE_DESCRIPTION("Freescale i.MX6 PCIe host controller driver");
-- 
1.8.4.rc3


  parent reply	other threads:[~2013-10-15 16:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 16:06 [PATCH 0/6] PCI: imx6: Random fixes Marek Vasut
2013-10-15 16:06 ` [PATCH 1/6] PCI: imx6: Make reset-gpio optional Marek Vasut
2013-10-16  1:24   ` Jingoo Han
2013-10-15 16:06 ` [PATCH 2/6] PCI: imx6: Fix the clock for PCIe Marek Vasut
2013-10-15 16:06 ` [PATCH 3/6] ARM: dts: imx6qdl: " Marek Vasut
2013-10-15 16:06 ` Marek Vasut [this message]
2013-10-17 23:31   ` [PATCH 4/6] PCI: imx6: Probe the PCIe in fs_initcall() Tim Harvey
2013-10-15 16:06 ` [PATCH 5/6] PCI: imx6: Force Gen1 operation Marek Vasut
2013-10-16  5:54   ` Pratyush Anand
2013-10-16 13:57     ` Marek Vasut
2013-10-17  7:02       ` Zhu Richard-R65037
2013-10-17 17:34         ` Marek Vasut
2013-10-18  2:12           ` Zhu Richard-R65037
2013-10-19  5:07             ` Marek Vasut
2013-10-21  6:33               ` Zhu Richard-R65037
2013-10-18  5:04   ` Tim Harvey
2013-10-15 16:06 ` [PATCH 6/6] PCI: designware: Fix DT resource retrieval Marek Vasut
2013-10-16  0:15   ` Tim Harvey
2013-10-16  3:56     ` Jingoo Han
2013-10-16 14:05     ` Marek Vasut
2013-10-15 16:34 ` [PATCH 0/6] PCI: imx6: Random fixes Marek Vasut
2013-10-16  0:03 ` Jingoo Han
2013-10-16  0:08   ` Marek Vasut
2013-10-29 19:14 ` Bjorn Helgaas
2013-10-30 14:52   ` Marek Vasut
2013-10-30 16:25     ` Bjorn Helgaas
2013-10-31  1:26       ` Shawn Guo
2013-10-31  1:38         ` Jingoo Han
2013-10-31 17:36     ` Bjorn Helgaas
2013-11-11 13:32 ` Jürgen Beisert
2013-11-11 13:48   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1381853200-5534-5-git-send-email-marex@denx.de \
    --to=marex@denx.de \
    --cc=Mohit.KUMAR@st.com \
    --cc=bhelgaas@google.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lznuaa@gmail.com \
    --cc=pratyush.anand@st.com \
    --cc=r65037@freescale.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=siva.kallam@samsung.com \
    --cc=tharvey@gateworks.com \
    --cc=troy.kisky@boundarydevices.com \
    --cc=ts.srikanth@samsung.com \
    --cc=xobs@kosagi.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).