Hi everyone,

I got the ZOOM OMAP-L138 EVM DEVELOPMENT KIT and DaVinci-PSP-SDK-03.20.00.06
with Arago distribution developed by TI for OMAP processor.

I'm trying to communicate with an external spi device. I configured my
kernel to support spi and modified arch source file to add "spidev" to /dev
directory.


*Here’s what I changed in board-da850-evm.c :*

*static struct spi_board_info da850_spi_board_info[] = {*

*        [0] = {*

*        //      .modalias = "m25p80",*

*                .modalias = "spidev",*

*        //      .platform_data = &spi_flash_data,*

*        //      .controller_data = &m25p64_spi_cfg,*

*                .mode = SPI_MODE_0,*

*                .max_speed_hz = 30000000,       /* max sample rate at 3V */
*

*                .bus_num = 1,*

*                .chip_select = 0,*

*        },*

*};*


Also, in the menuconfig I added support for SPI and Device Drivers  ---> SPI
support  ---> User mode SPI device driver support.

I currently have spidev1.0 in /dev directory. There are a lot of ioctl
command with the SPI, I successfully executed few of them: SPI_IOC_RD_MODE,
SPI_IOC_RD_BITS_PER_WORD, SPI_IOC_RD_MAX_SPEED_HZ.

The problem is when I execute ioctl(.., SPI_IOC_MESSAGE(1), ..) the board
crash.


*Here’s what happens when I execute SPI_IOC_MESSAGE:*

*Unable to handle kernel NULL pointer dereference at virtual address
00000010*

*pgd = c0004000*

*[00000010] *pgd=00000000*

*Internal error: Oops: 17 [#1] PREEMPT*

*CPU: 0    Not tainted  (2.6.31-rc7-davinci1 #2)*

*PC is at davinci_spi_bufs_prep+0xc/0x47c*

*LR is at davinci_spi_bufs_pio+0x68/0x2b4*

*pc : [<c01ab0f4>]    lr : [<c01abb7c>]    psr: 60000013*

*sp : c1dcbf04  ip : c1dcbf18  fp : c1dcbf14*

*r10: c1d042b8  r9 : 00000001  r8 : c1ddbf00*

*r7 : 00000000  r6 : c02a06dc  r5 : c1ce7300  r4 : c1d042b8*

*r3 : 00000000  r2 : 00000000  r1 : c1d042b8  r0 : c1ce7300*

*Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel*

*Control: 0005317f  Table: c1e30000  DAC: 00000017*

*Process dm_spi.1 (pid: 236, stack limit = 0xc1dca270)*

*Stack: (0xc1dcbf04 to 0xc1dcc000)*

*bf00:          c1d042b8 c1dcbf44 c1dcbf18 c01abb7c c01ab0f8 00000000
c1ddbf00*

*bf20: 00000000 c1c6de9c c1c6debc c1dca000 00000000 c1d042b8 c1dcbf84
c1dcbf48*

*bf40: c01aacfc c01abb24 c1d042cc ffffffff c01ac3b0 c1ce7300 00000000
c1d042c0*

*bf60: c1d042bc c1dca000 c1dcdf80 c01aab74 00000000 c1dcdf88 c1dcbfc4
c1dcbf88*

*bf80: c0049b30 c01aab84 c0234400 00000000 c1cd4000 c004d750 c1dcbf98
c1dcbf98*

*bfa0: c1dcbfcc c1c21d78 c1dcdf80 c00499e8 00000000 00000000 c1dcbff4
c1dcbfc8*

*bfc0: c004d4e0 c00499f8 00000000 00000000 c1dcbfd0 c1dcbfd0 00000000
00000000*

*bfe0: 00000000 00000000 00000000 c1dcbff8 c003ac50 c004d468 00000000
00000000*

*Backtrace:*

*[<c01ab0e8>] (davinci_spi_bufs_prep+0x0/0x47c) from [<c01abb7c>]
(davinci_spi_bufs_pio+0x68/0x2b4)*

* r4:c1d042b8*

*[<c01abb14>] (davinci_spi_bufs_pio+0x0/0x2b4) from [<c01aacfc>]
(bitbang_work+0x188/0x2ec)*

*[<c01aab74>] (bitbang_work+0x0/0x2ec) from [<c0049b30>]
(worker_thread+0x148/0x20c)*

*[<c00499e8>] (worker_thread+0x0/0x20c) from [<c004d4e0>]
(kthread+0x88/0x90)*

*[<c004d458>] (kthread+0x0/0x90) from [<c003ac50>] (do_exit+0x0/0x650)*

* r7:00000000 r6:00000000 r5:00000000 r4:00000000*

*Code: e89da800 e1a0c00d e92dd810 e24cb004 (e5923010)*

*---[ end trace 4f0e16f9f2f85b61 ]---*


Do you have any idea why the board is crashing?

Thanks

Nicolas
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to