summaryrefslogtreecommitdiff
path: root/target/linux/amazon/files
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2011-04-10 15:08:28 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2011-04-10 15:08:28 +0000
commitaed622fd2cccaac076436139e74fe408f6f1d9d7 (patch)
tree7206261baf65bf8906b2dd2c2b57e5c0e41f2817 /target/linux/amazon/files
parent077377a294aa659cd11c6ba52d05382de9d0b0e0 (diff)
downloadmtk-20170518-aed622fd2cccaac076436139e74fe408f6f1d9d7.zip
mtk-20170518-aed622fd2cccaac076436139e74fe408f6f1d9d7.tar.gz
mtk-20170518-aed622fd2cccaac076436139e74fe408f6f1d9d7.tar.bz2
amazon: Upgrade amazon target to kernel 2.6.37
This was just a little bit tested on an SAMSUNG SMT-G3020 and pci and usb do not work like before. SVN-Revision: 26576
Diffstat (limited to 'target/linux/amazon/files')
-rw-r--r--target/linux/amazon/files/arch/mips/amazon/dma-core.c15
-rw-r--r--target/linux/amazon/files/drivers/net/admmod.c12
-rw-r--r--target/linux/amazon/files/drivers/watchdog/amazon_wdt.c9
3 files changed, 31 insertions, 5 deletions
diff --git a/target/linux/amazon/files/arch/mips/amazon/dma-core.c b/target/linux/amazon/files/arch/mips/amazon/dma-core.c
index 6362895..8cb4085 100644
--- a/target/linux/amazon/files/arch/mips/amazon/dma-core.c
+++ b/target/linux/amazon/files/arch/mips/amazon/dma-core.c
@@ -73,6 +73,7 @@ int (*tpe_inject) (void);
#endif // AMAZON_DMA_TPE_AAL5_RECOVERY
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -266,7 +267,7 @@ inline void rx_chan_clear_isr(int chan_no)
#endif
}
-
+#ifdef AMAZON_DMA_TPE_AAL5_RECOVERY
/* Brief: hacking function, this will reset all descriptors back to DMA
*/
static void dma_reset_all_descriptors(int chan_no)
@@ -285,7 +286,6 @@ static void dma_reset_all_descriptors(int chan_no)
}
}
-#ifdef AMAZON_DMA_TPE_AAL5_RECOVERY
/* Brief: Reset DMA descriptors
*/
static void amazon_dma_reset_tpe_rx(int chan_no)
@@ -1344,10 +1344,13 @@ static int dma_release(struct inode *inode, struct file *file)
return 0;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+static long dma_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+#else
static int dma_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+#endif
{
int value = 0;
- int result = 0;
int chan_no = 0;
switch (cmd) {
@@ -1366,7 +1369,7 @@ static int dma_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
default:
break;
}
- return result;
+ return 0;
}
@@ -1374,7 +1377,11 @@ static struct file_operations dma_fops = {
owner:THIS_MODULE,
open:dma_open,
release:dma_release,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ unlocked_ioctl:dma_ioctl,
+#else
ioctl:dma_ioctl,
+#endif
};
static int dma_init(void)
diff --git a/target/linux/amazon/files/drivers/net/admmod.c b/target/linux/amazon/files/drivers/net/admmod.c
index 70ba149..473a1f6 100644
--- a/target/linux/amazon/files/drivers/net/admmod.c
+++ b/target/linux/amazon/files/drivers/net/admmod.c
@@ -39,6 +39,7 @@
/* 507281:linmars 2005/07/28 support MDIO/EEPROM config mode */
/* 509201:linmars remove driver testing codes */
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/proc_fs.h>
@@ -948,7 +949,12 @@ int adm_release(struct inode *inode, struct file *filp)
}
/* IOCTL function */
-int adm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long args)
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+static long adm_ioctl(struct file *filp, unsigned int cmd, unsigned long args)
+#else
+static int adm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long args)
+#endif
{
PREGRW uREGRW;
unsigned int rtval;
@@ -1346,7 +1352,11 @@ struct file_operations adm_ops =
write: adm_write,
open: adm_open,
release: adm_release,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ unlocked_ioctl: adm_ioctl
+#else
ioctl: adm_ioctl
+#endif
};
int adm_proc(char *buf, char **start, off_t offset, int count, int *eof, void *data)
diff --git a/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c b/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
index fcf1649..89f1e22 100644
--- a/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
+++ b/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
@@ -17,6 +17,7 @@
* Copyright (C) 2007 John Crispin <blogic@openwrt.org>
*/
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -118,7 +119,11 @@ void wdt_disable(void)
return;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+#else
static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+#endif
{
int result=0;
static int timeout=-1;
@@ -201,7 +206,11 @@ int wdt_register_proc_read(char *buf, char **start, off_t offset,
static struct file_operations wdt_fops = {
read: wdt_read,
write: wdt_write,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ unlocked_ioctl: wdt_ioctl,
+#else
ioctl: wdt_ioctl,
+#endif
open: wdt_open,
release: wdt_release,
};