From: Wolfgang Denk Date: Sun, 24 May 2009 16:57:25 +0200 Subject: [U-Boot] [RFC] initcall mechanism introduction In-Reply-To: <20090524120041.GG26561@game.jcrosoft.org> References: <20090523150558.GB26561@game.jcrosoft.org> <20090523181958.8E778832E416@gemini.denx.de> <20090524120041.GG26561@game.jcrosoft.org> Message-ID: <20090524145725.84A65832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Jean-Christophe PLAGNIOL-VILLARD, In message <20090524120041.GG26561@game.jcrosoft.org> you wrote: > > > What sort of benefit do you expect? > simplify the code, reduce the number of ifdef > reduce the size of U-Boot etc... How would that reduce the size of the code? > I do have some test and I've gain between 2KiB and more than 10KiB > by using this And, does it still work on all boards? > so yes I think it's great winn I think you don't understand the complexity yet. One problem we have to solve is to make sure we have a very specific sequence in which the init routines are run. The original idea of the code was that you can #define the init_sequence[] table in an architecture and/or board config file; it's just that nobody implemented that yet. If you changed the code in this direction, then this might actually make sense. The Linux way of doing initcalls is useless for U-Boot, as it addres- ses a completely different problem and is based on a completely different memory management model. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Never put off until tomorrow what you can put off indefinitely.