<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/of_address.h, branch v3.14.79</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.79</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.79'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-10-10T01:04:10Z</updated>
<entry>
<title>of: move of_translate_dma_address to of_address.h</title>
<updated>2013-10-10T01:04:10Z</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-09-17T02:05:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d0dfa16a600190d142f7538e5909d13c35b60d98'/>
<id>urn:sha1:d0dfa16a600190d142f7538e5909d13c35b60d98</id>
<content type='text'>
of_translate_dma_address is implemented in common code, so move the
declaration there too.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: linuxppc-dev@lists.ozlabs.org
</content>
</entry>
<entry>
<title>of: move of_address_to_resource and of_iomap declarations from sparc</title>
<updated>2013-10-10T01:04:09Z</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-09-17T02:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4acf4b9cd4534aaa9102004937e1ba79da01d008'/>
<id>urn:sha1:4acf4b9cd4534aaa9102004937e1ba79da01d008</id>
<content type='text'>
Move of_address_to_resource and of_iomap declarations to common code. These
only differ on sparc, but the declarations are the same and don't need to
be in arch header.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: sparclinux@vger.kernel.org
</content>
</entry>
<entry>
<title>of: implement pci_address_to_pio as weak function</title>
<updated>2013-10-10T01:04:06Z</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-09-07T19:07:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=25ff79443cbfa924b8df1d4a8a0fbff83816938a'/>
<id>urn:sha1:25ff79443cbfa924b8df1d4a8a0fbff83816938a</id>
<content type='text'>
Implement pci_address_to_pio as weak function to remove the dependency on
asm/prom.h. This is in preparation to make prom.h optional.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Michal Simek &lt;monstr@monstr.eu&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: x86@kernel.org
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>of/pci: Provide support for parsing PCI DT ranges property</title>
<updated>2013-05-19T20:29:55Z</updated>
<author>
<name>Andrew Murray</name>
<email>Andrew.Murray@arm.com</email>
</author>
<published>2013-05-16T15:55:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=29b635c00f3ebcdaf7a52c4948f6d948ad3757d3'/>
<id>urn:sha1:29b635c00f3ebcdaf7a52c4948f6d948ad3757d3</id>
<content type='text'>
This patch factors out common implementation patterns to reduce overall kernel
code and provide a means for host bridge drivers to directly obtain struct
resources from the DT's ranges property without relying on architecture specific
DT handling. This will make it easier to write archiecture independent host bridge
drivers and mitigate against further duplication of DT parsing code.

This patch can be used in the following way:

	struct of_pci_range_parser parser;
	struct of_pci_range range;

	if (of_pci_range_parser_init(&amp;parser, np))
		; //no ranges property

	for_each_of_pci_range(&amp;parser, &amp;range) {

		/*
			directly access properties of the address range, e.g.:
			range.pci_space, range.pci_addr, range.cpu_addr,
			range.size, range.flags

			alternatively obtain a struct resource, e.g.:
			struct resource res;
			of_pci_range_to_resource(&amp;range, np, &amp;res);
		*/
	}

Additionally the implementation takes care of adjacent ranges and merges them
into a single range (as was the case with powerpc and microblaze).

Signed-off-by: Andrew Murray &lt;Andrew.Murray@arm.com&gt;
Signed-off-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Reviewed-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Tested-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Tested-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Tested-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
</content>
</entry>
<entry>
<title>of/address: sparc: Declare of_iomap as an extern function for sparc again</title>
<updated>2012-11-23T22:01:15Z</updated>
<author>
<name>Andreas Larsson</name>
<email>andreas@gaisler.com</email>
</author>
<published>2012-11-23T11:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e622d39197f0b64b9e043fe75ac3634bf9f3a05'/>
<id>urn:sha1:0e622d39197f0b64b9e043fe75ac3634bf9f3a05</id>
<content type='text'>
This bug-fix makes sure that of_iomap is defined extern for sparc so that the
sparc-specific implementation of_iomap is once again used when including
include/linux/of_address.h in a sparc context. OF_GPIO that is now available for
sparc relies on this.

The bug was inadvertently introduced in a850a75, "of/address: add empty static
inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when
!CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but
there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.

This fix takes the same approach as 0bce04b that solved the equivalent problem
for of_address_to_resource.

Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Acked-by: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again</title>
<updated>2012-11-10T00:30:50Z</updated>
<author>
<name>Andreas Larsson</name>
<email>andreas@gaisler.com</email>
</author>
<published>2012-11-06T00:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0bce04be442cf4d6e4ba9dac2f0a4c5ee88af5c5'/>
<id>urn:sha1:0bce04be442cf4d6e4ba9dac2f0a4c5ee88af5c5</id>
<content type='text'>
This bug-fix makes sure that of_address_to_resource is defined extern for sparc
so that the sparc-specific implementation of of_address_to_resource() is once
again used when including include/linux/of_address.h in a sparc context. A
number of drivers in mainline relies on this function working for sparc.

The bug was introduced in a850a7554442f08d3e910c6eeb4ee216868dda1e, "of/address:
add empty static inlines for !CONFIG_OF". Contrary to that commit title, the
static inlines are added for !CONFIG_OF_ADDRESS, and CONFIG_OF_ADDRESS is never
defined for sparc. This is good behavior for the other functions in
include/linux/of_address.h, as the extern functions defined in
drivers/of/address.c only gets linked when OF_ADDRESS is configured. However,
for of_address_to_resource there exists a sparc-specific implementation in
arch/sparc/arch/sparc/kernel/of_device_common.c

Solution suggested by: Sam Ravnborg &lt;sam@ravnborg.org&gt;

Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>of/address: sparse fixes</title>
<updated>2012-10-17T20:53:01Z</updated>
<author>
<name>Kim Phillips</name>
<email>kim.phillips@freescale.com</email>
</author>
<published>2012-10-09T00:41:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=47b1e689db637ca6778c49d6c971af928cf0fb1d'/>
<id>urn:sha1:47b1e689db637ca6778c49d6c971af928cf0fb1d</id>
<content type='text'>
drivers/of/address.c:66:29: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:66:29:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:66:29:    got unsigned int [usertype] *addr
drivers/of/address.c:87:32: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:87:32:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:87:32:    got unsigned int [usertype] *addr
drivers/of/address.c:91:30: warning: incorrect type in assignment (different base types)
drivers/of/address.c:91:30:    expected unsigned int [unsigned] [usertype] &lt;noident&gt;
drivers/of/address.c:91:30:    got restricted __be32 [usertype] &lt;noident&gt;
drivers/of/address.c:92:22: warning: incorrect type in assignment (different base types)
drivers/of/address.c:92:22:    expected unsigned int [unsigned] [usertype] &lt;noident&gt;
drivers/of/address.c:92:22:    got restricted __be32 [usertype] &lt;noident&gt;
drivers/of/address.c:147:35: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:147:35:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:147:35:    got unsigned int [usertype] *addr
drivers/of/address.c:157:34: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:157:34:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:157:34:    got unsigned int [usertype] *
drivers/of/address.c:256:29: warning: restricted __be32 degrades to integer
drivers/of/address.c:256:36: warning: restricted __be32 degrades to integer
drivers/of/address.c:262:34: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:262:34:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:262:34:    got unsigned int [usertype] *
drivers/of/address.c:372:41: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:372:41:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:372:41:    got unsigned int [usertype] *addr
drivers/of/address.c:395:53: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:395:53:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:395:53:    got unsigned int [usertype] *addr
drivers/of/address.c:443:50: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:443:50:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:443:50:    got unsigned int *&lt;noident&gt;
drivers/of/address.c:455:49: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:455:49:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:455:49:    got unsigned int *&lt;noident&gt;
drivers/of/address.c:480:60: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:480:60:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:480:60:    got unsigned int *&lt;noident&gt;
drivers/of/address.c:412:5: warning: symbol '__of_translate_address' was not declared. Should it be static?
drivers/of/address.c:520:14: error: symbol 'of_get_address' redeclared with different type (originally declared at include/linux/of_address.h:22) - different base types

Signed-off-by: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>of: Allow busses with #size-cells=0</title>
<updated>2012-08-03T13:01:46Z</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-07-25T23:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d61b165c892853f2daf6220d2ec6577487e273a'/>
<id>urn:sha1:5d61b165c892853f2daf6220d2ec6577487e273a</id>
<content type='text'>
It's quite legitimate for a DT node to specify #size-cells=0. One example
is a node that's used to collect a number of non-memory-mapped devices.
In that scenario, there may be multiple child nodes with the same name
(type) thus necessitating the use of unit addresses in node names, and
reg properties:

/ {
	regulators {
		compatible = "simple-bus";
		#address-cells = &lt;1&gt;;
		#size-cells = &lt;0&gt;;

		regulator@0 {
			compatible = "regulator-fixed";
			reg = &lt;0&gt;;
			...
		};

		regulator@1 {
			compatible = "regulator-fixed";
			reg = &lt;1&gt;;
			...
		};

		...
	};
};

However, #size-cells=0 prevents translation of reg property values into
the parent node's address space. In turn, this triggers the kernel to
emit error messages during boot, such as:

    prom_parse: Bad cell count for /regulators/regulator@0

To prevent printing these error messages for legitimate DT content, a
number of changes are made:

1) of_get_address()/of_get_pci_address() are modified only to validate
   the value of #address-cells, and not #size-cells.

2) of_can_translate_address() is added to indicate whether address
   translation is possible.

3) of_device_make_bus_id() is modified to name devices based on the
   translated address only where possible, and otherwise fall back to
   using the (first cell of the) raw untranslated address.

4) of_device_alloc() is modified to create memory resources for a device
   only if the address can be translated into the CPU's address space.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>of/address: add empty static inlines for !CONFIG_OF</title>
<updated>2012-02-16T13:11:23Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-02-14T21:06:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a850a7554442f08d3e910c6eeb4ee216868dda1e'/>
<id>urn:sha1:a850a7554442f08d3e910c6eeb4ee216868dda1e</id>
<content type='text'>
As the title says, this patch adds empty implementations for the address
translation functions so that they can be used when CONFIG_OF is disabled.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>dt: include linux/errno.h in linux/of_address.h</title>
<updated>2011-07-18T22:37:45Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-07-06T05:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=99ce39e359fa29e4b609a6a13485e7573eda5dfb'/>
<id>urn:sha1:99ce39e359fa29e4b609a6a13485e7573eda5dfb</id>
<content type='text'>
of_address.h makes reference to some of the error code #defines, so it
needs to include errno.h.  If CONFIG_PCI is not selected, then some files
will fail to compile.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
</feed>
