[PATCH v3 7/7] mtd: rawnand: loongson: Add Loongson-2K1000 NAND controller support

Binbin Zhou zhoubb.aaron at gmail.com
Mon Aug 25 00:26:24 PDT 2025


Hi Miquel:

Thanks for your reply.

On Sun, Aug 24, 2025 at 11:40 PM Miquel Raynal
<miquel.raynal at bootlin.com> wrote:
>
> On 21/08/2025 at 14:39:21 +08, Binbin Zhou <zhoubinbin at loongson.cn> wrote:
>
> > The Loongson-2K1000 NAND controller is also similar to the Loongson-1C.
> >
> > It supports a maximum capacity of 16GB FLASH per chip with a maximum
> > page size of 8KB, and it supports up to 4 chip selects and 4 RDY
> > signals.
> >
> > The key difference from the Loongson-2K0500 is that it requires explicit
> > configuration of the DMA control route. Typically, it is configured as
> > APBDMA0.
> >
> > Signed-off-by: Binbin Zhou <zhoubinbin at loongson.cn>
> > ---
> >  .../mtd/nand/raw/loongson-nand-controller.c   | 48 +++++++++++++++++++
> >  1 file changed, 48 insertions(+)
> >
> > diff --git a/drivers/mtd/nand/raw/loongson-nand-controller.c b/drivers/mtd/nand/raw/loongson-nand-controller.c
> > index 7b331d0ca2f0..6610c239f721 100644
> > --- a/drivers/mtd/nand/raw/loongson-nand-controller.c
> > +++ b/drivers/mtd/nand/raw/loongson-nand-controller.c
> > @@ -73,9 +73,18 @@
> >  #define LOONGSON_NAND_READ_ID_TIMEOUT_US     5000
> >
> >  #define LOONGSON_NAND_64BIT_DMA              BIT(0)
> > +#define LOONGSON_NAND_DMA_CONFIG     BIT(1)
>
> You're reusing this flags member, so it's fine, please ignore the
> previous comment (except the style issue).
>
> ...
>
> > +     regs = devm_platform_ioremap_resource(pdev, 2);
>
> Would it be clearer to get the resource by name? (not a strong request)

It will be replaced by

devm_platform_ioremap_resource_byname(pdev, "dma-config");

>
> Thanks
> Miquèl


-- 
Thanks.
Binbin



More information about the linux-mtd mailing list