From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Mon, 21 Jul 2008 15:31:29 -0500 Subject: [U-Boot-Users] [PATCH] fsl-i2c: fix writes to data segment before relocation In-Reply-To: <4884F1A0.8000707@ovro.caltech.edu> References: <1216668383-17967-1-git-send-email-timur@freescale.com> <4884F1A0.8000707@ovro.caltech.edu> Message-ID: <4884F221.3070808@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de David Hawkins wrote: > Hi Timur, > >> - i2c_bus_speed[0] = set_i2c_bus_speed(dev, gd->i2c1_clk, speed); >> + temp = set_i2c_bus_speed(dev, gd->i2c1_clk, speed); >> + if (gd->flags & GD_FLG_RELOC) >> + i2c_bus_speed[0] = temp; > > Does i2c_init() get called again after relocation? Yes. > I guess in some cases a board with fixed DDR would not > need to initialize the I2C controller until after > relocation. We're okay then, too. > If you need I2C speed tracking code, why not just re-read > the I2C controller registers, and determine the speed from > there? That is independent of relocation. I suppose we could do that. I was planning on rewriting the I2C subsystem one day, anyway. -- Timur Tabi Linux kernel developer at Freescale