Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Hello Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/68146
to look at the new patch set (#2).
Change subject: soc/amd/*: Hook up iommu ops in devicetree
......................................................................
soc/amd/*: Hook up iommu ops in devicetree
This removed the need to maintain a PCI driver.
Change-Id: I43def81d615749008fcc9de8734fa2aca752aa9d
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/iommu/iommu.c
M src/soc/amd/mendocino/chipset_mendocino.cb
M src/soc/amd/mendocino/chipset_rembrandt.cb
M src/soc/amd/picasso/chipset.cb
5 files changed, 17 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/68146/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68146
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I43def81d615749008fcc9de8734fa2aca752aa9d
Gerrit-Change-Number: 68146
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Hello Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/68141
to look at the new patch set (#2).
Change subject: soc/amd/mendocino: Use devicetree ops over pci driver
......................................................................
soc/amd/mendocino: Use devicetree ops over pci driver
Picasso is a SoC so it makes sense to statically use ops instead of
matching them to PCI DID/VID at runtime.
Change-Id: I5619c8ad42cdeb019cb7294da884909df64a2211
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/mendocino/chipset_mendocino.cb
M src/soc/amd/mendocino/chipset_rembrandt.cb
M src/soc/amd/mendocino/data_fabric.c
M src/soc/amd/mendocino/root_complex.c
4 files changed, 33 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/68141/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68141
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5619c8ad42cdeb019cb7294da884909df64a2211
Gerrit-Change-Number: 68141
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Tim Wawrzynczak, Shou-Chieh Hsu, Leo Chou.
Reka Norman has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68098 )
Change subject: mb/google/nissa/pujjo: Change TPM I2C freqeuncy to 1 MHz
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68098
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If99b5022a9b67e9c63c440a1e398d56bb2c467e2
Gerrit-Change-Number: 68098
Gerrit-PatchSet: 3
Gerrit-Owner: Leo Chou <leo.chou(a)lcfc.corp-partner.google.com>
Gerrit-Reviewer: Reka Norman <rekanorman(a)chromium.org>
Gerrit-Reviewer: Shou-Chieh Hsu <shouchieh(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Joey Peng <joey.peng(a)lcfc.corp-partner.google.com>
Gerrit-CC: Jynn Chen <jynn.chen(a)lcfc.corp-partner.google.com>
Gerrit-CC: Leanne1 Chen <leanne1.chen(a)lcfc.corp-partner.google.com>
Gerrit-CC: Melo Chuang <melo.chuang(a)lcfc.corp-partner.google.com>
Gerrit-CC: Stanley Wu <stanley1.wu(a)lcfc.corp-partner.google.com>
Gerrit-Attention: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Shou-Chieh Hsu <shouchieh(a)google.com>
Gerrit-Attention: Leo Chou <leo.chou(a)lcfc.corp-partner.google.com>
Gerrit-Comment-Date: Wed, 05 Oct 2022 20:55:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Kangheui Won, Chen Wisley, Tim Wawrzynczak, Shou-Chieh Hsu.
Reka Norman has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68082 )
Change subject: mb/google/nissa/var/yaviks: Config I2C frequency
......................................................................
Patch Set 6: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68082
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I33c2891f17bc3c572bbfcbf30bbbdef9eb850ce7
Gerrit-Change-Number: 68082
Gerrit-PatchSet: 6
Gerrit-Owner: Chen Wisley <wisley.chen%quantatw.com(a)gtempaccount.com>
Gerrit-Reviewer: Kangheui Won <khwon(a)chromium.org>
Gerrit-Reviewer: Reka Norman <rekanorman(a)chromium.org>
Gerrit-Reviewer: Shou-Chieh Hsu <shouchieh(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Wisley Chen <wisley.chen(a)quanta.corp-partner.google.com>
Gerrit-Attention: Kangheui Won <khwon(a)chromium.org>
Gerrit-Attention: Chen Wisley <wisley.chen%quantatw.com(a)gtempaccount.com>
Gerrit-Attention: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Shou-Chieh Hsu <shouchieh(a)google.com>
Gerrit-Comment-Date: Wed, 05 Oct 2022 20:47:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68148 )
Change subject: soc/amd/*: Hook up GPU ops in devicetree
......................................................................
soc/amd/*: Hook up GPU ops in devicetree
This removes the need for a PCI driver.
Change-Id: I4b499013a80f5c1bd6ac265a5ae8e635598d9e6c
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/graphics/graphics.c
M src/soc/amd/mendocino/chipset_mendocino.cb
M src/soc/amd/mendocino/chipset_rembrandt.cb
M src/soc/amd/picasso/chipset.cb
5 files changed, 17 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/68148/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index 3a9bd72..3fb90a7 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -24,7 +24,7 @@
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A
ops amd_internal_pcie_gpp_ops
- device pci 0.0 alias gfx off end # Internal GPU (GFX)
+ device pci 0.0 alias gfx off ops amd_graphics_ops end # Internal GPU (GFX)
device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ)
device pci 0.2 alias crypto off end # Crypto Coprocessor
device pci 0.3 alias xhci_0 off
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c
index d39f60a..17ca2cd 100644
--- a/src/soc/amd/common/block/graphics/graphics.c
+++ b/src/soc/amd/common/block/graphics/graphics.c
@@ -4,7 +4,6 @@
#include <acpi/acpigen.h>
#include <boot/coreboot_tables.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <console/console.h>
#include <fsp/graphics.h>
#include <soc/intel/common/vbt.h>
@@ -168,7 +167,7 @@
pci_dev_init(dev);
}
-static const struct device_operations graphics_ops = {
+static const struct device_operations amd_graphics_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = graphics_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -179,19 +178,3 @@
.acpi_fill_ssdt = graphics_fill_ssdt,
.acpi_name = graphics_acpi_name,
};
-
-static const unsigned short pci_device_ids[] = {
- PCI_DID_ATI_FAM17H_MODEL18H_GPU,
- PCI_DID_ATI_FAM17H_MODEL60H_GPU,
- PCI_DID_ATI_FAM17H_MODEL68H_GPU,
- PCI_DID_ATI_FAM17H_MODELA0H_GPU,
- PCI_DID_ATI_FAM19H_MODEL51H_GPU_CEZANNE,
- PCI_DID_ATI_FAM19H_MODEL51H_GPU_BARCELO,
- 0,
-};
-
-static const struct pci_driver graphics_driver __pci_driver = {
- .ops = &graphics_ops,
- .vendor = PCI_VID_ATI,
- .devices = pci_device_ids,
-};
diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb
index 139ee84..83cdbc4 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -20,7 +20,7 @@
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A
ops amd_internal_pcie_gpp_ops
- device pci 0.0 alias gfx off end # Internal GPU (GFX)
+ device pci 0.0 alias gfx off ops amd_graphics_ops end # Internal GPU (GFX)
device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ)
device pci 0.2 alias crypto off end # Crypto Coprocessor
device pci 0.3 alias xhci_0 off
diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb
index e000f40..bfdc04d 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -20,7 +20,7 @@
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A
ops amd_internal_pcie_gpp_ops
- device pci 0.0 alias gfx off end # Internal GPU (GFX)
+ device pci 0.0 alias gfx off ops amd_graphics_ops end # Internal GPU (GFX)
device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ)
device pci 0.2 alias crypto off end # Crypto Coprocessor
device pci 0.3 alias xhci_0 off
diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb
index 756a7f4..ab286de 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -19,7 +19,7 @@
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias internal_bridge_a off # internal bridge to bus A
ops amd_internal_pcie_gpp_ops
- device pci 0.0 alias gfx off end # internal GPU
+ device pci 0.0 alias gfx off ops amd_graphics_ops end # internal GPU
device pci 0.1 alias gfx_hda off end # display HD Audio controller
device pci 0.2 alias crypto off end # cryptography coprocessor
device pci 0.3 alias xhci_0 off end
--
To view, visit https://review.coreboot.org/c/coreboot/+/68148
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4b499013a80f5c1bd6ac265a5ae8e635598d9e6c
Gerrit-Change-Number: 68148
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newchange
Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68147 )
Change subject: soc/amd/*: Hook up GPP bridges ops to devicetree
......................................................................
soc/amd/*: Hook up GPP bridges ops to devicetree
This removes the need for a PCI driver.
Change-Id: I8e235d25622d0bd3f1bb3f18ec0400a02f674a6d
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/pci/pcie_gpp.c
M src/soc/amd/mendocino/chipset_mendocino.cb
M src/soc/amd/mendocino/chipset_rembrandt.cb
M src/soc/amd/picasso/chipset.cb
5 files changed, 51 insertions(+), 59 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/68147/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index 1e3b946..3a9bd72 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -13,16 +13,17 @@
device pci 01.3 alias gpp_gfx_bridge_2 off end
device pci 02.0 on end # Dummy Host Bridge, do not disable
- device pci 02.1 alias gpp_bridge_0 off end
- device pci 02.2 alias gpp_bridge_1 off end
- device pci 02.3 alias gpp_bridge_2 off end
- device pci 02.4 alias gpp_bridge_3 off end
- device pci 02.5 alias gpp_bridge_4 off end
- device pci 02.6 alias gpp_bridge_5 off end
- device pci 02.7 alias gpp_bridge_6 off end
+ device pci 02.1 alias gpp_bridge_0 off ops amd_external_pcie_gpp_ops end
+ device pci 02.2 alias gpp_bridge_1 off ops amd_external_pcie_gpp_ops end
+ device pci 02.3 alias gpp_bridge_2 off ops amd_external_pcie_gpp_ops end
+ device pci 02.4 alias gpp_bridge_3 off ops amd_external_pcie_gpp_ops end
+ device pci 02.5 alias gpp_bridge_4 off ops amd_external_pcie_gpp_ops end
+ device pci 02.6 alias gpp_bridge_5 off ops amd_external_pcie_gpp_ops end
+ device pci 02.7 alias gpp_bridge_6 off ops amd_external_pcie_gpp_ops end
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias gfx off end # Internal GPU (GFX)
device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ)
device pci 0.2 alias crypto off end # Crypto Coprocessor
@@ -81,12 +82,14 @@
device pci 0.7 alias mp2 off end # Sensor Fusion Hub (MP2)
end
device pci 08.2 alias gpp_bridge_b off # Internal GPP Bridge 1 to Bus B
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias sata_0 off ops amd_sata_ops end # first SATA controller; AHCI Mode
device pci 0.1 alias sata_1 off ops amd_sata_ops end # second SATA Controller; SATA Raid/AHCI Mode
device pci 0.2 alias xgbe_0 off end # 10 GbE Controller Port 0 (XGBE0)
device pci 0.3 alias xgbe_1 off end # 10 GbE Controller Port 1 (XGBE1)
end
device pci 08.3 alias gpp_bridge_c off # Internal GPP Bridge 2 to Bus C
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias dummy_function_c off end # PCIe Dummy Function
device pci 0.2 alias i2s_ac97 off end # I2S/AC'97 Audio
end
diff --git a/src/soc/amd/common/block/pci/pcie_gpp.c b/src/soc/amd/common/block/pci/pcie_gpp.c
index 2e37935..0ce3268 100644
--- a/src/soc/amd/common/block/pci/pcie_gpp.c
+++ b/src/soc/amd/common/block/pci/pcie_gpp.c
@@ -7,7 +7,6 @@
#include <assert.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <device/pciexp.h>
#include <soc/pci_devs.h>
#include <stdio.h>
@@ -48,7 +47,7 @@
acpigen_pop_len(); /* Scope */
}
-static struct device_operations internal_pcie_gpp_ops = {
+struct device_operations amd_internal_pcie_gpp_ops = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
@@ -58,21 +57,7 @@
.acpi_fill_ssdt = acpi_device_write_gpp_pci_dev,
};
-static const unsigned short internal_pci_gpp_ids[] = {
- PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSA,
- PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSB,
- PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_BUSABC,
- PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP_BUSABC,
- 0
-};
-
-static const struct pci_driver internal_pcie_gpp_driver __pci_driver = {
- .ops = &internal_pcie_gpp_ops,
- .vendor = PCI_VID_AMD,
- .devices = internal_pci_gpp_ids,
-};
-
-static struct device_operations external_pcie_gpp_ops = {
+struct device_operations amd_external_pcie_gpp_ops = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
@@ -81,17 +66,3 @@
.acpi_name = pcie_gpp_acpi_name,
.acpi_fill_ssdt = acpi_device_write_gpp_pci_dev,
};
-
-static const unsigned short external_pci_gpp_ids[] = {
- PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP,
- PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D1,
- PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D2,
- PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP,
- 0
-};
-
-static const struct pci_driver external_pcie_gpp_driver __pci_driver = {
- .ops = &external_pcie_gpp_ops,
- .vendor = PCI_VID_AMD,
- .devices = external_pci_gpp_ids,
-};
diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb
index 3715306..139ee84 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -10,15 +10,16 @@
device pci 01.0 on end # Dummy Host Bridge
device pci 02.0 on end # Dummy Host Bridge, do not disable
- device pci 02.1 alias gpp_bridge_0 off end
- device pci 02.2 alias gpp_bridge_1 off end
- device pci 02.3 alias gpp_bridge_2 off end
- device pci 02.4 alias gpp_bridge_3 off end
- device pci 02.5 alias gpp_bridge_4 off end
- device pci 02.6 alias gpp_bridge_5 off end
+ device pci 02.1 alias gpp_bridge_0 off ops amd_external_pcie_gpp_ops end
+ device pci 02.2 alias gpp_bridge_1 off ops amd_external_pcie_gpp_ops end
+ device pci 02.3 alias gpp_bridge_2 off ops amd_external_pcie_gpp_ops end
+ device pci 02.4 alias gpp_bridge_3 off ops amd_external_pcie_gpp_ops end
+ device pci 02.5 alias gpp_bridge_4 off ops amd_external_pcie_gpp_ops end
+ device pci 02.6 alias gpp_bridge_5 off ops amd_external_pcie_gpp_ops end
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias gfx off end # Internal GPU (GFX)
device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ)
device pci 0.2 alias crypto off end # Crypto Coprocessor
@@ -65,7 +66,9 @@
device pci 0.7 alias mp2 off end # Sensor Fusion Hub (MP2)
end
device pci 08.2 alias gpp_bridge_b off end # Internal GPP Bridge 1 to Bus B
+ ops amd_internal_pcie_gpp_ops
device pci 08.3 alias gpp_bridge_c off # Internal GPP Bridge 2 to Bus C
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias xhci_2 off end # Might also be a dummy device with different PCI DID
end
diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb
index b81890f..e000f40 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -10,15 +10,16 @@
device pci 01.0 on end # Dummy Host Bridge
device pci 02.0 on end # Dummy Host Bridge, do not disable
- device pci 02.1 alias gpp_bridge_0 off end
- device pci 02.2 alias gpp_bridge_1 off end
- device pci 02.3 alias gpp_bridge_2 off end
- device pci 02.4 alias gpp_bridge_3 off end
- device pci 02.5 alias gpp_bridge_4 off end
- device pci 02.6 alias gpp_bridge_5 off end
+ device pci 02.1 alias gpp_bridge_0 off ops amd_external_pcie_gpp_ops end
+ device pci 02.2 alias gpp_bridge_1 off ops amd_external_pcie_gpp_ops end
+ device pci 02.3 alias gpp_bridge_2 off ops amd_external_pcie_gpp_ops end
+ device pci 02.4 alias gpp_bridge_3 off ops amd_external_pcie_gpp_ops end
+ device pci 02.5 alias gpp_bridge_4 off ops amd_external_pcie_gpp_ops end
+ device pci 02.6 alias gpp_bridge_5 off ops amd_external_pcie_gpp_ops end
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias gfx off end # Internal GPU (GFX)
device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ)
device pci 0.2 alias crypto off end # Crypto Coprocessor
@@ -64,8 +65,8 @@
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
- device pci 08.2 alias gpp_bridge_b off end # Internal GPP Bridge 1 to Bus B
- device pci 08.3 alias gpp_bridge_c off # Internal GPP Bridge 2 to Bus C
+ device pci 08.2 alias gpp_bridge_b off ops amd_internal_pcie_gpp_ops end # Internal GPP Bridge 1 to Bus B
+ device pci 08.3 alias gpp_bridge_c ops amd_internal_pcie_gpp_ops off # Internal GPP Bridge 2 to Bus C
device pci 0.0 alias xhci_2 off end # Might also be a dummy device with different PCI DID
end
diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb
index 9a69189..756a7f4 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -9,15 +9,16 @@
device pci 00.0 alias gnb on ops picasso_root_complex_operations end
device pci 00.2 alias iommu off ops amd_iommu_ops end
device pci 01.0 on end # Dummy Host Bridge, do not disable
- device pci 01.1 alias gpp_bridge_0 off end
- device pci 01.2 alias gpp_bridge_1 off end
- device pci 01.3 alias gpp_bridge_2 off end
- device pci 01.4 alias gpp_bridge_3 off end
- device pci 01.5 alias gpp_bridge_4 off end
- device pci 01.6 alias gpp_bridge_5 off end
- device pci 01.7 alias gpp_bridge_6 off end
+ device pci 01.1 alias gpp_bridge_0 off ops amd_external_pcie_gpp_ops end
+ device pci 01.2 alias gpp_bridge_1 off ops amd_external_pcie_gpp_ops end
+ device pci 01.3 alias gpp_bridge_2 off ops amd_external_pcie_gpp_ops end
+ device pci 01.4 alias gpp_bridge_3 off ops amd_external_pcie_gpp_ops end
+ device pci 01.5 alias gpp_bridge_4 off ops amd_external_pcie_gpp_ops end
+ device pci 01.6 alias gpp_bridge_5 off ops amd_external_pcie_gpp_ops end
+ device pci 01.7 alias gpp_bridge_6 off ops amd_external_pcie_gpp_ops end
device pci 08.0 on end # Dummy Host Bridge, do not disable
device pci 08.1 alias internal_bridge_a off # internal bridge to bus A
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias gfx off end # internal GPU
device pci 0.1 alias gfx_hda off end # display HD Audio controller
device pci 0.2 alias crypto off end # cryptography coprocessor
@@ -28,6 +29,7 @@
device pci 0.7 alias mp2 off end # sensor fusion hub (MP2)
end
device pci 08.2 alias internal_bridge_b off # internal bridge to bus B
+ ops amd_internal_pcie_gpp_ops
device pci 0.0 alias sata off ops amd_sata_ops end
device pci 0.1 alias xgbe_0 off end
device pci 0.2 alias xgbe_1 off end
--
To view, visit https://review.coreboot.org/c/coreboot/+/68147
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8e235d25622d0bd3f1bb3f18ec0400a02f674a6d
Gerrit-Change-Number: 68147
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newchange
Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68146 )
Change subject: soc/amd/*: Hook up iommu ops in devicetree
......................................................................
soc/amd/*: Hook up iommu ops in devicetree
This removed the need to maintain a PCI driver.
Change-Id: I43def81d615749008fcc9de8734fa2aca752aa9d
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/iommu/iommu.c
M src/soc/amd/mendocino/chipset_mendocino.cb
M src/soc/amd/mendocino/chipset_rembrandt.cb
M src/soc/amd/picasso/chipset.cb
5 files changed, 17 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/68146/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index 63cecd5..1e3b946 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -5,7 +5,7 @@
device domain 0 on
ops cezanne_pci_domain_ops
device pci 00.0 alias gnb on ops cezanne_root_complex_operations end
- device pci 00.2 alias iommu off end
+ device pci 00.2 alias iommu off ops amd_iommu_ops end
device pci 01.0 on end # Dummy Host Bridge, do not disable
device pci 01.1 alias gpp_gfx_bridge_0 off end
diff --git a/src/soc/amd/common/block/iommu/iommu.c b/src/soc/amd/common/block/iommu/iommu.c
index 4f20dd4..52861f2 100644
--- a/src/soc/amd/common/block/iommu/iommu.c
+++ b/src/soc/amd/common/block/iommu/iommu.c
@@ -2,7 +2,6 @@
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <lib.h>
static void iommu_read_resources(struct device *dev)
@@ -28,7 +27,7 @@
}
#endif
-static struct device_operations iommu_ops = {
+struct device_operations amd_iommu_ops = {
.read_resources = iommu_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -37,18 +36,3 @@
.acpi_name = iommu_acpi_name,
#endif
};
-
-static const unsigned short pci_device_ids[] = {
- PCI_DID_AMD_15H_MODEL_303F_NB_IOMMU,
- PCI_DID_AMD_15H_MODEL_707F_NB_IOMMU,
- PCI_DID_AMD_17H_MODEL_1020_NB_IOMMU,
- PCI_DID_AMD_17H_MODEL_606F_NB_IOMMU,
- PCI_DID_AMD_17H_MODEL_A0AF_NB_IOMMU,
- 0
-};
-
-static const struct pci_driver iommu_driver __pci_driver = {
- .ops = &iommu_ops,
- .vendor = PCI_VID_AMD,
- .devices = pci_device_ids,
-};
diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb
index 380e596..3715306 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -5,7 +5,7 @@
device domain 0 on
ops mendocino_pci_domain_ops
device pci 00.0 alias gnb on mendocino_root_complex_operations end
- device pci 00.2 alias iommu off end
+ device pci 00.2 alias iommu off ops amd_iommu_ops end
device pci 01.0 on end # Dummy Host Bridge
diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb
index 56afb3d..b81890f 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -5,7 +5,7 @@
device domain 0 on
ops mendocino_pci_domain_ops
device pci 00.0 alias gnb on ops mendocino_root_complex_operations end
- device pci 00.2 alias iommu off end
+ device pci 00.2 alias iommu off ops amd_iommu_ops end
device pci 01.0 on end # Dummy Host Bridge
diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb
index 07d7547..9a69189 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -7,7 +7,7 @@
device domain 0 on
ops picasso_pci_domain_ops
device pci 00.0 alias gnb on ops picasso_root_complex_operations end
- device pci 00.2 alias iommu off end
+ device pci 00.2 alias iommu off ops amd_iommu_ops end
device pci 01.0 on end # Dummy Host Bridge, do not disable
device pci 01.1 alias gpp_bridge_0 off end
device pci 01.2 alias gpp_bridge_1 off end
--
To view, visit https://review.coreboot.org/c/coreboot/+/68146
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I43def81d615749008fcc9de8734fa2aca752aa9d
Gerrit-Change-Number: 68146
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newchange
Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68145 )
Change subject: soc/amd/acp: Hook up ops in devicetree
......................................................................
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(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/acp/acp.c
M src/soc/amd/mendocino/chipset_mendocino.cb
M src/soc/amd/mendocino/chipset_rembrandt.cb
M src/soc/amd/picasso/chipset.cb
5 files changed, 17 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/68145/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index 3190cc7..63cecd5 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -76,7 +76,7 @@
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 cf0e9f8..a43792e 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 @@
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 @@
.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 876b09e..380e596 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -60,7 +60,7 @@
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 04fb8be..56afb3d 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -60,7 +60,7 @@
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 c1959dc..07d7547 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -23,7 +23,7 @@
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
--
To view, visit https://review.coreboot.org/c/coreboot/+/68145
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id25016703d1716930d9b6c6d1dab5481b10aca17
Gerrit-Change-Number: 68145
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newchange