We have a custom board that runs LS1046ardb chip on it. Currently, we are witnessing a lot of capabilities on the codewarrior that is stuck because the DEBUG_2 [30] (0x01080F04) was never set.
Below is the piece of code that is stuck in the hardware initialization file. We could not find the register DEBUG_2 in any documentation. Could we get some insight into what it is trying to do, why, and what may cause the chip to get stuck at this stage?
void A009803_Erratum(void)
{
volatile uint32_t * debug2 = (uint32_t *)DEBUG_2_ADDR;
// 1. Configure the DDR registers as normal with parity enabled
WRITE32(DDRmc1_SDRAM_CFG_2_ADDR, (DDRmc1_SDRAM_CFG_2_VAL | 0x20));
// 2. Set ERR_DIS[APED]: 1b - Address parity errors are not detected or reported.
WRITE32(DDRmc1_ERR_DISABLE_ADDR, DDRmc1_ERR_DISABLE_VAL | 0x100);
// 3. Set DDR_SDRAM_CFG[MEM_EN]
WRITE32(DDRmc1_SDRAM_CFG_ADDR, (DDRmc1_SDRAM_CFG_VAL | SDRAM_CFG_MEM_EN_MASK));
// 4. Poll for DEBUG_2[30] to be set
while ((*debug2 & 0x02000000) == 0) {}
// 5. Clear ERR_DIS[APED]. Parity checking is now enabled
WRITE32(DDRmc1_ERR_DISABLE_ADDR, DDRmc1_ERR_DISABLE_VAL & (~0x100));
}