drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / src / northbridge / amd / pi / 00730F01 / iommu.c
blob986c6faa1542abccac49c41050e73236a6cae6c7
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/device.h>
4 #include <device/pci.h>
5 #include <device/pci_ids.h>
6 #include <lib.h>
8 static void iommu_read_resources(struct device *dev)
10 struct resource *res;
12 /* Get the normal pci resources of this device */
13 pci_dev_read_resources(dev);
15 /* IOMMU MMIO registers */
16 res = new_resource(dev, 0x44);
17 res->size = 512 * 1024;
18 res->align = log2(res->size);
19 res->gran = log2(res->size);
20 res->limit = 0xffffffff; /* 4G */
21 res->flags = IORESOURCE_MEM;
24 struct device_operations amd_pi_iommu_ops = {
25 .read_resources = iommu_read_resources,
26 .set_resources = pci_dev_set_resources,
27 .enable_resources = pci_dev_enable_resources,
28 .ops_pci = &pci_dev_ops_pci,