xref: /linux/drivers/gpu/drm/nouveau/nvkm/subdev/pci/gh100.c (revision bca5cfbb694d66a1c482d0c347eee80f6afbc870)
1 /* SPDX-License-Identifier: MIT
2  *
3  * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
4  */
5 #include "priv.h"
6 
7 #include <nvhw/drf.h>
8 #include <nvhw/ref/gh100/dev_xtl_ep_pri.h>
9 
10 static void
11 gh100_pci_msi_rearm(struct nvkm_pci *pci)
12 {
13 	/* Handled by top-level intr ACK. */
14 }
15 
16 static const struct nvkm_pci_func
17 gh100_pci = {
18 	.cfg = {
19 		.addr = DRF_LO(NV_EP_PCFGM),
20 		.size = DRF_HI(NV_EP_PCFGM) - DRF_LO(NV_EP_PCFGM) + 1,
21 	},
22 	.msi_rearm = gh100_pci_msi_rearm,
23 };
24 
25 int
26 gh100_pci_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
27 	      struct nvkm_pci **ppci)
28 {
29 	return nvkm_pci_new_(&gh100_pci, device, type, inst, ppci);
30 }
31