From mboxrd@z Thu Jan 1 00:00:00 1970 From: Deepak Saxena Date: Fri, 10 Dec 2010 10:04:34 -0800 Subject: [U-Boot] [PATCH] Honor /memory/reg node in DTB files In-Reply-To: <20101208223405.6AC07CF5CA6@gemini.denx.de> References: <4CFD863A.7070000@mentor.com> <20101207065234.DC3BB280@gemini.denx.de> <4CFE775C.6050001@mentor.com> <20101207190936.EC285D0E429@gemini.denx.de> <4CFFCEC1.6000103@mentor.com> <20101208205359.6A1DDCF5CA6@gemini.denx.de> <4CFFF3C4.20800@mentor.com> <20101208213811.E218CCF5CA6@gemini.denx.de> <0DDCBDA1-188F-433D-BDCC-5FDCF709A131@digitaldans.com> <20101208223405.6AC07CF5CA6@gemini.denx.de> Message-ID: <4D026BB2.6020609@mentor.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/08/2010 02:34 PM, Wolfgang Denk wrote: > > I guess we can argue that the normal situation is that U-Boot will > know how to update the DT such as needed to boot the OS. So what we > are dealing with is a small percentage of cases where we need special > behaviour, and where it may be acceptable if the solution is only > semi-perfect ;-) > > My current thinking is to introduce something like > > dt_skip=memory,mac-address > > including eventually "dt_skip=ALL". This should cover most of the > current use cases. > > If someone gets fancy he can add wildcard support. > > And if we need even more flexibility, we can add some "dt_include" > with higher priority, so one could do for example > > dt_skip=ALL > dt_include=memory I imagine this being rather ugly to implement and to keep the code clean and maintained. Who parses these variables? Does each and every piece of code in U-Boot that now touches a piece of the DT need to check for this variable? I could see something like this working if there was a central DT handler that read nodes and then called platform-specific over-ride function, i.e.: for_each_node_in_dt() { if (dt_include(node->type)) platform_of_dt_node_process(node, boot_stage); } where boot_stage tells us whether we are at early init, about to boot an OS image, or in some other step in the process. This would provide a consistent method of handling that variable. Without something like this, I think and environment variable is just going to create confusion for users and developers. ~Deepak