summaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso/aoac.c
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2020-06-11 14:08:17 -0600
committerPatrick Georgi <pgeorgi@google.com>2020-06-14 16:53:31 +0000
commitc64755bcd70031620e606d30fd095ef6362b5975 (patch)
tree66f4e701f26b8f0ded943f5442be032da15e6e36 /src/soc/amd/picasso/aoac.c
parentd53c281d0beeabcfafd4b2682fbd0c01ae88ac10 (diff)
soc/amd/picasso/aoac: Set the Target Device State when powering on
If the OS sets the target device state to D3, we need to clear it so we can reestablish register access. BUG=b:153001807 TEST=Boot trembyle with I2C powered off and see it power back on. Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: If9bd1b7cfa7b8d074226c4dcdefc1a44cad8b940 Reviewed-on: https://review.coreboot.org/c/coreboot/+/42325 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/amd/picasso/aoac.c')
-rw-r--r--src/soc/amd/picasso/aoac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/aoac.c b/src/soc/amd/picasso/aoac.c
index 35adc24723..2e00d98900 100644
--- a/src/soc/amd/picasso/aoac.c
+++ b/src/soc/amd/picasso/aoac.c
@@ -36,6 +36,8 @@ void power_on_aoac_device(int dev)
/* Power on the UART and AMBA devices */
byte = aoac_read8(AOAC_DEV_D3_CTL(dev));
byte |= FCH_AOAC_PWR_ON_DEV;
+ byte &= ~FCH_AOAC_TARGET_DEVICE_STATE;
+ byte |= FCH_AOAC_D0_INITIALIZED;
aoac_write8(AOAC_DEV_D3_CTL(dev), byte);
}