aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar.h')
-rw-r--r--drivers/net/gianfar.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index ac4a92e08c09..710810e2adb4 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -1025,6 +1025,12 @@ struct gfar_priv_grp {
1025 char int_name_er[GFAR_INT_NAME_MAX]; 1025 char int_name_er[GFAR_INT_NAME_MAX];
1026}; 1026};
1027 1027
1028enum gfar_errata {
1029 GFAR_ERRATA_74 = 0x01,
1030 GFAR_ERRATA_76 = 0x02,
1031 GFAR_ERRATA_A002 = 0x04,
1032};
1033
1028/* Struct stolen almost completely (and shamelessly) from the FCC enet source 1034/* Struct stolen almost completely (and shamelessly) from the FCC enet source
1029 * (Ok, that's not so true anymore, but there is a family resemblence) 1035 * (Ok, that's not so true anymore, but there is a family resemblence)
1030 * The GFAR buffer descriptors track the ring buffers. The rx_bd_base 1036 * The GFAR buffer descriptors track the ring buffers. The rx_bd_base
@@ -1049,6 +1055,7 @@ struct gfar_private {
1049 struct device_node *node; 1055 struct device_node *node;
1050 struct net_device *ndev; 1056 struct net_device *ndev;
1051 struct of_device *ofdev; 1057 struct of_device *ofdev;
1058 enum gfar_errata errata;
1052 1059
1053 struct gfar_priv_grp gfargrp[MAXGROUPS]; 1060 struct gfar_priv_grp gfargrp[MAXGROUPS];
1054 struct gfar_priv_tx_q *tx_queue[MAX_TX_QS]; 1061 struct gfar_priv_tx_q *tx_queue[MAX_TX_QS];
@@ -1111,6 +1118,12 @@ struct gfar_private {
1111extern unsigned int ftp_rqfpr[MAX_FILER_IDX + 1]; 1118extern unsigned int ftp_rqfpr[MAX_FILER_IDX + 1];
1112extern unsigned int ftp_rqfcr[MAX_FILER_IDX + 1]; 1119extern unsigned int ftp_rqfcr[MAX_FILER_IDX + 1];
1113 1120
1121static inline int gfar_has_errata(struct gfar_private *priv,
1122 enum gfar_errata err)
1123{
1124 return priv->errata & err;
1125}
1126
1114static inline u32 gfar_read(volatile unsigned __iomem *addr) 1127static inline u32 gfar_read(volatile unsigned __iomem *addr)
1115{ 1128{
1116 u32 val; 1129 u32 val;