Re: [PATCH 1/2] dtc: add ability to make nodes conditional on them being referenced

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



Hi Ian,

On Wed, Feb 21, 2018 at 09:26:40AM -0700, Ian Lepore wrote:
> On Wed, 2018-02-21 at 11:00 +0100, Maxime Ripard wrote:
> > On Sat, Feb 03, 2018 at 10:14:31AM +0100, Maxime Ripard wrote:
> > > 
> > > From: Heiko Stuebner <heiko.stuebner@xxxxxx>
> > > 
> > > On i.MX, which carries a lot of pin-groups of which most are unused on
> > > individual boards, they noticed that this plethora of nodes also results
> > > in the runtime-lookup-performance also degrading [0].
> > > 
> > > A i.MX-specific solution defining the pingroups in the board files but
> > > using macros to reference the pingroup-data was not well received.
> > > 
> > > This patch is trying to solve this issue in a more general way, by
> > > adding the ability to mark nodes as needing to be referenced somewhere
> > > in the tree.
> > > 
> > > To mark a node a needing to be referenced it must be prefixed with
> > > /delete-if-unreferenced/. This makes dtc check the nodes reference-status
> > > when creating the flattened tree, dropping it if unreferenced.
> > > 
> > > For example, the i.MX6SL pingroup
> > > 
> > > 	/delete-if-unreferenced/ pinctrl_ecspi1_1: ecspi1grp-1 {
> > > 		fsl,pins = <
> > > 			MX6SL_PAD_ECSPI1_MISO__ECSPI1_MISO 0x100b1
> > > 			MX6SL_PAD_ECSPI1_MOSI__ECSPI1_MOSI 0x100b1
> > > 			MX6SL_PAD_ECSPI1_SCLK__ECSPI1_SCLK 0x100b1
> > > 		>;
> > > 	};
> > > 
> > > would only be included in the dtb if it got referenced somewhere
> > > as pingroup via
> > > 
> > > 	node {
> > > 		pinctrl-0 <&pinctrl_ecscpi1_1>;
> > > 	};
> > > 
> > > [0] http://thread.gmane.org/gmane.linux.ports.arm.kernel/275912/
> > Have you been able to take a look at this?
> 
> Wouldn't this destroy the ability to use overlays, whose whole point is
> to establish references at runtime rather than compile time?

Yes, it would. But there is a strong need for smaller DTBs as well, to
embed them in size-constrained projects such as bootloaders that need
to run from an SRAM.

In such a case, it wouldn't make any sense to enable the overlays
either given the size overhead it involves, so I don't think this is
really an issue.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux