Hi All,
I want to reset the Davinci pocessor using watchdog timer.
So when I give reboot command from kernel, it hangs & doesn't actually
reset the processor.
code for watchdog rest in kernel is as follows :
void davinci_watchdog_reset(void) {
volatile davinci_timer_regs_t *davinci_wdt = (volatile
davinci_timer_regs_t *)IO_ADDRESS(DAVINCI_WDOG_BASE);
davinci_wdt->tcr = 0x0; /* disable timer */
davinci_wdt->tgcr = 0x0; /* reset timer */
davinci_wdt->tgcr = 0x8; /* configure timer2 as 64-bit */
davinci_wdt->tgcr |= 0x3; /* release timer from reset */
davinci_wdt->tim12 = 0; /* clear counter and period regs */
davinci_wdt->tim34 = 0;
davinci_wdt->prd12 = 0;
davinci_wdt->prd34 = 0;
davinci_wdt->tcr |= 0x00000040;
davinci_wdt->wdtcr |= 0x4000; /* enable watchdog timer */
*(volatile unsigned int *)(0x01c41a20) = 0x00000000;
/* put watchdog in pre-active state */
davinci_wdt->wdtcr = 0xA5C64000;
/* put watchdog in active state */
davinci_wdt->wdtcr = 0xDA7E4000;
/* write an invalid value to the WDKEY field to trigger* a watchdog
reset */
davinci_wdt->wdtcr = 0x00004000;
}
But it hangs & doesn't actually reset the processor.
I tried with reset commnad from u-boot loader also. It also gives me the
same result.
Can anyone Help me out to debug what is wrong ?
Thanks in advance,
-Sweta
eInfochips Business Disclaimer:
This message may contain confidential, proprietary or legally Privileged
information. In case you are not the original intended Recipient of the
message, you must not, directly or indirectly, use, Disclose, distribute,
print, or copy any part of this message and you are requested to delete it and
inform the sender. Any views expressed in this message are those of the
individual sender unless otherwise stated. Nothing contained in this message
shall be construed as an offer or acceptance of any offer by eInfochips Limited
and/or eInfochips Inc("eInfochips") unless sent with that express intent and
with due authority of eInfochips. eInfochips has taken enough precautions to
prevent the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source