From: Tom Rini Date: Mon, 23 Nov 2020 13:48:46 -0500 Subject: [PATCH V3] dm: core: Add late driver remove option In-Reply-To: <0f9d329f-dfd5-4cc6-29da-9ca1dda25446@denx.de> References: <20201108140818.55172-1-marek.vasut+renesas@gmail.com> <20201118145346.GI5340@bill-the-cat> <0f9d329f-dfd5-4cc6-29da-9ca1dda25446@denx.de> Message-ID: <20201123184846.GE32272@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, Nov 22, 2020 at 03:13:15AM +0100, Marek Vasut wrote: > On 11/22/20 12:07 AM, Simon Glass wrote: > [...] > > > > > > > That way we are describing the property of the device rather than what > > > > > > we want to do with it. > > > > > > > > > > The device is not critical or vital, it just needs to be torn down late. > > > > > > > > What is it about the device that requires it to be torn down 'late'? > > > > > > I think perhaps the problem isn't that it needs to be "late", it's that > > > it has perhaps not obviously described children. Which gets back to > > > what you just said as well about "later" and "fairly late". It's an > > > ordering problem. > > > > Yes it is. > > > > We currently don't record devices that depend on others. It would be > > possible to add a refcount to DM to cope with this and implement it > > for clocks. I wonder if that might be better than what we have here? > > This is still a bootloader, not a general-purpose OS, so I would argue we > should not complicate this more than is necessary. The DM already adds a lot > of bloat to U-Boot, no need to make that worse unless there is a real good > reason for that. Also, in V1 of this patch, Simon did suggest that a simple > approach is OK if I recall correctly. Perhaps now that it's clear to everyone what "late" means in this context, we can just solve it with a flag + documentation that ...whatever the name is... means that it's for ensuring that we have unwound the other parts of the system which require this to be enabled first. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: