[U-Boot] [PATCH v3 03/11] net: add Faraday FTMAC110 10/100Mbps ethernet support

Kuo-Jung Su
2013-05-03T06:01:30Z

2013/5/3 Tom Rini <trini@ti.com>:
> On Fri, Apr 26, 2013 at 04:02:32PM +0800, Kuo-Jung Su wrote:
>
>> From: Kuo-Jung Su <dantesu@faraday-tech.com>
> [snip]
>> + | (phyaddr << PHYCR_ADDR_SHIFT)
>> + | (phyreg << PHYCR_REG_SHIFT)
>> + | 0x30000000;
>
> Magic number.
>
It's the HW debug function, it would be removed at next version.

>> +
>> + writel(tmp, &regs->phycr);
>> +
>> + for (ts = get_timer(0); get_timer(ts) < 1000; ) {
>
> Please define a TIMEOUT and use that insteadof 1000 all the time.
>

Got it, thanks

> [snip]
>> + /* interrupt at every packet transmit/receive */
>> + writel(0x00001010, &regs->itc);
>> + /* tx/rx poll interval=5.12us; rx_poll_cnt=1 */
>> + writel(0x00000001, &regs->aptc);
>> + /* rx fifo: high=1536, low=512 */
>> + writel(0x00000390, &regs->dblac);
>> + /* clear all interrupt status */
>> + writel(0x000003FF, &regs->isr);
>
> More magic numbers. Please fix globally. Thanks!
>

Got it, thanks

> --
> Tom

--
Best wishes,
Kuo-Jung Su