Have a great day,
The do_reset() procedure does all required settings to initiate hreset flow
| int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) |
|
| volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; |
|
| /* Interrupts and MMU off */ |
|
| __asm__ __volatile__ ("mfmsr %0":"=r" (msr):); |
|
| msr &= ~( MSR_EE | MSR_IR | MSR_DR); |
|
| __asm__ __volatile__ ("mtmsr %0"::"r" (msr)); |
|
| * Enable Reset Control Reg - "RSTE" is the magic word that let us go |
|
| out_be32(&immap->reset.rpr, 0x52535445); |
|
| /* Verify Reset Control Reg is enabled */ |
|
| while (!(in_be32(&immap->reset.rcer) & RCER_CRE)) |
|
| printf ("Resetting the board.\n"); |
|
| out_be32(&immap->reset.rcr, RCR_SWHR); |
|
}
So if the do_rest() procedure executed then hreset is driven automatically. Of course if CONFIG_SYS_IMMR wrong then procedure hang in /* Verify Reset Control Reg is enabled */ loop.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------