Thread (1 message) 1 message, 1 author, 2012-04-19

[PATCH 1/1] dt: Add general DMA window parser

From: Hiroshi Doyu <hidden>
Date: 2012-04-19 12:19:20
Also in: linux-devicetree, linux-iommu, linux-tegra

On Wed, 18 Apr 2012 19:27:58 +0200
Stephen Warren [off-list ref] wrote:
On 04/18/2012 04:19 AM, Hiroshi Doyu wrote:
quoted
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.
It seems that the "ibm," prefix is not used in .dts files, but it
comes from the PAPR compliant firmware and cannot be changed.

The easiest solution would be to make the function understand both
variants.
quoted
+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);
At least, I can add the code checking the return value of this
function, which won't change the existing code.

Does anyone know the format of "ibm,dma-window"?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help