From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Keguang Zhang <keguang.zhang@gmail.com>
Cc: Keguang Zhang via B4 Relay
<devnull+keguang.zhang.gmail.com@kernel.org>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v11 2/2] mtd: rawnand: Add Loongson-1 NAND Controller Driver
Date: Mon, 20 Jan 2025 13:54:17 +0100 [thread overview]
Message-ID: <8734hdsl1i.fsf@bootlin.com> (raw)
In-Reply-To: <CAJhJPsU1eFJ_R1-emENs8T5rrKXUKjvk-cQx9RT2ztTvmOTZug@mail.gmail.com> (Keguang Zhang's message of "Mon, 20 Jan 2025 19:08:55 +0800")
>> IIUC, yes and no. It is the remapped address of the physical address you
>> want to reach, not the physical address itself. The type is dma_addr_t
>> and not phys_addr_t and you can get a dma address out of a physical
>> address with a call to dma_map_resource(). The numerical value might be
>> the same if there is no IO-MMU involved, but the good practice is to
>> remap anyway.
>
> Got it. I will keep dma_map_resource() as it is, which is called in
> ls1x_nand_probe().
>
> + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand-dma");
> + host->dma_base = dma_map_resource(dev, res->start, resource_size(res),
> + DMA_BIDIRECTIONAL, 0);
> + if (dma_mapping_error(dev, host->dma_base))
> + return -ENXIO;
Looks correct.
prev parent reply other threads:[~2025-01-20 12:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 10:16 [PATCH v11 0/2] Add support for Loongson-1 NAND Keguang Zhang via B4 Relay
2024-12-17 10:16 ` [PATCH v11 1/2] dt-bindings: mtd: Add Loongson-1 NAND Controller Keguang Zhang via B4 Relay
2024-12-18 9:01 ` Krzysztof Kozlowski
2024-12-18 9:31 ` Keguang Zhang
2024-12-17 10:16 ` [PATCH v11 2/2] mtd: rawnand: Add Loongson-1 NAND Controller Driver Keguang Zhang via B4 Relay
2025-01-15 18:54 ` Miquel Raynal
2025-01-17 11:58 ` Keguang Zhang
2025-01-17 18:26 ` Miquel Raynal
2025-01-18 8:01 ` Keguang Zhang
2025-01-20 8:10 ` Miquel Raynal
2025-01-20 11:08 ` Keguang Zhang
2025-01-20 12:54 ` Miquel Raynal [this message]
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=8734hdsl1i.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+keguang.zhang.gmail.com@kernel.org \
--cc=keguang.zhang@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--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 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).