mtd: rawnand: qcom: allow override of partition parser
authorBaruch Siach <baruch@tkos.co.il>
Wed, 21 Apr 2021 18:31:09 +0000 (21:31 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 10 May 2021 09:58:58 +0000 (11:58 +0200)
Commit 82bfd11f1b03 ("mtd: rawnand: qcom: Add support for Qcom SMEM
parser") made qcomsmem the only parser for qcom_nandc partitions. This
might be problematic for systems with both SPI and NAND MTD devices.
When booting from SPI flash the partition table should not apply to the
NAND flash.

Prepend cmdlinepart and ofpart parsers to allow override of the
partition parser.

Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/cf470f05af514acd5bd94548804ffa96b966a0a8.1619029869.git.baruch@tkos.co.il
drivers/mtd/nand/raw/qcom_nandc.c

index a64fb6c..ef90b66 100644 (file)
@@ -2882,7 +2882,7 @@ static int qcom_nandc_setup(struct qcom_nand_controller *nandc)
        return 0;
 }
 
-static const char * const probes[] = { "qcomsmem", NULL };
+static const char * const probes[] = { "cmdlinepart", "ofpart", "qcomsmem", NULL };
 
 static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc,
                                            struct qcom_nand_host *host,