diff options
Diffstat (limited to 'target/linux/etrax-2.6/patches/cris')
-rw-r--r-- | target/linux/etrax-2.6/patches/cris/020-syscalls.patch | 199 |
1 files changed, 2 insertions, 197 deletions
diff --git a/target/linux/etrax-2.6/patches/cris/020-syscalls.patch b/target/linux/etrax-2.6/patches/cris/020-syscalls.patch index f735ce7458..5e674a6232 100644 --- a/target/linux/etrax-2.6/patches/cris/020-syscalls.patch +++ b/target/linux/etrax-2.6/patches/cris/020-syscalls.patch @@ -159,203 +159,8 @@ diff -urN linux-2.6.19.2.orig/include/asm-cris/unistd.h linux-2.6.19.2/include/a /* * NOTE!! This doesn't have to be exact - we just have -diff -urN linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/gpio_syscalls.c linux-2.6.19.2/arch/cris/arch-v10/drivers/gpio_syscalls.c ---- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/gpio_syscalls.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.19.2/arch/cris/arch-v10/drivers/gpio_syscalls.c 2007-06-17 04:09:15.000000000 +0200 -@@ -0,0 +1,192 @@ -+ -+#include <linux/autoconf.h> -+ -+#include <linux/module.h> -+#include <linux/sched.h> -+#include <linux/slab.h> -+#include <linux/ioport.h> -+#include <linux/errno.h> -+#include <linux/kernel.h> -+#include <linux/fs.h> -+#include <linux/string.h> -+#include <linux/poll.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+ -+#include <asm/uaccess.h> -+#include <linux/gpio_syscalls.h> -+ -+#include <asm/etraxgpio.h> -+#include <asm/arch/svinto.h> -+#include <asm/io.h> -+#include <asm/system.h> -+#include <asm/irq.h> -+#include <asm/arch/io_interface_mux.h> -+ -+#include <asm/unistd.h> -+ -+ -+extern int errno; -+ -+ -+asmlinkage void sys_gpiosetbits(unsigned char port, unsigned int bits){ -+ switch(port){ -+ case 'G': -+ case 'g': -+ *R_PORT_G_DATA = port_g_data_shadow |= bits; -+ break; -+ -+ case 'A': -+ case 'a': -+ *R_PORT_PA_DATA = port_pa_data_shadow |= bits; -+ break; -+ -+ case 'B': -+ case 'b': -+ *R_PORT_PB_DATA = port_pb_data_shadow |= bits; -+ break; -+ -+ }; -+}; -+ -+ -+asmlinkage void sys_gpioclearbits(unsigned char port, unsigned int bits){ -+ switch(port){ -+ case 'G': -+ case 'g': -+ *R_PORT_G_DATA = port_g_data_shadow &= ~bits; -+ break; -+ -+ case 'A': -+ case 'a': -+ *R_PORT_PA_DATA = port_pa_data_shadow &= ~bits; -+ break; -+ -+ case 'B': -+ case 'b': -+ *R_PORT_PB_DATA = port_pb_data_shadow &= ~bits; -+ break; -+ -+ }; -+}; -+ -+asmlinkage void sys_gpiosetdir(unsigned char port, unsigned char dir, unsigned int bits){ -+ if((dir=='I' )||(dir=='i')){ -+ switch(port){ -+ case 'G': -+ case 'g': -+ if(bits & (1<<0)){ -+ genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g0dir); -+ }; -+ if((bits & 0x0000FF00)==0x0000FF00){ -+ genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g8_15dir); -+ }; -+ if((bits & 0x00FF0000)==0x00FF0000){ -+ genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g16_23dir); -+ }; -+ if(bits & (1<<24)){ -+ genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g24dir); -+ }; -+ *R_GEN_CONFIG = genconfig_shadow; -+ break; -+ -+ case 'A': -+ case 'a': -+ *R_PORT_PA_DIR = port_pa_dir_shadow &= ~(bits & 0xff); -+ break; -+ -+ case 'B': -+ case 'b': -+ *R_PORT_PB_DIR = port_pb_dir_shadow &= ~(bits & 0xff); -+ break; -+ }; -+ } else if((dir=='O' )||(dir=='o')){ -+ switch(port){ -+ case 'G': -+ case 'g': -+ if(bits & (1<<0)){ -+ genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g0dir); -+ }; -+ if((bits & 0x0000FF00)==0x0000FF00){ -+ genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g8_15dir); -+ }; -+ if((bits & 0x00FF0000)==0x00FF0000){ -+ genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g8_15dir); -+ }; -+ if(bits & (1<<24)){ -+ genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g24dir); -+ }; -+ *R_GEN_CONFIG = genconfig_shadow; -+ break; -+ -+ case 'A': -+ case 'a': -+ *R_PORT_PA_DIR = port_pa_dir_shadow |= (bits & 0xff); -+ break; -+ -+ case 'B': -+ case 'b': -+ *R_PORT_PB_DIR = port_pb_dir_shadow |= (bits & 0xff); -+ break; -+ }; -+ }; -+}; -+ -+ -+asmlinkage void sys_gpiotogglebit(unsigned char port, unsigned int bits){ -+ switch(port){ -+ case 'G': -+ case 'g': -+ if(port_g_data_shadow & bits){ -+ *R_PORT_G_DATA = port_g_data_shadow &= ~bits; -+ } else { -+ *R_PORT_G_DATA = port_g_data_shadow |= bits; -+ }; -+ break; -+ -+ case 'A': -+ case 'a': -+ if(*R_PORT_PA_DATA & bits){ -+ *R_PORT_PA_DATA = port_pa_data_shadow &= ~(bits & 0xff); -+ } else { -+ *R_PORT_PA_DATA = port_pa_data_shadow |= (bits & 0xff); -+ }; -+ break; -+ -+ case 'B': -+ case 'b': -+ if(*R_PORT_PB_DATA & bits){ -+ *R_PORT_PB_DATA = port_pb_data_shadow &= ~(bits & 0xff); -+ } else { -+ *R_PORT_PB_DATA = port_pb_data_shadow |= (bits & 0xff); -+ }; -+ break; -+ -+ }; -+}; -+ -+ -+asmlinkage unsigned int sys_gpiogetbits(unsigned char port, unsigned int bits){ -+ unsigned int data = 0; -+ switch(port){ -+ case 'G': -+ case 'g': -+ data = *R_PORT_G_DATA; -+ break; -+ -+ case 'A': -+ case 'a': -+ data = *R_PORT_PA_DATA; -+ break; -+ -+ case 'B': -+ case 'b': -+ data = *R_PORT_PB_DATA; -+ break; -+ -+ }; -+ data &= bits; -+ return data; -+}; -+ -+ -Only in linux-2.6.19.2/arch/cris/arch-v10/drivers/: gpio_syscalls.c diff linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/Makefile linux-2.6.19.2/arch/cris/arch-v10/drivers/Makefile +--- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/Makefile 2007-06-16 23:58:14.000000000 +0200 ++++ linux-2.6.19.2/arch/cris/arch-v10/drivers/Makefile 2007-06-17 03:48:21.000000000 +0200 8a9 > obj-$(CONFIG_ETRAX_GPIO) += gpio_syscalls.o |