From: Wolfgang Denk Date: Wed, 07 Sep 2011 22:26:35 +0200 Subject: [U-Boot] [PATCH 4/8] net: emaclite: Remove baseaddress from xemaclite In-Reply-To: <1314362843-18214-4-git-send-email-monstr@monstr.eu> References: <1314362843-18214-1-git-send-email-monstr@monstr.eu> <1314362843-18214-2-git-send-email-monstr@monstr.eu> <1314362843-18214-3-git-send-email-monstr@monstr.eu> <1314362843-18214-4-git-send-email-monstr@monstr.eu> Message-ID: <20110907202635.D78A0140875B@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 Michal Simek, In message <1314362843-18214-4-git-send-email-monstr@monstr.eu> you wrote: > Use dev->iobase instead of baseaddress. > > Signed-off-by: Michal Simek ... > - out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET, 0); > + out_be32 (dev->iobase + XEL_TSR_OFFSET, 0); > /* Copy MAC address */ > xemaclite_alignedwrite (dev->enetaddr, > - emaclite.baseaddress, ENET_ADDR_LENGTH); > + dev->iobase, ENET_ADDR_LENGTH); > /* Set the length */ > - out_be32 (emaclite.baseaddress + XEL_TPLR_OFFSET, ENET_ADDR_LENGTH); > + out_be32 (dev->iobase + XEL_TPLR_OFFSET, ENET_ADDR_LENGTH); > /* Update the MAC address in the EMAC Lite */ > - out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET, XEL_TSR_PROG_MAC_ADDR); > + out_be32 (dev->iobase + XEL_TSR_OFFSET, XEL_TSR_PROG_MAC_ADDR); > /* Wait for EMAC Lite to finish with the MAC address update */ > - while ((in_be32 (emaclite.baseaddress + XEL_TSR_OFFSET) & > + while ((in_be32 (dev->iobase + XEL_TSR_OFFSET) & > XEL_TSR_PROG_MAC_ADDR) != 0) ; I'll accept this for now as you are not adding this code new, but please note that all this should be cleaned up and converted into C structs instead of base + offset. 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 There is, however, a strange, musty smell in the air that reminds me of something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. - Larry Wall in Configure from the perl distribution