From: Kumar Gala <galak@kernel.crashing.org>
To: Domen Puncer <domen.puncer@telargo.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] mpc5200: /dev/watchdog driver for GPT0
Date: Wed, 13 Jun 2007 22:57:29 -0500 [thread overview]
Message-ID: <ECDF5931-F264-4083-B4F0-C8CA1976195A@kernel.crashing.org> (raw)
In-Reply-To: <20070612085931.GG23294@moe.telargo.com>
On Jun 12, 2007, at 3:59 AM, Domen Puncer wrote:
> Driver for internal mpc5200 watchdog on general purpose timer 0.
> For IPB clock of 132 MHz the maximum timeout is about 32 seconds.
>
>
> Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Should really be submitted to the watchdog maintainer if you want
this in the kernel
> ---
> Hi!
>
> I also have some generic GPT code that one could extend with
> what he/she needs. Mail me if you'd find it useful.
>
>
> drivers/char/watchdog/Kconfig | 4
> drivers/char/watchdog/Makefile | 1
> drivers/char/watchdog/mpc5200_wdt.c | 257 ++++++++++++++++++++++++
> ++++++++++++
> 3 files changed, 262 insertions(+)
>
> Index: work-powerpc.git/drivers/char/watchdog/Kconfig
> ===================================================================
> --- work-powerpc.git.orig/drivers/char/watchdog/Kconfig
> +++ work-powerpc.git/drivers/char/watchdog/Kconfig
> @@ -521,6 +521,10 @@ config 8xx_WDT
> tristate "MPC8xx Watchdog Timer"
> depends on 8xx
>
> +config MPC5200_WDT
> + tristate "MPC5200 Watchdog Timer"
> + depends on PPC_MPC52xx
> +
> config 83xx_WDT
> tristate "MPC83xx Watchdog Timer"
> depends on PPC_83xx
> Index: work-powerpc.git/drivers/char/watchdog/Makefile
> ===================================================================
> --- work-powerpc.git.orig/drivers/char/watchdog/Makefile
> +++ work-powerpc.git/drivers/char/watchdog/Makefile
> @@ -64,6 +64,7 @@ obj-$(CONFIG_SBC_EPX_C3_WATCHDOG) += sbc
>
> # PowerPC Architecture
> obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o
> +obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o
> obj-$(CONFIG_83xx_WDT) += mpc83xx_wdt.o
> obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o
> obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o
> Index: work-powerpc.git/drivers/char/watchdog/mpc5200_wdt.c
> ===================================================================
> --- /dev/null
> +++ work-powerpc.git/drivers/char/watchdog/mpc5200_wdt.c
> @@ -0,0 +1,257 @@
> +#include <linux/init.h>
> +#include <linux/module.h>
> +#include <linux/miscdevice.h>
> +#include <linux/watchdog.h>
> +#include <linux/io.h>
> +#include <asm/of_platform.h>
> +#include <asm/uaccess.h>
> +#include <asm/mpc52xx.h>
> +
> +
> +#define GPT_MODE_WDT (1<<15)
> +#define GPT_MODE_CE (1<<12)
> +#define GPT_MODE_MS_TIMER (0x4)
> +
> +
> +struct mpc5200_wdt {
> + unsigned count; /* timer ticks before watchdog kicks in */
> + long ipb_freq;
> + struct miscdevice miscdev;
> + struct resource mem;
> + struct mpc52xx_gpt __iomem *regs;
> + struct mpc52xx_gpt saved_regs;
saved_regs isn't used anywhere
[snip]
- k
next prev parent reply other threads:[~2007-06-14 3:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-12 8:59 [PATCH] mpc5200: /dev/watchdog driver for GPT0 Domen Puncer
2007-06-14 3:57 ` Kumar Gala [this message]
2007-10-21 16:55 ` Grant Likely
2007-10-21 17:14 ` Domen Puncer
2007-10-21 17:24 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ECDF5931-F264-4083-B4F0-C8CA1976195A@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=domen.puncer@telargo.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox