From: Wolfgang Denk Date: Fri, 09 May 2008 23:03:27 +0200 Subject: [U-Boot-Users] [PATCH] Configuration changes for ADS5121 Rev 3 In-Reply-To: Your message of "Tue, 06 May 2008 17:20:39 EDT." <12101088393510-git-send-email-mmarx@silicontkx.com> Message-ID: <20080509210327.2FB8D24764@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 In message <12101088393510-git-send-email-mmarx@silicontkx.com> you wrote: > This includes changes to the ref clock, memory size, > the addition of PCI functionality and Makefile options > to build either the Rev 3 or Rev 2 U-Boot. > The new README explains these options. ... > -ads5121_PCI_config \ > - : unconfig > +ads5121_rev2_config \ > + : unconfig ... > +To configure for the Rev 3.x ADS5121 type > +make ads5121_config > +This will automatically include PCI and the Real Time CLock abilities, > +and set the correct frequency and memory configuration. > + > +To configure for the Rev 2 ADS5121 type > +make ads5121_rev2_config I guess we should invert this handling - I understand that it would be wrong to assume that Rev. 1, Rev. 3, Rev. 4 and all following need the same settings and just Rev. 2 iss the big exception. Isn't it rather vice versa, i. e. Rev. 1 of the board (and probably earlier) need different settings than all later boards? If my assumption is correct, then we should make the current configuration the default, so that only the few customers who use older boards have to specify a special configuration - say "ads5121_rev1_config" or so. > + > diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c > index 8629b03..111245d 100644 > --- a/board/ads5121/ads5121.c > +++ b/board/ads5121/ads5121.c ... > + static uchar buf[1] = {0xbf}; > + > + i2c_set_bus_num(2); > + i2c_write(0x38, 0x8, 1, buf, 1); Please define some nice names instead of using such magic constants without explanation of their meaning. 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 Philosophy: A route of many roads leading from nowhere to nothing. - Ambrose Bierce