Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43503 )
Change subject: soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG ......................................................................
soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG
This change uses read-modify-write to update ACP_I2S_PIN_CONFIG instead of a write operation since the other bits in the register are reserved.
Change-Id: Ic64e1907858ec293c5f759e627d19c00d748a30e Signed-off-by: Furquan Shaikh furquan@google.com --- M src/soc/amd/picasso/acp.c M src/soc/amd/picasso/include/soc/acp.h 2 files changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/43503/1
diff --git a/src/soc/amd/picasso/acp.c b/src/soc/amd/picasso/acp.c index b598e64..4efef18 100644 --- a/src/soc/amd/picasso/acp.c +++ b/src/soc/amd/picasso/acp.c @@ -41,7 +41,7 @@ }
bar = (uintptr_t)res->base; - write32((void *)(bar + ACP_I2S_PIN_CONFIG), cfg->acp_pin_cfg); + acp_update32(bar, ACP_I2S_PIN_CONFIG, PIN_CONFIG_MASK, cfg->acp_pin_cfg);
/* Enable ACP_PME_EN and ACP_I2S_WAKE_EN for I2S_WAKE event */ acp_update32(bar, ACP_I2S_WAKE_EN, WAKE_EN_MASK, !!cfg->acp_i2s_wake_enable); diff --git a/src/soc/amd/picasso/include/soc/acp.h b/src/soc/amd/picasso/include/soc/acp.h index 36bd6fb..545a372 100644 --- a/src/soc/amd/picasso/include/soc/acp.h +++ b/src/soc/amd/picasso/include/soc/acp.h @@ -5,6 +5,7 @@
/* Bus A D0F5 - Audio Processor */ #define ACP_I2S_PIN_CONFIG 0x1400 /* HDA, Soundwire, I2S */ +#define PIN_CONFIG_MASK (7 << 0) #define ACP_I2S_WAKE_EN 0x1414 #define WAKE_EN_MASK (1 << 0) #define ACP_PME_EN 0x1418
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43503 )
Change subject: soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/43503/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43503/1//COMMIT_MSG@9 PS1, Line 9: of nit: line too long
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43503 )
Change subject: soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43503/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43503/1//COMMIT_MSG@9 PS1, Line 9: of
nit: line too long
I was asked to reflow some of my other commit messages to 75 characters. This line has 74 characters.
Hello build bot (Jenkins), Raul Rangel, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43503
to look at the new patch set (#2).
Change subject: soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG ......................................................................
soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG
This change uses read-modify-write to update ACP_I2S_PIN_CONFIG instead of a write operation since the other bits in the register are reserved.
Change-Id: Ic64e1907858ec293c5f759e627d19c00d748a30e Signed-off-by: Furquan Shaikh furquan@google.com --- M src/soc/amd/picasso/acp.c M src/soc/amd/picasso/include/soc/acp.h 2 files changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/43503/2
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43503 )
Change subject: soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43503/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43503/1//COMMIT_MSG@9 PS1, Line 9: of
I was asked to reflow some of my other commit messages to 75 characters. […]
not sure why gerrit wraps it.
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43503 )
Change subject: soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG ......................................................................
Patch Set 2: Code-Review+2
Aaron Durbin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/43503 )
Change subject: soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG ......................................................................
soc/amd/picasso: Use read-modify-write for ACP_I2S_PIN_CONFIG
This change uses read-modify-write to update ACP_I2S_PIN_CONFIG instead of a write operation since the other bits in the register are reserved.
Change-Id: Ic64e1907858ec293c5f759e627d19c00d748a30e Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/43503 Reviewed-by: Aaron Durbin adurbin@chromium.org Reviewed-by: Raul Rangel rrangel@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/picasso/acp.c M src/soc/amd/picasso/include/soc/acp.h 2 files changed, 2 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved Raul Rangel: Looks good to me, approved
diff --git a/src/soc/amd/picasso/acp.c b/src/soc/amd/picasso/acp.c index b598e64..4efef18 100644 --- a/src/soc/amd/picasso/acp.c +++ b/src/soc/amd/picasso/acp.c @@ -41,7 +41,7 @@ }
bar = (uintptr_t)res->base; - write32((void *)(bar + ACP_I2S_PIN_CONFIG), cfg->acp_pin_cfg); + acp_update32(bar, ACP_I2S_PIN_CONFIG, PIN_CONFIG_MASK, cfg->acp_pin_cfg);
/* Enable ACP_PME_EN and ACP_I2S_WAKE_EN for I2S_WAKE event */ acp_update32(bar, ACP_I2S_WAKE_EN, WAKE_EN_MASK, !!cfg->acp_i2s_wake_enable); diff --git a/src/soc/amd/picasso/include/soc/acp.h b/src/soc/amd/picasso/include/soc/acp.h index 36bd6fb..545a372 100644 --- a/src/soc/amd/picasso/include/soc/acp.h +++ b/src/soc/amd/picasso/include/soc/acp.h @@ -5,6 +5,7 @@
/* Bus A D0F5 - Audio Processor */ #define ACP_I2S_PIN_CONFIG 0x1400 /* HDA, Soundwire, I2S */ +#define PIN_CONFIG_MASK (7 << 0) #define ACP_I2S_WAKE_EN 0x1414 #define WAKE_EN_MASK (1 << 0) #define ACP_PME_EN 0x1418