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: [EMAIL PROTECTED] {
>                clock-frequency = <0>;
>                interrupt-controller;
>             #address-cells = <0>;
>                reg = <0x20006000 0x100>;
>                compatible = "it";
>                device_type = "it";
>                big-endian;
>            };
> 
>            [EMAIL PROTECTED]
>                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
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to