MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / msi_write_enable

Function msi_write_enable

components/drivers/pci/msi/msi.c:112–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112static void msi_write_enable(struct rt_pci_device *pdev, rt_bool_t enable)
113{
114 rt_uint16_t msgctl;
115
116 rt_pci_read_config_u16(pdev, pdev->msi_cap + PCIR_MSI_CTRL, &msgctl);
117
118 msgctl &= ~PCIM_MSICTRL_MSI_ENABLE;
119
120 if (enable)
121 {
122 msgctl |= PCIM_MSICTRL_MSI_ENABLE;
123 }
124
125 rt_pci_write_config_u16(pdev, pdev->msi_cap + PCIR_MSI_CTRL, msgctl);
126}
127
128static void msi_affinity_init(struct rt_pci_msi_desc *desc, int msi_index,
129 rt_bitmap_t *cpumasks)

Callers 2

rt_pci_msi_shutdownFunction · 0.85
msi_capability_initFunction · 0.85

Calls 2

rt_pci_read_config_u16Function · 0.85
rt_pci_write_config_u16Function · 0.85

Tested by

no test coverage detected