From: Fabrice Gasnier <fabrice.gasnier@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] Xenomai rtcan build issue on MPC5121 (kernel >= 2.6.35)
Date: Wed, 21 Dec 2011 12:22:52 +0100 [thread overview]
Message-ID: <4EF1C18C.3020407@domain.hid> (raw)
[-- Attachment #1: Type: text/plain, Size: 3673 bytes --]
Dear all,
I'm trying to build xenomai-2.6.0 with kernel 3.0.4 for powerpc (MPC5121).
some config options:
CONFIG_PPC_MPC512x=y
CONFIG_XENO_DRIVERS_CAN=m
CONFIG_XENO_DRIVERS_CAN_MSCAN=m
Using CAN support leads to compile errors:
CC [M] drivers/xenomai/can/mscan/rtcan_mscan.o
CC [M] drivers/xenomai/can/mscan/rtcan_mscan_mpc5xxx.o
drivers/xenomai/can/mscan/rtcan_mscan_mpc5xxx.c: In function
'mpc512x_can_get_clock':
drivers/xenomai/can/mscan/rtcan_mscan_mpc5xxx.c:158:30: error: 'struct
platform_device' has no member named 'node'
drivers/xenomai/can/mscan/rtcan_mscan_mpc5xxx.c:174:41: error: 'struct
platform_device' has no member named 'node'
drivers/xenomai/can/mscan/rtcan_mscan_mpc5xxx.c:178:31: error: 'struct
platform_device' has no member named 'node'
make[5]: *** [drivers/xenomai/can/mscan/rtcan_mscan_mpc5xxx.o] Error 1
I'm a bit surprised as I found a xenomai git commit that seem to handle
this issue when building with CONFIG_PPC_MPC52xx:
- can: adapt to platform driver infrastructure changes for 2 .6.35
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=50b289784ef2b0734bef1e99b008ff4b79ad5409
I believe this issue can be fixed for MPC512x as well, by using same
principle. Is it correct to do so?
Index: xenomai-2.6.0/ksrc/drivers/can/mscan/rtcan_mscan_mpc5xxx.c
===================================================================
--- xenomai-2.6.0.orig/ksrc/drivers/can/mscan/rtcan_mscan_mpc5xxx.c
2011-10-18 20:17:18.000000000 +0200
+++ xenomai-2.6.0/ksrc/drivers/can/mscan/rtcan_mscan_mpc5xxx.c
2011-12-21 11:52:43.000000000 +0100
@@ -155,7 +155,7 @@
}
/* Determine the MSCAN device index from the physical address */
- pval = of_get_property(ofdev->node, "reg", &plen);
+ pval = of_get_property(mpc5xxx_get_of_node(ofdev), "reg", &plen);
BUG_ON(!pval || plen < sizeof(*pval));
clockidx = (*pval & 0x80) ? 1 : 0;
if (*pval & 0x2000)
@@ -171,11 +171,11 @@
*/
if (clock_name && !strcmp(clock_name, "ip")) {
*mscan_clksrc = MSCAN_CLKSRC_IPS;
- freq = mpc5xxx_get_bus_frequency(ofdev->node);
+ freq = mpc5xxx_get_bus_frequency(mpc5xxx_get_of_node(ofdev));
} else {
*mscan_clksrc = MSCAN_CLKSRC_BUS;
- pval = of_get_property(ofdev->node,
+ pval = of_get_property(mpc5xxx_get_of_node(ofdev),
"fsl,mscan-clock-divider", &plen);
if (pval && plen == sizeof(*pval))
clockdiv = *pval;
If it's ok, can it be integrated into xenomai-head?
Thanks in advance,
Fabrice Gasnier
--
Fabrice GASNIER, Ingénieur Systèmes Embarqués
Email: fabrice.gasnier@domain.hid <mailto:fabrice.gasnier@domain.hid>
Découvrez notre catalogue de formations 2011
<http://www.cenosys.com/contenu/pdf/catalogue.pdf>
<http://www.cenosys.com>
10 rue Xavier Bichat - 72000 Le Mans - France - Tel: +33(0)2 43 51 17 97
- Fax: +33(0)2 43 51 17 98 - www.cenosys.com <http://www.cenosys.com>
CONFIDENTIALITÉ : Ce message électronique et tous les fichiers attachés
qu'il contient sont confidentiels et destinés exclusivement à l'usage de
la personne à laquelle ils sont adressés. Si vous avez reçu ce message
par erreur, merci de le retourner immédiatement à son émetteur sans en
conserver de copie.
CONFIDENTIALITY : This e-mail and any attachments are confidential and
may also be privileged. If you are not the named recipient, please
notify the sender immediately and do not disclose the contents to an
other person, use it for any purpose, or store or copy the information
in any medium.
[-- Attachment #2.1: Type: text/html, Size: 6078 bytes --]
[-- Attachment #2.2: pied-mail.png --]
[-- Type: image/png, Size: 7760 bytes --]
next reply other threads:[~2011-12-21 11:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 11:22 Fabrice Gasnier [this message]
2011-12-26 17:54 ` [Xenomai-help] Xenomai rtcan build issue on MPC5121 (kernel >= 2.6.35) Gilles Chanteperdrix
2012-01-03 8:47 ` Fabrice Gasnier
2012-01-03 21:03 ` Gilles Chanteperdrix
2012-01-04 10:06 ` Fabrice Gasnier
2012-01-04 12:30 ` Wolfgang Grandegger
-- strict thread matches above, loose matches on Subject: below --
2012-01-04 13:48 Fabrice Gasnier
2012-01-04 15:53 ` Wolfgang Grandegger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EF1C18C.3020407@domain.hid \
--to=fabrice.gasnier@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.