This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM365 SPI driver compilation problems

 Hi all,

 

I am new to DM365 and I am trying to use the SPI port of the DM365 processor. I am using DVSDK 2.10 and Montavista Linux. I have been checking if there were libraries to use the SPI port and I found out  /home/jlopez/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500/drivers/spi the file davinci_spi_master.c which I think defines the structures and functions to use the SPI port.

When I tried to compile this file it appears that the order of the include files is wrong for some reason and I get compilation errors:

Compiling obj/../../../../../../../../home/jlopez/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500/drivers/spi/davinci_spi_master.dm365.o470MV from ../../../../../../../../home/jlopez/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500/drivers/spi/davinci_spi_master.c..

In file included from /home/jlopez/workdir/lsp/ti-davinci/linux-2.6.18_pro500/include/linux/device.h:14,

                 from /home/jlopez/workdir/lsp/ti-davinci/linux-2.6.18_pro500/include/linux/platform_device.h:14,

                 from ../../../../../../../../home/jlopez/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500/drivers/spi/davinci_spi_master.c:20:

/home/jlopez/workdir/lsp/ti-davinci/linux-2.6.18_pro500/include/linux/ioport.h:18: error: expected specifier-qualifier-list before resource_size_t

this is due to fact that the .h files are not included in the right order and the definition of resource_size_t is not found, but I have not modified avinci_spi_master.c, so it should be right.

In summary I have two questions:

1) Am I compiling the right file for using the SPI port on a DM365 processor?

2) If that is right, what am I doing wrong on the compilation phase?

Thanks in advance

Jesus