problem with building a driver on sam9_l9260

hi,

when i try to build a custom driver for my sam9_l9260 board i get this error:

include/linux/calc64.h: In function 'do_div_llr': 
include/linux/calc64.h:25: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function)
include/linux/calc64.h:25: error: (Each undeclared identifier is reported only once
include/linux/calc64.h:25: error: for each function it appears in.)
make[2]: *** [/home/Code/test_driver/Driver.o] Error 1
make[1]: *** [_module_/home/Code/test_driver] Error 2
make[1]: Leaving directory `/home/kernel/linux-2.6.23'
make: *** [default] Error 2

i build the kernel like described in the manuel.

anyone a idea how to solve this?

TY

i tried a newer kernel, now i get this error:

error: code model 'kernel' not supported in the 32 bit mode

what does that mean?

has anyone succesfully built a custom device driver for that board?