提交 aef85b56 编写于 作者: L Laurentiu Tudor 提交者: Greg Kroah-Hartman

bus: fsl-mc: MC control registers are not always available

As per the device tree binding, in certain scenarios such as
virtualization scenarios, the MC control registers are not
available so don't error out if they are not present.
Signed-off-by: NLaurentiu Tudor <laurentiu.tudor@nxp.com>
Link: https://lore.kernel.org/r/20200914105459.27448-2-laurentiu.tudor@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3b844345
...@@ -915,11 +915,11 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) ...@@ -915,11 +915,11 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, mc); platform_set_drvdata(pdev, mc);
plat_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); plat_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
mc->fsl_mc_regs = devm_ioremap_resource(&pdev->dev, plat_res); if (plat_res)
if (IS_ERR(mc->fsl_mc_regs)) mc->fsl_mc_regs = devm_ioremap_resource(&pdev->dev, plat_res);
return PTR_ERR(mc->fsl_mc_regs);
if (IS_ENABLED(CONFIG_ACPI) && !dev_of_node(&pdev->dev)) { if (mc->fsl_mc_regs && IS_ENABLED(CONFIG_ACPI) &&
!dev_of_node(&pdev->dev)) {
mc_stream_id = readl(mc->fsl_mc_regs + FSL_MC_FAPR); mc_stream_id = readl(mc->fsl_mc_regs + FSL_MC_FAPR);
/* /*
* HW ORs the PL and BMT bit, places the result in bit 15 of * HW ORs the PL and BMT bit, places the result in bit 15 of
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册