<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/of_address.h, branch v3.10.44</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.44</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.44'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-11-23T22:01:15Z</updated>
<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>
<entry>
<title>of/address: Add of_find_matching_node_by_address helper</title>
<updated>2011-07-18T22:32:26Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-07-06T05:42:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=90e33f62e027d330485d03598e1b2d8db3ff031c'/>
<id>urn:sha1:90e33f62e027d330485d03598e1b2d8db3ff031c</id>
<content type='text'>
of_find_matching_node_by_address() can be used to find a device tree
node for a device at a specific address.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/address: use proper endianess in get_flags</title>
<updated>2010-12-23T22:57:48Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2010-12-01T09:54:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0131d8973c8b9bd9d40fee8fae24eab24821efdb'/>
<id>urn:sha1:0131d8973c8b9bd9d40fee8fae24eab24821efdb</id>
<content type='text'>
This patch changes u32 to __be32 for all "ranges", "prop" and "addr" and
such. Those variables are pointing to the device tree which contains
integers in big endian format.

Most functions are doing it right because of_read_number() is doing the
right thing for them. of_bus_isa_get_flags(), of_bus_pci_get_flags() and
of_bus_isa_map() were accessing the data directly and were doing it wrong.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/address: Clean up function declarations</title>
<updated>2010-08-01T07:42:42Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-07-29T17:49:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=22ae782f86b726f9cea752c0f269ff6dcdf2f6e1'/>
<id>urn:sha1:22ae782f86b726f9cea752c0f269ff6dcdf2f6e1</id>
<content type='text'>
This patch moves the declaration of of_get_address(), of_get_pci_address(),
and of_pci_address_to_resource() out of arch code and into the common
linux/of_address header file.

This patch also fixes some of the asm/prom.h ordering issues.  It still
includes some header files that it ideally shouldn't be, but at least the
ordering is consistent now so that of_* overrides work.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/address: Merge all of the bus translation code</title>
<updated>2010-07-05T22:14:26Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dbbdee94734bf6f1db7af42008a53655e77cab8f'/>
<id>urn:sha1:dbbdee94734bf6f1db7af42008a53655e77cab8f</id>
<content type='text'>
Microblaze and PowerPC share a large chunk of code for translating
OF device tree data into usable addresses.  Differences between the two
consist of cosmetic differences, and the addition of dma-ranges support
code to powerpc but not microblaze.  This patch moves the powerpc
version into common code and applies many of the cosmetic (non-functional)
changes from the microblaze version.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
</content>
</entry>
</feed>
