From 4e7ea16048bde2f02e566c0bd0db70b69d0271fd Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 3 May 2008 15:51:16 +0000 Subject: bump etrax to .25 SVN-Revision: 11028 --- .../arch/cris/arch-v10/drivers/gpio_syscalls.c | 191 --------------------- 1 file changed, 191 deletions(-) delete mode 100644 target/linux/etrax/files/arch/cris/arch-v10/drivers/gpio_syscalls.c (limited to 'target/linux/etrax/files/arch') diff --git a/target/linux/etrax/files/arch/cris/arch-v10/drivers/gpio_syscalls.c b/target/linux/etrax/files/arch/cris/arch-v10/drivers/gpio_syscalls.c deleted file mode 100644 index b6300aa9cd..0000000000 --- a/target/linux/etrax/files/arch/cris/arch-v10/drivers/gpio_syscalls.c +++ /dev/null @@ -1,191 +0,0 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - - -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; -}; - - -- cgit v1.2.3