devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* possible add CONFIG define in dts?
@ 2015-02-24  9:03 vichy
       [not found] ` <CAOVJa8FmpFFk=3YwgTX4N3u5AKmM05jpbzww4_xNvS3d=W8sRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: vichy @ 2015-02-24  9:03 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

hi all:
I want to share 1 dts when my linux kernel running on different platform.
is it possible to use #ifdef CONFIGxxx like below?
( Compile is pass, but I still get arm,data-latency, arm,tag-latency as <6 6 6>
Sincerely appreciate your kind help in advance,

        L2: cache-controller@ffe00000 {
                compatible = "arm,pl310-cache";
                reg = <0xffe00000 0x1000>;
                interrupts = <0 96 4>;
                cache-level = <2>;
#ifdef CONFIG_ARCH_PLAT_FPGA
                arm,data-latency = <0 0 0>;
                arm,tag-latency = <0 0 0>;
#else
                arm,data-latency = <6 6 6>;
                arm,tag-latency = <6 6 6>;
#endif
        };
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: possible add CONFIG define in dts?
       [not found] ` <CAOVJa8FmpFFk=3YwgTX4N3u5AKmM05jpbzww4_xNvS3d=W8sRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-02-24 11:02   ` Mark Rutland
  2015-03-01  4:56     ` vichy
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2015-02-24 11:02 UTC (permalink / raw)
  To: vichy
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

On Tue, Feb 24, 2015 at 09:03:06AM +0000, vichy wrote:
> hi all:
> I want to share 1 dts when my linux kernel running on different platform.
> is it possible to use #ifdef CONFIGxxx like below?
> ( Compile is pass, but I still get arm,data-latency, arm,tag-latency as <6 6 6>
> Sincerely appreciate your kind help in advance,
> 
>         L2: cache-controller@ffe00000 {
>                 compatible = "arm,pl310-cache";
>                 reg = <0xffe00000 0x1000>;
>                 interrupts = <0 96 4>;
>                 cache-level = <2>;
> #ifdef CONFIG_ARCH_PLAT_FPGA
>                 arm,data-latency = <0 0 0>;
>                 arm,tag-latency = <0 0 0>;
> #else
>                 arm,data-latency = <6 6 6>;
>                 arm,tag-latency = <6 6 6>;
> #endif
>         };

The DTB should describe the HW, and thus should be separate from the
CONFIG options, which control the behaviour of the kernel. So CONFIG_*
in DTBs doesn't make much sense.

This is broken for a multi-platform kernel, no?

If you want to build DTBs for platforms with slight differences as
above, place the common portion in a shared dtsi, and override the parts
which are different in each dts. You'll end up with a dtb for each
variation, but you don't need to repeat all the common parts in each
dts.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: possible add CONFIG define in dts?
  2015-02-24 11:02   ` Mark Rutland
@ 2015-03-01  4:56     ` vichy
  0 siblings, 0 replies; 3+ messages in thread
From: vichy @ 2015-03-01  4:56 UTC (permalink / raw)
  To: Mark Rutland
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

hi Mark:
> The DTB should describe the HW, and thus should be separate from the
> CONFIG options, which control the behaviour of the kernel. So CONFIG_*
> in DTBs doesn't make much sense.
>
> This is broken for a multi-platform kernel, no?
>
> If you want to build DTBs for platforms with slight differences as
> above, place the common portion in a shared dtsi, and override the parts
> which are different in each dts. You'll end up with a dtb for each
> variation, but you don't need to repeat all the common parts in each
> dts.
I found what you mention in the kernel for other disi example.
Sincerely appreciate your kind explanation, ^^
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-01  4:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24  9:03 possible add CONFIG define in dts? vichy
     [not found] ` <CAOVJa8FmpFFk=3YwgTX4N3u5AKmM05jpbzww4_xNvS3d=W8sRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-24 11:02   ` Mark Rutland
2015-03-01  4:56     ` vichy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).