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 09:10:04 +0100 [thread overview]
Message-ID: <874j1tykgz.fsf@bootlin.com> (raw)
In-Reply-To: <CAJhJPsVhH=8dKmUgmTSHnG8H1_9G3zvovX9hDv_VM6fSUR5oQw@mail.gmail.com> (Keguang Zhang's message of "Sat, 18 Jan 2025 16:01:19 +0800")
>> >> Don't you need a dma_addr_t here instead? You shall remap the resource.
>> >>
>> > Sorry, I don't quite understand.
>> > 'dma_base' is already of type dma_addr_t.
>>
>> I didn't identify where the dma_base was remapped, but if that's already
>> done then we're good.
>
> Perhaps I misunderstand the usage of dma_map_resource(). dma_base is
> the physical address and will be written to the DMA controller
> register at last.
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.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
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 09:10:04 +0100 [thread overview]
Message-ID: <874j1tykgz.fsf@bootlin.com> (raw)
In-Reply-To: <CAJhJPsVhH=8dKmUgmTSHnG8H1_9G3zvovX9hDv_VM6fSUR5oQw@mail.gmail.com> (Keguang Zhang's message of "Sat, 18 Jan 2025 16:01:19 +0800")
>> >> Don't you need a dma_addr_t here instead? You shall remap the resource.
>> >>
>> > Sorry, I don't quite understand.
>> > 'dma_base' is already of type dma_addr_t.
>>
>> I didn't identify where the dma_base was remapped, but if that's already
>> done then we're good.
>
> Perhaps I misunderstand the usage of dma_map_resource(). dma_base is
> the physical address and will be written to the DMA controller
> register at last.
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.
Thanks,
Miquèl
next prev parent reply other threads:[~2025-01-20 8:10 UTC|newest]
Thread overview: 27+ 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
2024-12-17 10:16 ` Keguang Zhang via B4 Relay
2024-12-17 10:16 ` Keguang Zhang via B4 Relay
2024-12-17 10:16 ` [PATCH v11 1/2] dt-bindings: mtd: Add Loongson-1 NAND Controller Keguang Zhang
2024-12-17 10:16 ` Keguang Zhang via B4 Relay
2024-12-17 10:16 ` Keguang Zhang via B4 Relay
2024-12-18 9:01 ` Krzysztof Kozlowski
2024-12-18 9:01 ` Krzysztof Kozlowski
2024-12-18 9:31 ` Keguang Zhang
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
2024-12-17 10:16 ` Keguang Zhang via B4 Relay
2024-12-17 10:16 ` Keguang Zhang via B4 Relay
2025-01-15 18:54 ` Miquel Raynal
2025-01-15 18:54 ` Miquel Raynal
2025-01-17 11:58 ` Keguang Zhang
2025-01-17 11:58 ` Keguang Zhang
2025-01-17 18:26 ` Miquel Raynal
2025-01-17 18:26 ` Miquel Raynal
2025-01-18 8:01 ` Keguang Zhang
2025-01-18 8:01 ` Keguang Zhang
2025-01-20 8:10 ` Miquel Raynal [this message]
2025-01-20 8:10 ` Miquel Raynal
2025-01-20 11:08 ` Keguang Zhang
2025-01-20 11:08 ` Keguang Zhang
2025-01-20 12:54 ` Miquel Raynal
2025-01-20 12:54 ` Miquel Raynal
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=874j1tykgz.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 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.