mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-06 09:21:26 +01:00
drivers: net: ipq: Optimize mdio read/write
This patch removes the redundant udelay's and ipq_mdio_wait_busy calls which in turn reduces the overall AQ FW Load time. Change-Id: I31f3a940d743528ed212e8cccab522ac249a5a5a Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
This commit is contained in:
parent
258a568873
commit
088df08ece
1 changed files with 0 additions and 8 deletions
|
|
@ -29,14 +29,11 @@ static int ipq_mdio_wait_busy(void)
|
|||
int i;
|
||||
u32 busy;
|
||||
for (i = 0; i < IPQ_MDIO_RETRY; i++) {
|
||||
udelay(IPQ_MDIO_DELAY);
|
||||
busy = readl(IPQ_MDIO_BASE +
|
||||
MDIO_CTRL_4_REG) &
|
||||
MDIO_CTRL_4_ACCESS_BUSY;
|
||||
|
||||
if (!busy)
|
||||
return 0;
|
||||
udelay(IPQ_MDIO_DELAY);
|
||||
}
|
||||
printf("%s: MDIO operation timed out\n",
|
||||
__func__);
|
||||
|
|
@ -46,9 +43,6 @@ static int ipq_mdio_wait_busy(void)
|
|||
int ipq_mdio_write(int mii_id, int regnum, u16 value)
|
||||
{
|
||||
u32 cmd;
|
||||
if (ipq_mdio_wait_busy())
|
||||
return -ETIMEDOUT;
|
||||
|
||||
|
||||
if (regnum & MII_ADDR_C45) {
|
||||
unsigned int mmd = (regnum >> 16) & 0x1F;
|
||||
|
|
@ -100,8 +94,6 @@ int ipq_mdio_write(int mii_id, int regnum, u16 value)
|
|||
int ipq_mdio_read(int mii_id, int regnum, ushort *data)
|
||||
{
|
||||
u32 val,cmd;
|
||||
if (ipq_mdio_wait_busy())
|
||||
return -ETIMEDOUT;
|
||||
|
||||
if (regnum & MII_ADDR_C45) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue