aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/prom.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-08-07[SPARC]: Centralize find_in_proplist() instead of duplicating N times.David S. Miller1-0/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-20[SPARC]: Fix serial console device detection.David S. Miller1-0/+4
The current scheme works on static interpretation of text names, which is wrong. The output-device setting, for example, must be resolved via an alias or similar to a full path name to the console device. Paths also contain an optional set of 'options', which starts with a colon at the end of the path. The option area is used to specify which of two serial ports ('a' or 'b') the path refers to when a device node drives multiple ports. 'a' is assumed if the option specification is missing. This was caught by the UltraSPARC-T1 simulator. The 'output-device' property was set to 'ttya' and we didn't pick upon the fact that this is an OBP alias set to '/virtual-devices/console'. Instead we saw it as the first serial console device, instead of the hypervisor console. The infrastructure is now there to take advantage of this to resolve the console correctly even in multi-head situations in fbcon too. Thanks to Greg Onufer for the bug report. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-20Consolidate of_find_node_by routinesStephen Rothwell1-0/+1
This consolidates the routines of_find_node_by_path, of_find_node_by_name, of_find_node_by_type and of_find_compatible_device. Again, the comparison of strings are done differently by Sparc and PowerPC and also these add read_locks around the iterations. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
2007-07-20Consolidate of_get_parentStephen Rothwell1-0/+9
This requires creating dummy of_node_{get,put} routines for sparc and sparc64. It also adds a read_lock around the parent accesses. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
2007-07-20Consolidate of_find_propertyStephen Rothwell1-0/+1
The only change here is that a readlock is taken while the property list is being traversed on Sparc where it was not taken previously. Also, Sparc uses strcasecmp to compare property names while PowerPC uses strcmp. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
2007-07-20Consolidate of_device_is_compatibleStephen Rothwell1-0/+2
The only difference here is that Sparc uses strncmp to match compatibility names while PowerPC uses strncasecmp. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
2007-07-20Start split out of common open firmware codeStephen Rothwell1-0/+3
This creates drivers/of/base.c (depending on CONFIG_OF) and puts the first trivially common bits from the prom.c files into it. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
2007-07-20Split out common parts of prom.hStephen Rothwell1-40/+6
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: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
2007-04-26[SPARC]: Make device_node name and type constStephen Rothwell1-2/+2
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-26[SPARC]: constify some paramaters of OF routinesStephen Rothwell1-4/+6
This starts bringing the PowerPC and Sparc implemetations back closer together. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-26[SPARC/64]: constify of_get_property returnStephen Rothwell1-1/+1
Finally, we actually change the functions themselves. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-02[SPARC]: Provide 'get_property()' alias for of_get_property().David S. Miller1-0/+1
Another powerpc compatibility item, this will allow us to share more code with them. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC]: Kill interrupt stuff and linux_phandle from device_node.David S. Miller1-8/+0
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC]: Beginnings of generic of_device framework.David S. Miller1-0/+2
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: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC]: Add of_n_{addr,size}_cells().David S. Miller1-0/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-25[SPARC]: Add unique device_node IDs and a ".node" property.David S. Miller1-0/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-25[SPARC]: Add of_set_property() interface.David S. Miller1-0/+8
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-23[SPARC]: Port sparc64 in-kernel device tree code to sparc32.David S. Miller1-0/+98
Signed-off-by: David S. Miller <davem@davemloft.net>