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.

HDVICP & HDVPSS fails to start after watchdog reset kickoff

Hi,

We are working on Netra DM8168 based custom board. Where Watchdog out pin is not gated to reset switch. 

My question is, is it possible to reset M3 cores without External watchdog out pin using software? if yes please let me know how and where to do it (in u-boot or linux).

My test case is as below:

case 1:

Executing watchdog kickoff function and doing nothing while rebooting.

./watchdog -t 10

system is reseted and unable to load the HDVICP2 & HDVPSS firmware log is as below


log:---------------------------------------------------------------------------------------------------------------------------

PRCM Initialization completed
SysLink version : 2.10.03.20
SysLink module created on Date:Sep 23 2012 Time:20:24:41

FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id>Unhandled fault: Precise External Abort on non-linefetch (0x1808) at 0xf9020000
<Location of FiInternal error: : 1808 [#1]
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in: syslink ipv6
CPU: 0 Not tainted (2.6.37 #3)
PC is at DM8168DUCATIMMU_enable+0xc0/0x124 [syslink]
LR is at DM8168DUCATIMMU_enable+0x2c/0x124 [syslink]
pc : [<bf06b208>] lr : [<bf06b174>] psr: 20000013
sp : cb4c0fe8 ip : 00000000 fp : cb4c1004
r10: 00000000 r9 : 00000000 r8 : cb4c1ea4
r7 : d4e45000 r6 : d4e3c000 r5 : bf1447b0 r4 : d4e3f000
r3 : 00010000 r2 : f9020000 r1 : 00050000 r0 : bf0e35b5
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 8b71c019 DAC: 00000015
Process firmware_loader (pid: 1060, stack limit = 0xcb4c02e8)
Stack: (0xcb4c0fe8 to 0xcb4c2000)
0fe0: cb4c1004 cb4c0ff8 d4e3f000 00000000 cb4c102c cb4c1008
1000: bf069e1c bf06b154 00000008 f9020000 bf140000 d4e3c000 097d2000 00000008
1020: cb4c104c cb4c1030 bf050c20 bf069bd8 cb4c1e2c 00000000 d0af4000 cb4c0000
1040: cb4c1e5c cb4c1050 bf04ff08 bf050b30 cb4c1ea4 00000000 00000000 00000000
1060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

-------------------------------dump shorted here---------------------------------------------------

1fc0: 000458f4 00000000 00008d74 00000036 00000000 00000000 40091000 beeb5acc
1fe0: 00000000 beeb5aa8 000380b4 401faaec 60000010 00000008 00000000 00000000
Backtrace:
[<bf06b148>] (DM8168DUCATIMMU_enable+0x0/0x124 [syslink]) from [<bf069e1c>] (DM8168DUCATIPWR_on+0x250/0x2d4 [syslink])
r5:00000000 r4:d4e3f000
[<bf069bcc>] (DM8168DUCATIPWR_on+0x0/0x2d4 [syslink]) from [<bf050c20>] (PwrMgr_attach+0xfc/0x180 [syslink])
r6:00000008 r5:097d2000 r4:d4e3c000
[<bf050b24>] (PwrMgr_attach+0x0/0x180 [syslink]) from [<bf04ff08>] (ProcMgr_attach+0x190/0x3b0 [syslink])
r5:cb4c0000 r4:d0af4000
[<bf04fd78>] (ProcMgr_attach+0x0/0x3b0 [syslink]) from [<bf051790>] (ProcMgrDrv_ioctl+0x984/0x1c38 [syslink])
[<bf050e0c>] (ProcMgrDrv_ioctl+0x0/0x1c38 [syslink]) from [<c00d1db4>] (vfs_ioctl+0x28/0x44)
r8:beeb5ae8 r7:00000008 r6:00000008 r5:ccbc4000 r4:00000000
[<c00d1d8c>] (vfs_ioctl+0x0/0x44) from [<c00d24c4>] (do_vfs_ioctl+0x500/0x540)
[<c00d1fc4>] (do_vfs_ioctl+0x0/0x540) from [<c00d255c>] (sys_ioctl+0x58/0x7c)
[<c00d2504>] (sys_ioctl+0x0/0x7c) from [<c0044e00>] (ret_fast_syscall+0x0/0x30)
r8:c0044fa8 r7:00000036 r6:00008d74 r5:00000000 r4:000458f4
Code: e3130010 0afffffc e5942010 e3a03801 (e5823000)
rmware> <start|s---[ end trace 889997bb4df8c042 ]---
top> [-mmap <memory_map_file>] [-i2c <0|1>]
===Mandatory arguments===
<Processor Id> 0: DSP, 1: Video-M3, 2: Vpss-M3
<Location of Firmware> firmware binary file
<start|stop> to start/stop the firmware
===Optional arguments===
-mmap input memory map bin file name
-i2c 0: i2c init not done by M3, 1(default): i2c init done by M3
FIRMWARE: isI2cInitRequiredOnM3: 0
FIRMWARE: Default memory configuration is used
MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.2.1
eth0: no IPv6 routers present

-----------------------------------------------------------------------------------------------------------------

Then system hangs here

Case 2: Executing watchdog kickoff function and reseting some m3 registes in u-boot:

./watchdog -t 10

While device is reseting at u-boot level following register writes or done

# mw 0x48180b10 w 0xff      (RM_DEFAULT_RSTCTRL)

mw 0x48180574 w 0x00    (CM_DEFAULT_DUCATI_CLKSTCTRL)

mw 0x48180518 w 0x00    (CM_DEFAULT_DUCATI_CLKCTRL)

# mw 0x48180b10 w 0x10     (RM_DEFAULT_RSTCTRL)

==> Loads the firmware but unable to start it log is as below.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
Assertion at Line no: 301 in ~/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/syslind
FIRMWARE: Ipc_CONTROLCMD_STARTCALLBACK Error: ProcMgr status 0xffffffff
FIRMWARE: Could not start: -1
Loading HDVPSS Firmware
MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
Assertion at Line no: 301 in ~/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/syslind
FIRMWARE: Ipc_CONTROLCMD_STARTCALLBACK Error: ProcMgr status 0xffffffff
FIRMWARE: Could not start: -1
==> Any thing I am missing in the reset sequence?
Solution for this issue is very urgent, Please help us in this regard.
Thanks in advance
sada
  • Hello,

    Did you follow this guide:

    http://processors.wiki.ti.com/index.php?title=TI81XX_PSP_WDT_Support#Board_Modification

    More to that, according to DM816x TRM, Table 18-28. Reset Sources Overview, MPU WD reset is NOT source for the DSS_M3_PWRN_RST (HDVPSS), IVAHD0_PWRN_RST (HDVICP2_0), IVAHD1_PWRN_RST (HDVICP2_1), IVAHD2_PWRN_RST (HDVICP2_2)

    The Watchdog reset is Warm reset: it is a partial reset which doesn’t affect all the logic in a given entity.

    Warm reset types are not necessarily applied globally within each receiving entity. A module may use a warm reset to reset a subset of its logic. This is often done to speed-up reset recovery time, that is, the time to transition to a safe operating state, compared to the time required upon receipt of a cold reset.

    For SW reset, check DM816x TRM, section 18.5.8 HDVICP2 Software Warm Reset Sequence

    BR,

    Pavel

  • Hi Pavel,

    Thank you for your quick response.

    Coming to http://processors.wiki.ti.com/index.php?title=TI81XX_PSP_WDT_Support#Board_Modification. We can't use WD_OUT now as it is not floated on our custom board. Since boards are already in field. How we can achieve cold reset of the device including M3 cores (same like power_on_reset or reset button press)?

    when we use ./watchdog -t 12 apps.

    Thanks

    Sada


  • You can try with the PRM_RSTCTRL[1] RST_GLOBAL_COLD_SW - when set to 0x1 - Asserts a global COLD software reset. The software must ensure the SDRAM is properly put in sef-refresh mode before applying this reset.

    Also pay attention to the PRM_RSTTIME[7:0] RSTTIME1 and PRM_RSTST[0] GLOBAL_COLD_RST bits.

    Cold (POR - Power On Reset) reset: it affects all the logic in a given entity
    Global reset: it affects the entire device

    Software reset: it is initiated by software

    18.5.3 Global Power-On (Cold) Reset

    The PRCM is required internally to generate the global power-on reset used by the domain Reset Managers from three cold reset sources: SYS_PWRN_RST, ICEPICK_POR_RST, GLOBAL_COLD_SW_RST.

    Source GLOBAL_COLD_SW_RST is a PRM internally generated one. Activation is triggered upon setting PRM memory-mapped register bit, PRM_RSTCTRL.GLOBAL_COLD_SW_RST. This bit is self-clearing, it is automatically cleared by the hardware.

    The PRCM must stall the release of the global power-on reset until after de-assertion of all cold reset sources and until after receiving indication that the voltage domains, have all ramped to their operating levels and until after receiving an indication that the system clock is running and is stable. The PRCM implements a counter after all of these indications have occurred to provide a delay before releasing internal global power on reset signals. This requires use of a PM FW Reset Manager. The "always-on" 27 MHz clock must run the RM's stall-period timer. The max count is provided by PRM register PRM_RSTTIME.RSTTIME1 bit-field. During device power-up, this mechanism enforces the system requirement of a running 27 MHz clock.

    BR,

    Pavel





  • Hi Pavel,

    I think when there is no Hardware for WTD_OUT. We can configure only CONFIG_SOFT_WATCHDOG instead off CONFIG_OMAP_WATCHDOG in xxxxx_defconfig. This software watchdog works fine for me. Thanks for your help

    Sada

  • Hello, Sada,

    Could you give me more information about CONFIG_SOFT_WATCHDOG?

    We have the same problem after watchdog reset, M3 firmware cant be loaded properly.

    Hi Pavel,

    According to hardware modify for WTD_OUT  , the watchdog reset process is cold reset  and it will be fully reset not partial reset?

    So we could load M3 firmware properly after watchdog reset?

    Any help will be highly appreciate!

    thank you very much!

    Steven

  • Hello,

    Could someone give me some clue?

    thanks a lot!!

    Regards,

    Steven

  • Hello,

    I have change the kernel configure

    CONFIG_SOFT_WATCHDOG=y
    # CONFIG_OMAP_WATCHDOG is not set

    watchdog reset is ok now!

    thank you!

    Steven

  • Hi, we really need to use the hardware watchdog since the software watchdog is not reliable enough for our mission-critical system.

    How do you reset the HDVICP? We are trying to follow section 18.5.8 in the TRM but we haven't found success.

    This is what we are doing in Linux before loading the HDVPSS and HDVICP firmware:

    Here we go. The TRM says to do this:

    Before asserting the software reset to the HDVICP2, the MPU software must ensure that:
    a) The HDVICP2 sequencer CPUs are in IDLE state (CM_IVAHDi_IVAHD_CLKCTRL[17:16] IDLEST).
    b) The HDVICP2 is in STANDBY state CM_IVAHDi_IVAHD_CLKCTRL[[18] STBYST).
    c) The functional clock to the HDVICP2 has been gated by the PRCM module (CM_IVAHDi_CLKSTCTRL[8] CLKACTIVITY_IVAHD_CLK).

    The software reset sequence occurs when the MPU software:
    1. Sets the RM_IVAHDi_RSTCTRL[2] RST3, RM_IVAHDi_RSTCTRL[1] RST2, and RM_IVAHDi_RSTCTRL[0] RST1 bits. This causes the PRCM module to assert the IVAHDi_RST, IVAHDi_SEQ1_RST, and IVAHDi_SEQ2_RST resets to the HDVICP2. IVAHDi_PWRN_RST remains
    deasserted.
    2. Enables the functional clock to the HDVICP2.
    3. clears the RM_IVAHDi_RSTCTRL[2] RST3 and RM_IVAHDi_RSTCTRL[0] RST1 bits. This causes the PRCM module to release the IVAHDi_RST and IVAHDi_SEQ1_RST resets to the HDVICP2.
    4. clears the RM_IVAHDi_RSTCTRL[1] RST2 bit. This releases the IVAHDi_SEQ2_RST reset to the Sequencer2 CPU.


    And my take on all this which would be worth checking on:

    a) & b)
    devmem2 0x48180620 word
    devmem2 0x48180720 word
    devmem2 0x48180820 word
    Check bits 0-1 and check they are 0x0 as this means the module is disabled. For the moment I'm guessing that if the module is disabled, you needn't worry about the state of the HDVICP.
    If these bits aren't 0x0, presumably you have to check bits 16-17 and ensure they are equal to 0x2 (???) and also check that bit 18 is set.

    c)
    devmem2 0x48180600 halfword
    devmem2 0x48180700 halfword
    devmem2 0x48180800 halfword
    Check that bit 8 is unset.

    1.
    devmem2 0x48180C10 byte 7
    devmem2 0x48180D10 byte 7
    devmem2 0x48180E10 byte 7

    2.
    devmem2 0x48180620 byte 2
    devmem2 0x48180720 byte 2
    devmem2 0x48180820 byte 2

    3.
    devmem2 0x48180C10 byte 2
    devmem2 0x48180D10 byte 2
    devmem2 0x48180E10 byte 2

    4.
    devmem2 0x48180C10 byte 0
    devmem2 0x48180D10 byte 0
    devmem2 0x48180E10 byte 0

    Please could someone from TI tell me what I'm doing wrong and how I can reset the HDVICP?

    Thanks,
    Ralph

  • Okay, that didn't work. In fact, writing the registers in U-Boot didn't work.

    I only got this working by checking for warm boot at _the very start_ of the boot process in assembler function "reset" in "start.S" and doing a cold reset if a warm reset was detected. :-D

    Ralph