summaryrefslogtreecommitdiff
path: root/target/linux/ifxmips/files/drivers
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2007-12-22 13:55:14 +0000
committerJohn Crispin <john@openwrt.org>2007-12-22 13:55:14 +0000
commitede75452000b57a7eee95be4469690dae165d1bd (patch)
treef1ef9623582d04f291876626ff75b12f18ea975e /target/linux/ifxmips/files/drivers
parent4da7f2dbed36a301c92087a8d6b11cd8bb3ab3d0 (diff)
downloadmtk-20170518-ede75452000b57a7eee95be4469690dae165d1bd.zip
mtk-20170518-ede75452000b57a7eee95be4469690dae165d1bd.tar.gz
mtk-20170518-ede75452000b57a7eee95be4469690dae165d1bd.tar.bz2
danube to ifxmips transition
SVN-Revision: 9825
Diffstat (limited to 'target/linux/ifxmips/files/drivers')
-rw-r--r--target/linux/ifxmips/files/drivers/char/danube_eeprom.c74
-rw-r--r--target/linux/ifxmips/files/drivers/char/danube_gpio.c204
-rw-r--r--target/linux/ifxmips/files/drivers/char/danube_led.c58
-rw-r--r--target/linux/ifxmips/files/drivers/char/danube_ssc.c28
-rw-r--r--target/linux/ifxmips/files/drivers/char/watchdog/danube_wdt.c74
-rw-r--r--target/linux/ifxmips/files/drivers/net/danube_mii0.c68
-rw-r--r--target/linux/ifxmips/files/drivers/serial/danube_asc.c176
7 files changed, 341 insertions, 341 deletions
diff --git a/target/linux/ifxmips/files/drivers/char/danube_eeprom.c b/target/linux/ifxmips/files/drivers/char/danube_eeprom.c
index 1835f27..ea1303c 100644
--- a/target/linux/ifxmips/files/drivers/char/danube_eeprom.c
+++ b/target/linux/ifxmips/files/drivers/char/danube_eeprom.c
@@ -53,13 +53,13 @@
#include <linux/kernel.h>
#include <linux/version.h>
-#include <asm/danube/danube.h>
-#include <asm/danube/danube_irq.h>
-#include <asm/danube/ifx_ssc_defines.h>
-#include <asm/danube/ifx_ssc.h>
+#include <asm/ifxmips/ifxmips.h>
+#include <asm/ifxmips/ifxmips_irq.h>
+#include <asm/ifxmips/ifx_ssc_defines.h>
+#include <asm/ifxmips/ifx_ssc.h>
/* allow the user to set the major device number */
-static int danube_eeprom_maj = 0;
+static int ifxmips_eeprom_maj = 0;
extern int ifx_ssc_init (void);
extern int ifx_ssc_open (struct inode *inode, struct file *filp);
@@ -299,26 +299,26 @@ out:
}
int
-danube_eeprom_open (struct inode *inode, struct file *filp)
+ifxmips_eeprom_open (struct inode *inode, struct file *filp)
{
filp->f_pos = 0;
return 0;
}
int
-danube_eeprom_close (struct inode *inode, struct file *filp)
+ifxmips_eeprom_close (struct inode *inode, struct file *filp)
{
return 0;
}
int
-danube_eeprom_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long data)
+ifxmips_eeprom_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long data)
{
return 0;
}
ssize_t
-danube_eeprom_read (char *buf, size_t len, unsigned int addr)
+ifxmips_eeprom_read (char *buf, size_t len, unsigned int addr)
{
int ret = 0;
unsigned int data;
@@ -335,7 +335,7 @@ danube_eeprom_read (char *buf, size_t len, unsigned int addr)
if ((ret = ifx_ssc_open((struct inode *) 0, NULL)))
{
- printk("danube_eeprom_open fails\n");
+ printk("ifxmips_eeprom_open fails\n");
goto out;
}
@@ -361,14 +361,14 @@ danube_eeprom_read (char *buf, size_t len, unsigned int addr)
out:
if (ifx_ssc_close((struct inode *) 0, NULL))
- printk("danube_eeprom_close fails\n");
+ printk("ifxmips_eeprom_close fails\n");
return len;
}
-EXPORT_SYMBOL(danube_eeprom_read);
+EXPORT_SYMBOL(ifxmips_eeprom_read);
static ssize_t
-danube_eeprom_fops_read (struct file *filp, char *ubuf, size_t len, loff_t * off)
+ifxmips_eeprom_fops_read (struct file *filp, char *ubuf, size_t len, loff_t * off)
{
int ret = 0;
unsigned char ssc_rx_buf[EEPROM_SIZE];
@@ -385,7 +385,7 @@ danube_eeprom_fops_read (struct file *filp, char *ubuf, size_t len, loff_t * off
local_irq_save(flag);
- if ((ret = danube_eeprom_read(ssc_rx_buf, len, *off)) < 0)
+ if ((ret = ifxmips_eeprom_read(ssc_rx_buf, len, *off)) < 0)
{
printk("read fails, err=%x\n", ret);
local_irq_restore(flag);
@@ -405,14 +405,14 @@ danube_eeprom_fops_read (struct file *filp, char *ubuf, size_t len, loff_t * off
}
ssize_t
-danube_eeprom_write (char *buf, size_t len, unsigned int addr)
+ifxmips_eeprom_write (char *buf, size_t len, unsigned int addr)
{
int ret = 0;
unsigned int data;
if ((ret = ifx_ssc_open ((struct inode *) 0, NULL)))
{
- printk ("danube_eeprom_open fails\n");
+ printk ("ifxmips_eeprom_open fails\n");
goto out;
}
@@ -436,14 +436,14 @@ danube_eeprom_write (char *buf, size_t len, unsigned int addr)
out:
if (ifx_ssc_close ((struct inode *) 0, NULL))
- printk ("danube_eeprom_close fails\n");
+ printk ("ifxmips_eeprom_close fails\n");
return ret;
}
-EXPORT_SYMBOL(danube_eeprom_write);
+EXPORT_SYMBOL(ifxmips_eeprom_write);
static ssize_t
-danube_eeprom_fops_write (struct file *filp, const char *ubuf, size_t len, loff_t * off)
+ifxmips_eeprom_fops_write (struct file *filp, const char *ubuf, size_t len, loff_t * off)
{
int ret = 0;
unsigned char ssc_tx_buf[EEPROM_SIZE];
@@ -457,7 +457,7 @@ danube_eeprom_fops_write (struct file *filp, const char *ubuf, size_t len, loff_
if ((ret = copy_from_user (ssc_tx_buf, ubuf, len)))
return EFAULT;
- ret = danube_eeprom_write (ssc_tx_buf, len, *off);
+ ret = ifxmips_eeprom_write (ssc_tx_buf, len, *off);
if (ret > 0)
*off = ret;
@@ -466,7 +466,7 @@ danube_eeprom_fops_write (struct file *filp, const char *ubuf, size_t len, loff_
}
loff_t
-danube_eeprom_llseek (struct file * filp, loff_t off, int whence)
+ifxmips_eeprom_llseek (struct file * filp, loff_t off, int whence)
{
loff_t newpos;
switch (whence) {
@@ -490,24 +490,24 @@ danube_eeprom_llseek (struct file * filp, loff_t off, int whence)
return newpos;
}
-static struct file_operations danube_eeprom_fops = {
+static struct file_operations ifxmips_eeprom_fops = {
owner:THIS_MODULE,
- llseek:danube_eeprom_llseek,
- read:danube_eeprom_fops_read,
- write:danube_eeprom_fops_write,
- ioctl:danube_eeprom_ioctl,
- open:danube_eeprom_open,
- release:danube_eeprom_close,
+ llseek:ifxmips_eeprom_llseek,
+ read:ifxmips_eeprom_fops_read,
+ write:ifxmips_eeprom_fops_write,
+ ioctl:ifxmips_eeprom_ioctl,
+ open:ifxmips_eeprom_open,
+ release:ifxmips_eeprom_close,
};
int __init
-danube_eeprom_init (void)
+ifxmips_eeprom_init (void)
{
int ret = 0;
- danube_eeprom_maj = register_chrdev(0, "eeprom", &danube_eeprom_fops);
+ ifxmips_eeprom_maj = register_chrdev(0, "eeprom", &ifxmips_eeprom_fops);
- if (danube_eeprom_maj < 0)
+ if (ifxmips_eeprom_maj < 0)
{
printk("failed to register eeprom device\n");
ret = -EINVAL;
@@ -515,27 +515,27 @@ danube_eeprom_init (void)
goto out;
}
- printk("danube_eeprom : /dev/eeprom mayor %d\n", danube_eeprom_maj);
+ printk("ifxmips_eeprom : /dev/eeprom mayor %d\n", ifxmips_eeprom_maj);
out:
return ret;
}
void __exit
-danube_eeprom_cleanup_module (void)
+ifxmips_eeprom_cleanup_module (void)
{
- /*if (unregister_chrdev (danube_eeprom_maj, "eeprom")) {
+ /*if (unregister_chrdev (ifxmips_eeprom_maj, "eeprom")) {
printk ("Unable to unregister major %d for the EEPROM\n",
maj);
}*/
}
-module_exit (danube_eeprom_cleanup_module);
-module_init (danube_eeprom_init);
+module_exit (ifxmips_eeprom_cleanup_module);
+module_init (ifxmips_eeprom_init);
MODULE_LICENSE ("GPL");
MODULE_AUTHOR ("Peng Liu");
MODULE_DESCRIPTION ("IFAP EEPROM driver");
-MODULE_SUPPORTED_DEVICE ("danube_eeprom");
+MODULE_SUPPORTED_DEVICE ("ifxmips_eeprom");
diff --git a/target/linux/ifxmips/files/drivers/char/danube_gpio.c b/target/linux/ifxmips/files/drivers/char/danube_gpio.c
index 2a42665..6ac9ec6 100644
--- a/target/linux/ifxmips/files/drivers/char/danube_gpio.c
+++ b/target/linux/ifxmips/files/drivers/char/danube_gpio.c
@@ -26,13 +26,13 @@
#include <linux/ioctl.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>
-#include <asm/danube/danube.h>
-#include <asm/danube/danube_ioctl.h>
+#include <asm/ifxmips/ifxmips.h>
+#include <asm/ifxmips/ifxmips_ioctl.h>
#define MAX_PORTS 2
#define PINS_PER_PORT 16
-static unsigned int danube_gpio_major = 0;
+static unsigned int ifxmips_gpio_major = 0;
/* TODO do we need this ? */
static struct semaphore port_sem;
@@ -41,147 +41,147 @@ static struct semaphore port_sem;
#define IFXMIPS_GPIO_SANITY {if (port > MAX_PORTS || pin > PINS_PER_PORT) return -EINVAL; }
int
-danube_port_reserve_pin (unsigned int port, unsigned int pin)
+ifxmips_port_reserve_pin (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
printk("%s : call to obseleted function\n", __func__);
return 0;
}
-EXPORT_SYMBOL(danube_port_reserve_pin);
+EXPORT_SYMBOL(ifxmips_port_reserve_pin);
int
-danube_port_free_pin (unsigned int port, unsigned int pin)
+ifxmips_port_free_pin (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
printk("%s : call to obseleted function\n", __func__);
return 0;
}
-EXPORT_SYMBOL(danube_port_free_pin);
+EXPORT_SYMBOL(ifxmips_port_free_pin);
int
-danube_port_set_open_drain (unsigned int port, unsigned int pin)
+ifxmips_port_set_open_drain (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_OD + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_OD);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_open_drain);
+EXPORT_SYMBOL(ifxmips_port_set_open_drain);
int
-danube_port_clear_open_drain (unsigned int port, unsigned int pin)
+ifxmips_port_clear_open_drain (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_OD + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_OD);
return 0;
}
-EXPORT_SYMBOL(danube_port_clear_open_drain);
+EXPORT_SYMBOL(ifxmips_port_clear_open_drain);
int
-danube_port_set_pudsel (unsigned int port, unsigned int pin)
+ifxmips_port_set_pudsel (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_PUDSEL + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_PUDSEL);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_pudsel);
+EXPORT_SYMBOL(ifxmips_port_set_pudsel);
int
-danube_port_clear_pudsel (unsigned int port, unsigned int pin)
+ifxmips_port_clear_pudsel (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_PUDSEL + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_PUDSEL);
return 0;
}
-EXPORT_SYMBOL(danube_port_clear_pudsel);
+EXPORT_SYMBOL(ifxmips_port_clear_pudsel);
int
-danube_port_set_puden (unsigned int port, unsigned int pin)
+ifxmips_port_set_puden (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_PUDEN + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_PUDEN);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_puden);
+EXPORT_SYMBOL(ifxmips_port_set_puden);
int
-danube_port_clear_puden (unsigned int port, unsigned int pin)
+ifxmips_port_clear_puden (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_PUDEN + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_PUDEN);
return 0;
}
-EXPORT_SYMBOL(danube_port_clear_puden);
+EXPORT_SYMBOL(ifxmips_port_clear_puden);
int
-danube_port_set_stoff (unsigned int port, unsigned int pin)
+ifxmips_port_set_stoff (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_STOFF + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_STOFF);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_stoff);
+EXPORT_SYMBOL(ifxmips_port_set_stoff);
int
-danube_port_clear_stoff (unsigned int port, unsigned int pin)
+ifxmips_port_clear_stoff (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_STOFF + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_STOFF);
return 0;
}
-EXPORT_SYMBOL(danube_port_clear_stoff);
+EXPORT_SYMBOL(ifxmips_port_clear_stoff);
int
-danube_port_set_dir_out (unsigned int port, unsigned int pin)
+ifxmips_port_set_dir_out (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_DIR + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_DIR);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_dir_out);
+EXPORT_SYMBOL(ifxmips_port_set_dir_out);
int
-danube_port_set_dir_in (unsigned int port, unsigned int pin)
+ifxmips_port_set_dir_in (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_DIR + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_DIR);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_dir_in);
+EXPORT_SYMBOL(ifxmips_port_set_dir_in);
int
-danube_port_set_output (unsigned int port, unsigned int pin)
+ifxmips_port_set_output (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_OUT + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_OUT);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_output);
+EXPORT_SYMBOL(ifxmips_port_set_output);
int
-danube_port_clear_output (unsigned int port, unsigned int pin)
+ifxmips_port_clear_output (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_OUT + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_OUT);
return 0;
}
-EXPORT_SYMBOL(danube_port_clear_output);
+EXPORT_SYMBOL(ifxmips_port_clear_output);
int
-danube_port_get_input (unsigned int port, unsigned int pin)
+ifxmips_port_get_input (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
@@ -190,49 +190,49 @@ danube_port_get_input (unsigned int port, unsigned int pin)
else
return 1;
}
-EXPORT_SYMBOL(danube_port_get_input);
+EXPORT_SYMBOL(ifxmips_port_get_input);
int
-danube_port_set_altsel0 (unsigned int port, unsigned int pin)
+ifxmips_port_set_altsel0 (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_ALTSEL0 + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_ALTSEL0);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_altsel0);
+EXPORT_SYMBOL(ifxmips_port_set_altsel0);
int
-danube_port_clear_altsel0 (unsigned int port, unsigned int pin)
+ifxmips_port_clear_altsel0 (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_ALTSEL0 + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_ALTSEL0);
return 0;
}
-EXPORT_SYMBOL(danube_port_clear_altsel0);
+EXPORT_SYMBOL(ifxmips_port_clear_altsel0);
int
-danube_port_set_altsel1 (unsigned int port, unsigned int pin)
+ifxmips_port_set_altsel1 (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_ALTSEL1 + (port * 0x30)) | (1 << pin), IFXMIPS_GPIO_P0_ALTSEL1);
return 0;
}
-EXPORT_SYMBOL(danube_port_set_altsel1);
+EXPORT_SYMBOL(ifxmips_port_set_altsel1);
int
-danube_port_clear_altsel1 (unsigned int port, unsigned int pin)
+ifxmips_port_clear_altsel1 (unsigned int port, unsigned int pin)
{
IFXMIPS_GPIO_SANITY;
writel(readl(IFXMIPS_GPIO_P0_ALTSEL1 + (port * 0x30)) & ~(1 << pin), IFXMIPS_GPIO_P0_ALTSEL1);
return 0;
}
-EXPORT_SYMBOL(danube_port_clear_altsel1);
+EXPORT_SYMBOL(ifxmips_port_clear_altsel1);
-long danube_port_read_procmem_helper(char* tag, u32* in_reg, char *buf)
+long ifxmips_port_read_procmem_helper(char* tag, u32* in_reg, char *buf)
{
u32 reg, bit = 0;
unsigned int len, t;
@@ -252,10 +252,10 @@ long danube_port_read_procmem_helper(char* tag, u32* in_reg, char *buf)
}
int
-danube_port_read_procmem (char *buf, char **start, off_t offset, int count,
+ifxmips_port_read_procmem (char *buf, char **start, off_t offset, int count,
int *eof, void *data)
{
- long len = sprintf (buf, "\nDanube Port Settings\n");
+ long len = sprintf (buf, "\nIFXMips Port Settings\n");
len += sprintf (buf + len,
" 3 2 1 0\n");
@@ -264,24 +264,24 @@ danube_port_read_procmem (char *buf, char **start, off_t offset, int count,
len += sprintf (buf + len,
"----------------------------------------\n");
- len += danube_port_read_procmem_helper("P0-OUT", IFXMIPS_GPIO_P0_OUT, &buf[len]);
- len += danube_port_read_procmem_helper("P1-OUT", IFXMIPS_GPIO_P1_OUT, &buf[len]);
- len += danube_port_read_procmem_helper("P0-IN ", IFXMIPS_GPIO_P0_IN, &buf[len]);
- len += danube_port_read_procmem_helper("P1-IN ", IFXMIPS_GPIO_P1_IN, &buf[len]);
- len += danube_port_read_procmem_helper("P0-DIR", IFXMIPS_GPIO_P0_DIR, &buf[len]);
- len += danube_port_read_procmem_helper("P1-DIR", IFXMIPS_GPIO_P1_DIR, &buf[len]);
- len += danube_port_read_procmem_helper("P0-STO ", IFXMIPS_GPIO_P0_STOFF, &buf[len]);
- len += danube_port_read_procmem_helper("P1-STO ", IFXMIPS_GPIO_P1_STOFF, &buf[len]);
- len += danube_port_read_procmem_helper("P0-PUDE", IFXMIPS_GPIO_P0_PUDEN, &buf[len]);
- len += danube_port_read_procmem_helper("P1-PUDE", IFXMIPS_GPIO_P1_PUDEN, &buf[len]);
- len += danube_port_read_procmem_helper("P0-OD ", IFXMIPS_GPIO_P0_OD, &buf[len]);
- len += danube_port_read_procmem_helper("P1-OD ", IFXMIPS_GPIO_P1_OD, &buf[len]);
- len += danube_port_read_procmem_helper("P0-PUDS", IFXMIPS_GPIO_P0_PUDSEL, &buf[len]);
- len += danube_port_read_procmem_helper("P1-PUDS", IFXMIPS_GPIO_P1_PUDSEL, &buf[len]);
- len += danube_port_read_procmem_helper("P0-ALT0", IFXMIPS_GPIO_P0_ALTSEL0, &buf[len]);
- len += danube_port_read_procmem_helper("P1-ALT0", IFXMIPS_GPIO_P1_ALTSEL0, &buf[len]);
- len += danube_port_read_procmem_helper("P0-ALT1", IFXMIPS_GPIO_P0_ALTSEL1, &buf[len]);
- len += danube_port_read_procmem_helper("P1-ALT1", IFXMIPS_GPIO_P1_ALTSEL1, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-OUT", IFXMIPS_GPIO_P0_OUT, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-OUT", IFXMIPS_GPIO_P1_OUT, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-IN ", IFXMIPS_GPIO_P0_IN, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-IN ", IFXMIPS_GPIO_P1_IN, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-DIR", IFXMIPS_GPIO_P0_DIR, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-DIR", IFXMIPS_GPIO_P1_DIR, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-STO ", IFXMIPS_GPIO_P0_STOFF, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-STO ", IFXMIPS_GPIO_P1_STOFF, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-PUDE", IFXMIPS_GPIO_P0_PUDEN, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-PUDE", IFXMIPS_GPIO_P1_PUDEN, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-OD ", IFXMIPS_GPIO_P0_OD, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-OD ", IFXMIPS_GPIO_P1_OD, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-PUDS", IFXMIPS_GPIO_P0_PUDSEL, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-PUDS", IFXMIPS_GPIO_P1_PUDSEL, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-ALT0", IFXMIPS_GPIO_P0_ALTSEL0, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-ALT0", IFXMIPS_GPIO_P1_ALTSEL0, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P0-ALT1", IFXMIPS_GPIO_P0_ALTSEL1, &buf[len]);
+ len += ifxmips_port_read_procmem_helper("P1-ALT1", IFXMIPS_GPIO_P1_ALTSEL1, &buf[len]);
len = len + sprintf (buf + len, "\n\n");
*eof = 1;
@@ -290,23 +290,23 @@ danube_port_read_procmem (char *buf, char **start, off_t offset, int count,
}
static int
-danube_port_open (struct inode *inode, struct file *filep)
+ifxmips_port_open (struct inode *inode, struct file *filep)
{
return 0;
}
static int
-danube_port_release (struct inode *inode, struct file *filelp)
+ifxmips_port_release (struct inode *inode, struct file *filelp)
{
return 0;
}
static int
-danube_port_ioctl (struct inode *inode, struct file *filp,
+ifxmips_port_ioctl (struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
int ret = 0;
- volatile struct danube_port_ioctl_parm parm;
+ volatile struct ifxmips_port_ioctl_parm parm;
if (_IOC_TYPE (cmd) != IFXMIPS_PORT_IOC_MAGIC)
return -EINVAL;
@@ -314,15 +314,15 @@ danube_port_ioctl (struct inode *inode, struct file *filp,
if (_IOC_DIR (cmd) & _IOC_WRITE) {
if (!access_ok
(VERIFY_READ, arg,
- sizeof (struct danube_port_ioctl_parm)))
+ sizeof (struct ifxmips_port_ioctl_parm)))
return -EFAULT;
ret = copy_from_user ((void *) &parm, (void *) arg,
- sizeof (struct danube_port_ioctl_parm));
+ sizeof (struct ifxmips_port_ioctl_parm));
}
if (_IOC_DIR (cmd) & _IOC_READ) {
if (!access_ok
(VERIFY_WRITE, arg,
- sizeof (struct danube_port_ioctl_parm)))
+ sizeof (struct ifxmips_port_ioctl_parm)))
return -EFAULT;
}
@@ -332,64 +332,64 @@ danube_port_ioctl (struct inode *inode, struct file *filp,
switch (cmd) {
case IFXMIPS_PORT_IOCOD:
if (parm.value == 0x00)
- danube_port_clear_open_drain(parm.port, parm.pin);
+ ifxmips_port_clear_open_drain(parm.port, parm.pin);
else
- danube_port_set_open_drain(parm.port, parm.pin);
+ ifxmips_port_set_open_drain(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCPUDSEL:
if (parm.value == 0x00)
- danube_port_clear_pudsel(parm.port, parm.pin);
+ ifxmips_port_clear_pudsel(parm.port, parm.pin);
else
- danube_port_set_pudsel(parm.port, parm.pin);
+ ifxmips_port_set_pudsel(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCPUDEN:
if (parm.value == 0x00)
- danube_port_clear_puden(parm.port, parm.pin);
+ ifxmips_port_clear_puden(parm.port, parm.pin);
else
- danube_port_set_puden(parm.port, parm.pin);
+ ifxmips_port_set_puden(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCSTOFF:
if (parm.value == 0x00)
- danube_port_clear_stoff(parm.port, parm.pin);
+ ifxmips_port_clear_stoff(parm.port, parm.pin);
else
- danube_port_set_stoff(parm.port, parm.pin);
+ ifxmips_port_set_stoff(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCDIR:
if (parm.value == 0x00)
- danube_port_set_dir_in(parm.port, parm.pin);
+ ifxmips_port_set_dir_in(parm.port, parm.pin);
else
- danube_port_set_dir_out(parm.port, parm.pin);
+ ifxmips_port_set_dir_out(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCOUTPUT:
if (parm.value == 0x00)
- danube_port_clear_output(parm.port, parm.pin);
+ ifxmips_port_clear_output(parm.port, parm.pin);
else
- danube_port_set_output(parm.port, parm.pin);
+ ifxmips_port_set_output(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCALTSEL0:
if (parm.value == 0x00)
- danube_port_clear_altsel0(parm.port, parm.pin);
+ ifxmips_port_clear_altsel0(parm.port, parm.pin);
else
- danube_port_set_altsel0(parm.port, parm.pin);
+ ifxmips_port_set_altsel0(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCALTSEL1:
if (parm.value == 0x00)
- danube_port_clear_altsel1(parm.port, parm.pin);
+ ifxmips_port_clear_altsel1(parm.port, parm.pin);
else
- danube_port_set_altsel1(parm.port, parm.pin);
+ ifxmips_port_set_altsel1(parm.port, parm.pin);
break;
case IFXMIPS_PORT_IOCINPUT:
- parm.value = danube_port_get_input(parm.port, parm.pin);
+ parm.value = ifxmips_port_get_input(parm.port, parm.pin);
copy_to_user((void*)arg, (void*)&parm,
- sizeof(struct danube_port_ioctl_parm));
+ sizeof(struct ifxmips_port_ioctl_parm));
break;
default:
@@ -402,41 +402,41 @@ danube_port_ioctl (struct inode *inode, struct file *filp,
}
static struct file_operations port_fops = {
- .open = danube_port_open,
- .release = danube_port_release,
- .ioctl = danube_port_ioctl
+ .open = ifxmips_port_open,
+ .release = ifxmips_port_release,
+ .ioctl = ifxmips_port_ioctl
};
int __init
-danube_gpio_init (void)
+ifxmips_gpio_init (void)
{
int retval = 0;
sema_init (&port_sem, 1);
- danube_gpio_major = register_chrdev(0, "danube_gpio", &port_fops);
- if (!danube_gpio_major)
+ ifxmips_gpio_major = register_chrdev(0, "ifxmips_gpio", &port_fops);
+ if (!ifxmips_gpio_major)
{
- printk("danube-port: Error! Could not register port device. #%d\n", danube_gpio_major);
+ printk("ifxmips-port: Error! Could not register port device. #%d\n", ifxmips_gpio_major);
retval = -EINVAL;
goto out;
}
- create_proc_read_entry("danube_gpio", 0, NULL,
- danube_port_read_procmem, NULL);
+ create_proc_read_entry("ifxmips_gpio", 0, NULL,
+ ifxmips_port_read_procmem, NULL);
- printk("registered danube gpio driver\n");
+ printk("registered ifxmips gpio driver\n");
out:
return retval;
}
void __exit
-danube_gpio_exit (void)
+ifxmips_gpio_exit (void)
{
- unregister_chrdev(danube_gpio_major, "danube_gpio");
- remove_proc_entry("danube_gpio", NULL);
+ unregister_chrdev(ifxmips_gpio_major, "ifxmips_gpio");
+ remove_proc_entry("ifxmips_gpio", NULL);
}
-module_init(danube_gpio_init);
-module_exit(danube_gpio_exit);
+module_init(ifxmips_gpio_init);
+module_exit(ifxmips_gpio_exit);
diff --git a/target/linux/ifxmips/files/drivers/char/danube_led.c b/target/linux/ifxmips/files/drivers/char/danube_led.c
index f1483cc..b0b8e82 100644
--- a/target/linux/ifxmips/files/drivers/char/danube_led.c
+++ b/target/linux/ifxmips/files/drivers/char/danube_led.c
@@ -27,9 +27,9 @@
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <linux/errno.h>
-#include <asm/danube/danube.h>
-#include <asm/danube/danube_gpio.h>
-#include <asm/danube/danube_pmu.h>
+#include <asm/ifxmips/ifxmips.h>
+#include <asm/ifxmips/ifxmips_gpio.h>
+#include <asm/ifxmips/ifxmips_pmu.h>
#define IFXMIPS_LED_CLK_EDGE IFXMIPS_LED_FALLING
//#define IFXMIPS_LED_CLK_EDGE IFXMIPS_LED_RISING
@@ -38,52 +38,52 @@
#define IFXMIPS_LED_GPIO_PORT 0
-static int danube_led_major;
+static int ifxmips_led_major;
void
-danube_led_set (unsigned int led)
+ifxmips_led_set (unsigned int led)
{
led &= 0xffffff;
writel(readl(IFXMIPS_LED_CPU0) | led, IFXMIPS_LED_CPU0);
}
-EXPORT_SYMBOL(danube_led_set);
+EXPORT_SYMBOL(ifxmips_led_set);
void
-danube_led_clear (unsigned int led)
+ifxmips_led_clear (unsigned int led)
{
led = ~(led & 0xffffff);
writel(readl(IFXMIPS_LED_CPU0) & led, IFXMIPS_LED_CPU0);
}
-EXPORT_SYMBOL(danube_led_clear);
+EXPORT_SYMBOL(ifxmips_led_clear);
void
-danube_led_blink_set (unsigned int led)
+ifxmips_led_blink_set (unsigned int led)
{
led &= 0xffffff;
writel(readl(IFXMIPS_LED_CON0) | led, IFXMIPS_LED_CON0);
}
-EXPORT_SYMBOL(danube_led_blink_set);
+EXPORT_SYMBOL(ifxmips_led_blink_set);
void
-danube_led_blink_clear (unsigned int led)
+ifxmips_led_blink_clear (unsigned int led)
{
led = ~(led & 0xffffff);
writel(readl(IFXMIPS_LED_CON0) & led, IFXMIPS_LED_CON0);
}
-EXPORT_SYMBOL(danube_led_blink_clear);
+EXPORT_SYMBOL(ifxmips_led_blink_clear);
void
-danube_led_setup_gpio (void)
+ifxmips_led_setup_gpio (void)
{
int i = 0;
/* we need to setup pins SH,D,ST (4,5,6) */
for (i = 4; i < 7; i++)
{
- danube_port_set_altsel0(IFXMIPS_LED_GPIO_PORT, i);
- danube_port_clear_altsel1(IFXMIPS_LED_GPIO_PORT, i);
- danube_port_set_dir_out(IFXMIPS_LED_GPIO_PORT, i);
- danube_port_set_open_drain(IFXMIPS_LED_GPIO_PORT, i);
+ ifxmips_port_set_altsel0(IFXMIPS_LED_GPIO_PORT, i);
+ ifxmips_port_clear_altsel1(IFXMIPS_LED_GPIO_PORT, i);
+ ifxmips_port_set_dir_out(IFXMIPS_LED_GPIO_PORT, i);
+ ifxmips_port_set_open_drain(IFXMIPS_LED_GPIO_PORT, i);
}
}
@@ -111,7 +111,7 @@ led_release (struct inode *inode, struct file *file)
return 0;
}
-static struct file_operations danube_led_fops = {
+static struct file_operations ifxmips_led_fops = {
.owner = THIS_MODULE,
.ioctl = led_ioctl,
.open = led_open,
@@ -138,11 +138,11 @@ Map for hardware relay on reference board
int __init
-danube_led_init (void)
+ifxmips_led_init (void)
{
int ret = 0;
- danube_led_setup_gpio();
+ ifxmips_led_setup_gpio();
writel(0, IFXMIPS_LED_AR);
writel(0, IFXMIPS_LED_CPU0);
@@ -169,29 +169,29 @@ danube_led_init (void)
writel(readl(IFXMIPS_LED_CON0) | IFXMIPS_LED_ADSL_SRC, IFXMIPS_LED_CON0);
/* per default, the leds are turned on */
- danube_pmu_enable(IFXMIPS_PMU_PWDCR_LED);
+ ifxmips_pmu_enable(IFXMIPS_PMU_PWDCR_LED);
- danube_led_major = register_chrdev(0, "danube_led", &danube_led_fops);
+ ifxmips_led_major = register_chrdev(0, "ifxmips_led", &ifxmips_led_fops);
- if (!danube_led_major)
+ if (!ifxmips_led_major)
{
- printk("danube_led: Error! Could not register device. %d\n", danube_led_major);
+ printk("ifxmips_led: Error! Could not register device. %d\n", ifxmips_led_major);
ret = -EINVAL;
goto out;
}
- printk(KERN_INFO "danube_led : device registered on major %d\n", danube_led_major);
+ printk(KERN_INFO "ifxmips_led : device registered on major %d\n", ifxmips_led_major);
out:
return ret;
}
void __exit
-danube_led_exit (void)
+ifxmips_led_exit (void)
{
- unregister_chrdev(danube_led_major, "danube_led");
+ unregister_chrdev(ifxmips_led_major, "ifxmips_led");
}
-module_init(danube_led_init);
-module_exit(danube_led_exit);
+module_init(ifxmips_led_init);
+module_exit(ifxmips_led_exit);
diff --git a/target/linux/ifxmips/files/drivers/char/danube_ssc.c b/target/linux/ifxmips/files/drivers/char/danube_ssc.c
index c26b7bb..495f258 100644
--- a/target/linux/ifxmips/files/drivers/char/danube_ssc.c
+++ b/target/linux/ifxmips/files/drivers/char/danube_ssc.c
@@ -54,10 +54,10 @@
#include <linux/kernel.h>
#include <linux/version.h>
-#include <asm/danube/danube.h>
-#include <asm/danube/danube_irq.h>
-#include <asm/danube/ifx_ssc_defines.h>
-#include <asm/danube/ifx_ssc.h>
+#include <asm/ifxmips/ifxmips.h>
+#include <asm/ifxmips/ifxmips_irq.h>
+#include <asm/ifxmips/ifx_ssc_defines.h>
+#include <asm/ifxmips/ifx_ssc.h>
#ifdef SSC_FRAME_INT_ENABLE
#undef SSC_FRAME_INT_ENABLE
@@ -93,8 +93,8 @@ static unsigned int ifx_ssc_get_kernel_clk (struct ifx_ssc_port *info);
static void tx_int (struct ifx_ssc_port *);
static int ifx_ssc1_read_proc (char *, char **, off_t, int, int *, void *);
-extern unsigned int danube_get_fpi_hz (void);
-extern void mask_and_ack_danube_irq (unsigned int irq_nr);
+extern unsigned int ifxmips_get_fpi_hz (void);
+extern void mask_and_ack_ifxmips_irq (unsigned int irq_nr);
static struct file_operations ifx_ssc_fops = {
.owner = THIS_MODULE,
@@ -116,7 +116,7 @@ ifx_ssc_get_kernel_clk (struct ifx_ssc_port *info)
printk ("ifx_ssc_get_kernel_clk rmc==0 \n");
return 0;
}
- return danube_get_fpi_hz () / rmc;
+ return ifxmips_get_fpi_hz () / rmc;
}
#ifndef not_yet
@@ -382,9 +382,9 @@ ifx_ssc_abort (struct ifx_ssc_port *info)
wake_up_interruptible (&info->rwait);
// clear pending int's
- mask_and_ack_danube_irq(info->rxirq);
- mask_and_ack_danube_irq(info->txirq);
- mask_and_ack_danube_irq(info->errirq);
+ mask_and_ack_ifxmips_irq(info->rxirq);
+ mask_and_ack_ifxmips_irq(info->txirq);
+ mask_and_ack_ifxmips_irq(info->errirq);
// clear error flags
WRITE_PERIPHERAL_REGISTER (IFX_SSC_WHBSTATE_CLR_ALL_ERROR, info->mapbase + IFX_SSC_WHBSTATE);
@@ -440,9 +440,9 @@ ifx_ssc_open (struct inode *inode, struct file *filp)
WRITE_PERIPHERAL_REGISTER (IFX_SSC_WHBSTATE_CLR_ALL_ERROR, info->mapbase + IFX_SSC_WHBSTATE);
// clear pending interrupts
- mask_and_ack_danube_irq(info->rxirq);
- mask_and_ack_danube_irq(info->txirq);
- mask_and_ack_danube_irq(info->errirq);
+ mask_and_ack_ifxmips_irq(info->rxirq);
+ mask_and_ack_ifxmips_irq(info->txirq);
+ mask_and_ack_ifxmips_irq(info->errirq);
WRITE_PERIPHERAL_REGISTER (IFX_SSC_WHBSTATE_SET_ENABLE, info->mapbase + IFX_SSC_WHBSTATE);
@@ -1529,5 +1529,5 @@ EXPORT_SYMBOL(ifx_ssc_rx);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
-MODULE_DESCRIPTION("danube ssc driver");
+MODULE_DESCRIPTION("ifxmips ssc driver");
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
--- 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 <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
-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
-danube_wdt_enable (unsigned int timeout)
+ifxmips_wdt_enable (unsigned int timeout)
{
unsigned int wdt_cr = 0;
unsigned int wdt_reload = 0;
@@ -88,7 +88,7 @@ out:
}
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);
@@ -98,7 +98,7 @@ danube_wdt_disable (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;
@@ -119,7 +119,7 @@ danube_wdt_enable_feature (int en, int type)
}
void
-danube_wdt_prewarning_limit (int pwl)
+ifxmips_wdt_prewarning_limit (int pwl)
{
unsigned int wdt_cr = 0;
@@ -134,7 +134,7 @@ danube_wdt_prewarning_limit (int pwl)
}
void
-danube_wdt_set_clkdiv (int clkdiv)
+ifxmips_wdt_set_clkdiv (int clkdiv)
{
unsigned int wdt_cr = 0;
@@ -149,7 +149,7 @@ danube_wdt_set_clkdiv (int clkdiv)
}
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;
@@ -167,7 +167,7 @@ danube_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
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;
@@ -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");
- danube_wdt_disable();
+ ifxmips_wdt_disable();
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:
@@ -191,19 +191,19 @@ danube_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
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:
- 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:
- 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:
- danube_wdt_set_clkdiv(user_arg);
+ ifxmips_wdt_set_clkdiv(user_arg);
break;
default:
@@ -215,26 +215,26 @@ out:
}
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;
- danube_wdt_inuse = 1;
+ ifxmips_wdt_inuse = 1;
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
-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;
@@ -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,
- .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
-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;
}
- 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
-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);
diff --git a/target/linux/ifxmips/files/drivers/net/danube_mii0.c b/target/linux/ifxmips/files/drivers/net/danube_mii0.c
index 861ff81..50478bf 100644
--- a/target/linux/ifxmips/files/drivers/net/danube_mii0.c
+++ b/target/linux/ifxmips/files/drivers/net/danube_mii0.c
@@ -1,5 +1,5 @@
/*
- * drivers/net/danube_mii0.c
+ * drivers/net/ifxmips_mii0.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
*
* Copyright (C) 2005 Infineon
*
- * Rewrite of Infineon Danube code, thanks to infineon for the support,
+ * Rewrite of Infineon IFXMips code, thanks to infineon for the support,
* software and hardware
*
* Copyright (C) 2007 John Crispin <blogic@openwrt.org>
@@ -41,16 +41,16 @@
#include <asm/checksum.h>
#include <linux/init.h>
#include <asm/delay.h>
-#include <asm/danube/danube.h>
-#include <asm/danube/danube_mii0.h>
-#include <asm/danube/danube_dma.h>
-#include <asm/danube/danube_pmu.h>
+#include <asm/ifxmips/ifxmips.h>
+#include <asm/ifxmips/ifxmips_mii0.h>
+#include <asm/ifxmips/ifxmips_dma.h>
+#include <asm/ifxmips/ifxmips_pmu.h>
-static struct net_device danube_mii0_dev;
+static struct net_device ifxmips_mii0_dev;
static unsigned char u_boot_ethaddr[MAX_ADDR_LEN];
void
-danube_write_mdio (u32 phy_addr, u32 phy_reg, u16 phy_data)
+ifxmips_write_mdio (u32 phy_addr, u32 phy_reg, u16 phy_data)
{
u32 val = MDIO_ACC_REQUEST |
((phy_addr & MDIO_ACC_ADDR_MASK) << MDIO_ACC_ADDR_OFFSET) |
@@ -62,7 +62,7 @@ danube_write_mdio (u32 phy_addr, u32 phy_reg, u16 phy_data)
}
unsigned short
-danube_read_mdio (u32 phy_addr, u32 phy_reg)
+ifxmips_read_mdio (u32 phy_addr, u32 phy_reg)
{
u32 val = MDIO_ACC_REQUEST | MDIO_ACC_READ |
((phy_addr & MDIO_ACC_ADDR_MASK) << MDIO_ACC_ADDR_OFFSET) |
@@ -76,7 +76,7 @@ danube_read_mdio (u32 phy_addr, u32 phy_reg)
}
int
-danube_switch_open (struct net_device *dev)
+ifxmips_switch_open (struct net_device *dev)
{
struct switch_priv* priv = (struct switch_priv*)dev->priv;
struct dma_device_info* dma_dev = priv->dma_device;
@@ -230,12 +230,12 @@ dma_intr_handler (struct dma_device_info* dma_dev, int status)
switch (status)
{
case RCV_INT:
- switch_hw_receive(&danube_mii0_dev, dma_dev);
+ switch_hw_receive(&ifxmips_mii0_dev, dma_dev);
break;
case TX_BUF_FULL_INT:
printk("tx buffer full\n");
- netif_stop_queue(&danube_mii0_dev);
+ netif_stop_queue(&ifxmips_mii0_dev);
for (i = 0; i < dma_dev->max_tx_chan_num; i++)
{
if ((dma_dev->tx_chan[i])->control==IFXMIPS_DMA_CH_ON)
@@ -247,7 +247,7 @@ dma_intr_handler (struct dma_device_info* dma_dev, int status)
for (i = 0; i < dma_dev->max_tx_chan_num; i++)
dma_dev->tx_chan[i]->disable_irq(dma_dev->tx_chan[i]);
- netif_wake_queue(&danube_mii0_dev);
+ netif_wake_queue(&ifxmips_mii0_dev);
break;
}
@@ -255,7 +255,7 @@ dma_intr_handler (struct dma_device_info* dma_dev, int status)
}
unsigned char*
-danube_etop_dma_buffer_alloc (int len, int *byte_offset, void **opt)
+ifxmips_etop_dma_buffer_alloc (int len, int *byte_offset, void **opt)
{
unsigned char *buffer = NULL;
struct sk_buff *skb = NULL;
@@ -273,7 +273,7 @@ danube_etop_dma_buffer_alloc (int len, int *byte_offset, void **opt)
}
void
-danube_etop_dma_buffer_free (unsigned char *dataptr, void *opt)
+ifxmips_etop_dma_buffer_free (unsigned char *dataptr, void *opt)
{
struct sk_buff *skb = NULL;
@@ -287,7 +287,7 @@ danube_etop_dma_buffer_free (unsigned char *dataptr, void *opt)
}
static struct net_device_stats*
-danube_get_stats (struct net_device *dev)
+ifxmips_get_stats (struct net_device *dev)
{
return (struct net_device_stats *)dev->priv;
}
@@ -303,10 +303,10 @@ switch_init (struct net_device *dev)
printk("%s up\n", dev->name);
- dev->open = danube_switch_open;
+ dev->open = ifxmips_switch_open;
dev->stop = switch_release;
dev->hard_start_xmit = switch_tx;
- dev->get_stats = danube_get_stats;
+ dev->get_stats = ifxmips_get_stats;
dev->tx_timeout = switch_tx_timeout;
dev->watchdog_timeo = 10 * HZ;
dev->priv = kmalloc(sizeof(struct switch_priv), GFP_KERNEL);
@@ -324,8 +324,8 @@ switch_init (struct net_device *dev)
return -ENODEV;
}
- priv->dma_device->buffer_alloc = &danube_etop_dma_buffer_alloc;
- priv->dma_device->buffer_free = &danube_etop_dma_buffer_free;
+ priv->dma_device->buffer_alloc = &ifxmips_etop_dma_buffer_alloc;
+ priv->dma_device->buffer_free = &ifxmips_etop_dma_buffer_free;
priv->dma_device->intr_handler = &dma_intr_handler;
priv->dma_device->max_rx_chan_num = 4;
@@ -371,10 +371,10 @@ switch_init (struct net_device *dev)
}
static void
-danube_sw_chip_init (int mode)
+ifxmips_sw_chip_init (int mode)
{
- danube_pmu_enable(IFXMIPS_PMU_PWDCR_DMA);
- danube_pmu_enable(IFXMIPS_PMU_PWDCR_PPE);
+ ifxmips_pmu_enable(IFXMIPS_PMU_PWDCR_DMA);
+ ifxmips_pmu_enable(IFXMIPS_PMU_PWDCR_PPE);
if(mode == REV_MII_MODE)
writel((readl(IFXMIPS_PPE32_CFG) & PPE32_MII_MASK) | PPE32_MII_REVERSE, IFXMIPS_PPE32_CFG);
@@ -393,21 +393,21 @@ switch_init_module(void)
{
int result = 0;
- danube_mii0_dev.init = switch_init;
+ ifxmips_mii0_dev.init = switch_init;
- strcpy(danube_mii0_dev.name, "eth%d");
+ strcpy(ifxmips_mii0_dev.name, "eth%d");
SET_MODULE_OWNER(dev);
- result = register_netdev(&danube_mii0_dev);
+ result = register_netdev(&ifxmips_mii0_dev);
if (result)
{
- printk("error %i registering device \"%s\"\n", result, danube_mii0_dev.name);
+ printk("error %i registering device \"%s\"\n", result, ifxmips_mii0_dev.name);
goto out;
}
- /* danube eval kit connects the phy/switch in REV mode */
- danube_sw_chip_init(REV_MII_MODE);
- printk("danube MAC driver loaded!\n");
+ /* ifxmips eval kit connects the phy/switch in REV mode */
+ ifxmips_sw_chip_init(REV_MII_MODE);
+ printk("ifxmips MAC driver loaded!\n");
out:
return result;
@@ -416,15 +416,15 @@ out:
static void __exit
switch_cleanup(void)
{
- struct switch_priv *priv = (struct switch_priv*)danube_mii0_dev.priv;
+ struct switch_priv *priv = (struct switch_priv*)ifxmips_mii0_dev.priv;
- printk("danube_mii0 cleanup\n");
+ printk("ifxmips_mii0 cleanup\n");
dma_device_unregister(priv->dma_device);
dma_device_release(priv->dma_device);
kfree(priv->dma_device);
- kfree(danube_mii0_dev.priv);
- unregister_netdev(&danube_mii0_dev);
+ kfree(ifxmips_mii0_dev.priv);
+ unregister_netdev(&ifxmips_mii0_dev);
return;
}
diff --git a/target/linux/ifxmips/files/drivers/serial/danube_asc.c b/target/linux/ifxmips/files/drivers/serial/danube_asc.c
index 90f569c..b191241 100644
--- a/target/linux/ifxmips/files/drivers/serial/danube_asc.c
+++ b/target/linux/ifxmips/files/drivers/serial/danube_asc.c
@@ -48,9 +48,9 @@
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
-#include <asm/danube/danube.h>
-#include <asm/danube/danube_irq.h>
-#include <asm/danube/danube_serial.h>
+#include <asm/ifxmips/ifxmips.h>
+#include <asm/ifxmips/ifxmips_irq.h>
+#include <asm/ifxmips/ifxmips_serial.h>
#define PORT_IFXMIPSASC 111
@@ -58,48 +58,48 @@
#define UART_DUMMY_UER_RX 1
-static void danubeasc_tx_chars(struct uart_port *port);
+static void ifxmipsasc_tx_chars(struct uart_port *port);
extern void prom_printf(const char * fmt, ...);
-static struct uart_port danubeasc_port;
-static struct uart_driver danubeasc_reg;
+static struct uart_port ifxmipsasc_port;
+static struct uart_driver ifxmipsasc_reg;
static unsigned int uartclk = 0;
-extern unsigned int danube_get_fpi_hz(void);
+extern unsigned int ifxmips_get_fpi_hz(void);
static void
-danubeasc_stop_tx (struct uart_port *port)
+ifxmipsasc_stop_tx (struct uart_port *port)
{
/* fifo underrun shuts up after firing once */
return;
}
static void
-danubeasc_start_tx (struct uart_port *port)
+ifxmipsasc_start_tx (struct uart_port *port)
{
unsigned long flags;
local_irq_save(flags);
- danubeasc_tx_chars(port);
+ ifxmipsasc_tx_chars(port);
local_irq_restore(flags);
return;
}
static void
-danubeasc_stop_rx (struct uart_port *port)
+ifxmipsasc_stop_rx (struct uart_port *port)
{
/* clear the RX enable bit */
writel(ASCWHBSTATE_CLRREN, IFXMIPS_ASC1_WHBSTATE);
}
static void
-danubeasc_enable_ms (struct uart_port *port)
+ifxmipsasc_enable_ms (struct uart_port *port)
{
/* no modem signals */
return;
}
static void
-danubeasc_rx_chars (struct uart_port *port)
+ifxmipsasc_rx_chars (struct uart_port *port)
{
struct tty_struct *tty = port->info->tty;
unsigned int ch = 0, rsr = 0, fifocnt;
@@ -157,12 +157,12 @@ danubeasc_rx_chars (struct uart_port *port)
static void
-danubeasc_tx_chars (struct uart_port *port)
+ifxmipsasc_tx_chars (struct uart_port *port)
{
struct circ_buf *xmit = &port->info->xmit;
if (uart_tx_stopped(port)) {
- danubeasc_stop_tx(port);
+ ifxmipsasc_stop_tx(port);
return;
}
@@ -189,17 +189,17 @@ danubeasc_tx_chars (struct uart_port *port)
}
static irqreturn_t
-danubeasc_tx_int (int irq, void *port)
+ifxmipsasc_tx_int (int irq, void *port)
{
writel(ASC_IRNCR_TIR, IFXMIPS_ASC1_IRNCR);
- danubeasc_start_tx(port);
- mask_and_ack_danube_irq(irq);
+ ifxmipsasc_start_tx(port);
+ mask_and_ack_ifxmips_irq(irq);
return IRQ_HANDLED;
}
static irqreturn_t
-danubeasc_er_int (int irq, void *port)
+ifxmipsasc_er_int (int irq, void *port)
{
/* clear any pending interrupts */
writel(readl(IFXMIPS_ASC1_WHBSTATE) | ASCWHBSTATE_CLRPE |
@@ -209,17 +209,17 @@ danubeasc_er_int (int irq, void *port)
}
static irqreturn_t
-danubeasc_rx_int (int irq, void *port)
+ifxmipsasc_rx_int (int irq, void *port)
{
writel(ASC_IRNCR_RIR, IFXMIPS_ASC1_IRNCR);
- danubeasc_rx_chars((struct uart_port *) port);
- mask_and_ack_danube_irq(irq);
+ ifxmipsasc_rx_chars((struct uart_port *) port);
+ mask_and_ack_ifxmips_irq(irq);
return IRQ_HANDLED;
}
static unsigned int
-danubeasc_tx_empty (struct uart_port *port)
+ifxmipsasc_tx_empty (struct uart_port *port)
{
int status;
@@ -229,25 +229,25 @@ danubeasc_tx_empty (struct uart_port *port)
}
static unsigned int
-danubeasc_get_mctrl (struct uart_port *port)
+ifxmipsasc_get_mctrl (struct uart_port *port)
{
return TIOCM_CTS | TIOCM_CAR | TIOCM_DSR;
}
static void
-danubeasc_set_mctrl (struct uart_port *port, u_int mctrl)
+ifxmipsasc_set_mctrl (struct uart_port *port, u_int mctrl)
{
return;
}
static void
-danubeasc_break_ctl (struct uart_port *port, int break_state)
+ifxmipsasc_break_ctl (struct uart_port *port, int break_state)
{
return;
}
static void
-danubeasc1_hw_init (void)
+ifxmipsasc1_hw_init (void)
{
/* this setup was probably already done in ROM/u-boot but we do it again*/
/* TODO: GPIO pins are multifunction */
@@ -266,36 +266,36 @@ danubeasc1_hw_init (void)
}
static int
-danubeasc_startup (struct uart_port *port)
+ifxmipsasc_startup (struct uart_port *port)
{
unsigned long flags;
int retval;
/* this assumes: CON.BRS = CON.FDE = 0 */
if (uartclk == 0)
- uartclk = danube_get_fpi_hz();
+ uartclk = ifxmips_get_fpi_hz();
- danubeasc_port.uartclk = uartclk;
+ ifxmipsasc_port.uartclk = uartclk;
- danubeasc1_hw_init();
+ ifxmipsasc1_hw_init();
local_irq_save(flags);
- retval = request_irq(IFXMIPSASC1_RIR, danubeasc_rx_int, IRQF_DISABLED, "asc_rx", port);
+ retval = request_irq(IFXMIPSASC1_RIR, ifxmipsasc_rx_int, IRQF_DISABLED, "asc_rx", port);
if (retval){
- printk("failed to request danubeasc_rx_int\n");
+ printk("failed to request ifxmipsasc_rx_int\n");
return retval;
}
- retval = request_irq(IFXMIPSASC1_TIR, danubeasc_tx_int, IRQF_DISABLED, "asc_tx", port);
+ retval = request_irq(IFXMIPSASC1_TIR, ifxmipsasc_tx_int, IRQF_DISABLED, "asc_tx", port);
if (retval){
- printk("failed to request danubeasc_tx_int\n");
+ printk("failed to request ifxmipsasc_tx_int\n");
goto err1;
}
- retval = request_irq(IFXMIPSASC1_EIR, danubeasc_er_int, IRQF_DISABLED, "asc_er", port);
+ retval = request_irq(IFXMIPSASC1_EIR, ifxmipsasc_er_int, IRQF_DISABLED, "asc_er", port);
if (retval){
- printk("failed to request danubeasc_er_int\n");
+ printk("failed to request ifxmipsasc_er_int\n");
goto err2;
}
@@ -317,7 +317,7 @@ err1:
}
static void
-danubeasc_shutdown (struct uart_port *port)
+ifxmipsasc_shutdown (struct uart_port *port)
{
free_irq(IFXMIPSASC1_RIR, port);
free_irq(IFXMIPSASC1_TIR, port);
@@ -334,7 +334,7 @@ danubeasc_shutdown (struct uart_port *port)
writel(readl(IFXMIPS_ASC1_TXFCON) & ~ASCTXFCON_TXFEN, IFXMIPS_ASC1_TXFCON);
}
-static void danubeasc_set_termios(struct uart_port *port, struct ktermios *new, struct ktermios *old)
+static void ifxmipsasc_set_termios(struct uart_port *port, struct ktermios *new, struct ktermios *old)
{
unsigned int cflag;
unsigned int iflag;
@@ -424,34 +424,34 @@ static void danubeasc_set_termios(struct uart_port *port, struct ktermios *new,
}
static const char*
-danubeasc_type (struct uart_port *port)
+ifxmipsasc_type (struct uart_port *port)
{
return port->type == PORT_IFXMIPSASC ? "IFXMIPSASC" : NULL;
}
static void
-danubeasc_release_port (struct uart_port *port)
+ifxmipsasc_release_port (struct uart_port *port)
{
return;
}
static int
-danubeasc_request_port (struct uart_port *port)
+ifxmipsasc_request_port (struct uart_port *port)
{
return 0;
}
static void
-danubeasc_config_port (struct uart_port *port, int flags)
+ifxmipsasc_config_port (struct uart_port *port, int flags)
{
if (flags & UART_CONFIG_TYPE) {
port->type = PORT_IFXMIPSASC;
- danubeasc_request_port(port);
+ ifxmipsasc_request_port(port);
}
}
static int
-danubeasc_verify_port (struct uart_port *port, struct serial_struct *ser)
+ifxmipsasc_verify_port (struct uart_port *port, struct serial_struct *ser)
{
int ret = 0;
if (ser->type != PORT_UNKNOWN && ser->type != PORT_IFXMIPSASC)
@@ -463,26 +463,26 @@ danubeasc_verify_port (struct uart_port *port, struct serial_struct *ser)
return ret;
}
-static struct uart_ops danubeasc_pops = {
- .tx_empty = danubeasc_tx_empty,
- .set_mctrl = danubeasc_set_mctrl,
- .get_mctrl = danubeasc_get_mctrl,
- .stop_tx = danubeasc_stop_tx,
- .start_tx = danubeasc_start_tx,
- .stop_rx = danubeasc_stop_rx,
- .enable_ms = danubeasc_enable_ms,
- .break_ctl = danubeasc_break_ctl,
- .startup = danubeasc_startup,
- .shutdown = danubeasc_shutdown,
- .set_termios = danubeasc_set_termios,
- .type = danubeasc_type,
- .release_port = danubeasc_release_port,
- .request_port = danubeasc_request_port,
- .config_port = danubeasc_config_port,
- .verify_port = danubeasc_verify_port,
+static struct uart_ops ifxmipsasc_pops = {
+ .tx_empty = ifxmipsasc_tx_empty,
+ .set_mctrl = ifxmipsasc_set_mctrl,
+ .get_mctrl = ifxmipsasc_get_mctrl,
+ .stop_tx = ifxmipsasc_stop_tx,
+ .start_tx = ifxmipsasc_start_tx,
+ .stop_rx = ifxmipsasc_stop_rx,
+ .enable_ms = ifxmipsasc_enable_ms,
+ .break_ctl = ifxmipsasc_break_ctl,
+ .startup = ifxmipsasc_startup,
+ .shutdown = ifxmipsasc_shutdown,
+ .set_termios = ifxmipsasc_set_termios,
+ .type = ifxmipsasc_type,
+ .release_port = ifxmipsasc_release_port,
+ .request_port = ifxmipsasc_request_port,
+ .config_port = ifxmipsasc_config_port,
+ .verify_port = ifxmipsasc_verify_port,
};
-static struct uart_port danubeasc_port = {
+static struct uart_port ifxmipsasc_port = {
membase: (void *)IFXMIPS_ASC1_BASE_ADDR,
mapbase: IFXMIPS_ASC1_BASE_ADDR,
iotype: SERIAL_IO_MEM,
@@ -491,12 +491,12 @@ static struct uart_port danubeasc_port = {
fifosize: 16,
unused: {IFXMIPSASC1_TIR, IFXMIPSASC1_EIR},
type: PORT_IFXMIPSASC,
- ops: &danubeasc_pops,
+ ops: &ifxmipsasc_pops,
flags: ASYNC_BOOT_AUTOCONF,
};
static void
-danubeasc_console_write (struct console *co, const char *s, u_int count)
+ifxmipsasc_console_write (struct console *co, const char *s, u_int count)
{
int i, fifocnt;
unsigned long flags;
@@ -532,7 +532,7 @@ danubeasc_console_write (struct console *co, const char *s, u_int count)
}
static int __init
-danubeasc_console_setup (struct console *co, char *options)
+ifxmipsasc_console_setup (struct console *co, char *options)
{
struct uart_port *port;
int baud = 115200;
@@ -541,11 +541,11 @@ danubeasc_console_setup (struct console *co, char *options)
int flow = 'n';
if (uartclk == 0)
- uartclk = danube_get_fpi_hz();
+ uartclk = ifxmips_get_fpi_hz();
co->index = 0;
- port = &danubeasc_port;
- danubeasc_port.uartclk = uartclk;
- danubeasc_port.type = PORT_IFXMIPSASC;
+ port = &ifxmipsasc_port;
+ ifxmipsasc_port.uartclk = uartclk;
+ ifxmipsasc_port.type = PORT_IFXMIPSASC;
if (options){
uart_parse_options(options, &baud, &parity, &bits, &flow);
@@ -554,55 +554,55 @@ danubeasc_console_setup (struct console *co, char *options)
return uart_set_options(port, co, baud, parity, bits, flow);
}
-static struct uart_driver danubeasc_reg;
-static struct console danubeasc_console = {
+static struct uart_driver ifxmipsasc_reg;
+static struct console ifxmipsasc_console = {
name: "ttyS",
- write: danubeasc_console_write,
+ write: ifxmipsasc_console_write,
device: uart_console_device,
- setup: danubeasc_console_setup,
+ setup: ifxmipsasc_console_setup,
flags: CON_PRINTBUFFER,
index: -1,
- data: &danubeasc_reg,
+ data: &ifxmipsasc_reg,
};
static int __init
-danubeasc_console_init (void)
+ifxmipsasc_console_init (void)
{
- register_console(&danubeasc_console);
+ register_console(&ifxmipsasc_console);
return 0;
}
-console_initcall(danubeasc_console_init);
+console_initcall(ifxmipsasc_console_init);
-static struct uart_driver danubeasc_reg = {
+static struct uart_driver ifxmipsasc_reg = {
.owner = THIS_MODULE,
.driver_name = "serial",
.dev_name = "ttyS",
.major = TTY_MAJOR,
.minor = 64,
.nr = 1,
- .cons = &danubeasc_console,
+ .cons = &ifxmipsasc_console,
};
static int __init
-danubeasc_init (void)
+ifxmipsasc_init (void)
{
unsigned char res;
- uart_register_driver(&danubeasc_reg);
- res = uart_add_one_port(&danubeasc_reg, &danubeasc_port);
+ uart_register_driver(&ifxmipsasc_reg);
+ res = uart_add_one_port(&ifxmipsasc_reg, &ifxmipsasc_port);
return res;
}
static void __exit
-danubeasc_exit (void)
+ifxmipsasc_exit (void)
{
- uart_unregister_driver(&danubeasc_reg);
+ uart_unregister_driver(&ifxmipsasc_reg);
}
-module_init(danubeasc_init);
-module_exit(danubeasc_exit);
+module_init(ifxmipsasc_init);
+module_exit(ifxmipsasc_exit);
MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
-MODULE_DESCRIPTION("MIPS Danube serial port driver");
+MODULE_DESCRIPTION("MIPS IFXMips serial port driver");
MODULE_LICENSE("GPL");