[PATCH 4/6] PCI: imx6: Probe the PCIe in fs_initcall()

Tim Harvey tharvey at gateworks.com
Thu Oct 17 19:31:46 EDT 2013


On Tue, Oct 15, 2013 at 9:06 AM, Marek Vasut <marex at denx.de> wrote:
> 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 at denx.de>
> Cc: Bjorn Helgaas <bhelgaas at google.com>
> Cc: Frank Li <lznuaa at gmail.com>
> Cc: Jingoo Han <jg1.han at samsung.com>
> Cc: Mohit KUMAR <Mohit.KUMAR at st.com>
> Cc: Pratyush Anand <pratyush.anand at st.com>
> Cc: Richard Zhu <r65037 at freescale.com>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: Sean Cross <xobs at kosagi.com>
> Cc: Shawn Guo <shawn.guo at linaro.org>
> Cc: Siva Reddy Kallam <siva.kallam at samsung.com>
> Cc: Srikanth T Shivanand <ts.srikanth at samsung.com>
> Cc: Tim Harvey <tharvey at gateworks.com>
> Cc: Troy Kisky <troy.kisky at boundarydevices.com>
> Cc: Yinghai Lu <yinghai at 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 at kosagi.com>");
>  MODULE_DESCRIPTION("Freescale i.MX6 PCIe host controller driver");
> --
> 1.8.4.rc3
>

Acked-by: Tim Harvey <tharvey at gateworks.com>
Tested-by: Tim Harvey <tharvey at gateworks.com>

Tim



More information about the linux-arm-kernel mailing list