LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 08-02-2013, 12:46 AM   #1
sallu.salmankhalid
LQ Newbie
 
Registered: Jun 2013
Posts: 27

Rep: Reputation: Disabled
help writing watchdog timer driver


Hi,

After successfuly learning how to crosscompile linux kernel and application for embedded devices I am learning device driver development and I want to write watchdog driver for my pandaboard running linux but I have no idea where to start. I have written linux kernel modules so I know how to write a basic character driver but I am not able to find any reference material for writing watchdog timer device driver for omap4. Please point me in the right direction and if possible give me links to concerned reference material.

Regards
 
Old 08-03-2013, 07:25 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,901
Blog Entries: 14

Rep: Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651
Member Response

Hi,

Linux does provide a watchdog timer.
The following is dated but can be used for references. Look at the kernel version you are wishing to work with to get better detail.

Look at http://www.mjmwired.net/kernel/Docum...tchdog/wdt.txt & watchdog-api.txt
Quote:
The Linux Watchdog driver API.
5
6 Copyright 2002 Christer Weingel <wingel@nano-system.com>
7
8 Some parts of this document are copied verbatim from the sbc60xxwdt
9 driver which is (c) Copyright 2000 Jakob Oestergaard <jakob@ostenfeld.dk>
10
11 This document describes the state of the Linux 2.4.18 kernel.
12
13 Introduction:
14
15 A Watchdog Timer (WDT) is a hardware circuit that can reset the
16 computer system in case of a software fault. You probably knew that
17 already.
18
19 Usually a userspace daemon will notify the kernel watchdog driver via the
20 /dev/watchdog special device file that userspace is still alive, at
21 regular intervals. When such a notification occurs, the driver will
22 usually tell the hardware watchdog that everything is in order, and
23 that the watchdog should wait for yet another little while to reset
24 the system. If userspace fails (RAM error, kernel bug, whatever), the
25 notifications cease to occur, and the hardware watchdog will reset the
26 system (causing a reboot) after the timeout occurs..
These two links should be of help;
http://www.mjmwired.net/kernel/Docum...kernel-api.txt
http://www.mjmwired.net/kernel/Docum...parameters.txt

Hope this helps.
 
Old 08-05-2013, 12:51 AM   #3
sallu.salmankhalid
LQ Newbie
 
Registered: Jun 2013
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thanks alot for replying

I am learning how to write my own device driver from scratch. I have reference manual for omap4 watchdog timer but I dont know how to start writing my own device driver. The reference manual has a lot of register that need to be configured to make watchdog driver operational but I have no idea how to do that. The file watchdog-apt.txt & watchdog-simple.c discuss the userspace application, not how to write your own device driver. The "The Linux WatchDog Timer Driver Core kernel API" was quite helpfull but I am still lost. If you could point me in the right direction that will be very helpful.

Regards

Last edited by sallu.salmankhalid; 08-05-2013 at 02:00 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Watchdog timer code for MINI-ITX VIA CN700-8237 MBoard johnfkav Linux - Hardware 0 01-09-2010 01:16 AM
Implementing Hardware Watchdog Timer MainMeat Linux - Hardware 2 12-09-2009 08:58 AM
Intel's watchdog support iTCO_wdt - does this mean watchdog is not present? kushalkoolwal Linux - Hardware 3 02-06-2009 03:16 PM
Hardware watchdog in BIOS and Linux watchdog driver are different? travishein Linux - Hardware 1 12-22-2008 09:41 PM
Setting up Watchdog TImer with FC2 geustace Linux - Hardware 0 08-21-2004 12:47 AM


All times are GMT -5. The time now is 05:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration