- 22 1月, 2011 1 次提交
-
-
由 Grant Likely 提交于
Having conditional around the of_match_table and the of_node pointers turns out to make driver code use ugly #ifdef blocks. Drop the conditionals and remove the #ifdef blocks from the affected drivers. Also tidy up minor whitespace issues within the same hunks. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 30 7月, 2010 1 次提交
-
-
由 Grant Likely 提交于
of_node_to_nid() is only relevant in a few architectures. Don't force everyone to implement it anyway. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 15 7月, 2010 1 次提交
-
-
由 Andres Salomon 提交于
Rename is_root_node() to of_node_is_root() and make it available for all archs to use, as it's not PROM-specific. Signed-off-by: NAndres Salomon <dilinger@queued.net> Acked-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 18 3月, 2010 1 次提交
-
-
由 Grant Likely 提交于
Commit 7c7b60cb "of: put default string compare and #a/s-cell values into common header" Breaks various things on powerpc due to using strncasecmp instead of strcasecmp for comparing against "compatible" strings. This causes things like the 4xx PCI code to fail miserably due to the partial matches in code like this: for_each_compatible_node(np, NULL, "ibm,plb-pcix") ppc4xx_probe_pcix_bridge(np); for_each_compatible_node(np, NULL, "ibm,plb-pci") ppc4xx_probe_pci_bridge(np); It's not quite right to do partial name match. Entries in a compatible list are meant to be matched whole. If a device is compatible with both "foo" and "foo1", then the device should have both strings in its "compatible" property. This patch reverts powerpc and microblaze us to use strcasecmp. Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> (for patch description) Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NMichal Simek <michal.simek@petalogix.com>
-
- 15 2月, 2010 1 次提交
-
-
由 Grant Likely 提交于
Both allnodes and devtree_lock are defined in common code. The extern declaration should be in the common header too so that the compiler can type check. allnodes is already in of.h, but devtree_lock should be declared there too. This patch removes the SPARC declarations and uses decls in of.h instead. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
- 14 2月, 2010 4 次提交
-
-
由 Grant Likely 提交于
Rather than defining of_chosen in each arch, it can be defined for all in driver/of/base.c Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu>
-
由 Grant Likely 提交于
Most architectures don't need to change these. Put them into common code to eliminate some duplication Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu>
-
由 Jeremy Kerr 提交于
For platforms that have CONFIG_OF optional, we need to make the contents of linux/of.h conditional on CONFIG_OF. Signed-off-by: NJeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu>
-
由 Grant Likely 提交于
The following functions don't exist: finish_device_tree() print_properties() prom_n_intr_cells() prom_get_irq_senses() The following functions are in drivers/of/base.c, so the declaration belongs in of.h instead of of_fdt.h of_machine_is_compatible() prom_add_property() prom_remove_property() prom_update_property() Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu>
-
- 09 2月, 2010 3 次提交
-
-
由 Jeremy Kerr 提交于
Currently, we're using u32 for cell values, and hence assuming host-endian device trees. As we'd like to support little-endian platforms, use a __be32 for cell values, and convert in the cell accessors. Signed-off-by: NJeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Jeremy Kerr 提交于
We only need set_node_proc_entry in proc_devtree.c, so move it there. This fixes the !HAVE_ARCH_DEVTREE_FIXUPS build, as we can't make make the definition in linux/of.h conditional on this #define (definitions in asm/prom.h can't be exposed to linux/of.h, due to the enforced #include ordering). Signed-off-by: NJeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
Merge common code between PowerPC and Microblaze Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Tested-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 29 1月, 2010 1 次提交
-
-
由 Grant Likely 提交于
In struct device_node, the phandle is named 'linux_phandle' for PowerPC and MicroBlaze, and 'node' for SPARC. There is no good reason for the difference, it is just an artifact of the code diverging over a couple of years. This patch renames both to simply .phandle. Note: the .node also existed in PowerPC/MicroBlaze, but the only user seems to be arch/powerpc/platforms/powermac/pfunc_core.c. It doesn't look like the assignment between .linux_phandle and .node is significantly different enough to warrant the separate code paths unless ibm,phandle properties actually appear in Apple device trees. I think it is safe to eliminate the old .node property and use phandle everywhere. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Tested-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 24 11月, 2009 2 次提交
-
-
由 Grant Likely 提交于
Special case of of_read_ulong() was defined for PPC32 to toss away all but the last 32 bits when a large number value was read, and the 'normal' version for ppc64 just #defined of_read_ulong to of_read_number which causes compiler warnings on MicroBlaze and other 32 bit architectures because it returns a u64 instead of a ulong. This patch fixes the problem by defining a common implementation of of_read_ulong() that works everywhere. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Reviewed-by: NWolfram Sang <w.sang@pengutronix.de> Tested-by: NMichal Simek <monstr@monstr.eu>
-
由 Grant Likely 提交于
Merge common code between PowerPC and MicroBlaze Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Reviewed-by: NWolfram Sang <w.sang@pengutronix.de> Tested-by: NMichal Simek <monstr@monstr.eu>
-
- 16 10月, 2009 7 次提交
-
-
由 Grant Likely 提交于
Merge common code between Microblaze and PowerPC, and make it available to Sparc Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
由 Grant Likely 提交于
Merge common code between Sparc, PowerPC and Microblaze. Sparc differs in the implementation at this point, so this patch uses a #ifdef to handle sparc differently for now. The merging of implementations will occur in a later patch Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
由 Grant Likely 提交于
Merge common code between Microblaze and PowerPC Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
由 Grant Likely 提交于
Merge common code between PowerPC and Microblaze Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
由 Grant Likely 提交于
Merge of common code duplicated between Sparc, PowerPC and Microblaze Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
由 Grant Likely 提交于
Merge of common code duplicated between Sparc, PowerPC and Microblaze Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
由 Grant Likely 提交于
Merge of common code duplicated between Sparc, PowerPC and Microblaze Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
- 27 4月, 2009 1 次提交
-
-
由 Grant Likely 提交于
of_parse_phandle() is a helper function to read and parse a phandle property and return a pointer to the resulting device_node. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 19 11月, 2008 1 次提交
-
-
由 Michael Ellerman 提交于
This commit adds a routine for finding a device node which has a certain property. The contents of the property are not taken into account, merely the presence or absence of the property. Based on that routine, we add a for_each_ macro for iterating over all nodes that have a certain property. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 13 10月, 2008 1 次提交
-
-
由 Anton Vorontsov 提交于
The helper is factored out of of_get_gpio(). Will be used by the QE pin multiplexing functions (they need to parse the gpios = <> too). Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 26 7月, 2008 1 次提交
-
-
由 Grant Likely 提交于
SPI has a similar problem as I2C in that it needs to determine an appropriate modalias value for each device node. This patch adapts the of_i2c of_find_i2c_driver() function to be usable by of_spi also. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 07 4月, 2008 1 次提交
-
-
由 Josh Boyer 提交于
IEEE 1275 defined a standard "status" property to indicate the operational status of a device. The property has four possible values: okay, disabled, fail, fail-xxx. The absence of this property means the operational status of the device is unknown or okay. This adds a function called of_device_is_available that checks the state of the status property of a device. If the property is absent or set to either "okay" or "ok", it returns 1. Otherwise it returns 0. Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 06 2月, 2008 1 次提交
-
-
由 Michael Ellerman 提交于
Iterating through a device node's parents is simple enough, but dealing with the refcounts properly is a little ugly, and replicating that logic is asking for someone to get it wrong or forget it all together, eg: while (dn != NULL) { /* loop body */ tmp = of_get_parent(dn); of_node_put(dn); dn = tmp; } So add of_get_next_parent(), inspired by of_get_next_child(). The contract is that it returns the parent and drops the reference on the current node, this makes the loop look like: while (dn != NULL) { /* loop body */ dn = of_get_next_parent(dn); } Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Acked-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 17 1月, 2008 1 次提交
-
-
由 Grant Likely 提交于
Similar to of_find_compatible_node(), of_find_matching_node() and for_each_matching_node() allow you to iterate over the device tree looking for specific nodes, except that they take of_device_id tables instead of strings. This also moves of_match_node() from driver/of/device.c to driver/of/base.c to colocate it with the of_find_matching_node which depends on it. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 11 12月, 2007 1 次提交
-
-
由 Michael Ellerman 提交于
Add for_each_child_of_node() to encapsulate the common idiom of iterating over the children of a device_node. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Acked-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 20 10月, 2007 1 次提交
-
-
由 Jiri Slaby 提交于
remove asm/bitops.h includes including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly. Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 17 8月, 2007 1 次提交
-
-
由 Stephen Rothwell 提交于
They were only needed for backwards compatibility and all in tree uses have now been changed. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 20 7月, 2007 1 次提交
-
-
由 Stephen Rothwell 提交于
This creates linux/of.h and includes asm/prom.h from it. We also include linux/of.h from asm/prom.h while we transition. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NPaul Mackerras <paulus@samba.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
- 26 4月, 2007 3 次提交
-
-
由 Stephen Rothwell 提交于
Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stephen Rothwell 提交于
This starts bringing the PowerPC and Sparc implemetations back closer together. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stephen Rothwell 提交于
Finally, we actually change the functions themselves. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 03 3月, 2007 1 次提交
-
-
由 David S. Miller 提交于
Another powerpc compatibility item, this will allow us to share more code with them. Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 30 6月, 2006 3 次提交
-
-
由 David S. Miller 提交于
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
The idea is to fully construct the device register and interrupt values into these of_device objects, and convert all of SBUS, EBUS, ISA drivers to use this new stuff. Much ideas and code taken from Ben H.'s powerpc work. Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-