lkml.org 
[lkml]   [2019]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectAw: Re: [PATCH] kbuild: Add DTC_CPP_FLAGS
Date
Hi,

thank you for your answer... i waited for this argument ;) so here an example (don't wanted to add in patch itself):

i have 2 different Bananapi-r64 boards with different switch-chips (v0.x rtl8367,v1.x xmt7531). for 1 of the switches (mt7531) there are 2 drivers (phy-driver + dsa driver) available and so i have 3 different configs in DTS.

Imho dtsi should contain only config for 1 chip, but the board has only 1 dts. Till now i have copied the whole dts twice, so i have 3 independent dts. if i Patch any other in one like for bluetooth, wifi, which is same on each board i have to do it on all 3 dts files.

so i tried to make the switch-part conditionally, include the right dtsi for switch to 1 bpi-r64 dts based on -D param passed to the build-chain.

#ifdef __SWITCH_RTL8367__
#include "rtl8367.dtsi"
#endif
#ifdef __SWITCH_MT7531_DSA__
#include "mt7531.dtsi"
#endif

imho i can/should not include a dtsi to a dtsi and no dts to dts, so i cannot have a small dts (with the switch-config) including the whole r64 board. Am i right?

and this change should be less interferring than other ideas i'm thinking about.

Another example: I had tried adding the include/generated/autoconf.h to dtsi (same reason) which needs a change in scripts/dtc/include-prefixes/ (add symlink) or an odd include in the dtsi (#include "../../../../../include/generated/autoconf.h"). Both ways not nice...

regards Frank


> Gesendet: Mittwoch, 18. Dezember 2019 um 14:31 Uhr
> Von: "Masahiro Yamada" <masahiroy@kernel.org>
> I think this is questionable
> since DT is supposed to describe hardware.
> Does it depends on #ifdef or some external defines?
>
> If you want to add variations,
> you can add a new DTS which includes other DTS(I) files.

\
 
 \ /
  Last update: 2019-12-18 14:55    [W:0.046 / U:1.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site