From b4b121f38dccaec2677e9e61090673c9e73a498f Mon Sep 17 00:00:00 2001 From: Pradeep P V K Date: Tue, 11 Apr 2023 16:34:04 +0530 Subject: [PATCH] mtd: msm_qpic_nand: Add boot_a and boot_b access to APPS As part of FR53657, make changes to support for boot_a and boot_b partition access to HLOS APPS. Change-Id: Ic173bd54df11e42b1811c198314719c4c34338db Signed-off-by: Pradeep P V K --- drivers/mtd/devices/msm_qpic_nand.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/devices/msm_qpic_nand.c b/drivers/mtd/devices/msm_qpic_nand.c index 78517b27c309..19fdb76fb697 100644 --- a/drivers/mtd/devices/msm_qpic_nand.c +++ b/drivers/mtd/devices/msm_qpic_nand.c @@ -2,6 +2,7 @@ /* * Copyright (C) 2007 Google, Inc. * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include "msm_qpic_nand.h" @@ -797,9 +798,15 @@ static int msm_nand_flash_onfi_probe(struct msm_nand_info *info) memset(&data, 0, sizeof(struct msm_nand_flash_onfi_data)); - /* Lookup the partition to which apps has access to */ + /* + * Lookup the partition to which apps has access to + * As a part of FR53657, add support for boot_a + * and boot_b partitions. + */ for (i = 0; i < FLASH_PTABLE_MAX_PARTS_V4; i++) { - if (mtd_part[i].name && !strcmp("boot", mtd_part[i].name)) { + if (mtd_part[i].name && (!strcmp("boot", mtd_part[i].name) || + !strcmp("boot_a", mtd_part[i].name) || + !strcmp("boot_b", mtd_part[i].name))) { page_address = mtd_part[i].offset << 6; break; }