From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Schwebel Date: Thu, 6 Mar 2003 09:40:06 +0100 Subject: [U-Boot-Users] I2C Initialization In-Reply-To: <20030306080153.C0832C6E0C@atlas.denx.de> References: <20030306062129.GT16290@pengutronix.de> <20030306080153.C0832C6E0C@atlas.denx.de> Message-ID: <20030306084006.GZ16290@pengutronix.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Mar 06, 2003 at 09:01:48AM +0100, Wolfgang Denk wrote: > I don't understand the problem. i2c_init() is the first I2C related > function that will be called on any system. > > It is implemented in common/soft_i2c.c for the itbanging version and > in cpu/??/i2c.c and cpu/mpc824x/drivers/i2c/i2c1.c for the others. > > > What prevents you from adding it there? > > I don't want to add even more code to the init functions part. Let's > keep the stuff as local as possible. Do we agree that i2c_init_board() has to be called right before (or at the beginning of) i2c_init()? So we have the choice to either add the call to all 12 cpu implementations or only once in the place right before i2c_init() is called. Why make it cpu dependend when it is not? Robert -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Braunschweiger Str. 79, 31134 Hildesheim, Germany Handelsregister: Amtsgericht Hildesheim, HRA 2686 Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4