projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
danube to ifxmips transition
[openwrt.git]
/
target
/
linux
/
ifxmips
/
files
/
drivers
/
char
/
watchdog
/
danube_wdt.c
diff --git
a/target/linux/ifxmips/files/drivers/char/watchdog/danube_wdt.c
b/target/linux/ifxmips/files/drivers/char/watchdog/danube_wdt.c
index
54885c1
..
8fcbc88
100644
(file)
--- a/
target/linux/ifxmips/files/drivers/char/watchdog/danube_wdt.c
+++ b/
target/linux/ifxmips/files/drivers/char/watchdog/danube_wdt.c
@@
-23,19
+23,19
@@
#include <linux/proc_fs.h>
#include <linux/ioctl.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/ioctl.h>
#include <linux/module.h>
-#include <asm-mips/
danube/danube
_wdt.h>
-#include <asm-mips/
danube/danube
.h>
+#include <asm-mips/
ifxmips/ifxmips
_wdt.h>
+#include <asm-mips/
ifxmips/ifxmips
.h>
// TODO remove magic numbers and weirdo macros
// TODO remove magic numbers and weirdo macros
-extern unsigned int
danube
_get_fpi_hz (void);
+extern unsigned int
ifxmips
_get_fpi_hz (void);
-static int
danube
_wdt_inuse = 0;
-static int
danube
_wdt_major = 0;
+static int
ifxmips
_wdt_inuse = 0;
+static int
ifxmips
_wdt_major = 0;
int
int
-
danube
_wdt_enable (unsigned int timeout)
+
ifxmips
_wdt_enable (unsigned int timeout)
{
unsigned int wdt_cr = 0;
unsigned int wdt_reload = 0;
{
unsigned int wdt_cr = 0;
unsigned int wdt_reload = 0;
@@
-88,7
+88,7
@@
out:
}
void
}
void
-
danube
_wdt_disable (void)
+
ifxmips
_wdt_disable (void)
{
writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR);
writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2), IFXMIPS_BIU_WDT_CR);
{
writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR);
writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2), IFXMIPS_BIU_WDT_CR);
@@
-98,7
+98,7
@@
danube_wdt_disable (void)
/* passed LPEN or DSEN */
void
/* passed LPEN or DSEN */
void
-
danube
_wdt_enable_feature (int en, int type)
+
ifxmips
_wdt_enable_feature (int en, int type)
{
unsigned int wdt_cr = 0;
{
unsigned int wdt_cr = 0;
@@
-119,7
+119,7
@@
danube_wdt_enable_feature (int en, int type)
}
void
}
void
-
danube
_wdt_prewarning_limit (int pwl)
+
ifxmips
_wdt_prewarning_limit (int pwl)
{
unsigned int wdt_cr = 0;
{
unsigned int wdt_cr = 0;
@@
-134,7
+134,7
@@
danube_wdt_prewarning_limit (int pwl)
}
void
}
void
-
danube
_wdt_set_clkdiv (int clkdiv)
+
ifxmips
_wdt_set_clkdiv (int clkdiv)
{
unsigned int wdt_cr = 0;
{
unsigned int wdt_cr = 0;
@@
-149,7
+149,7
@@
danube_wdt_set_clkdiv (int clkdiv)
}
static int
}
static int
-
danube
_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
+
ifxmips
_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
int result = 0;
unsigned long arg)
{
int result = 0;
@@
-167,7
+167,7
@@
danube_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
switch (cmd)
{
case IFXMIPS_WDT_IOC_START:
switch (cmd)
{
case IFXMIPS_WDT_IOC_START:
- if ((result =
danube
_wdt_enable(user_arg)) < 0)
+ if ((result =
ifxmips
_wdt_enable(user_arg)) < 0)
timeout = -1;
else
timeout = user_arg;
timeout = -1;
else
timeout = user_arg;
@@
-175,14
+175,14
@@
danube_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
case IFXMIPS_WDT_IOC_STOP:
printk("disable watch dog timer\n");
case IFXMIPS_WDT_IOC_STOP:
printk("disable watch dog timer\n");
-
danube
_wdt_disable();
+
ifxmips
_wdt_disable();
break;
case IFXMIPS_WDT_IOC_PING:
if (timeout < 0)
result = -EIO;
else
break;
case IFXMIPS_WDT_IOC_PING:
if (timeout < 0)
result = -EIO;
else
- result =
danube
_wdt_enable(timeout);
+ result =
ifxmips
_wdt_enable(timeout);
break;
case IFXMIPS_WDT_IOC_GET_STATUS:
break;
case IFXMIPS_WDT_IOC_GET_STATUS:
@@
-191,19
+191,19
@@
danube_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
break;
case IFXMIPS_WDT_IOC_SET_PWL:
break;
case IFXMIPS_WDT_IOC_SET_PWL:
-
danube
_wdt_prewarning_limit(user_arg);
+
ifxmips
_wdt_prewarning_limit(user_arg);
break;
case IFXMIPS_WDT_IOC_SET_DSEN:
break;
case IFXMIPS_WDT_IOC_SET_DSEN:
-
danube
_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_DSEN);
+
ifxmips
_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_DSEN);
break;
case IFXMIPS_WDT_IOC_SET_LPEN:
break;
case IFXMIPS_WDT_IOC_SET_LPEN:
-
danube
_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_LPEN);
+
ifxmips
_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_LPEN);
break;
case IFXMIPS_WDT_IOC_SET_CLKDIV:
break;
case IFXMIPS_WDT_IOC_SET_CLKDIV:
-
danube
_wdt_set_clkdiv(user_arg);
+
ifxmips
_wdt_set_clkdiv(user_arg);
break;
default:
break;
default:
@@
-215,26
+215,26
@@
out:
}
static int
}
static int
-
danube
_wdt_open (struct inode *inode, struct file *file)
+
ifxmips
_wdt_open (struct inode *inode, struct file *file)
{
{
- if (
danube
_wdt_inuse)
+ if (
ifxmips
_wdt_inuse)
return -EBUSY;
return -EBUSY;
-
danube
_wdt_inuse = 1;
+
ifxmips
_wdt_inuse = 1;
return 0;
}
static int
return 0;
}
static int
-
danube
_wdt_release (struct inode *inode, struct file *file)
+
ifxmips
_wdt_release (struct inode *inode, struct file *file)
{
{
-
danube
_wdt_inuse = 0;
+
ifxmips
_wdt_inuse = 0;
return 0;
}
int
return 0;
}
int
-
danube
_wdt_register_proc_read (char *buf, char **start, off_t offset, int count,
+
ifxmips
_wdt_register_proc_read (char *buf, char **start, off_t offset, int count,
int *eof, void *data)
{
int len = 0;
int *eof, void *data)
{
int len = 0;
@@
-252,36
+252,36
@@
danube_wdt_register_proc_read (char *buf, char **start, off_t offset, int count,
static struct file_operations wdt_fops = {
.owner = THIS_MODULE,
static struct file_operations wdt_fops = {
.owner = THIS_MODULE,
- .ioctl =
danube
_wdt_ioctl,
- .open =
danube
_wdt_open,
- .release =
danube
_wdt_release,
+ .ioctl =
ifxmips
_wdt_ioctl,
+ .open =
ifxmips
_wdt_open,
+ .release =
ifxmips
_wdt_release,
};
int __init
};
int __init
-
danube
_wdt_init_module (void)
+
ifxmips
_wdt_init_module (void)
{
{
-
danube
_wdt_major = register_chrdev(0, "wdt", &wdt_fops);
+
ifxmips
_wdt_major = register_chrdev(0, "wdt", &wdt_fops);
- if (
danube
_wdt_major < 0)
+ if (
ifxmips
_wdt_major < 0)
{
printk("cannot register watchdog device\n");
return -EINVAL;
}
{
printk("cannot register watchdog device\n");
return -EINVAL;
}
- create_proc_read_entry("
danube_wdt", 0, NULL, danube
_wdt_register_proc_read, NULL);
+ create_proc_read_entry("
ifxmips_wdt", 0, NULL, ifxmips
_wdt_register_proc_read, NULL);
- printk("
danube
watchdog loaded\n");
+ printk("
ifxmips
watchdog loaded\n");
return 0;
}
void
return 0;
}
void
-
danube
_wdt_cleanup_module (void)
+
ifxmips
_wdt_cleanup_module (void)
{
{
- unregister_chrdev(
danube
_wdt_major, "wdt");
- remove_proc_entry("
danube
_wdt", NULL);
+ unregister_chrdev(
ifxmips
_wdt_major, "wdt");
+ remove_proc_entry("
ifxmips
_wdt", NULL);
}
}
-module_init(
danube
_wdt_init_module);
-module_exit(
danube
_wdt_cleanup_module);
+module_init(
ifxmips
_wdt_init_module);
+module_exit(
ifxmips
_wdt_cleanup_module);
This page took
0.029009 seconds
and
4
git commands to generate.