diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-07-04 12:15:56 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-07-06 13:53:29 +0000 |
commit | 0b5802449d399708068ed7c9a345b4024c2c594d (patch) | |
tree | 096ae80b3a21f4565089af6bb4b76b574ef18c01 /src/mainboard | |
parent | edf1ffef9f371c48c86ba219806dd053e7b7212e (diff) |
emulation/{i440fx,q35}: Don't use PCI driver to set root PCI dev ops
This devices is always present so hooking up the ops in devicetree makes
more sense.
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I369129e365ce8596cad25b97d12168bb08e3ed0e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76241
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/emulation/qemu-i440fx/devicetree.cb | 2 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-i440fx/mainboard.c | 8 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-q35/devicetree.cb | 2 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-q35/mainboard.c | 8 |
4 files changed, 4 insertions, 16 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/devicetree.cb b/src/mainboard/emulation/qemu-i440fx/devicetree.cb index cecba1c82a..3e4475f6f0 100644 --- a/src/mainboard/emulation/qemu-i440fx/devicetree.cb +++ b/src/mainboard/emulation/qemu-i440fx/devicetree.cb @@ -1,7 +1,7 @@ chip mainboard/emulation/qemu-i440fx device cpu_cluster 0 on end device domain 0 on - device pci 0.0 on end # northbridge (i440fx) + device pci 0.0 on ops nb_operations end # northbridge (i440fx) chip southbridge/intel/i82371eb # southbridge device pci 01.0 on end # ISA bridge device pci 01.1 on end # IDE diff --git a/src/mainboard/emulation/qemu-i440fx/mainboard.c b/src/mainboard/emulation/qemu-i440fx/mainboard.c index 50c5c02722..7debf8c308 100644 --- a/src/mainboard/emulation/qemu-i440fx/mainboard.c +++ b/src/mainboard/emulation/qemu-i440fx/mainboard.c @@ -41,15 +41,9 @@ static void qemu_nb_read_resources(struct device *dev) } } -static struct device_operations nb_operations = { +struct device_operations nb_operations = { .read_resources = qemu_nb_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = qemu_nb_init, }; - -static const struct pci_driver nb_driver __pci_driver = { - .ops = &nb_operations, - .vendor = 0x8086, - .device = 0x1237, -}; diff --git a/src/mainboard/emulation/qemu-q35/devicetree.cb b/src/mainboard/emulation/qemu-q35/devicetree.cb index 6bd3d9dc32..063c5e9aba 100644 --- a/src/mainboard/emulation/qemu-q35/devicetree.cb +++ b/src/mainboard/emulation/qemu-q35/devicetree.cb @@ -1,7 +1,7 @@ chip mainboard/emulation/qemu-q35 device cpu_cluster 0 on end device domain 0 on - device pci 0.0 mandatory end # northbridge (q35) + device pci 0.0 mandatory ops nb_operations end # northbridge (q35) chip southbridge/intel/i82801ix # present unconditionally device pci 1f.0 mandatory diff --git a/src/mainboard/emulation/qemu-q35/mainboard.c b/src/mainboard/emulation/qemu-q35/mainboard.c index 7d6707c5a5..1ff4c04d53 100644 --- a/src/mainboard/emulation/qemu-q35/mainboard.c +++ b/src/mainboard/emulation/qemu-q35/mainboard.c @@ -63,15 +63,9 @@ static void qemu_nb_read_resources(struct device *dev) } -static struct device_operations nb_operations = { +struct device_operations nb_operations = { .read_resources = qemu_nb_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = qemu_nb_init, }; - -static const struct pci_driver nb_driver __pci_driver = { - .ops = &nb_operations, - .vendor = 0x8086, - .device = 0x29c0, -}; |