Lines Matching refs:gwca

122 		iowrite32(BIT(priv->gwca.index), priv->addr + FWPBFC(i));  in rswitch_fwd_init()
126 iowrite32(FWPC0_DEFAULT, priv->addr + FWPC0(priv->gwca.index)); in rswitch_fwd_init()
127 iowrite32(FWPC1_DDE, priv->addr + FWPC1(priv->gwca.index)); in rswitch_fwd_init()
128 iowrite32(0, priv->addr + FWPBFC(priv->gwca.index)); in rswitch_fwd_init()
129 iowrite32(GENMASK(RSWITCH_NUM_PORTS - 1, 0), priv->addr + FWPBFC(priv->gwca.index)); in rswitch_fwd_init()
138 if (!rswitch_agent_clock_is_enabled(priv->addr, priv->gwca.index)) in rswitch_gwca_change_mode()
139 rswitch_agent_clock_ctrl(priv->addr, priv->gwca.index, 1); in rswitch_gwca_change_mode()
146 rswitch_agent_clock_ctrl(priv->addr, priv->gwca.index, 0); in rswitch_gwca_change_mode()
167 u32 *mask = tx ? priv->gwca.tx_irq_bits : priv->gwca.rx_irq_bits; in rswitch_is_any_data_irq()
285 struct rswitch_gwca_queue *gq = &priv->gwca.ts_queue; in rswitch_gwca_ts_queue_free()
326 priv->gwca.tx_irq_bits[i] |= bit; in rswitch_gwca_queue_alloc()
328 priv->gwca.rx_irq_bits[i] |= bit; in rswitch_gwca_queue_alloc()
378 linkfix = &priv->gwca.linkfix_table[gq->index]; in rswitch_gwca_queue_format()
402 struct rswitch_gwca_queue *gq = &priv->gwca.ts_queue; in rswitch_gwca_ts_queue_fill()
476 linkfix = &priv->gwca.linkfix_table[gq->index]; in rswitch_gwca_queue_ext_ts_format()
489 int i, num_queues = priv->gwca.num_queues; in rswitch_gwca_linkfix_alloc()
490 struct rswitch_gwca *gwca = &priv->gwca; in rswitch_gwca_linkfix_alloc() local
493 gwca->linkfix_table_size = sizeof(struct rswitch_desc) * num_queues; in rswitch_gwca_linkfix_alloc()
494 gwca->linkfix_table = dma_alloc_coherent(dev, gwca->linkfix_table_size, in rswitch_gwca_linkfix_alloc()
495 &gwca->linkfix_table_dma, GFP_KERNEL); in rswitch_gwca_linkfix_alloc()
496 if (!gwca->linkfix_table) in rswitch_gwca_linkfix_alloc()
499 gwca->linkfix_table[i].die_dt = DT_EOS; in rswitch_gwca_linkfix_alloc()
506 struct rswitch_gwca *gwca = &priv->gwca; in rswitch_gwca_linkfix_free() local
508 if (gwca->linkfix_table) in rswitch_gwca_linkfix_free()
509 dma_free_coherent(&priv->pdev->dev, gwca->linkfix_table_size, in rswitch_gwca_linkfix_free()
510 gwca->linkfix_table, gwca->linkfix_table_dma); in rswitch_gwca_linkfix_free()
511 gwca->linkfix_table = NULL; in rswitch_gwca_linkfix_free()
516 struct rswitch_gwca_queue *gq = &priv->gwca.ts_queue; in rswitch_gwca_ts_queue_alloc()
531 INIT_LIST_HEAD(&priv->gwca.ts_info_list); in rswitch_gwca_ts_queue_alloc()
541 index = find_first_zero_bit(priv->gwca.used, priv->gwca.num_queues); in rswitch_gwca_get()
542 if (index >= priv->gwca.num_queues) in rswitch_gwca_get()
544 set_bit(index, priv->gwca.used); in rswitch_gwca_get()
545 gq = &priv->gwca.queues[index]; in rswitch_gwca_get()
555 clear_bit(gq->index, priv->gwca.used); in rswitch_gwca_put()
647 iowrite32(lower_32_bits(priv->gwca.linkfix_table_dma), priv->addr + GWDCBAC1); in rswitch_gwca_hw_init()
648 iowrite32(upper_32_bits(priv->gwca.linkfix_table_dma), priv->addr + GWDCBAC0); in rswitch_gwca_hw_init()
649 iowrite32(lower_32_bits(priv->gwca.ts_queue.ring_dma), priv->addr + GWTDCAC10); in rswitch_gwca_hw_init()
650 iowrite32(upper_32_bits(priv->gwca.ts_queue.ring_dma), priv->addr + GWTDCAC00); in rswitch_gwca_hw_init()
855 for (i = 0; i < priv->gwca.num_queues; i++) { in rswitch_data_irq()
856 gq = &priv->gwca.queues[i]; in rswitch_data_irq()
915 struct rswitch_gwca_queue *gq = &priv->gwca.ts_queue; in rswitch_ts()
930 list_for_each_entry_safe(ts_info, ts_info2, &priv->gwca.ts_info_list, list) { in rswitch_ts()
1481 list_for_each_entry_safe(ts_info, ts_info2, &rdev->priv->gwca.ts_info_list, list) { in rswitch_stop()
1541 list_add_tail(&ts_info->list, &rdev->priv->gwca.ts_info_list); in rswitch_start_xmit()
1756 if (rdev->priv->gwca.speed < rdev->etha->speed) in rswitch_device_alloc()
1757 rdev->priv->gwca.speed = rdev->etha->speed; in rswitch_device_alloc()
1941 priv->gwca.index = AGENT_INDEX_GWCA; in renesas_eth_sw_probe()
1942 priv->gwca.num_queues = min(RSWITCH_NUM_PORTS * NUM_QUEUES_PER_NDEV, in renesas_eth_sw_probe()
1944 priv->gwca.queues = devm_kcalloc(&pdev->dev, priv->gwca.num_queues, in renesas_eth_sw_probe()
1945 sizeof(*priv->gwca.queues), GFP_KERNEL); in renesas_eth_sw_probe()
1946 if (!priv->gwca.queues) in renesas_eth_sw_probe()