* @num_queues: Total number of DMA queues
* @dq: DMA queues data
* @is_tsn: Denotes a tsn port
+ * @num_q: Denotes number of queue in current TSN design
* @temac_no: Denotes the port number in TSN IP
* @timer_priv: PTP timer private data pointer
* @ptp_tx_irq: PTP tx irq
u16 num_queues; /* Number of DMA queues */
struct axienet_dma_q *dq[XAE_MAX_QUEUES]; /* DAM queue data*/
bool is_tsn;
+#ifdef CONFIG_XILINX_TSN
+ int num_q;
#ifdef CONFIG_XILINX_TSN_PTP
void *timer_priv;
int ptp_tx_irq;
struct sk_buff_head ptp_txq;
struct work_struct tx_tstamp_work;
spinlock_t ptp_tx_lock; /* TSN PTP tx lock*/
+#endif
#endif
int eth_irq;
u32 phy_type;
}
#ifdef CONFIG_XILINX_TSN
+ of_property_read_u32(pdev->dev.of_node, "xlnx,num-queue", &lp->num_q);
+ pr_info("Number of TSN priority queues: %d\n", lp->num_q);
+
slave = of_property_read_bool(pdev->dev.of_node,
"xlnx,tsn-slave");
if (slave)
{
struct axienet_local *lp = netdev_priv(ndev);
int i;
+ unsigned int acl_bit_map = 0;
u32 u_config_change = 0;
u8 port = qbv->port;
/* program each list */
for (i = 0; i < qbv->list_length; i++) {
+ acl_bit_map = qbv->acl_gate_state[i];
+ if ((lp->num_q == 2) && (acl_bit_map == 4)) /* for 2 quese ST */
+ acl_bit_map = 2;
axienet_iow(lp, ADMIN_CTRL_LIST(port, i),
- (qbv->acl_gate_state[i] & (ACL_GATE_STATE_MASK)) <<
+ (acl_bit_map & (ACL_GATE_STATE_MASK)) <<
ACL_GATE_STATE_SHIFT);
/* set the time for each entry */