tg3: Set the MAC clock to the fastest speed during boot code load
authorNithin Sujir <nsujir@broadcom.com>
Fri, 3 Jan 2014 18:09:13 +0000 (10:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Jan 2014 01:59:52 +0000 (20:59 -0500)
commitf82995b65c44f353358179f4e2745cf967e00b31
treef410f0c640b0eed466a3cc751cb298e25e2d9efb
parente565eec31d9d5b1024311564f6536162df951de4
tg3: Set the MAC clock to the fastest speed during boot code load

On the 5717, 5718 and 5719 devices, the bootcode runs slower when any
port doesn't have a link due to clock speed slowing down as part of the
link-aware feature. This leads to the driver timing out waiting for the
bootcode signature.

This patch overrides the clock policy to the highest frequency just before
reset and restores it after the bootcode is up.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/broadcom/tg3.h