From: Kim Phillips Date: Tue, 17 Feb 2009 19:22:33 -0600 Subject: [U-Boot] [PATCH 03/12] 83xx, kmeter1: add I2C, dtt, eeprom support In-Reply-To: <499A532B.5030301@denx.de> References: <4993182D.2030003@denx.de> <20090216193614.1fe95a7e.kim.phillips@freescale.com> <499A532B.5030301@denx.de> Message-ID: <20090217192233.03b27dd7.kim.phillips@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 Tue, 17 Feb 2009 07:03:23 +0100 Heiko Schocher wrote: > Hello Kim, Hello Heiko, > Kim Phillips wrote: > > On Wed, 11 Feb 2009 19:25:49 +0100 > > Heiko Schocher wrote: > >> /* switch to correct I2C bus */ > >> old_bus = I2C_GET_BUS(); > >> - I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM); > >> + if ((gd->flags & GD_FLG_RELOC) != GD_FLG_RELOC) { > >> + uchar *tmp = (uchar *)getenv("dtt_bus"); > > > > sorry Heiko, I should have asked you before: this is a hardcoded > > environment variable in driver code, does the dtt bus value change > > between boots? If not, what's the reason the value isn't specified as > > a CONFIG_SYS_DTT_BUS_NUM? > > It changes not between boots, but between different hardware. so why not make it a CONFIG_SYS_DTT_BUS_NUM instead of permanently polluting environment namespace. That's what the rest of the boards that use this DTT code do; what makes the kmeter1 special in this regard? Because CONFIG_SYS_DTT_BUS_NUM is not just a single number? In that case we can make CONFIG_SYS_DTT_BUS_REF or something (not sure if that's a good enough name). Kim