Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

How do I add interrupt-names parameter to the device tree?

I'm trying to use mSGDMA and am looking at the interrupt-names field in the device-tree-source of the gmac and see this:

hps_0_gmac0: ethernet@0xff700000 {

compatible = "synopsys,dwmac-1.0", "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";

reg = < 0xFF700000 0x00002000 >;

interrupt-parent = < &hps_0_arm_gic_0 >;

interrupts = < 0 115 4 >;

interrupt-names = "macirq"; /* embeddedsw.dts.params.interrupt-names type STRING */

mac-address = "[00 00 00 00 00 00]"; /* embeddedsw.dts.params.mac-address type STRING */

address-bits = < 48 >;

max-frame-size = < 1518 >;

local-mac-address = [ 00 00 00 00 00 00 ];

clock-names = "stmmaceth"; /* appended from boardinfo */

clocks = < &emac0_clk >; /* appended from boardinfo */

status = "disabled"; /* appended from boardinfo */

}; //end ethernet@0xff700000 (hps_0_gmac0)

which appears to allow the device driver to call platform_get_irq_byname with the specified name. How can I get a name that I can use with platform_get_irq_byname into the device-tree, short of editing it by hand?

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Use DTAppend command in the board info file while creating device tree using soc2dts tool.

    http://www.rocketboards.org/foswiki/documentation/gsrdv1402devicetreegenerator#dtappend_tag

    Refer http://www.rocketboards.org/foswiki/documentation/gsrd1402devicetreegenerator to use board info while creating dtb/dts file

    --- Quote Start ---

    I'm trying to use mSGDMA and am looking at the interrupt-names field in the device-tree-source of the gmac and see this:

    hps_0_gmac0: ethernet@0xff700000 {

    compatible = "synopsys,dwmac-1.0", "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";

    reg = < 0xFF700000 0x00002000 >;

    interrupt-parent = < &hps_0_arm_gic_0 >;

    interrupts = < 0 115 4 >;

    interrupt-names = "macirq"; /* embeddedsw.dts.params.interrupt-names type STRING */

    mac-address = "[00 00 00 00 00 00]"; /* embeddedsw.dts.params.mac-address type STRING */

    address-bits = < 48 >;

    max-frame-size = < 1518 >;

    local-mac-address = [ 00 00 00 00 00 00 ];

    clock-names = "stmmaceth"; /* appended from boardinfo */

    clocks = < &emac0_clk >; /* appended from boardinfo */

    status = "disabled"; /* appended from boardinfo */

    }; //end ethernet@0xff700000 (hps_0_gmac0)

    which appears to allow the device driver to call platform_get_irq_byname with the specified name. How can I get a name that I can use with platform_get_irq_byname into the device-tree, short of editing it by hand?

    --- Quote End ---