Re: dtc fails to compile <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 3 April 2017 at 14:55, Rob Herring <robh@xxxxxxxxxx> wrote:
> On Mon, Apr 3, 2017 at 6:25 AM, Waldemar Rymarkiewicz
> <waldemar.rymarkiewicz@xxxxxxxxx> wrote:
>> On 31 March 2017 at 18:31, Rob Herring <robh@xxxxxxxxxx> wrote:
>>> On Fri, Mar 31, 2017 at 3:25 AM, Waldemar Rymarkiewicz
>>> <waldemar.rymarkiewicz@xxxxxxxxx> wrote:
>>>> On 30 March 2017 at 17:39, Rob Herring <robh@xxxxxxxxxx> wrote:
>>>>> On Thu, Mar 30, 2017 at 4:20 AM, Waldemar Rymarkiewicz
>>>>> <waldemar.rymarkiewicz@xxxxxxxxx> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I build DT for thermal zone according to
>>>>>>
>>>>>> http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/thermal/thermal.txt#L261
>>>>>>
>>>>>> but dtc (DTC 1.4.1-g53bf130b) fails with syntax error.
>>>>>>
>>>>>>     Error: ../dts/xrx500.dtsi:1060.14-15 syntax error
>>>>>>     FATAL ERROR: Unable to parse input tree
>>>>>>
>>>>>> The problem is with cooling-device property
>>>>>>
>>>>>>       cooling-maps {
>>>>>> 295                         map0 {
>>>>>> 296                                 trip = <&cpu_alert0>;
>>>>>> 297                                 cooling-device =
>>>>>> 298                                     <&cpu0 THERMAL_NO_LIMIT
>>>>>> THERMAL_NO_LIMIT>;
>>>>>> 299                         };
>>>>>> 300                 };
>>>>>>
>>>>>> if I use phandle like <&cpu0> it compiles but  <&cpu0 THERMAL_NO_LIMIT
>>>>>> THERMAL_NO_LIMIT>; fails.
>>>>>>
>>>>>> What could be a reason? any hint ?
>>>>>
>>>>> Did you run it thru the C preprocessor first? Simple #defines are
>>>>> supported in dts files, but you have to use the C preprocessor before
>>>>> passing to dtc. The builds of dts files in the kernel tree do this for
>>>>> you.
>>>>
>>>> Yes,  but preprocessor does not resolve  THERMAL_NO_LIMIT which is
>>>> located in include/linux/thermal.h as far as I can see.
>>>
>>> That's by design. dts files should only include include/dt-bindings/*
>>> as they are part of the ABI.
>>
>> So, why does dtc fails on  THERMAL_NO_LIMIT if this is defined in
>> include/dt-bindings/thermal/thermal.h?
>
> It is and there are there are lots of users in the tree that all
> compile. Maybe something mips specific is not picking up the include
> path?

Indeed, I see it now :) Many thanks for helping me to understand this better.

Waldek
--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux