summaryrefslogtreecommitdiff
path: root/drivers/qe
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/qe')
-rw-r--r--drivers/qe/uccf.h1
-rw-r--r--drivers/qe/uec.h4
-rw-r--r--drivers/qe/uec_phy.c15
3 files changed, 18 insertions, 2 deletions
diff --git a/drivers/qe/uccf.h b/drivers/qe/uccf.h
index 1ff9e1d..2404c6a 100644
--- a/drivers/qe/uccf.h
+++ b/drivers/qe/uccf.h
@@ -25,6 +25,7 @@
#include "common.h"
#include "qe.h"
+#include "asm/immap_qe.h"
/* Fast or Giga ethernet
*/
diff --git a/drivers/qe/uec.h b/drivers/qe/uec.h
index 1568310..febfbce 100644
--- a/drivers/qe/uec.h
+++ b/drivers/qe/uec.h
@@ -23,6 +23,9 @@
#ifndef __UEC_H__
#define __UEC_H__
+#include "qe.h"
+#include "uccf.h"
+
#define MAX_TX_THREADS 8
#define MAX_RX_THREADS 8
#define MAX_TX_QUEUES 8
@@ -670,6 +673,7 @@ typedef enum enet_interface {
ENET_1000_RGMII,
ENET_1000_RGMII_ID,
ENET_1000_RGMII_RXID,
+ ENET_1000_RGMII_TXID,
ENET_1000_TBI,
ENET_1000_RTBI,
ENET_1000_SGMII
diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c
index aa4eb5e..9715183 100644
--- a/drivers/qe/uec_phy.c
+++ b/drivers/qe/uec_phy.c
@@ -429,12 +429,23 @@ static int marvell_init(struct uec_mii_info *mii_info)
{
struct eth_device *edev = mii_info->dev;
uec_private_t *uec = edev->priv;
+ enum enet_interface iface = uec->uec_info->enet_interface;
- if (uec->uec_info->enet_interface == ENET_1000_RGMII_ID) {
+ if (iface == ENET_1000_RGMII_ID ||
+ iface == ENET_1000_RGMII_RXID ||
+ iface == ENET_1000_RGMII_TXID) {
int temp;
temp = phy_read(mii_info, MII_M1111_PHY_EXT_CR);
- temp |= (MII_M1111_RX_DELAY | MII_M1111_TX_DELAY);
+ if (iface == ENET_1000_RGMII_ID) {
+ temp |= MII_M1111_RX_DELAY | MII_M1111_TX_DELAY;
+ } else if (iface == ENET_1000_RGMII_RXID) {
+ temp &= ~MII_M1111_TX_DELAY;
+ temp |= MII_M1111_RX_DELAY;
+ } else if (iface == ENET_1000_RGMII_TXID) {
+ temp &= ~MII_M1111_RX_DELAY;
+ temp |= MII_M1111_TX_DELAY;
+ }
phy_write(mii_info, MII_M1111_PHY_EXT_CR, temp);
temp = phy_read(mii_info, MII_M1111_PHY_EXT_SR);