83xx: requesting external interrupts
Andy Fleming
afleming at freescale.com
Sat Jun 30 09:54:52 EST 2007
On Jun 29, 2007, at 06:34, Joakim Tjernlund wrote:
> mdio at 2320 {
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <2320 18>;
> device_type = "mdio";
> compatible = "ucc_geth_phy";
>
> phy1: ethernet-phy at 0 {
> interrupt-parent = <&ipic>;
> interrupts = <12 2>; //EXT IRQ2
> reg = <0>; // 0
> device_type = "ethernet-phy";
> interface = <3>; //ENET_100_MII
> };
>
> Now the things is that the IRQ works with and without the
> /* All external IRQs + Generic timer IRQs must be initialized by
> BSP */
> const int bsp_irqs[] = {48, 17, 18, 19, 20, 21, 22, 23, 90, 78,
> 84, 72};
> for (i=0;i<sizeof(bsp_irqs)/sizeof(bsp_irqs[0]);i++)
> virq = irq_create_mapping(NULL, bsp_irqs[i]);
This isn't how to use the device tree. That is, you *aren't* using
the device tree. You want to read the node of every device you want
to set up, and create the mapping. Look at irq_of_parse_and_map().
Look in include/asm-powerpc/prom.h, at of_irq_to_resource(), which
maps an irq in the device tree.
Andy
More information about the Linuxppc-embedded
mailing list