summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2020-06-09 07:56:43 -0600
committerAaron Durbin <adurbin@chromium.org>2020-06-10 16:23:16 +0000
commita6e3b5ac093a4d9781fc83b75a14d1c47b92b6ef (patch)
tree9d98d5be8f200f05a712fdbfc0f685c6cc8eb0d3
parentcfc3c358b2686bebd936219c5fb3642b834780b2 (diff)
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 <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42231 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/soc/amd/picasso/acp.c7
1 files changed, 3 insertions, 4 deletions
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 <amdblocks/acpimmio.h>
#include <commonlib/helpers.h>
-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,
};