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.

DRA746: PRM_RSTSTS for Soft reboot is not showing the proper status value.

Part Number: DRA746
Other Parts Discussed in Thread: AM5748

Hi TI Team

We are checking the cause of reboot using the PRM_RSTSTS, Understanding is Bit1 should be set for soft reboot

In both power on and soft reboot cases, we are getting the same value, as below

root@mmt2020-a880:~#  omapconf read 0x4AE07D04
00000001

Can you please provide your inputs on this ?

Best Regards,

Sreeju

  • Hi Sreeju,

    How are you trying soft reboot? Linux reboot also does a cold reboot which means 0x1
    will be reflected.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    auto reboot on panic with echo c > /proc/sysrq-trigger

    and also tried "reboot -f" on console

    both cases it shows 0x1

    Regards,

    Sreeju

  • Hi Sreeju,

    That only means that both of them are indeed triggering the cold reset. Hence you see GLOBAL_COLD_RST.
    Typically i have observed thermal Shutdown TSHUT causes warm reset and that sets the GLOBAL_WARM_SW_RST
    bit as well.

    You can try maunlally write 1 to PRM_RSTCTRL register RST_GLOBAL_WARM_SW bit(0). See if that
    sets the GLOBAL_WARM_SW_RST bit.

    If you indeed get the results. Please resolve this thread.

    Regards,
    Keerthy

  • Hi Keerthy,

    We will check with setting this bit for warm reset

    Requirement is to differentiate the reboot cause in the last reboot to know whether it was clean reboot or not.

    In case of panic (with panic=1)

    kernel/panic.c

    if (panic_timeout != 0) {
    /*
    * This will not be a clean reboot, with everything
    * shutting down. But if there is a chance of
    * rebooting the system it will be rebooted.
    */
    emergency_restart();
    }

    Mentioned it is not a clean reboot, and pstore is available in next reboot. Are you saying "emergency_restart do the cold reboot ? Can you please confirm ?

    we want to use this reset source bit (as a reliable flag with pstore content) to know previous boot was due to panic or a clean power cycle

    Regards,

    Sreeju

  • Hi Sreeju,

    I am able to see bit(1) Warm reset bir set when i do a reset from u-boot prompt.
    When i do a reboot i see that does not get set. I am yet to try functional kernel panic
    but if on your setup bit(1) is not getting set then panic is not really triggering a warm reset.

    Could you confirm that u-boot reset sets bit(1) i.e your register reads 0x3 instead of 0x1?

    - Keerthy

  • Hi Keerthy,


    I have the same issue. I read the prm_rstst register in uboot via the function warm_reset(), which is in the file: arch/arm/mach-omap2/omap5/hwinit.c. And I printf the register before the preloader_console_init() on SPL. The CPU is DRA762-HS, and the test is on AM5748 IDK Board.
    The warm_reset() is always 0 when I do the following tests:
    1. The IDK board has Warm Reset button, press the button and reset the system

    2.Write the PRM_RSTCTRL register 1, perform the command: devmem2 0x4ae07d00 w 0x1

    3.Perform reset command from u-boot prompt.

    Could you give me some pointers?

    [quote user="Keerthy J"]

  • Hi Pingan,

    Could you copy paste the logs from devmem2 and also the register read after reset & warm reset button.

    - Keerthy