[PATCH 1/1] dt: Add general DMA window parser
Thierry Reding
thierry.reding at avionic-design.de
Thu Apr 19 05:39:45 EST 2012
* Stephen Warren wrote:
> On 04/18/2012 04:19 AM, Hiroshi Doyu wrote:
>
> > Subject: [PATCH 1/1] dt: Add general DMA window parser
> >
> > This code was stolen from:
> > "arch/microblaze/kernel/prom_parse.c"
> > "arch/powerpc/kernel/prom_parse.c"
> >
> > Once "ibm," prefix is removed from dts file. This generic one could
> > replace the originals.
>
> > +extern void of_parse_dma_window(struct device_node *dn,
> > + const void *dma_window_prop, unsigned long *busno,
> > + unsigned long *phys, unsigned long *size);
>
> At least some other of_*() parsing functions take the property name
> rather than the property pointer, and also take an index into the
> property in order to support multiple entries in it. See for example
> of_parse_phandle and of_get_named_gpio_flags. Should this new API be
> similar? E.g.:
>
> extern void of_parse_dma_window(struct device_node *np,
> const char *propname, int index,
> unsigned long *busno,
> unsigned long *phys, unsigned long *size);
In that case the function should return int for proper error handling.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20120418/fa4e567b/attachment.sig>
More information about the devicetree-discuss
mailing list