All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Md Sadre Alam <quic_mdalam@quicinc.com>
Cc: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, richard@nod.at, vigneshr@ti.com,
	manivannan.sadhasivam@linaro.org, linux-arm-msm@vger.kernel.org,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	quic_srichara@quicinc.com, quic_varada@quicinc.com,
	Alexandru Gagniuc <mr.nuke.me@gmail.com>
Subject: Re: [PATCH v5 4/7] drivers: mtd: nand: Add qpic_common API file
Date: Thu, 16 May 2024 14:37:48 +0200	[thread overview]
Message-ID: <20240516143748.2aa6de80@xps-13> (raw)
In-Reply-To: <20240508083637.3744003-5-quic_mdalam@quicinc.com>

Hello,

> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -61,6 +61,14 @@ config MTD_NAND_ECC_MEDIATEK
>  	help
>  	  This enables support for the hardware ECC engine from Mediatek.
>  
> +config QPIC_COMMON
> +	tristate "QPIC common api file"
> +	depends on ARCH_QCOM || COMPILE_TEST
> +	help
> +	  This enables support for common api for qpic nand controller.
> +	  common apis will be used by both raw nand driver and serial nand
> +	  driver.

This should probably not be a standalone selectable item. Make it
automatically selected by the users including the common header.

> +
>  endmenu
>  
>  endmenu
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 19e1291ac4d5..c0c1f8bd0220 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -3,6 +3,7 @@
>  nandcore-objs := core.o bbt.o
>  obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
>  obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
> +obj-$(CONFIG_QPIC_COMMON) += qpic_common.o
>  
>  obj-y	+= onenand/
>  obj-y	+= raw/
> diff --git a/drivers/mtd/nand/qpic_common.c b/drivers/mtd/nand/qpic_common.c
> new file mode 100644
> index 000000000000..d48892141365
> --- /dev/null
> +++ b/drivers/mtd/nand/qpic_common.c
> @@ -0,0 +1,741 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2016, The Linux Foundation. All rights reserved.
> + */
> +#include <linux/bitops.h>
> +#include <linux/clk.h>
> +#include <linux/delay.h>
> +#include <linux/dmaengine.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/dma/qcom_adm.h>
> +#include <linux/dma/qcom_bam_dma.h>
> +#include <linux/module.h>
> +#include <linux/mtd/partitions.h>
> +#include <linux/mtd/rawnand.h>

No raw NAND include in the common file. If there is something raw NAND
specific, it should not be here.

> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
> +#include <linux/mtd/nand-qpic-common.h>

Thanks,
Miquèl

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Md Sadre Alam <quic_mdalam@quicinc.com>
Cc: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, richard@nod.at, vigneshr@ti.com,
	manivannan.sadhasivam@linaro.org, linux-arm-msm@vger.kernel.org,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	quic_srichara@quicinc.com, quic_varada@quicinc.com,
	Alexandru Gagniuc <mr.nuke.me@gmail.com>
Subject: Re: [PATCH v5 4/7] drivers: mtd: nand: Add qpic_common API file
Date: Thu, 16 May 2024 14:37:48 +0200	[thread overview]
Message-ID: <20240516143748.2aa6de80@xps-13> (raw)
In-Reply-To: <20240508083637.3744003-5-quic_mdalam@quicinc.com>

Hello,

> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -61,6 +61,14 @@ config MTD_NAND_ECC_MEDIATEK
>  	help
>  	  This enables support for the hardware ECC engine from Mediatek.
>  
> +config QPIC_COMMON
> +	tristate "QPIC common api file"
> +	depends on ARCH_QCOM || COMPILE_TEST
> +	help
> +	  This enables support for common api for qpic nand controller.
> +	  common apis will be used by both raw nand driver and serial nand
> +	  driver.

This should probably not be a standalone selectable item. Make it
automatically selected by the users including the common header.

> +
>  endmenu
>  
>  endmenu
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 19e1291ac4d5..c0c1f8bd0220 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -3,6 +3,7 @@
>  nandcore-objs := core.o bbt.o
>  obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
>  obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
> +obj-$(CONFIG_QPIC_COMMON) += qpic_common.o
>  
>  obj-y	+= onenand/
>  obj-y	+= raw/
> diff --git a/drivers/mtd/nand/qpic_common.c b/drivers/mtd/nand/qpic_common.c
> new file mode 100644
> index 000000000000..d48892141365
> --- /dev/null
> +++ b/drivers/mtd/nand/qpic_common.c
> @@ -0,0 +1,741 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2016, The Linux Foundation. All rights reserved.
> + */
> +#include <linux/bitops.h>
> +#include <linux/clk.h>
> +#include <linux/delay.h>
> +#include <linux/dmaengine.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/dma/qcom_adm.h>
> +#include <linux/dma/qcom_bam_dma.h>
> +#include <linux/module.h>
> +#include <linux/mtd/partitions.h>
> +#include <linux/mtd/rawnand.h>

No raw NAND include in the common file. If there is something raw NAND
specific, it should not be here.

> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
> +#include <linux/mtd/nand-qpic-common.h>

Thanks,
Miquèl

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

  reply	other threads:[~2024-05-16 12:37 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08  8:36 [PATCH v5 0/7] Add QPIC SPI NAND driver Md Sadre Alam
2024-05-08  8:36 ` Md Sadre Alam
2024-05-08  8:36 ` [PATCH v5 1/7] spi: dt-bindings: Introduce qcom,spi-qpic-snand Md Sadre Alam
2024-05-08  8:36   ` Md Sadre Alam
2024-05-08  8:36 ` [PATCH v5 2/7] mtd: rawnand: qcom: cleanup qcom_nandc driver Md Sadre Alam
2024-05-08  8:36   ` Md Sadre Alam
2024-05-08  8:36 ` [PATCH v5 3/7] mtd: rawnand: qcom: Add qcom prefix to common api Md Sadre Alam
2024-05-08  8:36   ` Md Sadre Alam
2024-05-08  8:36 ` [PATCH v5 4/7] drivers: mtd: nand: Add qpic_common API file Md Sadre Alam
2024-05-08  8:36   ` Md Sadre Alam
2024-05-16 12:37   ` Miquel Raynal [this message]
2024-05-16 12:37     ` Miquel Raynal
2024-05-20  9:51     ` Md Sadre Alam
2024-05-20  9:51       ` Md Sadre Alam
2024-05-08  8:36 ` [PATCH v5 5/7] spi: spi-qpic: add driver for QCOM SPI NAND flash Interface Md Sadre Alam
2024-05-08  8:36   ` Md Sadre Alam
2024-05-16 12:56   ` Miquel Raynal
2024-05-16 12:56     ` Miquel Raynal
2024-05-20 10:07     ` Md Sadre Alam
2024-05-20 10:07       ` Md Sadre Alam
2024-05-20 12:43       ` Miquel Raynal
2024-05-20 12:43         ` Miquel Raynal
2024-05-20 15:25         ` Md Sadre Alam
2024-05-20 15:25           ` Md Sadre Alam
2024-05-08  8:36 ` [PATCH v5 6/7] arm64: dts: qcom: ipq9574: Add SPI nand support Md Sadre Alam
2024-05-08  8:36   ` Md Sadre Alam
2024-05-08  8:36 ` [PATCH v5 7/7] arm64: dts: qcom: ipq9574: Disable eMMC node Md Sadre Alam
2024-05-08  8:36   ` Md Sadre Alam
2024-05-16 12:59   ` Miquel Raynal
2024-05-16 12:59     ` Miquel Raynal
2024-05-20 10:15     ` Md Sadre Alam
2024-05-20 10:15       ` Md Sadre Alam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240516143748.2aa6de80@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mr.nuke.me@gmail.com \
    --cc=quic_mdalam@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=quic_varada@quicinc.com \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.