for (i = 0; i < plat->rx_queues_to_use; i++) {
plat->rx_queues_cfg[i].mode_to_use = MTL_QUEUE_DCB;
- plat->rx_queues_cfg[i].chan = i;
/* Disable Priority config by default */
plat->rx_queues_cfg[i].use_prio = false;
struct plat_stmmacenet_data *stmmac_plat_dat_alloc(struct device *dev)
{
struct plat_stmmacenet_data *plat_dat;
+ int i;
plat_dat = devm_kzalloc(dev, sizeof(*plat_dat), GFP_KERNEL);
if (!plat_dat)
plat_dat->tx_queues_to_use = 1;
plat_dat->rx_queues_to_use = 1;
+ /* Setup the default RX queue channel map */
+ for (i = 0; i < ARRAY_SIZE(plat_dat->rx_queues_cfg); i++)
+ plat_dat->rx_queues_cfg[i].chan = i;
+
return plat_dat;
}
EXPORT_SYMBOL_GPL(stmmac_plat_dat_alloc);
plat->rx_queues_cfg[i].use_prio = false;
plat->rx_queues_cfg[i].mode_to_use = MTL_QUEUE_DCB;
plat->rx_queues_cfg[i].pkt_route = 0x0;
- plat->rx_queues_cfg[i].chan = i;
}
plat->bus_id = 1;
else
plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB;
- if (of_property_read_u32(q_node, "snps,map-to-dma-channel",
- &plat->rx_queues_cfg[queue].chan))
- plat->rx_queues_cfg[queue].chan = queue;
+ of_property_read_u32(q_node, "snps,map-to-dma-channel",
+ &plat->rx_queues_cfg[queue].chan);
/* TODO: Dynamic mapping to be included in the future */
if (of_property_read_u32(q_node, "snps,priority",