From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Wed, 12 Feb 2014 15:27:58 +0100 Subject: [U-Boot] [PATCH] driver/mxc_i2c: Move static data structure to global_data In-Reply-To: <52FAA233.6090403@freescale.com> References: <1392069772-24742-1-git-send-email-yorksun@freescale.com> <52F98C18.7020402@freescale.com> <52FA7915.8000307@boundarydevices.com> <52FA7DFD.5060406@freescale.com> <20140211195918.69BCE38032B@gemini.denx.de> <52FA8205.1090206@freescale.com> <20140211205708.A76B0380439@gemini.denx.de> <52FA8FDB.3030808@freescale.com> <20140211221226.6042538032B@gemini.denx.de> <52FAA233.6090403@freescale.com> Message-ID: <20140212142758.94723380601@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 York, In message <52FAA233.6090403@freescale.com> you wrote: > > > Well, after relocation GD has also been relocated, so your SRAM would > > be comletely unused. > > Sounds like you are OK with using GD for this patch. Let's wait to hear from > Tom. He nacked this idea. I don't say I think this is a good change. I just tried to explain to you that the SRAM will be unused after relocation completed. Tom probably has the same problem as I: I cannot understand why you are changing the code. If it's been working as is before, then why would it stop now? > -/* > - * For SPL boot some boards need i2c before SDRAM is initialized so force > - * variables to live in SRAM > - */ > -static struct sram_data __attribute__((section(".data"))) srdata; > - > > I moved this variable into GD. Is there a alternative way to do it? I tried to > use stack but didn't find the solution. But why did you move it? It was working before, right? So what has changed, and why cannot you fix it in a way so the variable remains where it is, i. e. without the need to move it to GD? 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 Certainly there are things in life that money can't buy, but it's very funny - Did you ever try buying them without money? - Ogden Nash