diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-03-09 17:22:54 +0100 |
---|---|---|
committer | Jamie Iles <jamie@jamieiles.com> | 2011-11-22 16:21:18 +0100 |
commit | 70c9f3d4372ffa90775603e9c4e055a26a9b83e1 (patch) | |
tree | 8aa2e511bbd307b14f6f88c8ccf9680e887f378f /drivers/net/ethernet/cadence/macb.h | |
parent | macb: initial support for Cadence GEM (diff) | |
download | linux-70c9f3d4372ffa90775603e9c4e055a26a9b83e1.tar.xz linux-70c9f3d4372ffa90775603e9c4e055a26a9b83e1.zip |
macb: support higher rate GEM MDIO clock divisors
GEM devices support larger clock divisors and have a different
range of divisors. Program the MDIO clock divisors based on the
device type.
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.h')
-rw-r--r-- | drivers/net/ethernet/cadence/macb.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index d50057c244b2..354ed8f77884 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -135,6 +135,9 @@ #define MACB_IRXFCS_OFFSET 19 #define MACB_IRXFCS_SIZE 1 +/* GEM specific NCFGR bitfields. */ +#define GEM_CLK_OFFSET 18 +#define GEM_CLK_SIZE 3 /* Bitfields in NSR */ #define MACB_NSR_LINK_OFFSET 0 #define MACB_NSR_LINK_SIZE 1 @@ -249,6 +252,14 @@ #define MACB_CLK_DIV32 2 #define MACB_CLK_DIV64 3 +/* GEM specific constants for CLK. */ +#define GEM_CLK_DIV8 0 +#define GEM_CLK_DIV16 1 +#define GEM_CLK_DIV32 2 +#define GEM_CLK_DIV48 3 +#define GEM_CLK_DIV64 4 +#define GEM_CLK_DIV96 5 + /* Constants for MAN register */ #define MACB_MAN_SOF 1 #define MACB_MAN_WRITE 1 |