From: Wolfgang Denk Date: Tue, 24 Feb 2009 22:34:23 +0100 Subject: [U-Boot] [PATCH 1/7 v4] i2c, dtt: move dtt_init () to board_init_r () In-Reply-To: <1235491846.19570.71.camel@localhost.localdomain> References: <49A3CC46.3000602@denx.de> <1235491846.19570.71.camel@localhost.localdomain> Message-ID: <20090224213423.49607832E43F@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 Peter Tyser, In message <1235491846.19570.71.camel@localhost.localdomain> you wrote: > > Is there a reason we can't just move the dtt_init() call to after > relocation to RAM for both the cases with and without CONFIG_POST > defined? If some POST relies on the temperature sensors being > initialized it seems cleaner to change the POST to run after relocation > than add more ifdefery to common code. The only temperature dependent code I am aware of in the POST context does not make use of the DTT code, so moving DTT initialization after relocation to RAM should not be a problem. > Unconditionally moving dtt_init() to after relocation would also allow > dtt drivers to use global variables, etc (which it just so happens an > lm90-type driver I'm working on requires:). Agreed. 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 inappropriate cannot be beautiful. - Frank Lloyd Wright _The Future of Architecture_ (1953)