This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TMS320DM8168: Kernel hangs after u-boot message: "Starting kernel ..." after reset

Part Number: TMS320DM8168

Tool/software: Linux

Hello,


I'm working with TMS320DM8168 processor on my mother board.

I have scheduled device resets immediatelly after u-boot message: "Starting kernel ..." (several times, in loops, using a dedicated script).
Occasionally (not always), at the end of those resets, I notice the kernel hangs at the same boot step (stopping after printing "Starting kernel ...").
At any other reset after that the kernel keep hanging at the same boot step (stopping after printing "Starting kernel ...").
Only POWER-CYCLE for our mother board fixes the problem.

Importantly:
1.  This hang happens when my "resets script" include enough reset loops:
 a. 3 reset loops - the kernel never hangs.
 b. 10 reset loops - the kernel hangs at ~80% probability.
 c. 20 reset loops - the kernel hangs at 100% probability.

2. When scheduling the reset at any other boot step (before u-boot message: "Starting kernel ..." or at least 1 sec after that), the kernel never hangs.
3. It is required for my research to schedule device resets immediatelly after u-boot message: "Starting kernel ..." (maximum 900ms after this message).


Why does this failure occure?
And why more reset loops cause to the kernel to hang in higher probability?


Here's an example for print logs while kernel hang: 


U-Boot 2010.06 (Mar 15 2018 - 10:33:29)
MPEG UBOOT v1.24

TI8168-GP rev 2.1

ARM clk: 987MHz
DDR clk: 675MHz

I2C:   ready
DRAM:  1 GiB
NAND:  HW ECC Hamming Code selected
256 MiB
DDR3: Startup BIT Passed

GPIO Mpeg_Proj (1:15,1:10,1:09): 2
GPIO Mpeg_Mode (0:27,0:26,0:25): 1
Mpeg_Proj (NAND): 2

DBG Inverted: 1
ATE Present : 0
Mpeg_Mode (ATE-P:DBG-I) = 1

***PLL locked, PCIE_CFG 0x00c90100
pcie_enable_link passed, 11391
MMC:   OMAP SD/MMC: 0
Net:   Detected MACID:90:59:af:59:23:e2
Ethernet PHY: GENERIC @ 0x00
DaVinci EMAC
IP is set to 192.168.1.80
Debug Flag=0
Hit any key to stop autoboot:  0
HW ECC BCH8 Selected

NAND read: device 0 offset 0x300000, size 0x250000
 2424832 bytes read: OK, corrected 23 failed 0

## Checking Image at 81000000 ...
   Legacy image found
   Image Name:   Linux-2.6.37
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2221860 Bytes = 2.1 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
loading main kernel

NAND read: device 0 offset 0xb00000, size 0x600000
 6291456 bytes read: OK, corrected 59 failed 0

## Checking Image at 82000000 ...
   Legacy image found
   Image Name:   Mpeg Ramdisk
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5996138 Bytes = 5.7 MiB
   Load Address: 82000000
   Entry Point:  82000000
   Verifying Checksum ... OK
loading main ramdisk
## Booting kernel from Legacy Image at 81000000 ...
   Image Name:   Linux-2.6.37
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2221860 Bytes = 2.1 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 82000000 ...
   Image Name:   Mpeg Ramdisk
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5996138 Bytes = 5.7 MiB
   Load Address: 82000000
   Entry Point:  82000000
   Verifying Checksum ...
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Regards,
Daniel Daniel