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/+/68144 )
Change subject: soc/amd/*: Hook up LPC ops in devicetree
......................................................................
soc/amd/*: Hook up LPC ops in devicetree
This removes the need for a PCI driver.
Change-Id: I6674d13f434cfa27fa6514623ba305af6681f70d
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/lpc/lpc.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(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/68144/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index 8271d24..3190cc7 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -92,7 +92,7 @@
end
device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
- device pci 14.3 alias lpc_bridge on end
+ device pci 14.3 alias lpc_bridge on ops amd_lpc_ops end
device pci 18.0 alias data_fabric_0 on ops cezanne_data_fabric_ops end
device pci 18.1 alias data_fabric_1 on ops cezanne_data_fabric_ops end
diff --git a/src/soc/amd/common/block/lpc/lpc.c b/src/soc/amd/common/block/lpc/lpc.c
index 3d1b2d4..26e0c26 100644
--- a/src/soc/amd/common/block/lpc/lpc.c
+++ b/src/soc/amd/common/block/lpc/lpc.c
@@ -5,7 +5,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pnp.h>
-#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <pc80/mc146818rtc.h>
@@ -319,7 +318,7 @@
}
#endif
-static struct device_operations lpc_ops = {
+struct device_operations amd_lpc_ops = {
.read_resources = lpc_read_resources,
.set_resources = lpc_set_resources,
.enable_resources = lpc_enable_resources,
@@ -331,16 +330,3 @@
.scan_bus = scan_static_bus,
.ops_pci = &pci_dev_ops_pci,
};
-
-static const unsigned short pci_device_ids[] = {
- /* PCI device ID is used on all discrete FCHs and Family 16h Models 00h-3Fh */
- PCI_DID_AMD_SB900_LPC,
- /* PCI device ID is used on all integrated FCHs except Family 16h Models 00h-3Fh */
- PCI_DID_AMD_CZ_LPC,
- 0
-};
-static const struct pci_driver lpc_driver __pci_driver = {
- .ops = &lpc_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 06c5db2..876b09e 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -70,7 +70,7 @@
end
device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
- device pci 14.3 alias lpc_bridge on end
+ device pci 14.3 alias lpc_bridge on ops amd_lpc_opsend
device pci 18.0 alias data_fabric_0 on ops mendocino_data_fabric_ops end
device pci 18.1 alias data_fabric_1 on ops mendocino_data_fabric_ops end
diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb
index 441db75..04fb8be 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -70,7 +70,7 @@
end
device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
- device pci 14.3 alias lpc_bridge on end
+ device pci 14.3 alias lpc_bridge on ops amd_lpc_ops end
device pci 18.0 alias data_fabric_0 on ops mendocino_data_fabric_ops end
device pci 18.1 alias data_fabric_1 on ops mendocino_data_fabric_ops end
diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb
index 6fcfd41..c1959dc 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -33,7 +33,7 @@
device pci 0.2 alias xgbe_1 off end
end
device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
- device pci 14.3 alias lpc_bridge on end
+ device pci 14.3 alias lpc_bridge on ops amd_lpc_ops end
device pci 14.6 alias sdhci off end
device pci 18.0 alias data_fabric_0 on ops picasso_data_fabric_ops end
device pci 18.1 alias data_fabric_1 on ops picasso_data_fabric_ops end
--
To view, visit https://review.coreboot.org/c/coreboot/+/68144
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6674d13f434cfa27fa6514623ba305af6681f70d
Gerrit-Change-Number: 68144
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/+/68143 )
Change subject: soc/amd/cezanne: Use devicetree ops over pci driver
......................................................................
soc/amd/cezanne: 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: If535221335217cee53bca956747e7f17f0a5fd8d
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/cezanne/data_fabric.c
M src/soc/amd/cezanne/root_complex.c
3 files changed, 24 insertions(+), 47 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/68143/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index d975fcf..8271d24 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -4,7 +4,7 @@
end
device domain 0 on
ops cezanne_pci_domain_ops
- device pci 00.0 alias gnb on end
+ device pci 00.0 alias gnb on ops cezanne_root_complex_operations end
device pci 00.2 alias iommu off end
device pci 01.0 on end # Dummy Host Bridge, do not disable
@@ -94,14 +94,14 @@
device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
device pci 14.3 alias lpc_bridge on end
- device pci 18.0 alias data_fabric_0 on end
- device pci 18.1 alias data_fabric_1 on end
- device pci 18.2 alias data_fabric_2 on end
- device pci 18.3 alias data_fabric_3 on end
- device pci 18.4 alias data_fabric_4 on end
- device pci 18.5 alias data_fabric_5 on end
- device pci 18.6 alias data_fabric_6 on end
- device pci 18.7 alias data_fabric_7 on end
+ device pci 18.0 alias data_fabric_0 on ops cezanne_data_fabric_ops end
+ device pci 18.1 alias data_fabric_1 on ops cezanne_data_fabric_ops end
+ device pci 18.2 alias data_fabric_2 on ops cezanne_data_fabric_ops end
+ device pci 18.3 alias data_fabric_3 on ops cezanne_data_fabric_ops end
+ device pci 18.4 alias data_fabric_4 on ops cezanne_data_fabric_ops end
+ device pci 18.5 alias data_fabric_5 on ops cezanne_data_fabric_ops end
+ device pci 18.6 alias data_fabric_6 on ops cezanne_data_fabric_ops end
+ device pci 18.7 alias data_fabric_7 on ops cezanne_data_fabric_ops end
end
device mmio 0xfedc2000 alias i2c_0 off ops soc_amd_i2c_mmio_ops end
diff --git a/src/soc/amd/cezanne/data_fabric.c b/src/soc/amd/cezanne/data_fabric.c
index 43894e9..336b7eb 100644
--- a/src/soc/amd/cezanne/data_fabric.c
+++ b/src/soc/amd/cezanne/data_fabric.c
@@ -7,7 +7,6 @@
#include <cpu/x86/lapic_def.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <soc/data_fabric.h>
#include <soc/iomap.h>
#include <types.h>
@@ -132,37 +131,9 @@
return NULL;
}
-static struct device_operations data_fabric_ops = {
+struct device_operations cezanne_data_fabric_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_name = data_fabric_acpi_name,
.acpi_fill_ssdt = acpi_device_write_pci_dev,
};
-
-static const unsigned short pci_device_ids[] = {
- /* Renoir DF devices */
- PCI_DID_AMD_FAM17H_MODEL60H_DF0,
- PCI_DID_AMD_FAM17H_MODEL60H_DF1,
- PCI_DID_AMD_FAM17H_MODEL60H_DF2,
- PCI_DID_AMD_FAM17H_MODEL60H_DF3,
- PCI_DID_AMD_FAM17H_MODEL60H_DF4,
- PCI_DID_AMD_FAM17H_MODEL60H_DF5,
- PCI_DID_AMD_FAM17H_MODEL60H_DF6,
- PCI_DID_AMD_FAM17H_MODEL60H_DF7,
- /* Cezanne DF devices */
- PCI_DID_AMD_FAM19H_MODEL51H_DF0,
- PCI_DID_AMD_FAM19H_MODEL51H_DF1,
- PCI_DID_AMD_FAM19H_MODEL51H_DF2,
- PCI_DID_AMD_FAM19H_MODEL51H_DF3,
- PCI_DID_AMD_FAM19H_MODEL51H_DF4,
- PCI_DID_AMD_FAM19H_MODEL51H_DF5,
- PCI_DID_AMD_FAM19H_MODEL51H_DF6,
- PCI_DID_AMD_FAM19H_MODEL51H_DF7,
- 0
-};
-
-static const struct pci_driver data_fabric_driver __pci_driver = {
- .ops = &data_fabric_ops,
- .vendor = PCI_VID_AMD,
- .devices = pci_device_ids,
-};
diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c
index 8ea5c9f..ed919b1 100644
--- a/src/soc/amd/cezanne/root_complex.c
+++ b/src/soc/amd/cezanne/root_complex.c
@@ -11,7 +11,6 @@
#include <cpu/amd/msr.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <fsp/util.h>
#include <soc/iomap.h>
#include <stdint.h>
@@ -206,7 +205,7 @@
return "GNB";
}
-static struct device_operations root_complex_operations = {
+struct device_operations cezanne_root_complex_operations = {
.read_resources = read_resources,
.set_resources = noop_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -214,9 +213,3 @@
.acpi_name = gnb_acpi_name,
.acpi_fill_ssdt = root_complex_fill_ssdt,
};
-
-static const struct pci_driver family17_root_complex __pci_driver = {
- .ops = &root_complex_operations,
- .vendor = PCI_VID_AMD,
- .device = PCI_DID_AMD_17H_MODEL_606F_NB,
-};
--
To view, visit https://review.coreboot.org/c/coreboot/+/68143
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If535221335217cee53bca956747e7f17f0a5fd8d
Gerrit-Change-Number: 68143
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/+/68142 )
Change subject: soc/amd/sata.c: Hook up directly in devicetree
......................................................................
soc/amd/sata.c: Hook up directly in devicetree
Change-Id: If7f0a9638151cf981d891464a2c3a0ec5fc9c780
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/sata/sata.c
M src/soc/amd/picasso/chipset.cb
3 files changed, 14 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/68142/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index fa42e8a..d975fcf 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -81,8 +81,8 @@
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
- device pci 0.0 alias sata_0 off end # first SATA controller; AHCI Mode
- device pci 0.1 alias sata_1 off end # second SATA Controller; SATA Raid/AHCI Mode
+ 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
diff --git a/src/soc/amd/common/block/sata/sata.c b/src/soc/amd/common/block/sata/sata.c
index 19a7d3e..6a27168 100644
--- a/src/soc/amd/common/block/sata/sata.c
+++ b/src/soc/amd/common/block/sata/sata.c
@@ -3,7 +3,6 @@
#include <acpi/acpigen.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <amdblocks/sata.h>
static const char *sata_acpi_name(const struct device *dev)
@@ -11,7 +10,7 @@
return "STCR";
}
-static struct device_operations sata_ops = {
+struct device_operations amd_sata_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -20,19 +19,3 @@
.acpi_name = sata_acpi_name,
.acpi_fill_ssdt = acpi_device_write_pci_dev,
};
-
-static const unsigned short pci_device_ids[] = {
- PCI_DID_AMD_CZ_SATA,
- PCI_DID_AMD_CZ_SATA_AHCI,
- PCI_DID_AMD_FAM17H_SATA_AHCI_VER0,
- PCI_DID_AMD_FAM17H_SATA_AHCI_VER1,
- PCI_DID_AMD_FAM17H_SATA_AHCI_RAID_VER0,
- PCI_DID_AMD_FAM17H_SATA_AHCI_RAID_VER1,
- 0
-};
-
-static const struct pci_driver sata0_driver __pci_driver = {
- .ops = &sata_ops,
- .vendor = PCI_VID_AMD,
- .devices = pci_device_ids,
-};
diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb
index 1fee7f8..6fcfd41 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -28,7 +28,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
- device pci 0.0 alias sata off end
+ 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
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/68142
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If7f0a9638151cf981d891464a2c3a0ec5fc9c780
Gerrit-Change-Number: 68142
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/+/68141 )
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/1
diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb
index 3f0d2f2..06c5db2 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -4,7 +4,7 @@
end
device domain 0 on
ops mendocino_pci_domain_ops
- device pci 00.0 alias gnb on end
+ device pci 00.0 alias gnb on mendocino_root_complex_operations end
device pci 00.2 alias iommu off end
device pci 01.0 on end # Dummy Host Bridge
@@ -72,14 +72,14 @@
device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
device pci 14.3 alias lpc_bridge on end
- device pci 18.0 alias data_fabric_0 on end
- device pci 18.1 alias data_fabric_1 on end
- device pci 18.2 alias data_fabric_2 on end
- device pci 18.3 alias data_fabric_3 on end
- device pci 18.4 alias data_fabric_4 on end
- device pci 18.5 alias data_fabric_5 on end
- device pci 18.6 alias data_fabric_6 on end
- device pci 18.7 alias data_fabric_7 on end
+ device pci 18.0 alias data_fabric_0 on ops mendocino_data_fabric_ops end
+ device pci 18.1 alias data_fabric_1 on ops mendocino_data_fabric_ops end
+ device pci 18.2 alias data_fabric_2 on ops mendocino_data_fabric_ops end
+ device pci 18.3 alias data_fabric_3 on ops mendocino_data_fabric_ops end
+ device pci 18.4 alias data_fabric_4 on ops mendocino_data_fabric_ops end
+ device pci 18.5 alias data_fabric_5 on ops mendocino_data_fabric_ops end
+ device pci 18.6 alias data_fabric_6 on ops mendocino_data_fabric_ops end
+ device pci 18.7 alias data_fabric_7 on ops mendocino_data_fabric_ops end
end
device mmio 0xfedc2000 alias i2c_0 off ops soc_amd_i2c_mmio_ops end
diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb
index 31499b8..441db75 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -4,7 +4,7 @@
end
device domain 0 on
ops mendocino_pci_domain_ops
- device pci 00.0 alias gnb on end
+ device pci 00.0 alias gnb on ops mendocino_root_complex_operations end
device pci 00.2 alias iommu off end
device pci 01.0 on end # Dummy Host Bridge
@@ -72,14 +72,14 @@
device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
device pci 14.3 alias lpc_bridge on end
- device pci 18.0 alias data_fabric_0 on end
- device pci 18.1 alias data_fabric_1 on end
- device pci 18.2 alias data_fabric_2 on end
- device pci 18.3 alias data_fabric_3 on end
- device pci 18.4 alias data_fabric_4 on end
- device pci 18.5 alias data_fabric_5 on end
- device pci 18.6 alias data_fabric_6 on end
- device pci 18.7 alias data_fabric_7 on end
+ device pci 18.0 alias data_fabric_0 on ops mendocino_data_fabric_ops end
+ device pci 18.1 alias data_fabric_1 on ops mendocino_data_fabric_ops end
+ device pci 18.2 alias data_fabric_2 on ops mendocino_data_fabric_ops end
+ device pci 18.3 alias data_fabric_3 on ops mendocino_data_fabric_ops end
+ device pci 18.4 alias data_fabric_4 on ops mendocino_data_fabric_ops end
+ device pci 18.5 alias data_fabric_5 on ops mendocino_data_fabric_ops end
+ device pci 18.6 alias data_fabric_6 on ops mendocino_data_fabric_ops end
+ device pci 18.7 alias data_fabric_7 on ops mendocino_data_fabric_ops end
end
device mmio 0xfedc2000 alias i2c_0 off ops soc_amd_i2c_mmio_ops end
diff --git a/src/soc/amd/mendocino/data_fabric.c b/src/soc/amd/mendocino/data_fabric.c
index 0a39959..4195ac0 100644
--- a/src/soc/amd/mendocino/data_fabric.c
+++ b/src/soc/amd/mendocino/data_fabric.c
@@ -9,7 +9,6 @@
#include <cpu/x86/lapic_def.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <soc/data_fabric.h>
#include <soc/iomap.h>
#include <types.h>
@@ -127,27 +126,9 @@
return NULL;
}
-static struct device_operations data_fabric_ops = {
+struct device_operations mendocino_data_fabric_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_name = data_fabric_acpi_name,
.acpi_fill_ssdt = acpi_device_write_pci_dev,
};
-
-static const unsigned short pci_device_ids[] = {
- PCI_DID_AMD_FAM17H_MODELA0H_DF0,
- PCI_DID_AMD_FAM17H_MODELA0H_DF1,
- PCI_DID_AMD_FAM17H_MODELA0H_DF2,
- PCI_DID_AMD_FAM17H_MODELA0H_DF3,
- PCI_DID_AMD_FAM17H_MODELA0H_DF4,
- PCI_DID_AMD_FAM17H_MODELA0H_DF5,
- PCI_DID_AMD_FAM17H_MODELA0H_DF6,
- PCI_DID_AMD_FAM17H_MODELA0H_DF7,
- 0
-};
-
-static const struct pci_driver data_fabric_driver __pci_driver = {
- .ops = &data_fabric_ops,
- .vendor = PCI_VID_AMD,
- .devices = pci_device_ids,
-};
diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c
index 7f54bde..6768613 100644
--- a/src/soc/amd/mendocino/root_complex.c
+++ b/src/soc/amd/mendocino/root_complex.c
@@ -13,7 +13,6 @@
#include <cpu/amd/msr.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <fsp/util.h>
#include <soc/iomap.h>
#include <stdint.h>
@@ -236,7 +235,7 @@
return "GNB";
}
-static struct device_operations root_complex_operations = {
+struct device_operations mendocino_root_complex_operations = {
.read_resources = read_resources,
.set_resources = noop_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -244,9 +243,3 @@
.acpi_name = gnb_acpi_name,
.acpi_fill_ssdt = root_complex_fill_ssdt,
};
-
-static const struct pci_driver family17_root_complex __pci_driver = {
- .ops = &root_complex_operations,
- .vendor = PCI_VID_AMD,
- .device = PCI_DID_AMD_17H_MODEL_A0AF_NB,
-};
--
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: 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/+/68140 )
Change subject: soc/amd/*: Hook up smbus ops to devicetree
......................................................................
soc/amd/*: Hook up smbus ops to devicetree
Change-Id: Iab75f8c28a247f1370f4425e19cc215678bfa3e5
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/cezanne/chipset.cb
M src/soc/amd/common/block/smbus/sm.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, 15 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/68140/1
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
index 3426f4e..fa42e8a 100644
--- a/src/soc/amd/cezanne/chipset.cb
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -91,7 +91,7 @@
device pci 0.2 alias i2s_ac97 off end # I2S/AC'97 Audio
end
- device pci 14.0 alias smbus on end # primary FCH function
+ device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
device pci 14.3 alias lpc_bridge on end
device pci 18.0 alias data_fabric_0 on end
diff --git a/src/soc/amd/common/block/smbus/sm.c b/src/soc/amd/common/block/smbus/sm.c
index 801a154..e958831 100644
--- a/src/soc/amd/common/block/smbus/sm.c
+++ b/src/soc/amd/common/block/smbus/sm.c
@@ -3,7 +3,6 @@
#include <amdblocks/acpimmio.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
#include <device/smbus.h>
#include <device/smbus_host.h>
@@ -64,7 +63,7 @@
}
#endif
-static struct device_operations smbus_ops = {
+static struct device_operations amd_smbus_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -75,10 +74,3 @@
.acpi_name = smbus_acpi_name,
#endif
};
-
-static const struct pci_driver smbus_driver __pci_driver = {
- .ops = &smbus_ops,
- .vendor = PCI_VID_AMD,
- /* PCI device ID is used on all integrated FCHs except Family 16h Models 00h-3Fh */
- .device = PCI_DID_AMD_CZ_SMBUS,
-};
diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb
index e687ec7..3f0d2f2 100644
--- a/src/soc/amd/mendocino/chipset_mendocino.cb
+++ b/src/soc/amd/mendocino/chipset_mendocino.cb
@@ -69,7 +69,7 @@
device pci 0.0 alias xhci_2 off end # Might also be a dummy device with different PCI DID
end
- device pci 14.0 alias smbus on end # primary FCH function
+ device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
device pci 14.3 alias lpc_bridge on end
device pci 18.0 alias data_fabric_0 on end
diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb
index bfdddef..31499b8 100644
--- a/src/soc/amd/mendocino/chipset_rembrandt.cb
+++ b/src/soc/amd/mendocino/chipset_rembrandt.cb
@@ -69,7 +69,7 @@
device pci 0.0 alias xhci_2 off end # Might also be a dummy device with different PCI DID
end
- device pci 14.0 alias smbus on end # primary FCH function
+ device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
device pci 14.3 alias lpc_bridge on end
device pci 18.0 alias data_fabric_0 on end
diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb
index 0ed7c73..1fee7f8 100644
--- a/src/soc/amd/picasso/chipset.cb
+++ b/src/soc/amd/picasso/chipset.cb
@@ -32,7 +32,7 @@
device pci 0.1 alias xgbe_0 off end
device pci 0.2 alias xgbe_1 off end
end
- device pci 14.0 alias smbus on end # primary FCH function
+ device pci 14.0 alias smbus on ops amd_smbus_ops end # primary FCH function
device pci 14.3 alias lpc_bridge on end
device pci 14.6 alias sdhci off end
device pci 18.0 alias data_fabric_0 on ops picasso_data_fabric_ops end
--
To view, visit https://review.coreboot.org/c/coreboot/+/68140
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iab75f8c28a247f1370f4425e19cc215678bfa3e5
Gerrit-Change-Number: 68140
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, Matt DeVillier, Fred Reitberger, Felix Held.
Hello Jason Glenesk, Matt DeVillier, Fred Reitberger, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/67743
to look at the new patch set (#4).
Change subject: soc/amd/picasso: Use devicetree ops over pci driver
......................................................................
soc/amd/picasso: 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: Ide747c9d386731af89b27630b200676c6e439910
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/amd/picasso/chipset.cb
M src/soc/amd/picasso/data_fabric.c
M src/soc/amd/picasso/root_complex.c
3 files changed, 24 insertions(+), 37 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/67743/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/67743
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ide747c9d386731af89b27630b200676c6e439910
Gerrit-Change-Number: 67743
Gerrit-PatchSet: 4
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-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
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: Robert Zieba, Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Hello build bot (Jenkins), 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/+/68138
to look at the new patch set (#2).
Change subject: soc/amd/cezanne: Factor out common GPP clk req code
......................................................................
soc/amd/cezanne: Factor out common GPP clk req code
This commit factors out the `gpp_dxio_update_clk_req_config` function
as it will be useful for other AMD SoCs.
BUG=b:250009974
TEST=Ran on nipperkin device, verified clk req settings match enabled
devices
Change-Id: I9a4c72d8e980993c76a1b128f17b65b0db972a03
Signed-off-by: Robert Zieba <robertzieba(a)google.com>
---
M src/soc/amd/cezanne/chip.h
M src/soc/amd/cezanne/fch.c
A src/soc/amd/common/block/include/amdblocks/pci_gpp.h
M src/soc/amd/common/block/pci/pcie_gpp.c
4 files changed, 126 insertions(+), 94 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/68138/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68138
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9a4c72d8e980993c76a1b128f17b65b0db972a03
Gerrit-Change-Number: 68138
Gerrit-PatchSet: 2
Gerrit-Owner: Robert Zieba <robertzieba(a)google.com>
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-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Robert Zieba <robertzieba(a)google.com>
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.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68138 )
Change subject: soc/amd/cezanne: Factor out common GPP clk req code
......................................................................
Patch Set 1:
(1 comment)
File src/soc/amd/common/block/include/amdblocks/pci_gpp.h:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-159715):
https://review.coreboot.org/c/coreboot/+/68138/comment/62fe524c_8ff25ad1
PS1, Line 17: #endif
adding a line without newline at end of file
--
To view, visit https://review.coreboot.org/c/coreboot/+/68138
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9a4c72d8e980993c76a1b128f17b65b0db972a03
Gerrit-Change-Number: 68138
Gerrit-PatchSet: 1
Gerrit-Owner: Robert Zieba <robertzieba(a)google.com>
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-Comment-Date: Wed, 05 Oct 2022 20:22:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment