linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: qcom_nandc: allow override of partition parser
@ 2021-04-21 18:31 Baruch Siach
  2021-04-22  4:21 ` Manivannan Sadhasivam
  2021-05-10 10:02 ` Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Baruch Siach @ 2021-04-21 18:31 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: linux-mtd, Baruch Siach, Manivannan Sadhasivam

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(-)

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


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: qcom_nandc: allow override of partition parser
  2021-04-21 18:31 [PATCH] mtd: qcom_nandc: allow override of partition parser Baruch Siach
@ 2021-04-22  4:21 ` Manivannan Sadhasivam
  2021-05-10 10:02 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2021-04-22  4:21 UTC (permalink / raw)
  To: Baruch Siach
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, linux-mtd

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
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: qcom_nandc: allow override of partition parser
  2021-04-21 18:31 [PATCH] mtd: qcom_nandc: allow override of partition parser Baruch Siach
  2021-04-22  4:21 ` Manivannan Sadhasivam
@ 2021-05-10 10:02 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2021-05-10 10:02 UTC (permalink / raw)
  To: Baruch Siach, Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: linux-mtd, Manivannan Sadhasivam

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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-10 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 18:31 [PATCH] mtd: qcom_nandc: allow override of partition parser Baruch Siach
2021-04-22  4:21 ` Manivannan Sadhasivam
2021-05-10 10:02 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).