diff options
author | John Crispin <blogic@openwrt.org> | 2007-07-23 22:10:11 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2007-07-23 22:10:11 +0000 |
commit | 357dcff318248ae2c193a094d5e2c5d5fe962c8e (patch) | |
tree | 4d1d8efac3cb27f369b02bf8b3fc8352369e053f /target/linux/amazon-2.6/files/include/asm-mips/amazon/port.h | |
parent | 0a9cc878be11847b461f020490894c46db67e9ec (diff) | |
download | master-187ad058-357dcff318248ae2c193a094d5e2c5d5fe962c8e.tar.gz master-187ad058-357dcff318248ae2c193a094d5e2c5d5fe962c8e.tar.bz2 master-187ad058-357dcff318248ae2c193a094d5e2c5d5fe962c8e.zip |
initial merge of infineon code for amazon, pci is still broken a bit. a big thank you goes to infineon for providing info and reference code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8137 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/amazon-2.6/files/include/asm-mips/amazon/port.h')
-rw-r--r-- | target/linux/amazon-2.6/files/include/asm-mips/amazon/port.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/target/linux/amazon-2.6/files/include/asm-mips/amazon/port.h b/target/linux/amazon-2.6/files/include/asm-mips/amazon/port.h new file mode 100644 index 0000000000..21825794c5 --- /dev/null +++ b/target/linux/amazon-2.6/files/include/asm-mips/amazon/port.h @@ -0,0 +1,72 @@ +/* + * ######################################################################## + * + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * ######################################################################## + * + * port.h + * + * Global Amazon port driver header file + * + */ + +/* Modification history */ +/* 21Jun2004 btxu Generate from Inca_IP project */ + + +#ifndef PORT_H +#define PORT_H + +struct amazon_port_ioctl_parm { + int port; + int pin; + int value; +}; +#define AMAZON_PORT_IOC_MAGIC 0xbf +#define AMAZON_PORT_IOCOD _IOW( AMAZON_PORT_IOC_MAGIC,0,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCPUDSEL _IOW( AMAZON_PORT_IOC_MAGIC,1,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCPUDEN _IOW( AMAZON_PORT_IOC_MAGIC,2,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCSTOFF _IOW( AMAZON_PORT_IOC_MAGIC,3,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCDIR _IOW( AMAZON_PORT_IOC_MAGIC,4,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCOUTPUT _IOW( AMAZON_PORT_IOC_MAGIC,5,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCINPUT _IOWR(AMAZON_PORT_IOC_MAGIC,6,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCALTSEL0 _IOW( AMAZON_PORT_IOC_MAGIC,7,struct amazon_port_ioctl_parm) +#define AMAZON_PORT_IOCALTSEL1 _IOW( AMAZON_PORT_IOC_MAGIC,8,struct amazon_port_ioctl_parm) + +int amazon_port_reserve_pin(int port, int pin, int module_id); +int amazon_port_free_pin(int port, int pin, int module_id); +int amazon_port_set_open_drain(int port, int pin, int module_id); +int amazon_port_clear_open_drain(int port, int pin, int module_id); +int amazon_port_set_pudsel(int port, int pin, int module_id); +int amazon_port_clear_pudsel(int port, int pin, int module_id); +int amazon_port_set_puden(int port, int pin, int module_id); +int amazon_port_clear_puden(int port, int pin, int module_id); +int amazon_port_set_stoff(int port, int pin, int module_id); +int amazon_port_clear_stoff(int port, int pin, int module_id); +int amazon_port_set_dir_out(int port, int pin, int module_id); +int amazon_port_set_dir_in(int port, int pin, int module_id); +int amazon_port_set_output(int port, int pin, int module_id); +int amazon_port_clear_output(int port, int pin, int module_id); +int amazon_port_get_input(int port, int pin, int module_id); + +int amazon_port_set_altsel0(int port, int pin, int module_id); +int amazon_port_clear_altsel0(int port, int pin, int module_id); +int amazon_port_set_altsel1(int port, int pin, int module_id); +int amazon_port_clear_altsel1(int port, int pin, int module_id); + + +#endif /* PORT_H */ + + |