Skip to content

Commit 25e6996

Browse files
Vasant Hegdempe
authored andcommitted
powerpc/powernv/flash: Check OPAL flash calls exist before using
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> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210914101630.30613-1-hegdevasant@linux.vnet.ibm.com
1 parent bb12dd4 commit 25e6996

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/powerpc/platforms/powernv/opal-flash.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ void __init opal_flash_update_init(void)
520520
{
521521
int ret;
522522

523+
/* Firmware update is not supported by firmware */
524+
if (!opal_check_token(OPAL_FLASH_VALIDATE))
525+
return;
526+
523527
/* Allocate validate image buffer */
524528
validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL);
525529
if (!validate_flash_data.buf) {

0 commit comments

Comments
 (0)