From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 25 Aug 2011 10:13:58 -0400 Subject: [U-Boot] [PATCH v2 1/3] net: Adds Fast Ethernet Controller driver for Armada100 In-Reply-To: <1611119015.375.1314249030501.JavaMail.root@ahm.einfochips.com> References: <1611119015.375.1314249030501.JavaMail.root@ahm.einfochips.com> Message-ID: <201108251013.59887.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, August 25, 2011 01:10:30 Ajay Bhargav wrote: > ----- "Mike Frysinger" wrote: > > On Wednesday, August 24, 2011 09:07:18 Ajay Bhargav wrote: > > > + /* Read mac from env if available */ > > > + eth_getenv_enetaddr("ethaddr", dev->enetaddr); > > > > you shouldnt need to do this. the higher layers will take care of > > this for > > you when you set write_hwaddr > > I do not have a hardware storage for MAC on my controller. write_hwaddr > is not needed for me. ok, but you should not be touching dev->enetaddr in your registration function. the main net/eth.c:eth_initialize() takes care of this for you. > > > +int armada100_fec_initialize() > > > +{ > > > ... > > > + darmdfec->regs = (void *) ARMD1_FEC_BASE; > > > > make the reg base a parameter to armada100_fec_initialize() > > This driver is for Armada100 series and base address is same for > the whole series, so i did not feel passing it as a parameter. Can > you please tell me if there is any specific reason for the same? drivers should be written for the IP they control, not for specific SoCs or boards. and what people often start off with "this SoC only has one MAC so screw multi-instance" quite frequently turns into "this next SoC supports multiple MACs!". i'm not familiar with the Armada100, or the MAC IP that is in that SoC, but this story repeats itself constantly in the SoC world because people focus on the one specific SoC they have in their hand and not the bigger picture. simply witness the ARM hell that Linux is currently in and is being cleaned up through the Linaro organization. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110825/1bb6d465/attachment.pgp