RE: [PATCH V2 2/2] mailbox: imx: support RST channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH V2 2/2] mailbox: imx: support RST channel
> 
> Hi,
> 
> On Wed, 2022-06-15 at 21:00 +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@xxxxxxx>
> >
> > i.MX generic MU supports MU-A/B reset feature.
> >
> > When stop/start remotecore, MU is not reset. So when Linux stop
> > remotecore, the MU-B side BCR may contain valid configuration, because
> > MU-B is not reset. So when linux start Mcore again and notify Mcore,
> > Mcore is not ready to handle MU interrupt and cause issues. So need
> > reset MU when stop Mcore.
> >
> > Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
> 
> It looks like this patch causes i.MX8qxp MEK boot failure with v6.0- rc1. After
> reverting commit 82ab513baed5895c8b0e991557a12fd38d5f25f0,
> it boots ok.

Thanks for your test. Indeed, I only take generic MU into consideration and broke
i.MX8QXP SCU MU. The following patch could resolve the issue, after more
test, I will send a formal patch:

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index f36cb0048ce7..e373ea8b4705 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -893,7 +893,7 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx7ulp = {
        .xTR    = 0x20,
        .xRR    = 0x40,
        .xSR    = {0x60, 0x60, 0x60, 0x60},
-       .xCR    = {0x64, 0x64, 0x64, 0x64},
+       .xCR    = {0x64, 0x64, 0x64, 0x64, 0x64},
 };

 static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp = {
@@ -916,7 +916,7 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp_s4 = {
        .xTR    = 0x200,
        .xRR    = 0x280,
        .xSR    = {0xC, 0x118, 0x124, 0x12C},
-       .xCR    = {0x110, 0x114, 0x120, 0x128},
+       .xCR    = {0x8, 0x110, 0x114, 0x120, 0x128},
 };

 static const struct imx_mu_dcfg imx_mu_cfg_imx93_s4 = {
@@ -927,7 +927,7 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx93_s4 = {
        .xTR    = 0x200,
        .xRR    = 0x280,
        .xSR    = {0xC, 0x118, 0x124, 0x12C},
-       .xCR    = {0x110, 0x114, 0x120, 0x128},
+       .xCR    = {0x8, 0x110, 0x114, 0x120, 0x128},
 };

 static const struct imx_mu_dcfg imx_mu_cfg_imx8_scu = {
@@ -938,7 +938,7 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8_scu = {
        .xTR    = 0x0,
        .xRR    = 0x10,
        .xSR    = {0x20, 0x20, 0x20, 0x20},
-       .xCR    = {0x24, 0x24, 0x24, 0x24},
+       .xCR    = {0x24, 0x24, 0x24, 0x24, 0x24},
 };

 static const struct imx_mu_dcfg imx_mu_cfg_imx8_seco = {
@@ -949,7 +949,7 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8_seco = {
        .xTR    = 0x0,
        .xRR    = 0x10,
        .xSR    = {0x20, 0x20, 0x20, 0x20},
-       .xCR    = {0x24, 0x24, 0x24, 0x24},
+       .xCR    = {0x24, 0x24, 0x24, 0x24, 0x24},
 };

 static const struct of_device_id imx_mu_dt_ids[] = {
--
2.37.1
Thanks,
Peng.
> 
> There are a lot imx_mu and imx-scu error logs:
> 
> ----------------------------8<------------------------------------
> [    1.166567] imx-scu system-controller: RPC send msg timeout
> [    1.171843] imx_scu_soc_id: get soc info failed, ret -110
> [    1.177221] imx-scu system-controller: failed to initialize SoC
> info: -22
> [    1.184019] imx-scu system-controller: NXP i.MX SCU Initialized
> [    1.230605] imx-scu system-controller: RPC send msg timeout
> [    1.270559] imx-scu system-controller: RPC send msg timeout
> [    1.310561] imx-scu system-controller: RPC send msg timeout
> [    1.350560] imx-scu system-controller: RPC send msg timeout
> [    1.390560] imx-scu system-controller: RPC send msg timeout
> [    1.430561] imx-scu system-controller: RPC send msg timeout
> [    1.470559] imx-scu system-controller: RPC send msg timeout
> [    1.510559] imx-scu system-controller: RPC send msg timeout
> [    1.550559] imx-scu system-controller: RPC send msg timeout
> [    1.590559] imx-scu system-controller: RPC send msg timeout
> [    1.630561] imx-scu system-controller: RPC send msg timeout
> [    1.670558] imx-scu system-controller: RPC send msg timeout
> [    1.710559] imx-scu system-controller: RPC send msg timeout
> [    1.750558] imx-scu system-controller: RPC send msg timeout
> [    1.790559] imx-scu system-controller: RPC send msg timeout
> [    1.830562] imx-scu system-controller: RPC send msg timeout
> [    1.870559] imx-scu system-controller: RPC send msg timeout
> [    1.910559] imx-scu system-controller: RPC send msg timeout
> [    1.950561] imx-scu system-controller: RPC send msg timeout
> [    1.990592] imx-scu system-controller: RPC send msg timeout
> [    1.995838] imx_mu 5d1c0000.mailbox: Try increasing
> MBOX_TX_QUEUE_LEN
> [    2.002262] imx-scu system-controller: RPC send msg failed: -105
> [    2.008260] imx_mu 5d1c0000.mailbox: Try increasing
> MBOX_TX_QUEUE_LEN
> [    2.014682] imx-scu system-controller: RPC send msg failed: -105
> [    2.020681] imx_mu 5d1c0000.mailbox: Try increasing
> MBOX_TX_QUEUE_LEN
> [    2.027103] imx-scu system-controller: RPC send msg failed: -105
> [    2.033105] imx_mu 5d1c0000.mailbox: Try increasing
> MBOX_TX_QUEUE_LEN
> [    2.039526] imx-scu system-controller: RPC send msg failed: -105
> [    2.045526] imx_mu 5d1c0000.mailbox: Try increasing
> MBOX_TX_QUEUE_LEN
> [    2.051949] imx-scu system-controller: RPC send msg failed: -105
> ----------------------------8<------------------------------------
> 
> Regards,
> Liu Ying





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux