1 diff -urN linux-2.6.19.2.orig/include/asm-cris/unistd.h linux-2.6.19.2/include/asm/unistd.h
2 --- linux-2.6.19.2.orig/include/asm-cris/unistd.h 2007-06-16 23:59:11.000000000 +0200
3 +++ linux-2.6.19.2/include/asm/unistd.h 2007-06-17 03:43:10.000000000 +0200
5 #define __NR_getcpu 318
6 #define __NR_epoll_pwait 319
8 +#ifdef CONFIG_ETRAX_GPIO
9 + #ifdef CONFIG_FOXBONE
10 + #define __NR_gpiosetbits 320
11 + #define __NR_gpioclearbits 321
12 + #define __NR_gpiosetdir 322
13 + #define __NR_gpiotogglebit 323
14 + #define __NR_gpiogetbits 324
15 + #define __NR_foxboneread 325
16 + #define __NR_foxbonewrite 326
17 + #define __NR_foxbonebulkread 327
18 + #define __NR_foxbonebulkwrite 328
19 + #define __NR_foxbonereset 329
20 + #define __NR_foxboneintreg 330
21 + #define __NR_foxboneintcheck 331
22 + #define __NR_foxboneintwait 332
23 + #define NR_syscalls 333
26 + #define __NR_gpiosetbits 320
27 + #define __NR_gpioclearbits 321
28 + #define __NR_gpiosetdir 322
29 + #define __NR_gpiotogglebit 323
30 + #define __NR_gpiogetbits 324
32 + #define NR_syscalls 325
35 + #ifdef CONFIG_FOXBONE
36 + #define __NR_foxboneread 320
37 + #define __NR_foxbonewrite 321
38 + #define __NR_foxbonebulkread 322
39 + #define __NR_foxbonebulkwrite 323
40 + #define __NR_foxboneintreg 324
41 + #define __NR_foxboneintcheck 325
42 + #define __NR_foxboneintwait 326
44 + #define NR_syscalls 327
48 + #define NR_syscalls 320
54 -#define NR_syscalls 320
56 #include <asm/arch/unistd.h>
58 --- linux-2.6.19.2.orig/include/linux/gpio_syscalls.h 1970-01-01 01:00:00.000000000 +0100
59 +++ linux-2.6.19.2/include/linux/gpio_syscalls.h 2007-06-17 03:44:49.000000000 +0200
61 +#ifndef __LINUX_SYSCALL_GPIO
62 +#define __LINUX_SYSCALL_GPIO
63 +#include <linux/autoconf.h>
64 +#include <linux/kernel.h>
65 +#include <linux/errno.h>
66 +#include <asm/unistd.h>
77 +// pin defines for PORTG
100 +#define PG22 (1<<22)
101 +#define PG23 (1<<23)
102 +#define PG24 (1<<24)
104 +#define PG8_15 0x00ff00
105 +#define PG16_23 0xff0000
108 +// pin defines for PORTA
118 +// pin defines for PORTB
129 +_syscall2(void, gpiosetbits, unsigned char, port, unsigned int, bits);
130 +_syscall2(void, gpioclearbits, unsigned char, port, unsigned int, bits);
131 +_syscall3(void, gpiosetdir, unsigned char, port, unsigned char, dir, unsigned int, bits);
132 +_syscall2(void, gpiotogglebit, unsigned char, port, unsigned int, bits);
133 +_syscall2(unsigned int, gpiogetbits, unsigned char, port, unsigned int, bits);
136 --- linux-2.6.19.2.orig/arch/cris/arch-v10/kernel/entry.S 2007-06-16 23:58:14.000000000 +0200
137 +++ linux-2.6.19.2/arch/cris/arch-v10/kernel/entry.S 2007-06-17 03:48:21.000000000 +0200
138 @@ -1200,6 +1200,23 @@
141 .long sys_epoll_pwait
142 +#ifdef CONFIG_ETRAX_GPIO
143 + .long sys_gpiosetbits
144 + .long sys_gpioclearbits
145 + .long sys_gpiosetdir
146 + .long sys_gpiotogglebit
147 + .long sys_gpiogetbits
149 +#ifdef CONFIG_FOXBONE
150 + .long sys_foxboneread
151 + .long sys_foxbonewrite
152 + .long sys_foxbonebulkread
153 + .long sys_foxbonebulkwrite
154 + .long sys_foxbonereset
155 + .long sys_foxboneintreg
156 + .long sys_foxboneintcheck
157 + .long sys_foxboneintwait
161 * NOTE!! This doesn't have to be exact - we just have
162 diff linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/Makefile linux-2.6.19.2/arch/cris/arch-v10/drivers/Makefile
163 --- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/Makefile 2007-06-16 23:58:14.000000000 +0200
164 +++ linux-2.6.19.2/arch/cris/arch-v10/drivers/Makefile 2007-06-17 03:48:21.000000000 +0200
166 > obj-$(CONFIG_ETRAX_GPIO) += gpio_syscalls.o