summaryrefslogtreecommitdiffstats
path: root/src/soc/amd
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-10-05 21:50:23 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-10-13 19:42:36 +0000
commit987ec8837ac8c5288a92af52c9bdd51f9019db3c (patch)
tree3f7c98f70392e8d544c00bdd0e2da57e4c4e39a9 /src/soc/amd
parent6e1fb6ae9f0cc2b37d2cbd127e0723789b0f7f3e (diff)
downloadcoreboot-987ec8837ac8c5288a92af52c9bdd51f9019db3c.tar.gz
coreboot-987ec8837ac8c5288a92af52c9bdd51f9019db3c.tar.bz2
coreboot-987ec8837ac8c5288a92af52c9bdd51f9019db3c.zip
soc/amd/acp: Hook up ops in devicetree
This removes the need for a PCI driver. Change-Id: Id25016703d1716930d9b6c6d1dab5481b10aca17 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68145 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/cezanne/chipset.cb2
-rw-r--r--src/soc/amd/common/block/acp/acp.c9
-rw-r--r--src/soc/amd/mendocino/chipset_mendocino.cb2
-rw-r--r--src/soc/amd/mendocino/chipset_rembrandt.cb2
-rw-r--r--src/soc/amd/morgana/chipset.cb2
-rw-r--r--src/soc/amd/picasso/chipset.cb2
6 files changed, 6 insertions, 13 deletions
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index c25e7dc12aa5..b0ebde59d96a 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -76,7 +76,7 @@ chip soc/amd/cezanne
end
end
end
- device pci 0.5 alias acp off end # Audio Processor (ACP)
+ device pci 0.5 alias acp off ops amd_acp_ops end # Audio Processor (ACP)
device pci 0.6 alias hda off end # Audio Processor HD Audio Controller (main AZ)
device pci 0.7 alias mp2 off end # Sensor Fusion Hub (MP2)
end
diff --git a/src/soc/amd/common/block/acp/acp.c b/src/soc/amd/common/block/acp/acp.c
index cf0e9f8fe29d..a43792eea7ef 100644
--- a/src/soc/amd/common/block/acp/acp.c
+++ b/src/soc/amd/common/block/acp/acp.c
@@ -7,7 +7,6 @@
#include <amdblocks/chip.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <commonlib/helpers.h>
#include "acp_def.h"
@@ -42,7 +41,7 @@ static void acp_fill_ssdt(const struct device *dev)
acp_fill_wov_method(dev);
}
-static struct device_operations acp_ops = {
+struct device_operations amd_acp_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -52,9 +51,3 @@ static struct device_operations acp_ops = {
.acpi_name = acp_acpi_name,
.acpi_fill_ssdt = acp_fill_ssdt,
};
-
-static const struct pci_driver acp_driver __pci_driver = {
- .ops = &acp_ops,
- .vendor = PCI_VID_AMD,
- .device = PCI_DID_AMD_FAM17H_ACP,
-};
diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb
index 390d5e52b3bd..260452d41c74 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -60,7 +60,7 @@ chip soc/amd/mendocino
end
end
end
- device pci 0.5 alias acp off end # Audio Processor (ACP)
+ device pci 0.5 alias acp off ops amd_acp_ops end # Audio Processor (ACP)
device pci 0.6 alias hda off end # Audio Processor HD Audio Controller (main AZ)
device pci 0.7 alias mp2 off end # Sensor Fusion Hub (MP2)
end
diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb
index 390d5e52b3bd..260452d41c74 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -60,7 +60,7 @@ chip soc/amd/mendocino
end
end
end
- device pci 0.5 alias acp off end # Audio Processor (ACP)
+ device pci 0.5 alias acp off ops amd_acp_ops end # Audio Processor (ACP)
device pci 0.6 alias hda off end # Audio Processor HD Audio Controller (main AZ)
device pci 0.7 alias mp2 off end # Sensor Fusion Hub (MP2)
end
diff --git a/src/soc/amd/morgana/chipset.cb b/src/soc/amd/morgana/chipset.cb
index 052b5fcba126..d27d66d8276c 100644
--- a/src/soc/amd/morgana/chipset.cb
+++ b/src/soc/amd/morgana/chipset.cb
@@ -62,7 +62,7 @@ chip soc/amd/morgana
end
end
end
- device pci 0.5 alias acp off end # Audio Processor (ACP)
+ device pci 0.5 alias acp off ops amd_acp_ops end # Audio Processor (ACP)
device pci 0.6 alias hda off end # Audio Processor HD Audio Controller (main AZ)
device pci 0.7 alias mp2 off end # Sensor Fusion Hub (MP2)
end
diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb
index 0ed7c732ad89..2bbee75ae1c1 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -23,7 +23,7 @@ chip soc/amd/picasso
device pci 0.2 alias crypto off end # cryptography coprocessor
device pci 0.3 alias xhci_0 off end
device pci 0.4 alias xhci_1 off end
- device pci 0.5 alias acp off end # audio co-processor
+ device pci 0.5 alias acp off ops amd_acp_ops end # audio co-processor
device pci 0.6 alias hda off end # main HD Audio Controller
device pci 0.7 alias mp2 off end # sensor fusion hub (MP2)
end