On 10/22/2010 05:58 PM, Jargalan Nermunkh wrote:
>>
>> Use the driver "mcp2515" instead of "mcp251x" in order to test the async
>> driver. They can be both compiled as modules, just load the driver you
>> want to use.
>>
>> _note_:
>>  the mcp2515 doesn't support the callback to phy, power and init yet

> I tried to use the mcp2515 driver but ran into some trouble. The driver is
> recognized and I can see can0 with "ifconfig -a" but when I try to send a
> CAN message it crashes and I have to reset the board. I think my problem is
> coming from not setting up the irq correctly. It is set in the
> .board_specific_setup in mcp251x_platform_data from GPIO but mcp2515.c never
> calls .board_specific and when the mcp2515 registers the irq is 0. How do I
> setup the irq?

a) move the things from the .board_specific function to your boardfile
   and call them prior to registering the mcp2515 at the spi framework
b) wait until someone implements the .board_specific hook in the driver
c) implement it yourself

Oh...wait...someone just did b)

(not tested so far)

http://git.pengutronix.de/?p=mkl/linux-2.6.git;a=shortlog;h=refs/heads/can/mcp251x-async-boardsetup

cheers, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to