
25 Aug
2011
25 Aug
'11
2:15 p.m.
On Thursday, August 25, 2011 07:21:25 AM Ajay Bhargav wrote:
----- "Marek Vasut" marek.vasut@gmail.com wrote:
On Wednesday, August 24, 2011 03:07:18 PM Ajay Bhargav wrote:
This patch adds support for Fast Ethernet Controller driver for Armada100 series.
Signed-off-by: Ajay Bhargav ajay.bhargav@einfochips.com
[...]
[...]
+static int armdfec_phy_timeout(u32 reg, u32 flag, int cond) +{
- u32 timeout = PHY_WAIT_ITERATIONS;
- while (--timeout) {
if (cond && (readl(reg) & flag))
break;
else if (!cond && !(readl(reg) & flag))
You can read the register into some temporary variable so you don't need the readl() at two places.
readl will be called only once... do i really need a temp var?
I think it'll help the readability a bit.
Cheers