From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Sun, 10 May 2009 18:28:52 +0200 Subject: [U-Boot] [PATCH 22/29] cpu/mpc512x/i2c.c: use immr offsets from C struct instead of #define In-Reply-To: <20090510122924.30911832E416@gemini.denx.de> References: <1241898668-11903-1-git-send-email-wd@denx.de> <1241898668-11903-23-git-send-email-wd@denx.de> <4A069233.2080101@denx.de> <20090510122924.30911832E416@gemini.denx.de> Message-ID: <4A0700C4.5040209@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 Hello Wolfgang, Wolfgang Denk wrote: > In message <4A069233.2080101@denx.de> you wrote: >>> -#define immr ((immap_t *)CONFIG_SYS_IMMR) >>> - >>> /* by default set I2C bus 0 active */ >>> static unsigned int bus_num = 0; >> If no other bus then the first needed, when running from Flash, >> its okay for me. > > Actually no I2C is needed while running from flash. In most cases, > I2C will not be touched at all in U-Boot (i. e. only when a user runs > a I2C command). so it is fully ok for me. >>> @@ -222,9 +226,9 @@ void i2c_init (int speed, int saddr) >>> } >>> >>> /* Disable interrupts */ >>> - immr->i2c.icr = 0; >>> + im->i2c.icr = 0; >> shouldn;t we use in/out accessors for this? >> >>> /* Turn off filters */ >>> - immr->i2c.mifr = 0; >>> + im->i2c.mifr = 0; >> here too (and so on) ... > > Yes - as you saw later, I decided to do this in a separate commit. Yep. > Would you prefer if I squashed these commits into one? I can do that, > of course. But I found debugging easier as is now... No it is fine for me, I just sequentially read the EMails, so I saw the patch, which uses the in/out accessors later ;-) Hmm... I think the complete patchseries go through the mpc5xxx custodian, so I only have to ACK this patches, right? bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany