From: Graeme Russ Date: Mon, 21 Sep 2009 11:37:44 +1000 Subject: [U-Boot] [PATCH 3/6] sbc8548: use I/O accessors In-Reply-To: <4b92f833dfac8470519a71aee9833c0c67edadbf.1253492532.git.paul.gortmaker@windriver.com> References: <1253493366-26427-1-git-send-email-paul.gortmaker@windriver.com> <4b92f833dfac8470519a71aee9833c0c67edadbf.1253492532.git.paul.gortmaker@windriver.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Sep 21, 2009 at 10:36 AM, Paul Gortmaker wrote: > Sweep throught the board specific file and replace the various > register proddings with the equivalent I/O accessors. > > Signed-off-by: Paul Gortmaker > --- > > - ecm->eedr = 0xffffffff; /* clear ecm errors */ > - ecm->eeer = 0xffffffff; /* enable ecm errors */ > + out_be32(&ecm->eedr, 0xffffffff); /* clear ecm errors */ > + out_be32(&ecm->eeer, 0xffffffff); /* enable ecm errors */ > return 0; Correct me if I'm wrong, but I thought the general rule was the other way (i.e. the way it alreay was). See for example: http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commit;h=ed7a1b681de1e31d18d5b92e2767ae8df3241687 This prevents, for example, accidentally writing words and longs to byte sized registers. Regards, G