summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/renesas/ravb.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb.h')
-rw-r--r--drivers/net/ethernet/renesas/ravb.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
index 37ad0f8aaf3c..47c5377e4f42 100644
--- a/drivers/net/ethernet/renesas/ravb.h
+++ b/drivers/net/ethernet/renesas/ravb.h
@@ -956,10 +956,6 @@ enum RAVB_QUEUE {
#define RX_BUF_SZ (2048 - ETH_FCS_LEN + sizeof(__sum16))
-/* TX descriptors per packet */
-#define NUM_TX_DESC_GEN2 2
-#define NUM_TX_DESC_GEN3 1
-
struct ravb_tstamp_skb {
struct list_head list;
struct sk_buff *skb;
@@ -983,17 +979,19 @@ struct ravb_ptp {
struct ravb_ptp_perout perout[N_PER_OUT];
};
-enum ravb_chip_id {
- RCAR_GEN2,
- RCAR_GEN3,
-};
-
struct ravb_hw_info {
+ void (*rx_ring_free)(struct net_device *ndev, int q);
+ void (*rx_ring_format)(struct net_device *ndev, int q);
+ void *(*alloc_rx_desc)(struct net_device *ndev, int q);
+ bool (*receive)(struct net_device *ndev, int *quota, int q);
+ void (*set_rate)(struct net_device *ndev);
+ int (*set_rx_csum_feature)(struct net_device *ndev, netdev_features_t features);
+ void (*dmac_init)(struct net_device *ndev);
+ void (*emac_init)(struct net_device *ndev);
const char (*gstrings_stats)[ETH_GSTRING_LEN];
size_t gstrings_size;
netdev_features_t net_hw_features;
netdev_features_t net_features;
- enum ravb_chip_id chip_id;
int stats_len;
size_t max_rx_len;
unsigned aligned_tx: 1;
@@ -1001,6 +999,9 @@ struct ravb_hw_info {
/* hardware features */
unsigned internal_delay:1; /* AVB-DMAC has internal delays */
unsigned tx_counters:1; /* E-MAC has TX counters */
+ unsigned multi_irqs:1; /* AVB-DMAC and E-MAC has multiple irqs */
+ unsigned no_ptp_cfg_active:1; /* AVB-DMAC does not support gPTP active in config mode */
+ unsigned ptp_cfg_active:1; /* AVB-DMAC has gPTP support active in config mode */
};
struct ravb_private {
@@ -1044,7 +1045,6 @@ struct ravb_private {
int msg_enable;
int speed;
int emac_irq;
- enum ravb_chip_id chip_id;
int rx_irqs[NUM_RX_QUEUE];
int tx_irqs[NUM_TX_QUEUE];
@@ -1057,6 +1057,7 @@ struct ravb_private {
unsigned int num_tx_desc; /* TX descriptors per packet */
const struct ravb_hw_info *info;
+ struct reset_control *rstc;
};
static inline u32 ravb_read(struct net_device *ndev, enum ravb_reg reg)