diff mbox series

mtd: qcom_nandc: allow override of partition parser

Message ID cf470f05af514acd5bd94548804ffa96b966a0a8.1619029869.git.baruch@tkos.co.il
State Accepted
Headers show
Series mtd: qcom_nandc: allow override of partition parser | expand

Commit Message

Baruch Siach April 21, 2021, 6:31 p.m. UTC
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>
---
 drivers/mtd/nand/raw/qcom_nandc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Manivannan Sadhasivam April 22, 2021, 4:21 a.m. UTC | #1
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@linaro.org>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@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
>
Miquel Raynal May 10, 2021, 10:02 a.m. UTC | #2
On Wed, 2021-04-21 at 18:31:09 UTC, 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@linaro.org>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel
diff mbox series

Patch

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,