net: macb: add support for C45 MDIO read/write

This patch modify MDIO read/write functions to support
communication with C45 PHY.

Signed-off-by: Milind Parab <mparab@cadence.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Milind Parab
2020-01-09 08:36:46 +00:00
committed by David S. Miller
parent 4a4a52d49d
commit 43ad352dc8
2 changed files with 61 additions and 15 deletions

View File

@@ -630,10 +630,17 @@
#define GEM_CLK_DIV96 5
/* Constants for MAN register */
#define MACB_MAN_SOF 1
#define MACB_MAN_WRITE 1
#define MACB_MAN_READ 2
#define MACB_MAN_CODE 2
#define MACB_MAN_C22_SOF 1
#define MACB_MAN_C22_WRITE 1
#define MACB_MAN_C22_READ 2
#define MACB_MAN_C22_CODE 2
#define MACB_MAN_C45_SOF 0
#define MACB_MAN_C45_ADDR 0
#define MACB_MAN_C45_WRITE 1
#define MACB_MAN_C45_POST_READ_INCR 2
#define MACB_MAN_C45_READ 3
#define MACB_MAN_C45_CODE 2
/* Capability mask bits */
#define MACB_CAPS_ISR_CLEAR_ON_WRITE 0x00000001