From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Tue, 01 Dec 2009 11:43:08 +0100 Subject: [U-Boot] [PATCH] ppc: transform init_sequence into a function. In-Reply-To: <20091130232754.393673F6E5@gemini.denx.de> (Wolfgang Denk's message of "Tue, 01 Dec 2009 00:27:54 +0100") References: <1259317926-9820-1-git-send-email-Joakim.Tjernlund@transmode.se> <20091127140634.D41E13F6D6@gemini.denx.de> <20091127201828.3CF70C88C6@gemini.denx.de> <20091130210244.8862D3F6E5@gemini.denx.de> <20091130232754.393673F6E5@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, > Dear Joakim Tjernlund, > > In message you wrote: >> >> > Yes. And all boards that don't need it will suffer from the increased >> > memory footprint. >> >> Sure, but I won't adding these extra call sites as an array of >> fptrs also add size? Since the new function as smaller than the current >> list, I would not be surprised if my function idea is smaller >> in total. Perhaps I am misunderstanding something? >> >> I am just illustrating one way, one that will allow boards >> better control too as then can define this function as they like/need. > > The idea is that boards that want such contrrol can redefine the > whole init sequence list - adding what they really need, and omitting > what they don't. Zero overhead. A little bit late, but reading and pondering on Jockes suggestion, in the meantime I lean somewhat into the direction of Jockes init function. Probably the heaviest argument is that once a board comes along which redefines the whole init list, this will effectively be a snapshot of the then current init-list shuffled around for this specific board. Now when we add more board-independent sub-systems needed initialization, we will always have to remember that there are copies of this pretty central data structure needing to be updated also, which I do not think to be very nice. Moreover, if we have such a central place, when adding stuff, we always now which user may have a problem with new code without going through all board configs. Apart from that, if up to today no board actually did such a redefinition of the whole array, then one could argue that the chances for something like that are pretty slim. And even if such a thing happens, I rather like to see the exception for such a conceptually important thing in a central place rather than a board config file. Just my 0.02 of your favourite currency Detlev -- Some mathematicians become so tense these days that they do not go to sleep during seminars. -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de