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@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