Quantcast

Drivers SPI

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Drivers SPI

Chrysaor
hello,

I trying to do a Driver SPI for my gumstix but i can't do anithing on register :
when i try to read a register (with ioremap , ioread32 in C or devmem2 in shell) i take this message :

-------------------------------------------------------------------------------------------------------------------------
root@overo:~# devmem2 0x48098000 h
/dev/mem opened.------------[ cut here ]------------
WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:162 omap3_l3_app_irq+0x23c/0x2cc()
In-band Error seen by MPU  at address 0
Modules linked in: ipv6
[<c0044dc4>] (unwind_backtrace+0x0/0x128) from [<c0067dcc>] (warn_slowpath_common+0x4c/0x64)
[<c0067dcc>] (warn_slowpath_common+0x4c/0x64) from [<c0067e78>] (warn_slowpath_fmt+0x30/0x40)
[<c0067e78>] (warn_slowpath_fmt+0x30/0x40) from [<c0057e18>] (omap3_l3_app_irq+0x23c/0x2cc)
[<c0057e18>] (omap3_l3_app_irq+0x23c/0x2cc) from [<c009849c>] (handle_irq_event_percpu+0x34/0x17c)
[<c009849c>] (handle_irq_event_percpu+0x34/0x17c) from [<c009860c>] (handle_irq_event+0x28/0x38)
[<c009860c>] (handle_irq_event+0x28/0x38) from [<c009a604>] (handle_level_irq+0xb8/0xe0)
[<c009a604>] (handle_level_irq+0xb8/0xe0) from [<c009818c>] (generic_handle_irq+0x2c/0x44)
[<c009818c>] (generic_handle_irq+0x2c/0x44) from [<c003a064>] (asm_do_IRQ+0x64/0x8c)
[<c003a064>] (asm_do_IRQ+0x64/0x8c) from [<c003fdb4>] (__irq_svc+0x34/0xa0)
Exception stack(0xde4f5f68 to 0xde4f5fb0)
5f60:                   40103000 00001018 de4f5fb0 60000010 ffffffff 00000068
5f80: 40103000 00000000 00000003 00000004 48098000 00000003 40244010 de4f5fb0
5fa0: c003ff50 c003ff58 60000113 ffffffff
[<c003fdb4>] (__irq_svc+0x34/0xa0) from [<c003ff58>] (__dabt_usr+0x38/0x40)
---[ end trace 01fd04011b71975b ]---

Memory mapped Unhandled fault: external abort on non-linefetch (0x1018) at 0x40103000
at address 0x40103000.
Bus error
-------------------------------------------------------------------------------------------------------------------------

however when i try to read a GPIO register it still run :

-------------------------------------------------------------------------------------------------------------------------
root@overo:~# devmem2 0x48310000 h
/dev/mem opened.
Memory mapped at address 0x40196000.
Read at address  0x48310000 (0x40196000): 0x0025
-------------------------------------------------------------------------------------------------------------------------

I don't understand why i can't have an access on SPI register (maybe already used or ?)
Can you help me please.

thanks,
Chrysaor
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Drivers SPI

kadero
This post has NOT been accepted by the mailing list yet.
Hi,
i have the same probelem, should i disable spi configure on the Kernel ??

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Drivers SPI

kadero
In reply to this post by Chrysaor
Hi,
i have the same probelem, should i disable spi configure on the Kernel ??

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Drivers SPI

Scott Ellis
Do you know about the spidev kernel module?

https://www.kernel.org/doc/Documentation/spi/spidev

It provides a userland interface through ioctl calls. It should
already be available in your Gumstix kernel. If not, it's easily
added. There are examples in the kernel source for using the
spidev driver from userland.

If that doesn't work for you, custom SPI kernel drivers are
not that difficult. The API for 'protocol' drivers, which is
probably what you want, is pretty simple.

I think you'll find it much easier to develop and maintain
a solution with either of the above, then a userland driver
going at registers  directly through mmap'd memory.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Drivers SPI

kadero
hello,
i don't use spidev, i ahve developped a user layer with my spi driver for verdex, i want to use it!
With PXA270 the spi configuration work well (direct acces to registers).

The probelem with overo (omap3) is when i try to read spi registers with devmem2 i have Bus Error and i don't know why!
Loading...