LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-29-2012, 02:22 AM   #1
extended_virtual
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Rep: Reputation: Disabled
Adding a "platform" device (CAN controller)


Problem: I need to bring up the SJA 1000 CAN controller on the [Colibri Evaluation Carrier Board v2.1][1] (with Colibri T20 (NVidia Tegra)module inserted into it, which has ARM cpu). toradex.com/Products/Colibri/Modules/Colibri-T20

Research: On the Toradex website they write that subject chip is "connected to GMI bus" (which could be "General Memory Interface"). I couldn't find anything about "GMI bus" in google, and I assume this is the same as "platform bus".
Is this correct?

Ok, if so, we have the following: there are drivers in Linux
`kernel/drivers/net/can/sja1000/sja1000.c` & `sja1000_platform.c`
which should be what I need, in addition to `can` and `can-dev` drivers. But they can't be started (not even probed), because the kernel doesn't know about subject platform device.

All "platform" devices are added with their resources from the "board driver" `kernel/arch/arm/mach-tegra/board-colibri_t20.c` via `platform_add_devices() func`. The problem is that it initializes all the devices from Colibri T20 and not the CAN chip which is on Eval Board.

So finally, if all above is correct, to bring up the drivers, I need to create a "platform_device" structure with the array of "resource" structures inside it with exact numbers of IRQs and memory addresses. There is the controller's datasheet[2], as well as board's datasheet[1], people told it should be used. Please help me work out how to use it; which good articles/books to read for this.

Please help, I'm really stuck!

[1]: http://developer.toradex.com/files/t..._Datasheet.pdf
[2]: http://www.nxp.com/documents/data_sheet/SJA1000.pdf
 
Old 10-29-2012, 06:51 PM   #2
sycho123321
Member
 
Registered: Apr 2012
Distribution: Slackware and debian
Posts: 192

Rep: Reputation: Disabled
Wink

welcome to LQ
 
Old 10-29-2012, 08:05 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,781

Rep: Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448
Welcome. Usually we try to offer assistance or leave questions empty so that others search for zero replies would tend to look at each one. Now that this has been answered I will try to help if I can. (and I don't think so)

Are you booting to the T20_LinuxImageV1.0_20120504.tar.bz2 image?

I hope that someone with more knowledge will assist.

The company that makes these may also have some assistance available.

http://www.toradex.com/En/Support

http://www.toradex.com/En/Support/Downloads

Last edited by jefro; 10-29-2012 at 08:07 PM.
 
Old 10-30-2012, 01:02 AM   #4
extended_virtual
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi
Yes, I'm booting the correct image from Toradex with with custom build FS and with added drivers for CAN SJA1000, tried both modules and kernel built-in - not working, because (I'm pretty sure) there is struct should be passed to platform_add_devices() at the system boot and it is not there for CAN controller.

The company is asking an enourmous amount of money for support on this problem, so my management want me to study this by myself
 
Old 10-30-2012, 02:46 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 11,781

Rep: Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448Reputation: 1448
Try it again with the stock image and see if you can get it up or seen. I don't believe the choice of power to chip is an issue. It should be only for can voltage but investigate it. It could be that the chip is also isolated from the board and needs external or internal jumper to power it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Shared physical device" versus "Virtual network" ThomasRonshof Linux - Virtualization and Cloud 2 06-17-2011 03:27 PM
[SOLVED] Adding user "me" to group "you" doesn't take effect for a while. Why not? Le Beastie Linux - Newbie 1 12-09-2009 04:13 AM
Occasionally-- "connected with self-assigned address," "deactivating device eth0" MaxIBoy Debian 4 10-04-2009 10:50 AM
"Successful install" results in "Boot device not found" slackr007 Fedora 2 06-21-2005 04:05 PM
Adding device shorcuts to "drives:/" soul_rebel Linux - General 3 09-10-2004 11:52 AM


All times are GMT -5. The time now is 08:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration