mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-12 00:03:44 +02:00
remove functions that was moved to board.c
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9929 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
eac5490941
commit
f6697c727c
@ -36,12 +36,6 @@ prom_free_prom_memory (void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
|
||||||
get_system_type (void)
|
|
||||||
{
|
|
||||||
return BOARD_SYSTEM_TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
prom_putchar (char c)
|
prom_putchar (char c)
|
||||||
{
|
{
|
||||||
|
@ -25,10 +25,11 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <asm-mips/ifxmips/ifxmips_wdt.h>
|
#include <asm-mips/ifxmips/ifxmips_wdt.h>
|
||||||
#include <asm-mips/ifxmips/ifxmips.h>
|
#include <asm-mips/ifxmips/ifxmips.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
|
||||||
|
#define DRVNAME "ifxmips_wdt"
|
||||||
|
|
||||||
// TODO remove magic numbers and weirdo macros
|
// TODO remove magic numbers and weirdo macros
|
||||||
|
|
||||||
extern unsigned int ifxmips_get_fpi_hz (void);
|
extern unsigned int ifxmips_get_fpi_hz (void);
|
||||||
|
|
||||||
static int ifxmips_wdt_inuse = 0;
|
static int ifxmips_wdt_inuse = 0;
|
||||||
@ -54,12 +55,12 @@ ifxmips_wdt_enable (unsigned int timeout)
|
|||||||
/* caculate reload value */
|
/* caculate reload value */
|
||||||
wdt_reload = (timeout * (ffpi / wdt_clkdiv)) + wdt_pwl;
|
wdt_reload = (timeout * (ffpi / wdt_clkdiv)) + wdt_pwl;
|
||||||
|
|
||||||
printk("wdt_pwl=0x%x, wdt_clkdiv=%d, ffpi=%d, wdt_reload = 0x%x\n",
|
printk(KERN_WARNING DRVNAME ": wdt_pwl=0x%x, wdt_clkdiv=%d, ffpi=%d, wdt_reload = 0x%x\n",
|
||||||
wdt_pwl, wdt_clkdiv, ffpi, wdt_reload);
|
wdt_pwl, wdt_clkdiv, ffpi, wdt_reload);
|
||||||
|
|
||||||
if (wdt_reload > 0xFFFF)
|
if (wdt_reload > 0xFFFF)
|
||||||
{
|
{
|
||||||
printk ("timeout too large %d\n", timeout);
|
printk(KERN_WARNING DRVNAME ": timeout too large %d\n", timeout);
|
||||||
retval = -EINVAL;
|
retval = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -174,7 +175,7 @@ ifxmips_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IFXMIPS_WDT_IOC_STOP:
|
case IFXMIPS_WDT_IOC_STOP:
|
||||||
printk("disable watch dog timer\n");
|
printk(KERN_INFO DRVNAME ": disable watch dog timer\n");
|
||||||
ifxmips_wdt_disable();
|
ifxmips_wdt_disable();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -207,7 +208,7 @@ ifxmips_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printk("unknown watchdog iotcl\n");
|
printk(KERN_WARNING DRVNAME ": unknown watchdog iotcl\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@ -257,8 +258,8 @@ static struct file_operations wdt_fops = {
|
|||||||
.release = ifxmips_wdt_release,
|
.release = ifxmips_wdt_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
int __init
|
static int
|
||||||
ifxmips_wdt_init_module (void)
|
ifxmips_wdt_probe (struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
ifxmips_wdt_major = register_chrdev(0, "wdt", &wdt_fops);
|
ifxmips_wdt_major = register_chrdev(0, "wdt", &wdt_fops);
|
||||||
|
|
||||||
@ -276,11 +277,37 @@ ifxmips_wdt_init_module (void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ifxmips_wdt_remove (struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
unregister_chrdev(ifxmips_wdt_major, "wdt");
|
||||||
|
remove_proc_entry(DRVNAME, NULL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct
|
||||||
|
platform_driver ifxmips_wdt_driver = {
|
||||||
|
.probe = ifxmips_wdt_probe,
|
||||||
|
.remove = ifxmips_wdt_remove,
|
||||||
|
.driver = {
|
||||||
|
.name = DRVNAME,
|
||||||
|
.owner = THIS_MODULE,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
int __init
|
||||||
|
ifxmips_wdt_init_module (void)
|
||||||
|
{
|
||||||
|
int ret = platform_driver_register(&ifxmips_wdt_driver);
|
||||||
|
if (ret)
|
||||||
|
printk(KERN_INFO DRVNAME ": Error registering platfom driver!");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ifxmips_wdt_cleanup_module (void)
|
ifxmips_wdt_cleanup_module (void)
|
||||||
{
|
{
|
||||||
unregister_chrdev(ifxmips_wdt_major, "wdt");
|
platform_driver_unregister(&ifxmips_wdt_driver);
|
||||||
remove_proc_entry("ifxmips_wdt", NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(ifxmips_wdt_init_module);
|
module_init(ifxmips_wdt_init_module);
|
||||||
|
@ -91,4 +91,4 @@ Index: linux-2.6.23/drivers/char/Makefile
|
|||||||
+obj-$(CONFIG_IFXMIPS_GPIO) += ifxmips_gpio.o
|
+obj-$(CONFIG_IFXMIPS_GPIO) += ifxmips_gpio.o
|
||||||
+obj-$(CONFIG_IFXMIPS_SSC) += ifxmips_ssc.o
|
+obj-$(CONFIG_IFXMIPS_SSC) += ifxmips_ssc.o
|
||||||
+obj-$(CONFIG_IFXMIPS_EEPROM) += ifxmips_eeprom.o
|
+obj-$(CONFIG_IFXMIPS_EEPROM) += ifxmips_eeprom.o
|
||||||
+obj-$(CONFIG_IFXMIPS_MEI) += ifxmips_mei_core.o ifxmips_mei_bsp.o ifxmips_mei_mib.o
|
+obj-$(CONFIG_IFXMIPS_MEI) += ifxmips_mei_core.o
|
||||||
|
Loading…
Reference in New Issue
Block a user