[i.MX7D] When the device disabled all the Ethernet modules, the system crashed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[i.MX7D] When the device disabled all the Ethernet modules, the system crashed

630 Views
alex_cheng1
Contributor I

1. The device uses 2G IM DDR3. I use fsl-yocto-L4.1.15_2.0.0-ga BSP(Yocto 2.1) to bring up the device.
When I type "ifconfig eth0 down" and "ifconfig eth1 down" to disable all the Ethernet modules, the system crashed.
The files in the attached file include the debug log file and the file that modifies the debug message.

2. It appears in the debug log file that when it enters the low power mode, the DDR clock frequency changes from 533 MHZ to 24 MHZ. The system is still alive.

3. However, when the low power mode is changed to normal mode, the DDR clock frequency is changed from 24 MHZ to 533 MHZ. At this point, the system will hang in imx7d_change_ddr_freq(ddr_rate) function.
a) in arch/arm/mach-imx/busfreq-imx.c
static void exit_lpm_imx7d(void)
{
   ...
   ...
   //alex
   printk("\n*** 2 [exit_lpm_imx7d] BF update_ddr_freq_imx_smp(ddr_normal_rate:%d)\n", ddr_normal_rate);

   update_ddr_freq_imx_smp(ddr_normal_rate);
   clk_set_parent(dram_root, pll_dram);
}

b) in arch/arm/mach-imx/busfreq_ddr3.c
/* change the DDR frequency. */
int update_ddr_freq_imx_smp(int ddr_rate)
{
   ...
   ...
   /* Now we can change the DDR frequency. */
   if (cpu_is_imx7d())
   {
   //alex
   printk("\n*** 3_1 [update_ddr_freq_imx_smp] BF imx7d_change_ddr_freq()\n");

   imx7d_change_ddr_freq(ddr_rate);

   //alex
   printk("\n*** 3_2 [update_ddr_freq_imx_smp] AF imx7d_change_ddr_freq()\n");
   }
}

4. When I igonre following functions, it works fine.
a) in arch/arm/mach-imx/busfreq-imx.c
static void enter_lpm_imx7d(void)
{
   ...
   ...
   } else {
   //alex
   //printk("\n*** 3 [enter_lpm_imx7d] BF update_ddr_freq_imx_smp(LPAPM_CLK:%d)\n", LPAPM_CLK);
#if 0 //alex
   update_ddr_freq_imx_smp(LPAPM_CLK);

   clk_set_parent(dram_alt_sel, osc_clk);
   clk_set_parent(dram_root, dram_alt_root);
#endif
   ...
   ...
   }
}

Can you please tell me the root cause and help me to solve this issue?

Thank you.

Best Regards,

Alex Cheng

Labels (2)
0 Kudos
1 Reply

445 Views
jimmychan
NXP TechSupport
NXP TechSupport

Have you try this on Linux 4.9.88_2.0.0 BSP?

0 Kudos