Skip to contentSkip to conversation

still unclear on a couple DT questions from my initial post

DISCUSSION Robert P. J. Day 3 participants 4 messages Sep 1, 2017 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

again, more nitpicky pedantry, but from my initial post, i'm still
unclear on a couple things.

first, a number of powerpc .dts files contain the line:

    dcr-parent = <&{/cpus/cpu@0}>;

and it's not clear to me why there are curly braces there. that is the only example of that, but i see no mention of that in the spec. is it meaningful? or are they superfluous?

also, the spec states that status could be set to "okay", but a pile
of .dts files in the current kernel have the shorter form:

  status = "ok";

and the current kernel code in drivers/of explicitly accepts both forms. is that a formal spec property, or is the kernel code simply allowing people to be sloppy?

i think that's it for now, thanks for your patience.

rday

Signature · 11 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive
Quoted 10 lines · Robert P. J. Day

again, more nitpicky pedantry, but from my initial post, i'm still
unclear on a couple things.

first, a number of powerpc .dts files contain the line:

    dcr-parent = <&{/cpus/cpu@0}>;

and it's not clear to me why there are curly braces there. that is the only example of that, but i see no mention of that in the spec. is it meaningful? or are they superfluous?

This syntax allows us to refer to a node by path, even if it doesn't have an existing label. The &foo syntax only allows us to refer to an existing label called foo.

Quoted 8 lines

also, the spec states that status could be set to "okay", but a pile
of .dts files in the current kernel have the shorter form:

  status = "ok";

and the current kernel code in drivers/of explicitly accepts both forms. is that a formal spec property, or is the kernel code simply allowing people to be sloppy?

The kernel is catering for sloppiness. We should probably fix those up in the kernel tree.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 8 lines · Mark Rutland
Quoted 7 lines · Robert P. J. Day

again, more nitpicky pedantry, but from my initial post, i'm still
unclear on a couple things.

first, a number of powerpc .dts files contain the line:

    dcr-parent = <&{/cpus/cpu@0}>;
Quoted 7 lines
Quoted 3 lines

and it's not clear to me why there are curly braces there. that is the only example of that, but i see no mention of that in the spec. is it meaningful? or are they superfluous?

This syntax allows us to refer to a node by path, even if it doesn't have an existing label. The &foo syntax only allows us to refer to an existing label called foo.

ah ... is that mentioned in the spec somewhere? i don't recall
seeing that.

Quoted 11 lines
Quoted 8 lines

also, the spec states that status could be set to "okay", but a pile
of .dts files in the current kernel have the shorter form:

  status = "ok";

and the current kernel code in drivers/of explicitly accepts both forms. is that a formal spec property, or is the kernel code simply allowing people to be sloppy?

The kernel is catering for sloppiness. We should probably fix those up in the kernel tree.

the vast majority of that is under arch/arm*, if you want to take
care of that, and i can see about the rest.

rday

Signature · 11 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
In reply to a message not in the archive
Quoted 30 lines · Robert P. J. Day
Quoted 8 lines · Mark Rutland
Quoted 7 lines · Robert P. J. Day

again, more nitpicky pedantry, but from my initial post, i'm still
unclear on a couple things.

first, a number of powerpc .dts files contain the line:

    dcr-parent = <&{/cpus/cpu@0}>;
Quoted 7 lines
Quoted 3 lines

and it's not clear to me why there are curly braces there. that is the only example of that, but i see no mention of that in the spec. is it meaningful? or are they superfluous?

This syntax allows us to refer to a node by path, even if it doesn't have an existing label. The &foo syntax only allows us to refer to an existing label called foo.

ah ... is that mentioned in the spec somewhere? i don't recall
seeing that.

Quoted 9 lines
Quoted 8 lines

also, the spec states that status could be set to "okay", but a pile
of .dts files in the current kernel have the shorter form:

  status = "ok";

and the current kernel code in drivers/of explicitly accepts both forms. is that a formal spec property, or is the kernel code simply allowing people to be sloppy?

Quoted 5 lines
Quoted 2 lines

The kernel is catering for sloppiness. We should probably fix those up in the kernel tree.

the vast majority of that is under arch/arm*, if you want to take
care of that, and i can see about the rest.

My preference would be to first add a check into dtc. It has a check for status currently, but only that it is a string. Then others can get annoyed with the warning and fix.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html