mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RESEND 1/4] mfd: cs42l43: Prepare support for updated bios patch
@ 2024-12-05 11:58 Charles Keepax
  2024-12-05 11:58 ` [PATCH RESEND 2/4] mfd: cs42l43: Use gpiod_set_raw for GPIO operations Charles Keepax
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Charles Keepax @ 2024-12-05 11:58 UTC (permalink / raw)
  To: lee; +Cc: yung-chuan.liao, peter.ujfalusi, linux-kernel, patches

From: Maciej Strozek <mstrozek@opensource.cirrus.com>

Newer bios patch firmware versions now require use of the shadow register
interface, which was previously only required by the full firmware, update
the check accordingly.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/mfd/cs42l43.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
index e5f17fc430e4..11a1b7f1e121 100644
--- a/drivers/mfd/cs42l43.c
+++ b/drivers/mfd/cs42l43.c
@@ -48,6 +48,7 @@
 
 #define CS42L43_MCU_SUPPORTED_REV		0x2105
 #define CS42L43_MCU_SHADOW_REGS_REQUIRED_REV	0x2200
+#define CS42L43_BIOS_SHADOW_REGS_REQUIRED_REV	0x1002
 #define CS42L43_MCU_SUPPORTED_BIOS_REV		0x0001
 
 #define CS42L43_VDDP_DELAY_US			50
@@ -773,7 +774,8 @@ static int cs42l43_mcu_update_step(struct cs42l43 *cs42l43)
 	 * Later versions of the firmwware require the driver to access some
 	 * features through a set of shadow registers.
 	 */
-	shadow = mcu_rev >= CS42L43_MCU_SHADOW_REGS_REQUIRED_REV;
+	shadow = (mcu_rev >= CS42L43_MCU_SHADOW_REGS_REQUIRED_REV) ||
+		 (bios_rev >= CS42L43_BIOS_SHADOW_REGS_REQUIRED_REV);
 
 	ret = regmap_read(cs42l43->regmap, CS42L43_BOOT_CONTROL, &secure_cfg);
 	if (ret) {
-- 
2.39.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-12 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-05 11:58 [PATCH RESEND 1/4] mfd: cs42l43: Prepare support for updated bios patch Charles Keepax
2024-12-05 11:58 ` [PATCH RESEND 2/4] mfd: cs42l43: Use gpiod_set_raw for GPIO operations Charles Keepax
2024-12-05 11:58 ` [PATCH 3/4] mfd: cs42l43: Increase the SoundWire attach timeout Charles Keepax
2024-12-05 11:58 ` [PATCH 4/4] mfd: cs42l43: Use devres for remove as well Charles Keepax
2024-12-12 18:09 ` [PATCH RESEND 1/4] mfd: cs42l43: Prepare support for updated bios patch Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®