From: Wolfgang Denk Date: Tue, 26 May 2009 23:54:55 +0200 Subject: [U-Boot] [RFC] initcall mechanism introduction In-Reply-To: <20090526210046.GA4669@b07421-ec1.am.freescale.net> References: <20090523150558.GB26561@game.jcrosoft.org> <20090523181958.8E778832E416@gemini.denx.de> <20090524120041.GG26561@game.jcrosoft.org> <20090524145725.84A65832E416@gemini.denx.de> <20090526210046.GA4669@b07421-ec1.am.freescale.net> Message-ID: <20090526215455.5BB0C832E416@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 Scott, in message <20090526210046.GA4669@b07421-ec1.am.freescale.net> you wrote: > > IMHO, it is much better for the information on what needs to be run on > init to reside in the file that needs to be called, rather than copied to > a bunch of different arch files. Then you might end up with another maze of #ifdef's... > In what practical case would one arch want to run component X before > component Y, but another want to run component Y before component X? If Boards are different... see for example "lib_ppc/board.c" - on some boards (BAB7xx and CPC45) we must initialize PCI early, while on some others we cannot initialize it that early. > component X is always supposed to come before component Y, that can be > done with different levels of initcalls, or just by arranging the > makefiles appropriately (with a comment warning people not to change it). The problem is that there is no such fix order. It is board dependent. > > 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. > > Initcalls are not the same thing as init code/data (other than the > coincidence that in Linux, they would typically reside in such sections). > > This has nothing to do with memory management. But saving memory was one of j24's arguments? 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 The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5