bus: fsl-mc: fully resume the firmware
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Thu, 15 Jul 2021 14:07:13 +0000 (17:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 11:56:25 +0000 (13:56 +0200)
The MC firmware has two execution units. Resume them both, as on some
Layerscape SoCs not doing so breaks the firmware.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Link: https://lore.kernel.org/r/20210715140718.8513-3-laurentiu.tudor@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/fsl-mc/fsl-mc-bus.c

index ffd7a1f..2341de6 100644 (file)
@@ -63,6 +63,7 @@ struct fsl_mc_addr_translation_range {
 
 #define FSL_MC_GCR1    0x0
 #define GCR1_P1_STOP   BIT(31)
+#define GCR1_P2_STOP   BIT(30)
 
 #define FSL_MC_FAPR    0x28
 #define MC_FAPR_PL     BIT(18)
@@ -1118,7 +1119,8 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
                 * At this point MC should have all its SMMU setup done so make
                 * sure it is resumed.
                 */
-               writel(readl(mc->fsl_mc_regs + FSL_MC_GCR1) & (~GCR1_P1_STOP),
+               writel(readl(mc->fsl_mc_regs + FSL_MC_GCR1) &
+                            (~(GCR1_P1_STOP | GCR1_P2_STOP)),
                       mc->fsl_mc_regs + FSL_MC_GCR1);
        }