The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/dev/rtw89/rtw8852ce.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
    2 /* Copyright(c) 2020-2022  Realtek Corporation
    3  */
    4 
    5 #include <linux/module.h>
    6 #include <linux/pci.h>
    7 
    8 #include "pci.h"
    9 #include "reg.h"
   10 #include "rtw8852c.h"
   11 
   12 static const struct rtw89_pci_bd_idx_addr rtw8852c_bd_idx_addr_low_power = {
   13         .tx_bd_addrs = {R_AX_DRV_FW_HSK_0, R_AX_DRV_FW_HSK_1, R_AX_DRV_FW_HSK_2,
   14                         R_AX_DRV_FW_HSK_3, 0, 0,
   15                         0, 0, R_AX_DRV_FW_HSK_4,
   16                         0, 0, 0,
   17                         R_AX_DRV_FW_HSK_5},
   18         .rx_bd_addrs = {R_AX_DRV_FW_HSK_6, R_AX_DRV_FW_HSK_7},
   19 };
   20 
   21 static const struct rtw89_pci_info rtw8852c_pci_info = {
   22         .txbd_trunc_mode        = MAC_AX_BD_TRUNC,
   23         .rxbd_trunc_mode        = MAC_AX_BD_TRUNC,
   24         .rxbd_mode              = MAC_AX_RXBD_PKT,
   25         .tag_mode               = MAC_AX_TAG_MULTI,
   26         .tx_burst               = MAC_AX_TX_BURST_V1_256B,
   27         .rx_burst               = MAC_AX_RX_BURST_V1_128B,
   28         .wd_dma_idle_intvl      = MAC_AX_WD_DMA_INTVL_256NS,
   29         .wd_dma_act_intvl       = MAC_AX_WD_DMA_INTVL_256NS,
   30         .multi_tag_num          = MAC_AX_TAG_NUM_8,
   31         .lbc_en                 = MAC_AX_PCIE_ENABLE,
   32         .lbc_tmr                = MAC_AX_LBC_TMR_2MS,
   33         .autok_en               = MAC_AX_PCIE_DISABLE,
   34         .io_rcy_en              = MAC_AX_PCIE_ENABLE,
   35         .io_rcy_tmr             = MAC_AX_IO_RCY_ANA_TMR_6MS,
   36 
   37         .init_cfg_reg           = R_AX_HAXI_INIT_CFG1,
   38         .txhci_en_bit           = B_AX_TXHCI_EN_V1,
   39         .rxhci_en_bit           = B_AX_RXHCI_EN_V1,
   40         .rxbd_mode_bit          = B_AX_RXBD_MODE_V1,
   41         .exp_ctrl_reg           = R_AX_HAXI_EXP_CTRL,
   42         .max_tag_num_mask       = B_AX_MAX_TAG_NUM_V1_MASK,
   43         .rxbd_rwptr_clr_reg     = R_AX_RXBD_RWPTR_CLR_V1,
   44         .txbd_rwptr_clr2_reg    = R_AX_TXBD_RWPTR_CLR2_V1,
   45         .dma_stop1_reg          = R_AX_HAXI_DMA_STOP1,
   46         .dma_stop2_reg          = R_AX_HAXI_DMA_STOP2,
   47         .dma_busy1_reg          = R_AX_HAXI_DMA_BUSY1,
   48         .dma_busy2_reg          = R_AX_HAXI_DMA_BUSY2,
   49         .dma_busy3_reg          = R_AX_HAXI_DMA_BUSY3,
   50 
   51         .rpwm_addr              = R_AX_PCIE_HRPWM_V1,
   52         .cpwm_addr              = R_AX_PCIE_CRPWM,
   53         .bd_idx_addr_low_power  = &rtw8852c_bd_idx_addr_low_power,
   54         .dma_addr_set           = &rtw89_pci_ch_dma_addr_set_v1,
   55 
   56         .ltr_set                = rtw89_pci_ltr_set_v1,
   57         .fill_txaddr_info       = rtw89_pci_fill_txaddr_info_v1,
   58         .config_intr_mask       = rtw89_pci_config_intr_mask_v1,
   59         .enable_intr            = rtw89_pci_enable_intr_v1,
   60         .disable_intr           = rtw89_pci_disable_intr_v1,
   61         .recognize_intrs        = rtw89_pci_recognize_intrs_v1,
   62 };
   63 
   64 static const struct rtw89_driver_info rtw89_8852ce_info = {
   65         .chip = &rtw8852c_chip_info,
   66         .bus = {
   67                 .pci = &rtw8852c_pci_info,
   68         },
   69 };
   70 
   71 static const struct pci_device_id rtw89_8852ce_id_table[] = {
   72         {
   73                 PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xc852),
   74                 .driver_data = (kernel_ulong_t)&rtw89_8852ce_info,
   75         },
   76         {},
   77 };
   78 MODULE_DEVICE_TABLE(pci, rtw89_8852ce_id_table);
   79 
   80 static struct pci_driver rtw89_8852ce_driver = {
   81         .name           = "rtw89_8852ce",
   82         .id_table       = rtw89_8852ce_id_table,
   83         .probe          = rtw89_pci_probe,
   84         .remove         = rtw89_pci_remove,
   85         .driver.pm      = &rtw89_pm_ops,
   86 #if defined(__FreeBSD__)
   87         .bsddriver.name = KBUILD_MODNAME,
   88 #endif
   89 };
   90 module_pci_driver(rtw89_8852ce_driver);
   91 
   92 MODULE_AUTHOR("Realtek Corporation");
   93 MODULE_DESCRIPTION("Realtek 802.11ax wireless 8852CE driver");
   94 MODULE_LICENSE("Dual BSD/GPL");

Cache object: 2fe2f20fb8e21e029fc6080df3ad8da8


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.