Hi Grant.<br><br>I am afraid I am seriously confused about how the dt is supposed to work.<br>Maybe I simply lack a detail, if I am lucky... perhaps it is to late in the day...<br><br>Problem:<br>I cannot get the for_each_matching_node macro to give me anything, so the I guess the of_find_matching_node cannot find anything.<br>

I am using the uarts in the test code. With the test code below the snowball dies.<br>Anyone see my mistake?<br><br>Thanks for any and all input.<br>/Niklas.<br><br>Suggestion: I forgot some initialization somewhere?<br>
<br>In this device tree I have:<br><br>/ {<br>        model = "ST-Ericsson Snowball";<br>
        compatible = "snowball";<br>        #address-cells = <1>;<br>        #size-cells = <1>;<br><br>        #chosen {<br>                bootargs = "root=/dev/ram0 console=ttyAMA2,115200n8 debug earlyprintk";<br>

        };<br><br>        #memory {<br>                reg = <0x90000000 0x20000000>;<br>        };<br><br>        #soc-u8500 {<br>                address-cells = <1>;<br>                size-cells = <1>;<br>

                compatible = "simple-bus";<br>                periph1-base = <0x32000>;<br><br>                cpus {<br>                        #address-cells = <1>;<br>                        #size-cells = <0>;<br>

                        cpu@0 {<br>                                compatible = "arm,cortex-a9";<br>                                reg = <0>;<br>                        };<br>                        cpu@1 {<br>

                                compatible = "arm,cortex-a9";<br>                                reg = <1>;<br>                        };<br>                };<br>        };<br><br>        uart@80120000 {<br>

                compatible = "arm,pl011";<br>        };<br>        uart@80121000 {<br>                compatible = "arm,pl011";<br>        };<br>        uart@80007000 {<br>                compatible = "arm,pl011";<br>

        };<br>  };<br><br><br>Test code:<br><br>static const struct of_device_id snowball_uarts[] __initconst={<br>        {.compatible="arm,pl011"},<br>        {},<br>};<br><br>
static void __init mop500_uart_init_dt(void)<br>
{<br>
        struct device_node *node;<br>
        u32 p0;<br>
        int ret;<br>
<br>
        /* Get device info from device-tree */<br>
        for_each_matching_node(node, snowball_uarts) {<br>
                goto doit;  /* Got something, all ok */<br>        }<br>
        goto die;<br><br>
 doit:<br>
        /* Standard init, no dt */<br>
        db8500_add_uart0(&uart0_plat);<br>
        db8500_add_uart1(&uart1_plat);<br>
        db8500_add_uart2(&uart2_plat);<br>
die:<br>
        ;<br>
};<br>
<br><br>