From: Federico Ridolfo <federico.ridolfo@domain.hid>
To: Bosko Radivojevic <bosko.radivojevic@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] PowerPC irq unmask
Date: Tue, 27 Jan 2009 08:39:38 +0100 [thread overview]
Message-ID: <497EBA3A.2050504@domain.hid> (raw)
In-Reply-To: <d6c8ef150901260652w1f0ecf5cmfd0b48ff75adb9c9@domain.hid>
Sure. I'll describe what i did for SPI driver on PSC3
in order to use OF:
- add a right node in dts file:
spi@domain.hid { // PSC3 in spi mode
compatible = "rtdm-spi","rtdm-spi";
cell-index = <2>;
reg = <0x2400 0x100>;
interrupts = <2 3 0>;
interrupt-parent = <&mpc5200_pic>;
};
- add headers in my rtdm driver:
#if defined(CONFIG_PPC_MERGE)
#include <linux/of.h>
#include <linux/of_platform.h>
#endif
- use OF to get irq in the rtdm driver:
#ifdef CONFIG_PPC_MERGE
/* Use Open Firmware device tree */
struct device_node *np = NULL;
struct resource r[2] = {};
np = of_find_compatible_node(np, NULL, "rtdm-spi");
if (np == NULL)
{
rtdm_printk("np = NULL!??!");
return -ENODEV;
}
ret = of_address_to_resource(np, 0, &r[0]);
if (ret)
{
rtdm_printk("of_address_to_resource returns: %d",ret);
return ret;
}
of_irq_to_resource(np, 0, &r[1]);
intr = r[1].start;
rtdm_printk("irq from OF:%d\n",intr);
#else
intr = MPC52xx_PSC3_IRQ;
#endif
- compile kernel and make dtb
I'm using u-boot 1.3.0 and both uImage, dtb and rootfs
are in a UDMA Compact Flash on ATA.
Ciao
Bosko Radivojevic wrote:
> Federico,
>
> may you write a small comment regarding what you had to change
> (especially regarding OF). Just for the rest of us ;)
>
> Thanks.
>
> On Mon, Jan 26, 2009 at 12:35 PM, Federico Ridolfo
> <federico.ridolfo@domain.hid> wrote:
>
>> Thanks, now my rtdm drrivers work!!
>> You are great.
>>
>
>
next prev parent reply other threads:[~2009-01-27 7:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 7:32 [Xenomai-help] PowerPC irq unmask Federico Ridolfo
2009-01-23 8:52 ` Philippe Gerum
2009-01-23 9:10 ` Federico Ridolfo
2009-01-23 9:48 ` Philippe Gerum
2009-01-23 10:16 ` Federico Ridolfo
2009-01-23 10:25 ` Philippe Gerum
2009-01-23 17:06 ` Federico Ridolfo
2009-01-23 18:07 ` Philippe Gerum
2009-01-23 18:18 ` Federico Ridolfo
2009-01-24 9:58 ` Philippe Gerum
2009-01-26 11:35 ` Federico Ridolfo
2009-01-26 14:52 ` Bosko Radivojevic
2009-01-27 7:39 ` Federico Ridolfo [this message]
2009-01-23 19:29 ` 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=497EBA3A.2050504@domain.hid \
--to=federico.ridolfo@domain.hid \
--cc=bosko.radivojevic@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.