/linux/drivers/net/wireless/mediatek/mt76/mt7996/ |
H A D | mmio.c | 272 static int mt7996_mmio_wed_reset(struct mtk_wed_device *wed) in mt7996_mmio_wed_reset() argument 274 struct mt76_dev *mdev = container_of(wed, struct mt76_dev, mmio.wed); in mt7996_mmio_wed_reset() 306 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_mmio_wed_init() local 318 wed = &dev->mt76.mmio.wed_hif2; in mt7996_mmio_wed_init() 320 wed->wlan.pci_dev = pci_dev; in mt7996_mmio_wed_init() 321 wed->wlan.bus_type = MTK_WED_BUS_PCIE; in mt7996_mmio_wed_init() 323 wed->wlan.base = devm_ioremap(dev->mt76.dev, in mt7996_mmio_wed_init() 326 wed->wlan.phy_base = pci_resource_start(pci_dev, 0); in mt7996_mmio_wed_init() 329 wed->wlan.wpdma_int = wed->wlan.phy_base + in mt7996_mmio_wed_init() 331 wed->wlan.wpdma_mask = wed->wlan.phy_base + in mt7996_mmio_wed_init() [all …]
|
H A D | dma.c | 11 int ring_base, struct mtk_wed_device *wed) in mt7996_init_tx_queues() argument 16 if (mtk_wed_device_active(wed)) { in mt7996_init_tx_queues() 27 ring_base, wed, flags); in mt7996_init_tx_queues() 221 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_dma_start() local 230 if (mtk_wed_device_active(wed) && mtk_wed_get_rx_capa(wed)) in mt7996_dma_start() 264 if (mtk_wed_device_active(wed) && wed_reset) { in mt7996_dma_start() 269 mtk_wed_device_start(wed, wed_irq_mask); in mt7996_dma_start() 363 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_dma_enable() 384 mdev->q_rx[MT_RXQ_RRO_IND].wed = &mdev->mmio.wed; in mt7996_dma_rro_init() 395 mdev->q_rx[MT_RXQ_MSDU_PAGE_BAND0].wed = &mdev->mmio.wed; in mt7996_dma_rro_init() [all …]
|
H A D | init.c | 351 mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed) in mt7996_init_wiphy() argument 363 if (mtk_wed_device_active(wed)) in mt7996_init_wiphy() 566 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_register_phy() local 576 wed = &dev->mt76.mmio.wed_hif2; in mt7996_register_phy() 610 mt7996_init_wiphy(mphy->hw, wed); in mt7996_register_phy() 615 wed); in mt7996_register_phy() 632 if (wed == &dev->mt76.mmio.wed_hif2 && mtk_wed_device_active(wed)) { in mt7996_register_phy() 685 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_wed_rro_init() local 694 if (!mtk_wed_device_active(wed)) in mt7996_wed_rro_init() 728 wed->wlan.ind_cmd.addr_elem_phys[i] = in mt7996_wed_rro_init() [all …]
|
H A D | pci.c | 207 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7996_pci_probe() 208 mtk_wed_device_detach(&dev->mt76.mmio.wed); in mt7996_pci_probe()
|
H A D | main.c | 1033 if (mtk_wed_device_active(&phy->dev->mt76.mmio.wed)) { in mt7996_sta_statistics() 1433 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_net_fill_forward_path() local 1436 wed = &dev->mt76.mmio.wed_hif2; in mt7996_net_fill_forward_path() 1438 if (!mtk_wed_device_active(wed)) in mt7996_net_fill_forward_path() 1446 path->mtk_wdma.wdma_idx = wed->wdma_idx; in mt7996_net_fill_forward_path() 1451 path->mtk_wdma.amsdu = mtk_wed_is_amsdu_supported(wed); in mt7996_net_fill_forward_path()
|
H A D | mac.c | 418 mtk_wed_device_ppe_check(&dev->mt76.mmio.wed, skb, in mt7996_wed_check_ppe() 1225 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) { in mt7996_mac_add_txs_skb() 1682 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_mac_restart() 1699 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_mac_restart() 1879 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7996_mac_reset_work() 1880 mtk_wed_device_stop(&dev->mt76.mmio.wed); in mt7996_mac_reset_work() 1904 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_mac_reset_work() 1932 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) { in mt7996_mac_reset_work() 1936 if (mtk_wed_get_rx_capa(&dev->mt76.mmio.wed)) in mt7996_mac_reset_work() 1941 mtk_wed_device_start_hw_rro(&dev->mt76.mmio.wed, wed_irq_mask, in mt7996_mac_reset_work() [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | wed.c | 9 void mt76_wed_release_rx_buf(struct mtk_wed_device *wed) in mt76_wed_release_rx_buf() argument 11 struct mt76_dev *dev = container_of(wed, struct mt76_dev, mmio.wed); in mt76_wed_release_rx_buf() 32 u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size) in mt76_wed_init_rx_buf() argument 34 struct mt76_dev *dev = container_of(wed, struct mt76_dev, mmio.wed); in mt76_wed_init_rx_buf() 35 struct mtk_wed_bm_desc *desc = wed->rx_buf_ring.desc; in mt76_wed_init_rx_buf() 79 mt76_wed_release_rx_buf(wed); in mt76_wed_init_rx_buf() 85 int mt76_wed_offload_enable(struct mtk_wed_device *wed) in mt76_wed_offload_enable() argument 87 struct mt76_dev *dev = container_of(wed, struct mt76_dev, mmio.wed); in mt76_wed_offload_enable() 90 dev->token_size = wed->wlan.token_start; in mt76_wed_offload_enable() 106 if (!q->wed || !mtk_wed_device_active(q->wed)) in mt76_wed_dma_setup() [all …]
|
H A D | mmio.c | 78 if (mtk_wed_device_active(&dev->mmio.wed)) in mt76_set_irq_mask() 79 mtk_wed_device_irq_set_mask(&dev->mmio.wed, in mt76_set_irq_mask()
|
H A D | dma.c | 16 _val = mtk_wed_device_reg_read((_q)->wed, \ 27 mtk_wed_device_reg_write((_q)->wed, \ 730 if (mtk_wed_device_active(&dev->mmio.wed)) { in mt76_dma_alloc_queue() 731 if ((mtk_wed_get_rx_capa(&dev->mmio.wed) && mt76_queue_is_wed_rro(q)) || in mt76_dma_alloc_queue() 794 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_dma_rx_reset() 1021 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_dma_cleanup() 1031 if (mtk_wed_device_active(&dev->mmio.wed)) in mt76_dma_cleanup() 1032 mtk_wed_device_detach(&dev->mmio.wed); in mt76_dma_cleanup()
|
H A D | mt76.h | 224 struct mtk_wed_device *wed; member 655 struct mtk_wed_device wed; member 1113 void mt76_wed_release_rx_buf(struct mtk_wed_device *wed); 1114 void mt76_wed_offload_disable(struct mtk_wed_device *wed); 1115 void mt76_wed_reset_complete(struct mtk_wed_device *wed); 1121 u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size); 1122 int mt76_wed_offload_enable(struct mtk_wed_device *wed); 1125 static inline u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size) in mt76_wed_init_rx_buf() argument 1130 static inline int mt76_wed_offload_enable(struct mtk_wed_device *wed) in mt76_wed_offload_enable() argument 1193 int ring_base, void *wed, u32 flags); [all …]
|
H A D | tx.c | 139 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_tx_status_skb_add() 849 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_token_consume() 850 token >= dev->mmio.wed.wlan.token_start) in mt76_token_consume() 893 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_token_release() 894 token >= dev->mmio.wed.wlan.token_start && in mt76_token_release()
|
H A D | dma.h | 92 if (mtk_wed_device_active(&dev->mmio.wed)) in mt76_dma_reset_tx_queue()
|
H A D | Makefile | 13 tx.o agg-rx.o mcu.o wed.o
|
/linux/drivers/net/wireless/mediatek/mt76/mt7915/ |
H A D | mmio.c | 579 static void mt7915_mmio_wed_update_rx_stats(struct mtk_wed_device *wed, in mt7915_mmio_wed_update_rx_stats() argument 586 dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed); in mt7915_mmio_wed_update_rx_stats() 604 static int mt7915_mmio_wed_reset(struct mtk_wed_device *wed) in mt7915_mmio_wed_reset() argument 606 struct mt76_dev *mdev = container_of(wed, struct mt76_dev, mmio.wed); in mt7915_mmio_wed_reset() 638 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7915_mmio_wed_init() local 647 wed->wlan.pci_dev = pci_dev; in mt7915_mmio_wed_init() 648 wed->wlan.bus_type = MTK_WED_BUS_PCIE; in mt7915_mmio_wed_init() 649 wed->wlan.base = devm_ioremap(dev->mt76.dev, in mt7915_mmio_wed_init() 652 wed->wlan.phy_base = pci_resource_start(pci_dev, 0); in mt7915_mmio_wed_init() 653 wed->wlan.wpdma_int = pci_resource_start(pci_dev, 0) + in mt7915_mmio_wed_init() [all …]
|
H A D | dma.c | 12 struct mtk_wed_device *wed = NULL; in mt7915_init_tx_queues() local 14 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) { in mt7915_init_tx_queues() 21 wed = &dev->mt76.mmio.wed; in mt7915_init_tx_queues() 25 wed, MT_WED_Q_TX(idx)); in mt7915_init_tx_queues() 87 if (is_mt7916(&dev->mt76) && mtk_wed_device_active(&dev->mt76.mmio.wed)) { in mt7915_dma_config() 309 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wed_reset) { in mt7915_dma_start() 323 mtk_wed_device_start(&dev->mt76.mmio.wed, wed_irq_mask); in mt7915_dma_start() 424 if (mtk_wed_device_active(&mdev->mmio.wed)) { in mt7915_dma_init() 494 if (mtk_wed_device_active(&mdev->mmio.wed) && is_mt7915(mdev)) { in mt7915_dma_init() 498 mdev->q_rx[MT_RXQ_MCU_WA].wed = &mdev->mmio.wed; in mt7915_dma_init() [all …]
|
H A D | pci.c | 192 if (mtk_wed_device_active(&mdev->mmio.wed)) in mt7915_pci_probe() 193 mtk_wed_device_detach(&mdev->mmio.wed); in mt7915_pci_probe()
|
/linux/include/linux/soc/mediatek/ |
H A D | mtk_wed.h | 182 int (*offload_enable)(struct mtk_wed_device *wed); 183 void (*offload_disable)(struct mtk_wed_device *wed); 184 u32 (*init_rx_buf)(struct mtk_wed_device *wed, int size); 185 void (*release_rx_buf)(struct mtk_wed_device *wed); 186 void (*update_wo_rx_stats)(struct mtk_wed_device *wed, 188 int (*reset)(struct mtk_wed_device *wed); 189 void (*reset_complete)(struct mtk_wed_device *wed); 217 int (*setup_tc)(struct mtk_wed_device *wed, struct net_device *dev,
|
/linux/drivers/misc/cxl/ |
H A D | native.c | 658 static int process_element_entry_psl9(struct cxl_context *ctx, u64 wed, u64 amr) in process_element_entry_psl9() argument 696 cxl_prefault(ctx, wed); in process_element_entry_psl9() 708 ctx->elem->common.wed = cpu_to_be64(wed); in process_element_entry_psl9() 713 int cxl_attach_afu_directed_psl9(struct cxl_context *ctx, u64 wed, u64 amr) in cxl_attach_afu_directed_psl9() argument 718 result = process_element_entry_psl9(ctx, wed, amr); in cxl_attach_afu_directed_psl9() 732 int cxl_attach_afu_directed_psl8(struct cxl_context *ctx, u64 wed, u64 amr) in cxl_attach_afu_directed_psl8() argument 756 cxl_prefault(ctx, wed); in cxl_attach_afu_directed_psl8() 773 ctx->elem->common.wed = cpu_to_be64(wed); in cxl_attach_afu_directed_psl8() 900 int cxl_attach_dedicated_process_psl9(struct cxl_context *ctx, u64 wed, u64 amr) in cxl_attach_dedicated_process_psl9() argument 906 result = process_element_entry_psl9(ctx, wed, amr); in cxl_attach_dedicated_process_psl9() [all …]
|
H A D | cxl.h | 637 int (*attach_afu_directed)(struct cxl_context *ctx, u64 wed, u64 amr); 638 int (*attach_dedicated_process)(struct cxl_context *ctx, u64 wed, u64 amr); 745 __be64 wed; member 903 int cxl_attach_afu_directed_psl9(struct cxl_context *ctx, u64 wed, u64 amr); 904 int cxl_attach_afu_directed_psl8(struct cxl_context *ctx, u64 wed, u64 amr); 907 int cxl_attach_dedicated_process_psl9(struct cxl_context *ctx, u64 wed, u64 amr); 908 int cxl_attach_dedicated_process_psl8(struct cxl_context *ctx, u64 wed, u64 amr); 972 void cxl_prefault(struct cxl_context *ctx, u64 wed); 1083 u64 wed, u64 amr);
|
H A D | trace.h | 89 TP_PROTO(struct cxl_context *ctx, u64 wed, s16 num_interrupts, u64 amr), 91 TP_ARGS(ctx, wed, num_interrupts, amr), 98 __field(u64, wed) 108 __entry->wed = wed; 118 __entry->wed,
|
H A D | fault.c | 319 void cxl_prefault(struct cxl_context *ctx, u64 wed) in cxl_prefault() argument 331 cxl_fault_segment(ctx, mm, wed); in cxl_prefault()
|
H A D | guest.c | 521 static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr) in attach_afu_directed() argument 561 cxl_prefault(ctx, wed); in attach_afu_directed() 587 elem->common.wed = cpu_to_be64(wed); in attach_afu_directed() 626 static int guest_attach_process(struct cxl_context *ctx, bool kernel, u64 wed, u64 amr) in guest_attach_process() argument 632 return attach_afu_directed(ctx, wed, amr); in guest_attach_process()
|
/linux/arch/arm64/boot/dts/mediatek/ |
H A D | mt7986a.dtsi | 150 wed_pcie: wed-pcie@10003000 { 151 compatible = "mediatek,mt7986-wed-pcie", 498 wed0: wed@15010000 { 499 compatible = "mediatek,mt7986-wed", 511 wed1: wed@15011000 { 512 compatible = "mediatek,mt7986-wed", 560 mediatek,wed-pcie = <&wed_pcie>; 561 mediatek,wed = <&wed0>, <&wed1>;
|
/linux/drivers/net/ethernet/mediatek/ |
H A D | mtk_wed_mcu.c | 81 mtk_wed_update_rx_stats(struct mtk_wed_device *wed, struct sk_buff *skb) in mtk_wed_update_rx_stats() argument 87 if (!wed->wlan.update_wo_rx_stats) in mtk_wed_update_rx_stats() 95 wed->wlan.update_wo_rx_stats(wed, &stats[i]); in mtk_wed_update_rx_stats()
|
/linux/include/misc/ |
H A D | cxl.h | 115 int cxl_start_context(struct cxl_context *ctx, u64 wed,
|