<feed xmlns='http://www.w3.org/2005/Atom'>
<title>snowball/igloo-kernel.git/drivers/of, branch u0</title>
<subtitle>Igloo kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/atom?h=u0</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/atom?h=u0'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/'/>
<updated>2011-03-29T03:20:53+00:00</updated>
<entry>
<title>dt: add of_platform_prepare() to match nodes with static platform_devices</title>
<updated>2011-03-29T03:20:53+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-03-29T03:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=c3cf74a53764b234937837e8be0a10cdb6d5ca40'/>
<id>urn:sha1:c3cf74a53764b234937837e8be0a10cdb6d5ca40</id>
<content type='text'>
This patch implements an alternate method for using device tree data
for populating machine device registration.  Traditionally, board
support has directly generated and registered devices based on nodes
in the device tree.  The board support code starts at the root of the
tree and begins allocating devices for each device node it finds.
Similarly, bus drivers (i2c, spi, etc.) use their child nodes to
register child devices.  This model can be seen in almost all the powerpc
board ports (arch/powerpc/platforms/*).

However, for many of the ARM SoCs, there already exists complete board
support for many SoCs that have their own code for registering the
basic set of platform devices with non-trivial dependencies on clock
structure and machine specific platform code.  While starting at the
base of the tree and working up is certainly possible, it requires
modifying a lot of machine support code to get it working.

This patch adds the function of_platform_prepare() to declare which
nodes will be used to create platform_devices without actually
creating them yet.  Then it uses a bus notifier to inspect
platform_device registrations.  If any match a node declared with
of_platform_prepare(), it will set the of_node pointer before the
device gets bound to a driver, making the device tree data available
at probe time.

After all the static devices are registered, the platform code can
still call either of_platform_populate or of_platform_bus_probe() on
the same nodes that were declared with of_platform_prepare().  Any
nodes that *were not* matched to a static platform_device will get
created in the normal way.

Note: Board ports using this facility are still required to provide a
fully populated device tree blob.  It is not a shortcut to providing
an accurate device tree model of the machine to the point that it
would be reasonably possible to switch to a direct registration model
for all devices without change the device tree.  ie. The SoC still
needs to be correctly identified and there should be nodes for all the
discrete devices.

v2: Complete revamp to make of_platform_populate() and
of_platform_bus_probe() respect the prepared nodes.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>dt: add of_platform_populate() for creating device from the device tree</title>
<updated>2011-03-29T03:20:47+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-03-29T03:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=3a1a90a4cf4f0870bb6ee8065092e2c0ea7d72aa'/>
<id>urn:sha1:3a1a90a4cf4f0870bb6ee8065092e2c0ea7d72aa</id>
<content type='text'>
of_platform_populate() is similar to of_platform_bus_probe() except
that it strictly enforces that all device nodes must have a compatible
property, and it can be used to register devices (not buses) which are
children of the root node.

This patch also modifies MPC5200 support to use the new function.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>dt: eliminate OF_NO_DEEP_PROBE and test for NULL match table</title>
<updated>2011-03-29T03:20:43+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-03-29T03:20:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=e0ceac7b1e4b89519b8bfd711b128560a5b2deea'/>
<id>urn:sha1:e0ceac7b1e4b89519b8bfd711b128560a5b2deea</id>
<content type='text'>
There are no users of OF_NO_DEEP_PROBE, and of_match_node() now
gracefully handles being passed a NULL pointer, so the checks at the
top of of_platform_bus_probe can be dropped.

While at it, consolidate the root node pointer check to be easier to
read and tidy up related comments.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>dt: protect against NULL matches passed to of_match_node()</title>
<updated>2011-03-29T03:20:40+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-03-29T03:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=1a16467e29a975f4dda1ccd3c6d12f9bea150743'/>
<id>urn:sha1:1a16467e29a975f4dda1ccd3c6d12f9bea150743</id>
<content type='text'>
There are a few use cases where it is convenient to pass NULL to
of_match_node() and have it fail gracefully.  The patch adds a null
check to the beginning so taht it does so.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>dt: Refactor of_platform_bus_probe()</title>
<updated>2011-03-29T03:20:32+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-03-29T03:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=041f8f6586a8e5171fe2d5a3ca6595fa939b34da'/>
<id>urn:sha1:041f8f6586a8e5171fe2d5a3ca6595fa939b34da</id>
<content type='text'>
The current implementation uses three copies of of basically identical
code.  This patch consolidates them to make the code simpler.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/promtree: allow DT device matching by fixing 'name' brokenness (v5)</title>
<updated>2011-03-02T20:45:19+00:00</updated>
<author>
<name>Andres Salomon</name>
<email>dilinger@queued.net</email>
</author>
<published>2011-02-24T06:38:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=a74ea43df1afc68f265c0ac2cb64031d855ae97b'/>
<id>urn:sha1:a74ea43df1afc68f265c0ac2cb64031d855ae97b</id>
<content type='text'>
Commit e2f2a93b, "of/promtree: add package-to-path support to pdt"
changed dp-&gt;name from using the 'name' property to using
package-to-path.  This fixed /proc/device-tree creation by eliminating
conflicts between names (the 'name' property provides names like
'battery', whereas package-to-path provides names like
'/foo/bar/battery@0', which we stripped to 'battery@0').  However, it
also breaks of_device_id table matching.

The fix that we _really_ wanted was to keep dp-&gt;name based upon
the name property ('battery'), but based dp-&gt;full_name upon
package-to-path ('battery@0').  This patch does just that.

This changes all users (except SPARC) of promtree to use the full
result from package-to-path for full_name, rather than stripping the
directory out.  In practice, the strings end up being exactly the
same; this change saves time, code, and memory.

SPARC continues to use the existing build_path_component() code.

v2: combine two patches and revert of_pdt_node_name to original version
v3: use dp-&gt;phandle instead of passing around node
v4: warn/bail out for non-sparc archs if pkg2path is not set
v5: split of_pdt_build_full_name into sparc &amp; non-sparc versions
v6: Pass NULL to pkg2path before buf gets assigned.
    Drop check for pkg2path hook on each and every node.
v7: Don't BUG() when unable to get the full_path; create a
    known-unique name instead.

Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>dt/flattree: Return virtual address from early_init_dt_alloc_memory_arch()</title>
<updated>2011-01-16T05:01:58+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-01-13T22:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=672c54466d24994eb9633f993862c89539504a42'/>
<id>urn:sha1:672c54466d24994eb9633f993862c89539504a42</id>
<content type='text'>
The physical address is never used by the device tree code when
allocating memory for unflattening.  Change the architecture's alloc
hook to return the virutal address instead.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6</title>
<updated>2011-01-10T16:57:03+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-10T16:57:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281'/>
<id>urn:sha1:0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281</id>
<content type='text'>
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
  of/flattree: forward declare struct device_node in of_fdt.h
  ipmi: explicitly include of_address.h and of_irq.h
  sparc: explicitly cast negative phandle checks to s32
  powerpc/405: Fix missing #{address,size}-cells in i2c node
  powerpc/5200: dts: refactor dts files
  powerpc/5200: dts: Change combatible strings on localbus
  powerpc/5200: dts: remove unused properties
  powerpc/5200: dts: rename nodes to prepare for refactoring dts files
  of/flattree: Update dtc to current mainline.
  of/device: Don't register disabled devices
  powerpc/dts: fix syntax bugs in bluestone.dts
  of: Fixes for OF probing on little endian systems
  of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
  of/flattree: Add of_flat_dt_match() helper function
  of_serial: explicitly include of_irq.h
  of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
  of/flattree: Reorder unflatten_dt_node
  of/flattree: Refactor unflatten_dt_node
  of/flattree: Add non-boottime device tree functions
  of/flattree: Add Kconfig for EARLY_FLATTREE
  ...

Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.
</content>
</entry>
<entry>
<title>of/device: Don't register disabled devices</title>
<updated>2011-01-03T23:02:49+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-01-03T22:51:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=cd1e65044d4473cca9a01bae7b7938f065044a4b'/>
<id>urn:sha1:cd1e65044d4473cca9a01bae7b7938f065044a4b</id>
<content type='text'>
Device nodes with the property status="disabled" are not usable and so
don't register them when parsing the device tree for devices.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Hollis Blanchard &lt;hollis_blanchard@mentor.com&gt;
Cc: Deepak Saxena &lt;deepak_saxena@mentor.com&gt;
Cc: Scott Wood &lt;scottwood@freescale.com&gt;,
Cc: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>of/flattree: Add of_flat_dt_match() helper function</title>
<updated>2011-01-01T20:03:25+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-10-30T15:49:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c'/>
<id>urn:sha1:a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c</id>
<content type='text'>
This patch adds of_flat_dt_match() which tests a node for
compatibility with a list of values and converts the relevant powerpc
platform code to use it.  This approach simplifies the board support
code a bit.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Reviewed-by: Stephen Neuendorffer &lt;stephen.neuendorffer@xilinx.com&gt;
</content>
</entry>
</feed>
