]> Git Repo - u-boot.git/commitdiff
net: macb: add support for faster clk rates
authorRamon Fried <[email protected]>
Tue, 16 Jul 2019 19:04:32 +0000 (22:04 +0300)
committerJoe Hershberger <[email protected]>
Thu, 25 Jul 2019 18:13:30 +0000 (13:13 -0500)
add support for clock rates higher than 2.4Mhz

Signed-off-by: Ramon Fried <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Tested-by: Anup Patel <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
drivers/net/macb.c
drivers/net/macb.h

index 0032d4e0002d266ae86b3a50dc8c0230e074e972..0fed43bbe2ac377bdd7e8d087530667b915b0e48 100644 (file)
@@ -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;
 }
index 8966c793a7355dddf96d6ee77cb21d3ea4fc4860..9b16383eba469f56cd4a973677e29634f2d11d50 100644 (file)
 #define GEM_CLK_DIV48                          3
 #define GEM_CLK_DIV64                          4
 #define GEM_CLK_DIV96                          5
+#define GEM_CLK_DIV128                         6
+#define GEM_CLK_DIV224                         7
 
 /* Constants for MAN register */
 #define MACB_MAN_SOF                           1
This page took 0.036124 seconds and 4 git commands to generate.