From: Atish Patra <atish.patra@wdc.com>
To: linux-kernel@vger.kernel.org
Cc: Atish Patra <atish.patra@wdc.com>,
Albert Ou <aou@eecs.berkeley.edu>, Christoph Hellwig <hch@lst.de>,
devicetree@vger.kernel.org, Dmitry Vyukov <dvyukov@google.com>,
Frank Rowand <frowand.list@gmail.com>,
Guo Ren <guoren@linux.alibaba.com>,
iommu@lists.linux-foundation.org,
linux-riscv@lists.infradead.org,
Marek Szyprowski <m.szyprowski@samsung.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Rob Herring <robh+dt@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Tobias Klauser <tklauser@distanz.ch>
Subject: [RFC 2/5] of: Move of_dma_get_range to of_address.h
Date: Fri, 23 Jul 2021 14:40:28 -0700 [thread overview]
Message-ID: <20210723214031.3251801-3-atish.patra@wdc.com> (raw)
In-Reply-To: <20210723214031.3251801-1-atish.patra@wdc.com>
Currently, of_dma_get_range is kept in of_private.h as it is used by only
OF support code.
Move it to of_address.h so that it can be used by the code outside OF
support code.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
---
drivers/of/of_private.h | 10 ----------
include/linux/of_address.h | 12 ++++++++++++
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index 631489f7f8c0..f65f801e3aae 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -160,16 +160,6 @@ extern int of_bus_n_addr_cells(struct device_node *np);
extern int of_bus_n_size_cells(struct device_node *np);
struct bus_dma_region;
-#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_HAS_DMA)
-int of_dma_get_range(struct device_node *np,
- const struct bus_dma_region **map);
-#else
-static inline int of_dma_get_range(struct device_node *np,
- const struct bus_dma_region **map)
-{
- return -ENODEV;
-}
-#endif
void fdt_init_reserved_mem(void);
void fdt_reserved_mem_save_node(unsigned long node, const char *uname,
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 45598dbec269..0e20f85850fc 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -154,4 +154,16 @@ static inline const __be32 *of_get_pci_address(struct device_node *dev, int bar_
return __of_get_address(dev, -1, bar_no, size, flags);
}
+struct bus_dma_region;
+#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_HAS_DMA)
+int of_dma_get_range(struct device_node *np,
+ const struct bus_dma_region **map);
+#else
+static inline int of_dma_get_range(struct device_node *np,
+ const struct bus_dma_region **map)
+{
+ return -ENODEV;
+}
+#endif
+
#endif /* __OF_ADDRESS_H */
--
2.31.1
next prev parent reply other threads:[~2021-07-23 21:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 21:40 [RFC 0/5] Support non-coherent DMA on RISC-V using a global pool Atish Patra
2021-07-23 21:40 ` [RFC 1/5] RISC-V: Implement arch_sync_dma* functions Atish Patra
2021-07-26 6:56 ` Christoph Hellwig
2021-07-26 21:52 ` Atish Patra
2021-09-11 9:37 ` Guo Ren
2021-08-17 1:48 ` Guo Ren
2021-08-17 3:24 ` Atish Patra
2021-08-17 6:28 ` Guo Ren
2021-07-23 21:40 ` Atish Patra [this message]
2021-07-23 21:40 ` [RFC 3/5] dma-mapping: Enable global non-coherent pool support for RISC-V Atish Patra
2021-07-25 22:29 ` Rob Herring
2021-07-26 7:00 ` Christoph Hellwig
2021-07-26 22:47 ` Atish Patra
2021-07-27 8:52 ` Christoph Hellwig
2021-08-02 18:22 ` Atish Patra
2021-07-23 21:40 ` [RFC 4/5] dma-direct: Allocate dma pages directly if global pool allocation fails Atish Patra
2021-07-26 7:01 ` Christoph Hellwig
2021-07-23 21:40 ` [RFC 5/5] RISC-V: Support a new config option for non-coherent DMA Atish Patra
2021-07-29 4:30 ` [RFC 0/5] Support non-coherent DMA on RISC-V using a global pool Palmer Dabbelt
2021-07-29 6:19 ` Atish Patra
2021-08-17 1:37 ` Guo Ren
2021-08-17 3:28 ` Atish Patra
2021-08-17 6:42 ` Guo Ren
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=20210723214031.3251801-3-atish.patra@wdc.com \
--to=atish.patra@wdc.com \
--cc=aou@eecs.berkeley.edu \
--cc=devicetree@vger.kernel.org \
--cc=dvyukov@google.com \
--cc=frowand.list@gmail.com \
--cc=guoren@linux.alibaba.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=tklauser@distanz.ch \
/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).