diff options
author | Ramon Fried <rfried.dev@gmail.com> | 2019-07-16 22:04:32 +0300 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2019-07-25 13:13:30 -0500 |
commit | 9e65f80ec9943790891a533dc8996d9d97a18cc6 (patch) | |
tree | 96bd4455882745314786f22405676a667cf8735e /drivers/net/macb.c | |
parent | 6c636514d4997eaf6aef806c68570b3a41e4df74 (diff) | |
download | u-boot-9e65f80ec9943790891a533dc8996d9d97a18cc6.tar.gz |
net: macb: add support for faster clk rates
add support for clock rates higher than 2.4Mhz
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Tested-by: Anup Patel <anup.patel@wdc.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 0032d4e000..0fed43bbe2 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -903,8 +903,12 @@ static u32 gem_mdc_clk_div(int id, struct macb_device *macb) config = GEM_BF(CLK, GEM_CLK_DIV48); else if (macb_hz < 160000000) config = GEM_BF(CLK, GEM_CLK_DIV64); - else + else if (macb_hz < 240000000) config = GEM_BF(CLK, GEM_CLK_DIV96); + else if (macb_hz < 320000000) + config = GEM_BF(CLK, GEM_CLK_DIV128); + else + config = GEM_BF(CLK, GEM_CLK_DIV224); return config; } |