From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Mon, 10 Feb 2014 14:28:01 -0800 Subject: [U-Boot] [PATCH] driver/mxc_i2c: Move static data structure to global_data In-Reply-To: <20140210221031.GD7049@bill-the-cat> References: <1392069772-24742-1-git-send-email-yorksun@freescale.com> <20140210221031.GD7049@bill-the-cat> Message-ID: <52F95271.6030006@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 On 02/10/2014 02:10 PM, Tom Rini wrote: > On Mon, Feb 10, 2014 at 02:02:52PM -0800, York Sun wrote: > >> This driver needs a data structure in SRAM before SDRAM is available. >> This is not alway the case using .data section. Moving this data >> structure to global_data guarantees it is writable. >> >> Signed-off-by: York Sun >> CC: Troy Kisky > > If you need something in SRAM then you need to place it in that section, > see arch/arm/cpu/armv7/am33xx/u-boot-spl.lds for example > I am not sure if it is a similar situation. But anyway, I am open to suggestions. For this driver, the variable needs to be writable. I guess it wasn't a problem for existing platforms which probably call this driver after relocation. Does the SRAM code/data relocate to SDRAM? I don't want this variable to stay in SRAM once u-boot relocates to normal memory. York