irq
Scott Wood
scottwood at freescale.com
Fri Sep 5 00:18:08 EST 2008
On Thu, Sep 04, 2008 at 03:23:21PM +0200, Sébastien Chrétien wrote:
> I try to write a device tree about irq :
>
> IT_controller: irq_controller at 20006000 {
> clock-frequency = <0>;
> interrupt-controller;
> #address-cells = <0>;
> reg = <0x20006000 0x100>;
> compatible = "it";
> device_type = "it";
> big-endian;
> };
>
> uart at 200b1000{
> device_type="uart";
> compatible="uart";
> interrupts = <0x18 0>;
> interrupt-parent=<&IT_controller>;
> };
>
>
> uart_irq=of_find_node_by_type(NULL, "uart");
> if(uart_irq==NULL)
> printk("%s: No uart node found !\n", __func__);
>
> virt=irq_of_parse_and_map(uart_irq, 0);
> printk("Virtual irq : %d \n",virt);
>
>
> When I boot linux, virt=0;
>
> What is wrong ?
You're missing #interrupt-cells, for one. Also, you need your interrupt
controller driver to register with the IRQ subsystem properly (see other
chained IRQ drivers in the tree).
You should also get rid of device_type, big-endian, and clock-frequency,
and use better compatible names.
-Scott
More information about the Linuxppc-dev
mailing list