aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8216.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-01-24 19:42:01 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-01-24 19:42:01 +0000
commit95e0b242c20cd8fe135e989cdad76405d38cca25 (patch)
treebb9060a460bcd8e6fe0ceba07c2b4f70604dc75f /target/linux/generic/files/drivers/net/phy/ar8216.h
parentf04feb379921c826b6034c831e8a5aed01525f9e (diff)
downloadmaster-187ad058-95e0b242c20cd8fe135e989cdad76405d38cca25.tar.gz
master-187ad058-95e0b242c20cd8fe135e989cdad76405d38cca25.tar.bz2
master-187ad058-95e0b242c20cd8fe135e989cdad76405d38cca25.zip
ar8216: decrease page switch wait time
Until a few years ago the page switch wait time was set to msleep(1) what was changed to usleep_range(1000, 2000) later. I can not imagine that a low-level operation like switching page on register level takes so much time. Most likely the value of 1ms was initially set to check whether it fixes an issue and then remained w/o further checking whether also a smaller value would be sufficient. Now the wait time is set to 5us and I successfully tested this on AR8327. IMHO 5us should be plenty of time for all supported chips. However I couldn't test this due to missing hardware. If other chips should need a longer wait time we can add the wait time as a parameter to the ar8xxx_chip struct. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44103 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8216.h')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 2d025ae835..77df506256 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -555,4 +555,10 @@ ar8xxx_reg_clear(struct ar8xxx_priv *priv, int reg, u32 val)
ar8xxx_rmw(priv, reg, val, 0);
}
+static inline void
+wait_for_page_switch(void)
+{
+ udelay(5);
+}
+
#endif