Commit 9e65f80ec9943790891a533dc8996d9d97a18cc6

Authored by Ramon Fried
Committed by Joe Hershberger
1 parent 6c636514d4

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>

Showing 2 changed files with 7 additions and 1 deletions Side-by-side Diff

... ... @@ -903,8 +903,12 @@
903 903 config = GEM_BF(CLK, GEM_CLK_DIV48);
904 904 else if (macb_hz < 160000000)
905 905 config = GEM_BF(CLK, GEM_CLK_DIV64);
906   - else
  906 + else if (macb_hz < 240000000)
907 907 config = GEM_BF(CLK, GEM_CLK_DIV96);
  908 + else if (macb_hz < 320000000)
  909 + config = GEM_BF(CLK, GEM_CLK_DIV128);
  910 + else
  911 + config = GEM_BF(CLK, GEM_CLK_DIV224);
908 912  
909 913 return config;
910 914 }
... ... @@ -613,6 +613,8 @@
613 613 #define GEM_CLK_DIV48 3
614 614 #define GEM_CLK_DIV64 4
615 615 #define GEM_CLK_DIV96 5
  616 +#define GEM_CLK_DIV128 6
  617 +#define GEM_CLK_DIV224 7
616 618  
617 619 /* Constants for MAN register */
618 620 #define MACB_MAN_SOF 1