diff options
author | Jochen Friedrich <jochen@scram.de> | 2008-07-24 06:22:05 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2008-08-26 16:19:56 -0400 |
commit | eaa95eb6ea43e6de8bea702c13556de9a1a1195a (patch) | |
tree | 76bd1f60d25550117128f4be673b66e0dce8a227 /drivers/watchdog | |
parent | 0e65fb2978467a3538af69858ae6bc13d332b9b2 (diff) |
[WATHDOG] delete unused driver mpc8xx_wdt.c
The watchdog driver mpc8xx_wdt.c was a device interface to
arch/ppc/syslib/m8xx_wdt.c for MPC8xx hardware. Now that ARCH=ppc is
gone, this driver is of no more use. For ARCH=powerpc, MPC8xx hardware
is supported by mpc8xxx_wdt.c.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/Kconfig | 4 | ||||
-rw-r--r-- | drivers/watchdog/Makefile | 1 | ||||
-rw-r--r-- | drivers/watchdog/mpc8xx_wdt.c | 170 |
3 files changed, 0 insertions, 175 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index db20542796bf..a8e80f2eb8ae 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -692,10 +692,6 @@ config MPC5200_WDT | |||
692 | tristate "MPC5200 Watchdog Timer" | 692 | tristate "MPC5200 Watchdog Timer" |
693 | depends on PPC_MPC52xx | 693 | depends on PPC_MPC52xx |
694 | 694 | ||
695 | config 8xx_WDT | ||
696 | tristate "MPC8xx Watchdog Timer" | ||
697 | depends on 8xx | ||
698 | |||
699 | config 8xxx_WDT | 695 | config 8xxx_WDT |
700 | tristate "MPC8xxx Platform Watchdog Timer" | 696 | tristate "MPC8xxx Platform Watchdog Timer" |
701 | depends on PPC_8xx || PPC_83xx || PPC_86xx | 697 | depends on PPC_8xx || PPC_83xx || PPC_86xx |
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index ca3dc043d786..1b5c0118cfe6 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile | |||
@@ -104,7 +104,6 @@ obj-$(CONFIG_TXX9_WDT) += txx9wdt.o | |||
104 | # PARISC Architecture | 104 | # PARISC Architecture |
105 | 105 | ||
106 | # POWERPC Architecture | 106 | # POWERPC Architecture |
107 | obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o | ||
108 | obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o | 107 | obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o |
109 | obj-$(CONFIG_8xxx_WDT) += mpc8xxx_wdt.o | 108 | obj-$(CONFIG_8xxx_WDT) += mpc8xxx_wdt.o |
110 | obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o | 109 | obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o |
diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xx_wdt.c deleted file mode 100644 index 1336425acf20..000000000000 --- a/drivers/watchdog/mpc8xx_wdt.c +++ /dev/null | |||
@@ -1,170 +0,0 @@ | |||
1 | /* | ||
2 | * mpc8xx_wdt.c - MPC8xx watchdog userspace interface | ||
3 | * | ||
4 | * Author: Florian Schirmer <jolt@tuxbox.org> | ||
5 | * | ||
6 | * 2002 (c) Florian Schirmer <jolt@tuxbox.org> This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/fs.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/miscdevice.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/watchdog.h> | ||
18 | #include <asm/8xx_immap.h> | ||
19 | #include <linux/uaccess.h> | ||
20 | #include <linux/io.h> | ||
21 | #include <syslib/m8xx_wdt.h> | ||
22 | |||
23 | static unsigned long wdt_opened; | ||
24 | static int wdt_status; | ||
25 | static spinlock_t wdt_lock; | ||
26 | |||
27 | static void mpc8xx_wdt_handler_disable(void) | ||
28 | { | ||
29 | volatile uint __iomem *piscr; | ||
30 | piscr = (uint *)&((immap_t *)IMAP_ADDR)->im_sit.sit_piscr; | ||
31 | |||
32 | if (!m8xx_has_internal_rtc) | ||
33 | m8xx_wdt_stop_timer(); | ||
34 | else | ||
35 | out_be32(piscr, in_be32(piscr) & ~(PISCR_PIE | PISCR_PTE)); | ||
36 | printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler deactivated\n"); | ||
37 | } | ||
38 | |||
39 | static void mpc8xx_wdt_handler_enable(void) | ||
40 | { | ||
41 | volatile uint __iomem *piscr; | ||
42 | piscr = (uint *)&((immap_t *)IMAP_ADDR)->im_sit.sit_piscr; | ||
43 | |||
44 | if (!m8xx_has_internal_rtc) | ||
45 | m8xx_wdt_install_timer(); | ||
46 | else | ||
47 | out_be32(piscr, in_be32(piscr) | PISCR_PIE | PISCR_PTE); | ||
48 | printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler activated\n"); | ||
49 | } | ||
50 | |||
51 | static int mpc8xx_wdt_open(struct inode *inode, struct file *file) | ||
52 | { | ||
53 | if (test_and_set_bit(0, &wdt_opened)) | ||
54 | return -EBUSY; | ||
55 | m8xx_wdt_reset(); | ||
56 | mpc8xx_wdt_handler_disable(); | ||
57 | return nonseekable_open(inode, file); | ||
58 | } | ||
59 | |||
60 | static int mpc8xx_wdt_release(struct inode *inode, struct file *file) | ||
61 | { | ||
62 | m8xx_wdt_reset(); | ||
63 | #if !defined(CONFIG_WATCHDOG_NOWAYOUT) | ||
64 | mpc8xx_wdt_handler_enable(); | ||
65 | #endif | ||
66 | clear_bit(0, &wdt_opened); | ||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | static ssize_t mpc8xx_wdt_write(struct file *file, const char *data, | ||
71 | size_t len, loff_t *ppos) | ||
72 | { | ||
73 | if (len) { | ||
74 | spin_lock(&wdt_lock); | ||
75 | m8xx_wdt_reset(); | ||
76 | spin_unlock(&wdt_lock); | ||
77 | } | ||
78 | return len; | ||
79 | } | ||
80 | |||
81 | static long mpc8xx_wdt_ioctl(struct file *file, | ||
82 | unsigned int cmd, unsigned long arg) | ||
83 | { | ||
84 | int timeout; | ||
85 | static struct watchdog_info info = { | ||
86 | .options = WDIOF_KEEPALIVEPING, | ||
87 | .firmware_version = 0, | ||
88 | .identity = "MPC8xx watchdog", | ||
89 | }; | ||
90 | |||
91 | switch (cmd) { | ||
92 | case WDIOC_GETSUPPORT: | ||
93 | if (copy_to_user((void *)arg, &info, sizeof(info))) | ||
94 | return -EFAULT; | ||
95 | break; | ||
96 | |||
97 | case WDIOC_GETSTATUS: | ||
98 | case WDIOC_GETBOOTSTATUS: | ||
99 | if (put_user(wdt_status, (int *)arg)) | ||
100 | return -EFAULT; | ||
101 | wdt_status &= ~WDIOF_KEEPALIVEPING; | ||
102 | break; | ||
103 | |||
104 | case WDIOC_GETTEMP: | ||
105 | return -EOPNOTSUPP; | ||
106 | |||
107 | case WDIOC_SETOPTIONS: | ||
108 | return -EOPNOTSUPP; | ||
109 | |||
110 | case WDIOC_KEEPALIVE: | ||
111 | spin_lock(&wdt_lock); | ||
112 | m8xx_wdt_reset(); | ||
113 | wdt_status |= WDIOF_KEEPALIVEPING; | ||
114 | spin_unlock(&wdt_lock); | ||
115 | break; | ||
116 | |||
117 | case WDIOC_SETTIMEOUT: | ||
118 | return -EOPNOTSUPP; | ||
119 | |||
120 | case WDIOC_GETTIMEOUT: | ||
121 | spin_lock(&wdt_lock); | ||
122 | timeout = m8xx_wdt_get_timeout(); | ||
123 | spin_unlock(&wdt_lock); | ||
124 | if (put_user(timeout, (int *)arg)) | ||
125 | return -EFAULT; | ||
126 | break; | ||
127 | |||
128 | default: | ||
129 | return -ENOTTY; | ||
130 | } | ||
131 | |||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | static const struct file_operations mpc8xx_wdt_fops = { | ||
136 | .owner = THIS_MODULE, | ||
137 | .llseek = no_llseek, | ||
138 | .write = mpc8xx_wdt_write, | ||
139 | .unlocked_ioctl = mpc8xx_wdt_ioctl, | ||
140 | .open = mpc8xx_wdt_open, | ||
141 | .release = mpc8xx_wdt_release, | ||
142 | }; | ||
143 | |||
144 | static struct miscdevice mpc8xx_wdt_miscdev = { | ||
145 | .minor = WATCHDOG_MINOR, | ||
146 | .name = "watchdog", | ||
147 | .fops = &mpc8xx_wdt_fops, | ||
148 | }; | ||
149 | |||
150 | static int __init mpc8xx_wdt_init(void) | ||
151 | { | ||
152 | spin_lock_init(&wdt_lock); | ||
153 | return misc_register(&mpc8xx_wdt_miscdev); | ||
154 | } | ||
155 | |||
156 | static void __exit mpc8xx_wdt_exit(void) | ||
157 | { | ||
158 | misc_deregister(&mpc8xx_wdt_miscdev); | ||
159 | |||
160 | m8xx_wdt_reset(); | ||
161 | mpc8xx_wdt_handler_enable(); | ||
162 | } | ||
163 | |||
164 | module_init(mpc8xx_wdt_init); | ||
165 | module_exit(mpc8xx_wdt_exit); | ||
166 | |||
167 | MODULE_AUTHOR("Florian Schirmer <jolt@tuxbox.org>"); | ||
168 | MODULE_DESCRIPTION("MPC8xx watchdog driver"); | ||
169 | MODULE_LICENSE("GPL"); | ||
170 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | ||