From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/1] dt: Add general DMA window parser
Date: Mon, 23 Apr 2012 12:16:40 -0600 [thread overview]
Message-ID: <4F959C88.3090805@wwwdotorg.org> (raw)
In-Reply-To: <20120423.145352.1868450546332033138.hdoyu@nvidia.com>
On 04/23/2012 05:53 AM, Hiroshi Doyu wrote:
> From: Hiroshi DOYU <hdoyu@nvidia.com>
>
> This code was based on:
> "arch/microblaze/kernel/prom_parse.c"
> "arch/powerpc/kernel/prom_parse.c"
>
> "ibm," prefix could be supported with some modification.
That'd probably be a good idea. If it isn't supported, then this code
can't be used as a replacement for the PPC and Microblaze code.
> +int of_parse_dma_window(struct device_node *dn,
> + const char *propname, int index,
> + unsigned long *busno,
> + dma_addr_t *addr, size_t *size)
> +{
> + const __be32 *dma_window, *end;
> + int bytes, cur_index = 0;
> +
> + if (!dn || !propname || !addr || !size)
> + return -EINVAL;
Instead of erroring out if (!propname), perhaps:
if (!propname)
propname = "dma-window";
so that only drivers using bindings before this common binding was
defined actually need to write out the property name?
> diff --git a/include/linux/of_address.h b/include/linux/of_address.h
...
> +extern int of_parse_dma_window(struct device_node *dev,
> + const char *propname, int index,
> + unsigned long *busno,
> + dma_addr_t *phys, size_t *size);
This function has the same name as the PPC and Microblaze code it's
based on. Is that going to cause compile and link errors due to
duplicate symbol definitions?
prev parent reply other threads:[~2012-04-23 18:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201204161534.20089.arnd@arndb.de>
[not found] ` <20120418081746.995724e27bdc726049cd4965@nvidia.com>
[not found] ` <20120418054140.GA17506@avionic-0098.adnet.avionic-design.de>
2012-04-18 6:44 ` [PATCH 1/1] arm/dts: Tegra30: Add device tree support for SMMU Hiroshi Doyu
2012-04-18 7:31 ` Arnd Bergmann
2012-04-18 9:18 ` Hiroshi Doyu
2012-04-18 9:26 ` Thierry Reding
2012-04-18 10:19 ` [PATCH 1/1] dt: Add general DMA window parser Hiroshi Doyu
2012-04-18 10:26 ` Thierry Reding
2012-04-18 10:36 ` Hiroshi Doyu
2012-04-18 10:54 ` Thierry Reding
2012-04-18 11:13 ` Hiroshi Doyu
2012-04-18 17:27 ` Stephen Warren
2012-04-18 19:39 ` Thierry Reding
2012-04-19 12:32 ` Hiroshi Doyu
2012-04-19 12:19 ` Hiroshi Doyu
2012-04-23 11:53 ` [PATCH v2 " Hiroshi Doyu
2012-04-23 18:16 ` Stephen Warren [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=4F959C88.3090805@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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