<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/of/address.c, branch linux-3.4.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>of/address: Don't loop forever in of_find_matching_node_by_address().</title>
<updated>2016-04-27T10:55:16+00:00</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2015-08-19T20:17:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ec62ecdcf609f00b3de511492f305cff47b41f98'/>
<id>ec62ecdcf609f00b3de511492f305cff47b41f98</id>
<content type='text'>
commit 3a496b00b6f90c41bd21a410871dfc97d4f3c7ab upstream.

If the internal call to of_address_to_resource() fails, we end up
looping forever in of_find_matching_node_by_address().  This can be
caused by a defective device tree, or calling with an incorrect
matches argument.

Fix by calling of_find_matching_node() unconditionally at the end of
the loop.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3a496b00b6f90c41bd21a410871dfc97d4f3c7ab upstream.

If the internal call to of_address_to_resource() fails, we end up
looping forever in of_find_matching_node_by_address().  This can be
caused by a defective device tree, or calling with an incorrect
matches argument.

Fix by calling of_find_matching_node() unconditionally at the end of
the loop.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/base: Fix PowerPC address parsing hack</title>
<updated>2015-02-02T09:05:22+00:00</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2014-11-14T06:55:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a36f0b51eb6821dc794a769030bacc5aad8dd8c3'/>
<id>a36f0b51eb6821dc794a769030bacc5aad8dd8c3</id>
<content type='text'>
commit 746c9e9f92dde2789908e51a354ba90a1962a2eb upstream.

We have a historical hack that treats missing ranges properties as the
equivalent of an empty one. This is needed for ancient PowerMac "bad"
device-trees, and shouldn't be enabled for any other PowerPC platform,
otherwise we get some nasty layout of devices in sysfs or even
duplication when a set of otherwise identically named devices is
created multiple times under a different parent node with no ranges
property.

This fix is needed for the PowerNV i2c busses to be exposed properly
and will fix a number of other embedded cases.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 746c9e9f92dde2789908e51a354ba90a1962a2eb upstream.

We have a historical hack that treats missing ranges properties as the
equivalent of an empty one. This is needed for ancient PowerMac "bad"
device-trees, and shouldn't be enabled for any other PowerPC platform,
otherwise we get some nasty layout of devices in sysfs or even
duplication when a set of otherwise identically named devices is
created multiple times under a different parent node with no ranges
property.

This fix is needed for the PowerNV i2c busses to be exposed properly
and will fix a number of other embedded cases.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/address: Add reg-names property to name an iomem resource</title>
<updated>2012-01-04T07:27:22+00:00</updated>
<author>
<name>Benoit Cousson</name>
<email>b-cousson@ti.com</email>
</author>
<published>2011-12-05T14:23:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=35f3da32af0e8970cc41288d4a7e3bd32399900e'/>
<id>35f3da32af0e8970cc41288d4a7e3bd32399900e</id>
<content type='text'>
Add a reg-names property to allow for reg regions to be reference by name
instead of by index.  Some devices have multiple register regions which
are more naturally referenced by name.

If the name is available, use it to name the resource when creating a devices.
Otherwise keep the device name.

Signed-off-by: Benoit Cousson &lt;b-cousson@ti.com&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
[Generalized documentation to be for any -names property]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a reg-names property to allow for reg regions to be reference by name
instead of by index.  Some devices have multiple register regions which
are more naturally referenced by name.

If the name is available, use it to name the resource when creating a devices.
Otherwise keep the device name.

Signed-off-by: Benoit Cousson &lt;b-cousson@ti.com&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
[Generalized documentation to be for any -names property]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: address: use resource_size helper</title>
<updated>2011-08-01T11:55:02+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2011-07-22T19:47:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=28c1b6d60e3ad0aecf48aaefc6995904e2ab1b9e'/>
<id>28c1b6d60e3ad0aecf48aaefc6995904e2ab1b9e</id>
<content type='text'>
that should be the approved way of calculating
the size of resources. No functional changes.

Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
that should be the approved way of calculating
the size of resources. No functional changes.

Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/address: Add of_find_matching_node_by_address helper</title>
<updated>2011-07-18T22:32:26+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-07-06T05:42:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=90e33f62e027d330485d03598e1b2d8db3ff031c'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/address: use proper endianess in get_flags</title>
<updated>2010-12-23T22:57:48+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2010-12-01T09:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0131d8973c8b9bd9d40fee8fae24eab24821efdb'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: use __be32 types for big-endian device tree data</title>
<updated>2010-10-13T03:58:42+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jeremy.kerr@canonical.com</email>
</author>
<published>2010-10-11T03:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a9fadeefdc869ff792591f57a9e33d8790d63292'/>
<id>a9fadeefdc869ff792591f57a9e33d8790d63292</id>
<content type='text'>
Use the sparse annotations so we can keep track of endianness.

Signed-off-by: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the sparse annotations so we can keep track of endianness.

Signed-off-by: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Use full node name in resource structures</title>
<updated>2010-07-05T22:14:27+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d3571c3acfabb6f3a93b517b75d9b30eb7e8692e'/>
<id>d3571c3acfabb6f3a93b517b75d9b30eb7e8692e</id>
<content type='text'>
Resource names appear in human readable output, so when extracting IRQ
and address resources from a device tree node, use the full node name
to give proper context in places like /proc/iomem.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
CC: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resource names appear in human readable output, so when extracting IRQ
and address resources from a device tree node, use the full node name
to give proper context in places like /proc/iomem.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
CC: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org
</pre>
</div>
</content>
</entry>
<entry>
<title>of/address: restrict 'no-ranges' kludge to powerpc</title>
<updated>2010-07-05T22:14:27+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3930f294d081c9e2a65f137a7d5fb6c161e4aa94'/>
<id>3930f294d081c9e2a65f137a7d5fb6c161e4aa94</id>
<content type='text'>
Certain Apple machines don't use the ranges property correctly, but the
workaround should not be applied on other architectures.  This patch
disables the workaround for non-powerpc architectures.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Certain Apple machines don't use the ranges property correctly, but the
workaround should not be applied on other architectures.  This patch
disables the workaround for non-powerpc architectures.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>of/address: little-endian fixes</title>
<updated>2010-07-05T22:14:27+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=154063a9c03d31228b6f9366d2ffc2b7c4961698'/>
<id>154063a9c03d31228b6f9366d2ffc2b7c4961698</id>
<content type='text'>
Fix some endian issues in the OF address translation code.

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: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix some endian issues in the OF address translation code.

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: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;

</pre>
</div>
</content>
</entry>
</feed>
