[PATCH] mtd: qcom_nandc: allow override of partition parser

Manivannan Sadhasivam manivannan.sadhasivam at linaro.org
Thu Apr 22 05:21:26 BST 2021


On Wed, Apr 21, 2021 at 09:31:09PM +0300, Baruch Siach wrote:
> 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 at linaro.org>
> Signed-off-by: Baruch Siach <baruch at tkos.co.il>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>

Thanks,
Mani

> ---
>  drivers/mtd/nand/raw/qcom_nandc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
> index fd4c318b520f..30cc85a32cd7 100644
> --- a/drivers/mtd/nand/raw/qcom_nandc.c
> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
> @@ -2821,7 +2821,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,
> -- 
> 2.30.2
> 



More information about the linux-mtd mailing list