From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 2 May 2013 12:03:39 -0400 Subject: [U-Boot] [PATCH v3 03/11] net: add Faraday FTMAC110 10/100Mbps ethernet support In-Reply-To: <1366963360-2987-4-git-send-email-dantesu@gmail.com> References: <1366277139-29728-2-git-send-email-dantesu@gmail.com> <1366963360-2987-4-git-send-email-dantesu@gmail.com> Message-ID: <20130502160339.GY25397@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Apr 26, 2013 at 04:02:32PM +0800, Kuo-Jung Su wrote: > From: Kuo-Jung Su [snip] > + | (phyaddr << PHYCR_ADDR_SHIFT) > + | (phyreg << PHYCR_REG_SHIFT) > + | 0x30000000; Magic number. > + > + writel(tmp, ®s->phycr); > + > + for (ts = get_timer(0); get_timer(ts) < 1000; ) { Please define a TIMEOUT and use that insteadof 1000 all the time. [snip] > + /* interrupt at every packet transmit/receive */ > + writel(0x00001010, ®s->itc); > + /* tx/rx poll interval=5.12us; rx_poll_cnt=1 */ > + writel(0x00000001, ®s->aptc); > + /* rx fifo: high=1536, low=512 */ > + writel(0x00000390, ®s->dblac); > + /* clear all interrupt status */ > + writel(0x000003FF, ®s->isr); More magic numbers. Please fix globally. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: