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 watchdog timer and DSP/BIOS issue

Other Parts Discussed in Thread: OMAP-L138, OMAP-L137

Hi

I'm experiencing a problem when using both watchdog timer and TSK_Sleep function on the DSP on OMAP-L138. Here is a similar problem for OMAP-L137:
http://e2e.ti.com/support/embedded/f/355/t/69643.aspx.

My problem is a little bit different though. From what I established, DSP/BIOS uses TIMER1 for its CLK module:
prog.module("CLK").TIMERSELECT = "Timer 1"; //line from bios_5_41_00_06/packages/ti/bios/config/bios_6748.tci

Unfortunately, TIMER1 is also used for watchdog timer in Linux. Up until I did not use the watchdog code in Linux and everything was going smoothly. But when I call davinci_wdog_init() and start kicking it with davinci_wdog_kick(), the first call of TSK_Sleep on the DSP hangs. This is actually a repost of my issue, I also posted a similar one on the BIOS forum (http://e2e.ti.com/support/embedded/f/355/p/74121/269448.aspx) but here I was looking for a different solution or a workaround.

In this topic I was looking for some clues on how to change default timer mapping in Linux. Right now the situation is like this (taken from arch/arm/mach-davinci/da850.c):

/*
 * T0_BOT: Timer 0, bottom        : Used for clock_event
 * T0_TOP: Timer 0, top            : Used for clocksource
 * T1_BOT, T1_TOP: Timer 1, bottom & top: Used for watchdog timer
 */

So, TIMER0 is used for clokck_event and clocksource and TIMER1 for watchdog timer. In OMAP-L138 only TIMER1 cane be used for wathcdog purposes so this leaves me with trying to change TIMER0 to TIMER2 or TIMER3. Unfortunately, default Linux code does not seen to be doing much initialization or to e prepared for handling those two last timers (as of version OMAP-L138_arm_1_00_00_11). Would switching to TIMER2 and TIMER3 help with my issues? Is this approach worth spending time on? I'm running on a tight schedule and this problem was unexpected...

Kind regards
Szymon