From a6e3b5ac093a4d9781fc83b75a14d1c47b92b6ef Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 9 Jun 2020 07:56:43 -0600 Subject: soc/amd/picasso: initialize ACP device at init() time The ACP device sits behind a bridge. Despite the logs indicating the bridge is likely hooked up, there's some unusual behavior of writes not sticking. Aside from the speculation of what's causing the issues the initialization of the device should occur at init() because of these potential dependencies. BUG=b:155882600 Change-Id: I8fa83d7d1d4f356c56971d4175a2ae6497a92fb8 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/c/coreboot/+/42231 Reviewed-by: Raul Rangel Reviewed-by: Felix Held Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/amd/picasso/acp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/picasso/acp.c b/src/soc/amd/picasso/acp.c index cbe5d860b0..854dd8f52b 100644 --- a/src/soc/amd/picasso/acp.c +++ b/src/soc/amd/picasso/acp.c @@ -13,15 +13,13 @@ #include #include -static void enable(struct device *dev) +static void init(struct device *dev) { const struct soc_amd_picasso_config *cfg; const struct device *nb_dev = pcidev_path_on_root(GNB_DEVFN); struct resource *res; uintptr_t bar; - pci_dev_enable_resources(dev); - /* Set the proper I2S_PIN_CONFIG state */ if (!nb_dev || !nb_dev->chip_info) return; @@ -44,7 +42,8 @@ static void enable(struct device *dev) static struct device_operations acp_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, - .enable_resources = enable, + .enable_resources = pci_dev_enable_resources, + .init = init, .ops_pci = &pci_dev_ops_pci, }; -- cgit v1.2.3