I am newbie working on Linux Device Driver, I need to do floating point operations in the Linux device driver on OMAP 3503.
I am able to successfully cross compile this code as a user space C program and run it without any issues.
But when I add this code to the touchscreen driver and try to build kernel image we get following errors
--------------------------------------------- kernel/device driver linking errors-----------------------------
linux-02.01.03.11/drivers/input/touchscreen/abc.c:17: undefined reference to `__aeabi_ddiv'
linux-02.01.03.11/drivers/input/touchscreen/abc.c:17: undefined reference to `__aeabi_dmul'
linux-02.01.03.11/drivers/input/touchscreen/abc.c:18: undefined reference to `__aeabi_dcmpge'
linux-02.01.03.11/drivers/input/touchscreen/abc.c:20: undefined reference to `__aeabi_dadd'
linux-02.01.03.11/drivers/input/touchscreen/abc.c:24: undefined reference to `__aeabi_dsub'
linux-02.01.03.11/drivers/input/touchscreen/abc.c:24: undefined reference to `__aeabi_d2uiz'
linux-02.01.03.11/drivers/input/touchscreen/abc.c:24: undefined reference to `__aeabi_ui2d'
linux-02.01.03.11/drivers/input/touchscreen/abc.c:24: undefined reference to `__aeabi_d2uiz'
---------------------------------------------------------------------------------------
---------------------- touchscreen.c code snippet for your reference ------------------
15 unsigned int round_func(double x, double divisor, double mapratio)
16 {
17 x = (x/divisor)*mapratio;
18 if ( x >= 0 )
19 {
20 x = (unsigned int)(x + 0.5);
21 }
22 else
23 {
24 x = (unsigned int)(x - 0.5);
25 }
26 return x;
27 }
------------------------------------------------------------------------
how can I do above shown floating point operations using OMAP 3503 instructions in Linux device driver code? ( VFPv3, NEON etc )
Thanks
---