All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using
@ 2021-09-14 10:16 Vasant Hegde
  2021-09-15  6:23 ` Michael Ellerman
  2022-05-24 11:09 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Vasant Hegde @ 2021-09-14 10:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Vasant Hegde

Currently only FSP based powernv systems supports firmware update
interfaces. Hence check that the token OPAL_FLASH_VALIDATE exists
before initalising the flash driver.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/opal-flash.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/opal-flash.c b/arch/powerpc/platforms/powernv/opal-flash.c
index 7e7d38b17420..05490fc22fae 100644
--- a/arch/powerpc/platforms/powernv/opal-flash.c
+++ b/arch/powerpc/platforms/powernv/opal-flash.c
@@ -520,6 +520,10 @@ void __init opal_flash_update_init(void)
 {
 	int ret;
 
+	/* Firmware update is not supported by firmware */
+	if (!opal_check_token(OPAL_FLASH_VALIDATE))
+		return;
+
 	/* Allocate validate image buffer */
 	validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL);
 	if (!validate_flash_data.buf) {
-- 
2.31.1


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

end of thread, other threads:[~2022-05-24 11:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 10:16 [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using Vasant Hegde
2021-09-15  6:23 ` Michael Ellerman
2021-09-15  6:55   ` Vasant Hegde
2021-09-15  6:55   ` Vasant Hegde
2022-05-24 11:09 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.